feat(outbound): add optional RESIN_UPSTREAM_PROXY for global node egress - #80
Open
muqing-kg wants to merge 1 commit into
Open
feat(outbound): add optional RESIN_UPSTREAM_PROXY for global node egress#80muqing-kg wants to merge 1 commit into
muqing-kg wants to merge 1 commit into
Conversation
Allow routing every managed node outbound through a configurable SOCKS5/HTTP/HTTPS upstream proxy via an opt-in environment variable. - parse RESIN_UPSTREAM_PROXY and inject a dedicated sing-box outbound - preserve existing node-level detours - auto-register local DNS when the proxy host is a domain - document the option in README and .env.example
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.
Summary
Add an opt-in environment variable
RESIN_UPSTREAM_PROXYthat routes every managed node outbound through a configurable upstream proxy.This is a generic dial-chain option for any SOCKS5/HTTP/HTTPS proxy. It is not tied to a specific product or vendor integration.
Motivation
Some deployments need all managed nodes to egress through an intermediate proxy instead of dialing directly from the Resin host/container.
Today Resin builds node outbounds with direct dialing. Operators who need a shared egress path must either change host networking or rewrite each node config.
This change provides a single opt-in control for that deployment pattern.
What changed
RESIN_UPSTREAM_PROXYsocks5://[user:pass@]host:portsocks5h://[user:pass@]host:porthttp://[user:pass@]host:porthttps://[user:pass@]host:porthost:port(treated as HTTP)DialerOptions.DetourNon-goals
Compatibility
RESIN_UPSTREAM_PROXYpreserves current direct dialing behaviorDocs
.env.exampledocuments the new variableREADME.mdandREADME.zh-CN.mdTest plan
go test ./internal/outbound/ -count=1go test ./internal/config/ -count=1RESIN_UPSTREAM_PROXY=socks5://127.0.0.1:1080and confirm node egress goes through that proxyExample