Skip to content

Conversation

@noahlevenson
Copy link
Contributor

@noahlevenson noahlevenson commented Dec 7, 2025

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 the ASSOCIATE command 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

  • there are a few settings remaining to expose to sing-box which cannot be parameterized via JSON -- e.g., the http.Client
  • make it stoppable
  • more end-to-end testing (of both SOCKS5 mode standalone and when integrated with sing-box)
  • test with Radiance and the TUN
  • decide what to do about TLS

@noahlevenson noahlevenson marked this pull request as draft December 7, 2025 21:53
@noahlevenson noahlevenson marked this pull request as ready for review December 14, 2025 19:44
@noahlevenson
Copy link
Contributor Author

This PR has been superseded by getlantern/lantern-box#76

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants