Skip to content

Docs: socks5 autodiscovery, exit security, rust socks5 page - #6928

Merged
mfahampshire merged 4 commits into
developfrom
max/socks5-autodiscovery-docs
Jul 27, 2026
Merged

Docs: socks5 autodiscovery, exit security, rust socks5 page#6928
mfahampshire merged 4 commits into
developfrom
max/socks5-autodiscovery-docs

Conversation

@mfahampshire

@mfahampshire mfahampshire commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Split out from max/socks5-to-socks-plus-autodiscovery so docs can be reviewed and merged (autodeploys) independently of the nym-sdk code, which still needs QA.


This change is Reviewable

Summary by CodeRabbit

  • New Features

    • Added new developer documentation for the Rust SDK SOCKS5 module, including setup, proxy-mode behavior, requester selection, country filtering, and a quick-start example.
  • Documentation

    • Rewrote exit security guidance with a unified exit-gateway security model for both IP Packet Router and Network Requester, including encryption responsibility, trust boundaries, and privacy limitations.
    • Updated related developer pages, SDK module listings, and Exit Gateway Services “Used by” references with improved cross-links and clearer wording.

@mfahampshire
mfahampshire requested a review from serinko June 30, 2026 13:19
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-nextra Ready Ready Preview, Comment Jul 27, 2026 1:21pm
nym-explorer-v2 Ready Ready Preview, Comment Jul 27, 2026 1:21pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nym-node-status Ignored Ignored Preview Jul 27, 2026 1:21pm

Request Review

@mfahampshire
mfahampshire requested a review from merve64 June 30, 2026 13:19
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 686b2cb8-b914-4256-b894-447b6bf13537

📥 Commits

Reviewing files that changed from the base of the PR and between c9170e8 and ec5ace9.

📒 Files selected for processing (1)
  • documentation/docs/pages/developers/concepts/exit-security.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • documentation/docs/pages/developers/concepts/exit-security.mdx

📝 Walkthrough

Walkthrough

Changes

The PR adds documentation for the Rust SDK SOCKS5 module, updates related navigation and references, expands Exit Gateway security guidance to cover IPR and NR, and revises service consumer listings.

Rust SDK SOCKS5 module

Layer / File(s) Summary
SOCKS5 documentation navigation and cross-references
documentation/docs/pages/developers/rust/_meta.json, documentation/docs/pages/developers/rust.mdx, documentation/docs/pages/developers/index.mdx, documentation/docs/pages/developers/clients/socks5.mdx, documentation/docs/pages/developers/rust/mixnet.mdx
Adds the SOCKS5 module to Rust SDK navigation and updates related links and descriptions.
Socks5MixnetClient usage and requester selection
documentation/docs/pages/developers/rust/socks5.mdx
Documents proxy behavior, request flow, Rust examples, remote DNS resolution, configuration, requester discovery, country selection, standalone comparison, and further reading.
Unified Exit Gateway security model
documentation/docs/pages/developers/concepts/exit-security.mdx
Updates security guidance for IPR and SOCKS-based NR, including hop visibility, payload encryption, trust boundaries, traffic-analysis limits, comparisons, and transport references.
Exit Gateway service consumers
documentation/docs/pages/network/infrastructure/exit-services.mdx
Updates Network Requester and IP Packet Router consumer listings and the comparison table.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RustApplication
  participant Socks5MixnetClient
  participant Mixnet
  participant NetworkRequester
  participant Destination
  RustApplication->>Socks5MixnetClient: Connect through socks5h://
  Socks5MixnetClient->>Mixnet: Segment TCP stream into mixnet traffic
  Mixnet->>NetworkRequester: Deliver SOCKS request
  NetworkRequester->>Destination: Request public destination
  Destination-->>NetworkRequester: Return response
  NetworkRequester-->>Socks5MixnetClient: Reassemble response stream
  Socks5MixnetClient-->>RustApplication: Return response
Loading

Possibly related PRs

  • nymtech/nym#6716: Introduces related Exit Gateway Services documentation content.
  • nymtech/nym#6769: Modifies overlapping SOCKS5 and Exit Gateway documentation.
  • nymtech/nym#6920: Covers related SOCKS5 requester autodiscovery and country-based selection.

Suggested reviewers: serinko

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main documentation changes: SOCKS5 autodiscovery, exit security, and the new Rust SOCKS5 page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch max/socks5-autodiscovery-docs

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@documentation/docs/pages/developers/concepts/exit-security.mdx`:
- Around line 70-71: The SOCKS5 documentation bullet uses stale API names, so
update the referenced callsites in this section to match the current symbols.
Replace the outdated `Socks5MixnetClient::connect_new(...)` and
`discover().countries([...])` wording with the correct
`Socks5MixnetClient::connect_with(...)` and
`NetworkRequester::in_countries([...])` references so the docs align with the
actual API.

In `@documentation/docs/pages/developers/rust.mdx`:
- Line 54: The SOCKS proxy description in the Rust developer docs overstates
supported protocols and should be narrowed to match the actual
`Socks5MixnetClient` contract. Update the `SOCKS5 module` blurb in the Rust docs
to describe only SOCKS5 support unless there is explicit implementation evidence
elsewhere, and keep the wording aligned with the `./rust/socks5` module name and
related docs.

In `@documentation/docs/pages/developers/rust/socks5.mdx`:
- Line 129: The SOCKS5 example link currently points to the mutable develop
branch, which can drift from the documented Rust API. Update the link in the
socks5.mdx page to use a version-stable target, such as a tagged permalink or
another immutable reference, so the example stays aligned with the docs. Use the
existing “Example: SOCKS5 proxy” link text as the anchor and replace only the
branch-based GitHub target.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bff02bde-c53b-46c3-ae18-26034e4d8633

📥 Commits

Reviewing files that changed from the base of the PR and between 1d2a4b3 and 650798f.

📒 Files selected for processing (8)
  • documentation/docs/pages/developers/_meta.json
  • documentation/docs/pages/developers/clients/socks5.mdx
  • documentation/docs/pages/developers/concepts/exit-security.mdx
  • documentation/docs/pages/developers/index.mdx
  • documentation/docs/pages/developers/rust.mdx
  • documentation/docs/pages/developers/rust/_meta.json
  • documentation/docs/pages/developers/rust/socks5.mdx
  • documentation/docs/pages/network/infrastructure/exit-services.mdx

Comment thread documentation/docs/pages/developers/concepts/exit-security.mdx Outdated
Comment thread documentation/docs/pages/developers/rust.mdx Outdated
Comment thread documentation/docs/pages/developers/rust/socks5.mdx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@documentation/docs/pages/developers/concepts/exit-security.mdx`:
- Line 21: Update the proxy-mode explanation in
documentation/docs/pages/developers/concepts/exit-security.mdx at lines 21-21
and 48-48: describe the Network Requester as seeing the SOCKS destination, and
qualify hostname visibility as applying only to socks5h requests while
IP-address requests expose only the address. Preserve the existing distinction
at line 65.
- Around line 89-96: Update the “Exit node sees traffic?” row in the Nym column
to scope its visibility claim to proxy mode, using wording such as “Proxy mode:
Yes.” Keep the existing Tor and VPN entries unchanged and ensure the table no
longer implies that end-to-end Nym traffic has an Exit Gateway.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bfb5a060-dbac-4686-bc05-02adddc02615

📥 Commits

Reviewing files that changed from the base of the PR and between 650798f and d3ea0f4.

📒 Files selected for processing (8)
  • documentation/docs/pages/developers/clients/socks5.mdx
  • documentation/docs/pages/developers/concepts/exit-security.mdx
  • documentation/docs/pages/developers/index.mdx
  • documentation/docs/pages/developers/rust.mdx
  • documentation/docs/pages/developers/rust/_meta.json
  • documentation/docs/pages/developers/rust/mixnet.mdx
  • documentation/docs/pages/developers/rust/socks5.mdx
  • documentation/docs/pages/network/infrastructure/exit-services.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
  • documentation/docs/pages/developers/index.mdx
  • documentation/docs/pages/developers/rust/_meta.json
  • documentation/docs/pages/network/infrastructure/exit-services.mdx
  • documentation/docs/pages/developers/rust/socks5.mdx

Comment thread documentation/docs/pages/developers/concepts/exit-security.mdx
Comment thread documentation/docs/pages/developers/concepts/exit-security.mdx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
documentation/docs/pages/developers/concepts/exit-security.mdx (2)

21-21: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Qualify Network Requester hostname visibility by SOCKS address type.

These lines still state that the NR sees a hostname unconditionally. For socks5 requests, the client may send an IP address; hostname visibility applies to socks5h. This repeats the previously reported issue and remains present in the supplied final file.

Proposed wording
- via either the IP Packet Router (raw IP packets) or the SOCKS-based Network Requester (which sees the destination hostname), and continues
+ via either the IP Packet Router (raw IP packets) or the SOCKS-based Network Requester (which sees the SOCKS destination, including a hostname only for `socks5h` requests), and continues
...
-| Exit Gateway (IPR or NR) | Sphinx removed; raw IP packet (IPR) or SOCKS request (NR) exposed | The IPR sees the destination IP and port; the NR sees the destination hostname. Either way the payload depends on your application layer (see below). |
+| Exit Gateway (IPR or NR) | Sphinx removed; raw IP packet (IPR) or SOCKS request (NR) exposed | The IPR sees the destination IP and port; the NR sees the SOCKS destination: a hostname for `socks5h`, or an IP address when resolved locally. Either way the payload depends on your application layer (see below). |

Also applies to: 48-48

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/pages/developers/concepts/exit-security.mdx` at line 21,
Update the proxy-mode explanation near the Network Requester reference to
qualify hostname visibility by SOCKS address type: state that the NR sees the
destination hostname for socks5h requests, while socks5 requests may provide an
IP address. Apply the same clarification to the corresponding repeated statement
later on the page.

91-91: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Scope the Nym exit-visibility row to proxy mode.

End-to-end Nym traffic has no Exit Gateway, but this comparison row currently says the exit sees traffic without qualification. Use wording such as Proxy mode: Yes (encrypt it) so the table does not contradict the end-to-end model described above.

Proposed fix
-| **Exit node sees traffic?** | Yes (encrypt it) | Yes (encrypt it) | Yes (encrypt it) |
+| **Exit node sees traffic?** | Proxy mode: Yes (encrypt it) | Yes (encrypt it) | Yes (encrypt it) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/pages/developers/concepts/exit-security.mdx` at line 91,
Update the “Exit node sees traffic?” comparison row to qualify the Nym entry as
applying only to proxy mode, using wording such as “Proxy mode: Yes (encrypt
it)”; leave the other columns unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@documentation/docs/pages/developers/concepts/exit-security.mdx`:
- Line 21: Update the proxy-mode explanation near the Network Requester
reference to qualify hostname visibility by SOCKS address type: state that the
NR sees the destination hostname for socks5h requests, while socks5 requests may
provide an IP address. Apply the same clarification to the corresponding
repeated statement later on the page.
- Line 91: Update the “Exit node sees traffic?” comparison row to qualify the
Nym entry as applying only to proxy mode, using wording such as “Proxy mode: Yes
(encrypt it)”; leave the other columns unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ae40c463-cd76-4f9b-bbd2-48572e946545

📥 Commits

Reviewing files that changed from the base of the PR and between d3ea0f4 and c9170e8.

📒 Files selected for processing (8)
  • documentation/docs/pages/developers/clients/socks5.mdx
  • documentation/docs/pages/developers/concepts/exit-security.mdx
  • documentation/docs/pages/developers/index.mdx
  • documentation/docs/pages/developers/rust.mdx
  • documentation/docs/pages/developers/rust/_meta.json
  • documentation/docs/pages/developers/rust/mixnet.mdx
  • documentation/docs/pages/developers/rust/socks5.mdx
  • documentation/docs/pages/network/infrastructure/exit-services.mdx
🚧 Files skipped from review as they are similar to previous changes (5)
  • documentation/docs/pages/developers/rust/mixnet.mdx
  • documentation/docs/pages/developers/rust/_meta.json
  • documentation/docs/pages/developers/rust.mdx
  • documentation/docs/pages/developers/rust/socks5.mdx
  • documentation/docs/pages/network/infrastructure/exit-services.mdx

@mfahampshire
mfahampshire enabled auto-merge (squash) July 27, 2026 13:29
@mfahampshire
mfahampshire disabled auto-merge July 27, 2026 13:57
@mfahampshire
mfahampshire enabled auto-merge (squash) July 27, 2026 13:57
@mfahampshire
mfahampshire merged commit e6dd497 into develop Jul 27, 2026
8 checks passed
@mfahampshire
mfahampshire deleted the max/socks5-autodiscovery-docs branch July 27, 2026 13:57
@coderabbitai coderabbitai Bot mentioned this pull request Jul 29, 2026
2 tasks
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