Skip to content

mikalv/i2p-outproxy-elixir

Repository files navigation

HTTP Proxy

A proxy server. WIP

Dependencies

To run or build the code you must first run

$ mix deps.get

Running

$ mix run --no-halt

will 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.com

Building

To create a release use:

$ mix release

To create a production release use:

$ MIX_ENV=prod mix release

You'll then be able to package up the release folder or run the executable rel/proxy/bin/proxy

Blocking Hosts

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 start

If you want to see the logs use the following instead:

$ rel/proxy/bin/proxy foreground

You can then start up a management console with

$ rel/proxy/bin/proxy remote_console

In 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

About

Elixir HTTP(S) outproxy for I2P - SOCKSv5 will be ready soon.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published