Add SOCKS5 forwarding rules support #96
Open
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.
This work is based on the forwarding rules idea proposed by @ohwgiles in #93.
On top of that initial implementation, this version fixes several functional
issues, improves stability, and adds support for global forwarding rules such as
0.0.0.0:0.Many thanks to @ohwgiles for the original idea.
It is acknowledged that this feature goes somewhat beyond the original design
goals of microsocks as a minimal SOCKS5 server. However, it can be useful in
practical scenarios where selectively forwarding specific destinations via an
upstream SOCKS proxy is required (e.g. accessing services in remote private
networks). This PR is therefore submitted as an optional enhancement for users
who may find it helpful.