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 PR implements a sing-box outbound for the Unbounded censored peer role. That is -- by adding this outbound to your sing-box configuration, your instance of sing-box runs an Unbounded censored peer client over which you can route sing-box traffic.
Our sing-box outbound uses Unbounded in SOCKS5 mode. That means it must join a network which implements SOCKS5-mode egress servers. Note that SOCKS5 mode was added for the purpose of sing-box integration, and so there's a lot of new bug surface to test beyond what appears in this PR.
Currently, the outbound will only carry TCP (not UDP) traffic. This is because many SOCKS5 implementations (including the very popular
go-socks5) don't support theASSOCIATEcommand for UDP. (If UDP is extremely important to us, the additional work involved is not that significant.) I believe that I've factored the outbound to register itself with sing-box as only available for TCP type traffic, which means that things should Just Work™.TODO