-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat(network-proxy): add a SOCKS5 proxy with policy enforcement #9803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
f65edf9
Add codex-network-proxy crate
viyatb-oai eceb76b
use better examples
viyatb-oai 83e8a70
use rama instead of implementing our own proxy stack
viyatb-oai 9b20af6
use a general path
viyatb-oai 127b89b
Merge branch 'main' into pr/network-proxy-crate
viyatb-oai 9d47392
address feedback
viyatb-oai dc063ff
add unit tests and re-add crate back to cargo
viyatb-oai fc35891
fix old artifacts from refactor
viyatb-oai 6f4edec
consolidate docs
viyatb-oai 2d79803
add comments
viyatb-oai 10abb38
tighten escape mechanisms
viyatb-oai 9b2a353
explicitly name controls
viyatb-oai 4f3097b
Merge branch 'main' into pr/network-proxy-crate
viyatb-oai e60d43c
fix cargo shear
viyatb-oai 3e90461
adding back assert_cmd
viyatb-oai ee102bc
fix test
viyatb-oai 310c79e
Merge branch 'main' into pr/network-proxy-crate
viyatb-oai d2042b9
Update network proxy rama deps
viyatb-oai ef2c2d3
Fix CI: cargo-shear, cargo-deny, bazel
viyatb-oai 6ef1dd9
Remove vendored rama-tls-rustls
viyatb-oai a60515b
Install cmake for Bazel CI
viyatb-oai 826e406
Bazel: disable cmake for aws-lc-sys
viyatb-oai 981c7c3
Bazel: drop aws-lc bindgen in rama-crypto
viyatb-oai 74d748c
Patch rama-crypto to drop bindgen
viyatb-oai 0dd7093
Bazel: skip aws-lc-sys memcmp check
viyatb-oai 1906a23
Fix aws-lc-sys patch hunk header
viyatb-oai 0bbe48c
Revert "Fix aws-lc-sys patch hunk header"
viyatb-oai e6194d5
Revert "Bazel: skip aws-lc-sys memcmp check"
viyatb-oai ab28660
Revert "Patch rama-crypto to drop bindgen"
viyatb-oai b49b838
Revert "Bazel: drop aws-lc bindgen in rama-crypto"
viyatb-oai 258b7ec
Revert "Bazel: disable cmake for aws-lc-sys"
viyatb-oai a61ab56
Merge origin/main into pr/network-proxy-crate
viyatb-oai 8f6413c
Bazel: disable cmake for aws-lc-sys
viyatb-oai be94fb6
CI: install libclang for Bazel
viyatb-oai 6c1df8b
Merge origin/main
viyatb-oai cbb5f48
Remove metadata extraction from proxy
viyatb-oai bd0ff89
Revert cargo-bin fallback to origin/main
viyatb-oai 302e6ee
Revert cargo-bin Cargo.toml to origin/main
viyatb-oai 8338beb
Make upstream proxy opt-in
viyatb-oai c656278
Disable aws-lc bindgen in rama-crypto for Bazel
viyatb-oai d85717d
use individual rama crates and boring-ssl
viyatb-oai e8cff7e
Install musl g++ for CI
viyatb-oai 7f44c72
Fallback to musl-gcc for musl CXX
viyatb-oai 3d1e12b
Fix musl compiler path quoting
viyatb-oai 5d66111
Install g++ for musl C++ headers
viyatb-oai 57c9714
Use clang++ for musl C++ headers
viyatb-oai c8b7c00
Force pthreads for musl CMake
viyatb-oai fe1c1c8
Use clang as musl C compiler
viyatb-oai 8637043
Revert "Disable aws-lc bindgen in rama-crypto for Bazel"
viyatb-oai 741b661
Tighten domain policy matching
viyatb-oai 90c2470
Fix CONNECT proxy handling and enforce managed network constraints
viyatb-oai f1cc7fb
Clamp proxy binds when unix sockets enabled
viyatb-oai bcdedf5
update messaging
viyatb-oai e4c003d
Honor proxy enablement and local binding rules
viyatb-oai e3d1906
Harden local binding checks for IPv6 literals
viyatb-oai 4995f09
refactor state.rs into manageable modules
viyatb-oai 58562a2
Merge branch 'main' into pr/network-proxy-crate
viyatb-oai 5d7f98a
Split network proxy state into runtime and policy modules
viyatb-oai 872d0ae
Adjust runtime formatting for rustfmt
viyatb-oai 1dd6952
remove cmake and clang setup from bazel.yml
viyatb-oai 4a0c292
ci: dedupe musl install steps
viyatb-oai fc33c31
ci: call musl setup script via GITHUB_WORKSPACE
viyatb-oai d54757b
network-proxy: harden policy enforcement
viyatb-oai 4196294
network-proxy: fix clippy test literals
viyatb-oai 6cb436a
network-proxy: focus PR1 on core http + policy
viyatb-oai 5738cf1
network-proxy: add SOCKS5 listener
viyatb-oai d116357
Merge origin/main into pr-network-proxy-socks
viyatb-oai 9db0fe4
chore: remove unused SOCKS5 builder override
viyatb-oai 6803979
Merge remote-tracking branch 'origin/main' into pr-network-proxy-socks
viyatb-oai d003072
docs: note full mode default in network proxy
viyatb-oai 3e8470a
Refactor SOCKS5 policy closures into helpers
viyatb-oai 349eec4
Merge remote-tracking branch 'origin/main' into pr-network-proxy-socks
viyatb-oai d9b0a7f
Merge branch 'main' into pr-network-proxy-socks
viyatb-oai a5fb56e
Merge branch 'main' into pr-network-proxy-socks
viyatb-oai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ mod proxy; | |
| mod reasons; | ||
| mod responses; | ||
| mod runtime; | ||
| mod socks5; | ||
| mod state; | ||
| mod upstream; | ||
|
|
||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolve_runtimenow parsesnetwork_proxy.socks_urlunconditionally, butNetworkProxyBuilder::buildcallsresolve_runtimeeven whenenable_socks5isfalse. This means an invalid or emptysocks_url(e.g., a placeholder in existing configs) will now prevent the entire proxy (HTTP + admin) from starting, despite SOCKS5 being disabled. Consider only resolving/clamping the SOCKS address whenenable_socks5is enabled, or defaulting it without validation in the disabled case.Useful? React with 👍 / 👎.