Skip to content

Instantly share code, notes, and snippets.

@iwanbk
Last active July 19, 2024 13:44
Show Gist options
  • Save iwanbk/d1f0d76305070f00509e8aee05ff4ed9 to your computer and use it in GitHub Desktop.
Save iwanbk/d1f0d76305070f00509e8aee05ff4ed9 to your computer and use it in GitHub Desktop.
fast sock5
2024-07-17T10:20:54Z ERROR server] Error with reply: Connection refused.
[2024-07-17T10:20:54Z ERROR server] Error with reply: Connection refused.
[2024-07-17T10:21:33Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:33Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:33Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:33Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:33Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:33Z ERROR fast_socks5::server] transfer error: Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }
[2024-07-17T10:21:43Z ERROR server] Error with reply: Connection timeout.
[2024-07-17T10:21:43Z ERROR server] Error with reply: Connection timeout.
[2024-07-17T10:21:47Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:47Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:47Z ERROR fast_socks5::server] transfer error: Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }
[2024-07-17T10:21:47Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:47Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:47Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:47Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:47Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:47Z ERROR server] Malformed request: Connection reset by peer (os error 104)
[2024-07-17T10:21:47Z ERROR server] Malformed request: early eof
[2024-07-17T10:21:48Z ERROR fast_socks5::server] transfer error: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }
[2024-07-17T10:21:48Z ERROR fast_socks5::server] transfer error: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }
[2024-07-17T10:21:53Z ERROR server] Error with reply: Connection timeout.
[2024-07-17T10:21:53Z ERROR server] Error with reply: Connection timeout.
[2024-07-17T10:22:50Z ERROR server] Malformed request: early eof
[2024-07-17T10:22:50Z ERROR server] Malformed request: early eof
[2024-07-17T10:22:50Z ERROR server] Malformed request: early eof
[2024-07-17T10:22:50Z ERROR fast_socks5::server] transfer error: Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }
[2024-07-17T10:22:50Z ERROR fast_socks5::server] transfer error: Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }
[2024-07-17T10:28:00Z ERROR fast_socks5::server] transfer error: Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }
[2024-07-17T10:28:01Z ERROR fast_socks5::server] transfer error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
[2024-07-17T10:28:01Z ERROR fast_socks5::server] transfer error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
[2024-07-17T10:28:01Z ERROR fast_socks5::server] transfer error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
[2024-07-17T10:28:01Z ERROR fast_socks5::server] transfer error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
[2024-07-17T10:28:01Z ERROR fast_socks5::server] transfer error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
[2024-07-17T10:28:01Z ERROR fast_socks5::server] transfer error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
[2024-07-17T10:30:02Z ERROR fast_socks5::server] transfer error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
[2024-07-17T10:30:10Z ERROR fast_socks5::server] transfer error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
[2024-07-17T10:43:33Z ERROR fast_socks5::server] transfer error: Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }
[2024-07-17T10:51:13Z ERROR fast_socks5::server] transfer error: Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }
[2024-07-17T10:51:23Z ERROR server] Malformed request: early eof
[2024-07-17T10:51:35Z ERROR fast_socks5::server] transfer error: Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }

fast-socks5 usage

There will be two parties:

  • proxy node : where we run fast-socks5 proxy
  • client node : where we run our browser

proxy node

run mycelium

mycelium --peers tcp://.....

run fast-socks5:

  • listen on all IPv6 addr, on port 9800
  • without auth
git clone https://github.com/dizda/fast-socks5.git
cd fast-socks5
RUST_LOG=warn cargo run --example server -- --listen-addr [::]:9800 no-auth 

to run with user=admin and password==password

RUST_LOG=warn cargo run --example server -- --listen-addr [::]:9800 password --username admin --password password

notes: the proxy still give error log https://gist.github.com/iwanbk/d1f0d76305070f00509e8aee05ff4ed9#file-error, need to check it

client node

firefox on Mac without auth (Linux / Windows should be similar)

  • go to firefox settings
  • find proxy image
  • fill the configuration. 55b:a38f:f04e:202a:fbad:54db:9adf:c7b8 is the proxy node mycelium IP image
  • check this Proxy DNS when using SOCKS v5 to do DNS resolve from the proxy

That's all

firefox on Mac with auth (Linux / Windows should be similar)

Chome

Chrome requeire us to modify our computer's proxy setting, so it is not recommended for now. Need more tests for this.

Chrome with Auth

currently not supported

Chrome without Auth on Mac & Linux

  • open Chrome "settings"
  • find "proxy" and you will got "Open your computer's proxy settings"
  • fill the proxy settings, without authentication

Android

Chrome

Firefox

iOS

Chrome

Firefox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment