Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds SOCKS4/SOCKS4a (CONNECT-only) support to the proxy stack by introducing new client/server handlers and wiring them into TCP handler factories and config enums.
Changes:
- Add
Socks4TcpServerHandlerandSocks4TcpClientHandlerimplementing SOCKS4/SOCKS4a CONNECT. - Extend client/server config enums and TCP handler factories to support
type: socks4. - Add a basic SOCKS4 example configuration.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tcp/tcp_server_handler_factory.rs | Wires ServerProxyConfig::Socks4 to the new SOCKS4 server handler. |
| src/tcp/tcp_client_handler_factory.rs | Wires ClientProxyConfig::Socks4 to the new SOCKS4 client handler (with optional local DNS resolution). |
| src/socks4_handler.rs | Implements SOCKS4/SOCKS4a parsing and request/response handling for CONNECT. |
| src/main.rs | Registers the new socks4_handler module for the binary crate. |
| src/lib.rs | Registers the new socks4_handler module for the library crate. |
| src/config/types/server.rs | Adds ServerProxyConfig::Socks4 { dns_enabled } and display formatting. |
| src/config/types/client.rs | Adds ClientProxyConfig::Socks4 { dns_enabled } and protocol name mapping. |
| examples/socks4_basic.yaml | Provides a sample YAML config using type: socks4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
thanks for the PR! seems reasonable to support socks4/4a. some feedback:
|
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
only CONNECT is supported (no BIND)
this could be added to mixed mode