MCPcopy Index your code
hub / github.com/b23r0/rsocx

github.com/b23r0/rsocx @v0.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.3 ↗ · + Follow
7 symbols 11 edges 3 files 0 documented · 0% updated 3y agov0.1.3 · 2022-07-05★ 4184 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

rsocx Build Status ChatOnDiscord Crate

A high performence Socks5 proxy server with bind/reverse support

Features

  • Async
  • Single executable
  • Linux/Windows/Mac/BSD support
  • Support reverse mode(Not bind any port in client)

Build & Run

$> cargo build --release

Installation

$> cargo install rsocx

Usage

Bind Mode

You can run a socks5 proxy and listen port at 1080

$> ./rsocx -l 0.0.0.0:1080

Reverse Mode

First listen a port waiting for slave connection

$> ./rsocx -t 0.0.0.0:8000 -s 0.0.0.0:1080

then reverse connect to master in slave

$> ./cliws -r 127.0.0.1:8000

Benchmark

Simple load test through proxychains4 visit to Tornado's helloworld case in LAN.

import grequests
import time
start = time.time()
req_list = [grequests.get('http://192.168.0.222:8888') for i in range(1000)]
res_list = grequests.map(req_list)
print(time.time()-start)

Test Envoriment

Envoriment Value
Proxy OS Windows11
CPU i7-9700k
Target OS Ubuntu20.04
Network LAN
Target Server Tornado(Python)
Test Count 1k
Socks5 client Proxychains4

Test Result

Project Language Base Take Time
rsocx Rust Async-std 12.90s
rsocx(reverse) Rust Aysnc-std 24.65s
merino Rust Tokio 12.37s
go-socks5 Golang goroutine 12.31s
simple-socks Nodejs async 13.71s
asio5 C++ Boost::Asio 12.37s
esocks Java Thread-Pool 25.06s

(Test Date : 13 Nov 2021)

Socks5 Protocol Support

  • [x] IPV6 Support
  • [ ] SOCKS5 Authentication Methods
  • [x] NOAUTH
  • [ ] USERPASS
  • [ ] SOCKS5 Commands
  • [x] CONNECT
  • [ ] BIND
  • [ ] ASSOCIATE

Reference

  • https://github.com/ajmwagar/merino

  • https://github.com/ylxdzsw/v2socks

Core symbols most depended-on inside this repo

makeword
called by 8
src/utils.rs
usage
called by 2
src/main.rs
socksv5_handle
called by 2
src/socks.rs
tcp_transfer
called by 1
src/socks.rs
main
called by 0
src/main.rs
format_ip_addr
called by 0
src/socks.rs

Shape

Function 6
Enum 1

Languages

Rust100%

Modules by API surface

src/socks.rs4 symbols
src/main.rs2 symbols
src/utils.rs1 symbols

For agents

$ claude mcp add rsocx \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact