A proxy server. WIP
To run or build the code you must first run
$ mix deps.get$ mix run --no-haltwill start the proxy server.
The http proxy server can be accessed at 127.0.0.1:4480, while the socks v5 should be availabe at 127.0.0.1:4450.
Another SOCKS v5 example:
$ mix run --no-halt $ # resolve hostname from local $ curl -v --proxy 'socks5://127.0.0.1:4450' google.com $ # resolve hostname from remote $ curl -v --proxy 'socks5h://127.0.0.1:4450' google.comTo create a release use:
$ mix releaseTo create a production release use:
$ MIX_ENV=prod mix releaseYou'll then be able to package up the release folder or run the executable rel/proxy/bin/proxy
You can dynamically block particular hosts using the console. First create a release as described above. Then start up the proxy. If you want it to run in the background use
$ rel/proxy/bin/proxy startIf you want to see the logs use the following instead:
$ rel/proxy/bin/proxy foregroundYou can then start up a management console with
$ rel/proxy/bin/proxy remote_consoleIn the console you can call functions such as
Proxy.BlockList.block "google.com"
Proxy.BlockList.unblock "google.com"
Proxy.BlockList.unblock_all
To save typing fully qualified function names enter import Proxy.BlockList.
Now you can use block unblock unblock_all etc. without typing the module name.
All future requests to hosts specified will be blocked