ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - surik/tunnerl: SOCKS4, SOCKS4a and SOCKS5 protocols implementation in Erlang/OTP.
SOCKS4, SOCKS4a and SOCKS5 protocols implementation in Erlang/OTP. - surik/tunnerl
Visit Site

GitHub - surik/tunnerl: SOCKS4, SOCKS4a and SOCKS5 protocols implementation in Erlang/OTP.

GitHub - surik/tunnerl: SOCKS4, SOCKS4a and SOCKS5 protocols implementation in Erlang/OTP.

Tunnerl - SOCKS Proxy Implementation in Erlang/OTP

Build Status

Tunnerl is a versatile SOCKS4, SOCKS4a, and SOCKS5 proxy protocol implementation in Erlang/OTP. It enables you to create a powerful and flexible proxy server to facilitate secure and efficient communication across various network environments.

Features

tunnerl offers a range of features for proxying TCP connections, making it a valuable tool for network communication. These features include:

  • SOCKS Protocol Support:
    • SOCKS4: A protocol for TCP proxy across firewalls (socks4.protocol).
      • Supports the connect command only.
    • SOCKS 4A: A Simple Extension to SOCKS 4 Protocol (socks4a.protocol).
    • SOCKS Protocol Version 5 (RFC1928):
      • Supports the connect command only.
      • Username/Password Authentication for SOCKS V5 (RFC1929).
      • ATYPs: IPv4, IPv6, and domain.

Getting Started

Follow these steps to integrate Tunnerl into your Erlang or Elixir application:

  1. Add tunnerl to your list of dependencies in rebar.config:
{deps, [
    {tunnerl, "1.0.0"}
]}.
  1. Ensure tunnerl is started before your application:
{applications, [tunnerl]}.
  1. Configure tunnerl to use custom handler::
{tunnerl, [
    {protocols, [socks4, socks5]},
    {handler, myapp_handler},
    {acceptors, 10},
    {ip, {0, 0, 0, 0}},
    {port, 1080}
]}.
  1. Implement your own myapp_handler module. This module defines how tunnerl handles authentication and connection requests based on your application's requirements.
-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(_) -> reject.

handle_command(#{protocol := socks4,
                 command := connect,
                 username := <<"root">>}) ->
    accept;
handle_command(#{protocol := socks5,
                 command := connect,
                 username := <<"user">>}) ->
    accept;
handle_command(_) ->
    reject.

Testing

To test tunnerl, follow these steps:

  1. Clone the tunnerl repository and compile the code:
$ git clone https://github.com/surik/tunnerl.git
$ cd tunnerl
$ rebar3 compile
  1. Run Tunnerl with a predefined configuration that includes SOCKS4 and SOCKS5 support with no authentication:
$ rebar3 shell --name [email protected] --config tunnerl.config --apps tunnerl
  1. You can run a series of common tests to ensure everything is working as expected:
$ rebar3 ct

Note: IPv6 tests may not work on all local machines.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory