Popularity
3.2
Growing
Activity
1.1
Declining
14
3
2
Monthly Downloads: 2
Programming language: Erlang
License: MIT License
Tags:
Networking
tunnerl alternatives and similar packages
Based on the "Networking" category.
Alternatively, view tunnerl alternatives based on common mentions on social networks and blogs.
-
Ockam
Ockam is a suite of tools, programming libraries and infrastructure that make it easy to build devices that communicate securely, privately and trustfully with cloud services and other devices. -
sshkit
An Elixir toolkit for performing tasks on one or more servers, built on top of Erlang’s SSH application.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of tunnerl or a related project?
Popular Comparisons
README
tunnerl
SOCKS4, SOCKS4a and SOCKS5 protocols implementation in Erlang/OTP.
Features
- SOCKS: A protocol for TCP proxy across firewalls: socks4
- connect command only
- SOCKS 4A: A Simple Extension to SOCKS 4 Protocol: socks4a
- SOCKS Protocol Version 5: RFC1928
- connect command only
- Username/Password Authentication for SOCKS V5 RFC1929
- ATYPs: IPv4, IPv6 and domain
Using
- Add
tunnerl
to your list of dependencies in rebar.config:
{deps, [
{tunnerl, "1.0.0"}
]}.
- Ensure
tunnerl
is started before your application:
{applications, [tunnerl]}.
- Configure it to use custom handler::
{tunnerl, [
{protocols, [socks4, socks5]},
{handler, myapp_handler},
{acceptors, 10},
{ip, {0, 0, 0, 0}},
{port, 1080}
]}.
- Implement
myapp_handler
:
-module(myapp_handler).
%% This simple handler module accepts username authentication and
%% allows user with password "pass" do connect command.
%% Also, is accepts all connections on Socks4 for "root".
-export([auth_methods/0,
auth/1,
handle_command/1]).
auth_methods() -> [username].
auth(#{username := <<"user">>,
password := <<"pass">>}) ->
accept;
auth(_) -> rejected.
handle_command(#{protocol := socks4,
command := connect,
username := <<"root">>}) ->
accept;
handle_command(#{protocol := socks5,
command := connect,
username := <<"user">>}) ->
accept;
handle_command(_) ->
reject.
Testing
Build:
$ git clone https://github.com/surik/tunnerl.git
$ cd tunnerl
$ rebar3 compile
Run tunnerl with simple predefined configuration with socks4/socks5 and no authentication
$ rebar3 shell --name [email protected] --config tunnerl.config --apps tunnerl
There is a bunch of common tests which can be running:
$ rebar3 ct
Note that IPv6 tests might not been working on your local machine.