SOCKS5 listener #33
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/multiproxy!33
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/socks5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #8.
The new
socks5package serves each SOCKS5 CONNECT as an in-process HTTPCONNECTto anhttp.Handler. The command hands it the same router as the HTTP listener, so routing is shared rather than reimplemented. The tunnel and MITM handlers accept by hijacking and writing200 OK; the server answers the client with SOCKS success in place of that line. Refusals map to reply codes: 403/405 to not allowed, 502 to host unreachable, 504 to TTL expired.Supports CONNECT with no authentication, and IPv4, IPv6 and domain addresses. Tests cover tunnel, MITM, refusal, unreachable hosts and protocol errors, and pass under
-race. A smoke run of the binary with curl--socks5-hostnametunnels and is refused as expected.