Code Monkey home page Code Monkey logo

fast-socks5's Introduction

SOCKS5 client/server library using async/.await

License crates.io dependency status Release

Features

  • An async/.await SOCKS5 implementation.
  • An async/.await SOCKS4 Client implementation.
  • An async/.await SOCKS4a Client implementation.
  • No unsafe code
  • Built on-top of tokio library
  • Ultra lightweight and scalable
  • No system dependencies
  • Cross-platform
  • Authentication methods:
    • No-Auth method
    • Username/Password auth method
    • Custom auth methods can be implemented via the Authentication Trait
  • All SOCKS5 RFC errors (replies) should be mapped
  • AsyncRead + AsyncWrite traits are implemented on Socks5Stream & Socks5Socket
  • IPv4, IPv6, and Domains types are supported
  • Config helper for Socks5Server
  • Helpers to run a Socks5Server ร  la "std's TcpStream" via incoming.next().await
  • Examples come with real cases commands scenarios
  • Can disable DNS resolving
  • Can skip the authentication/handshake process, which will directly handle command's request (useful to save useless round-trips in a current authenticated environment)
  • Can disable command execution (useful if you just want to forward the request to a different server)

Install

Open in crates.io.

Examples

Please check examples directory.

# Run client
RUST_LOG=debug cargo run --example client -- --socks-server 127.0.0.1:1337 --username admin --password password -a perdu.com -p 80

# Run server
RUST_LOG=debug cargo run --example server -- --listen-addr 127.0.0.1:1337 password -u admin -p password

# Test it with cURL
curl -v --proxy socks5://admin:[email protected]:1337 https://ipapi.co/json/

TODO

  • Tests have to be implemented
  • Better Rust doc
  • UDP bind command not implemented

Inspired by

Thanks to all these SOCKS5 projects

Further consideration

fast-socks5's People

Contributors

dizda avatar yuguorui avatar glendc avatar yneth avatar sassman avatar amaury1093 avatar alyoshavasilieva avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.