hnwProxy is a proxy server you can use to simulate a broken Internet connection. It was developed as a bachelor's thesis by Eemil Aikio.
hnwProxy uses a simple module system to run scripts that break things. The command proxy show
will list available modules, all of these can be called without arguments for usage information. (more info about modules under guestfiles/proxy_cli)
- Broken MTU
- Port block (drop & tcp rst)
- DNS redirect
- Transparent proxy (http & https)
- Install Vagrant
- Download hnwProxy:
git clone https://github.com/HowNetWorks/hnwProxy.git
- Start hnwProxy with a supported provider.
- Connect.
- Use the command
proxy
to see what you can break in hnwProxy.
hnwProxy supports 3 providers:
- Install VirtualBox
- (optional) Enable bridged networking in
settings.yaml
if you have a wired NIC available. - Run
vagrant up
- Ensure you have one
external
type external switch configured in Hyper-V. - Run
vagrant up
(include--provider=hyperv
if vagrant doesn't recognize this automatically)
- Install DO plugin:
vagrant plugin install vagrant-digitalocean
- Create API token: https://cloud.digitalocean.com/settings/api/tokens
- Add token to
settings.yaml
- (optional) Change DO region in
settings.yaml
. vagrant up --provider=digital_ocean
vagrant ssh -- -D 6000
- Set localhost:6000 as your socks5 proxy.
- Connect via SSH (
vagrant ssh
). proxy pptp
- Connect with the shown settings.
- Stop VM:
vagrant halt
- Delete VM:
vagrant destroy
- Update VM:
vagrant halt && vagrant up --provision
(fast and works most of the time) - Update VM:
vagrant destroy && vagrant up
PS D:\git\hnwProxy> vagrant ssh -- -D 6000
vagrant@hnwproxy:~$ proxy
USAGE
proxy <module_name> [options]
proxy show
OPTIONS
module_name Run this module.
show List available modules.
vagrant@hnwproxy:~$ proxy show
dns-redirect - Redirect DNS requests to another server.
Usage: proxy dns-redirect <ip>
mtu - break mtu
usage: proxy mtu [value]
port - Filters traffic by outgoing destination port.
Run without arguments for usage information.
vagrant@hnwproxy:~$ proxy dns-redirect 127.0.0.1
vagrant@hnwproxy:~$ proxy dns-redirect ::0
vagrant@hnwproxy:~$ proxy dns-redirect show
Redirecting IPv4 DNS requests to 127.0.0.1
Redirecting IPv6 DNS requests to ::
vagrant@hnwproxy:~$ ping google.com
ping: unknown host google.com