Skip to content

config: advertise the non_selectable_outbounds capability#555

Merged
myleshorton merged 3 commits into
mainfrom
fisk/advertise-nonselectable-cap
Jul 7, 2026
Merged

config: advertise the non_selectable_outbounds capability#555
myleshorton merged 3 commits into
mainfrom
fisk/advertise-nonselectable-cap

Conversation

@myleshorton

@myleshorton myleshorton commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

Advertise common.CapabilityNonSelectableOutbounds ("non_selectable_outbounds") in the config request's Capabilities (config/fetcher.go).

Why

radiance#549 made this client honor ConfigResponse.NonSelectableOutbounds — it merges server-declared infrastructure outbounds into the box config so their references resolve, but excludes them from both proxy-selection groups (auto/URLTest and the manual selector). Advertising the capability lets lantern-cloud gate infrastructure outbounds on it instead of the client version.

The concrete case is the proxyless rule-set download_detour (lantern-cloud#2936): a client that doesn't honor NonSelectableOutbounds would let its URLTest auto-select the low-latency direct+frag dialer and route traffic through it, exposing the real IP. Because this capability is added in the same client that has #549's handling, "advertises it" ⟺ "handles it safely" — a true capability signal, and one gate covers every future infra outbound with no new client release.

(The client already advertises the outline outbound type "outline" via its auto-derived supported-protocols list, but that predates #549, so it can't be the gate — old clients report it too. This is a distinct, explicitly-added capability.)

Dependencies

Testing

go build ./config/..., gofmt clean; go test ./config/ passes against merged common main. (The advertised value round-trips through common's TestCapabilitiesRoundTrip.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGpKfgkbfdJwwsTaouMDoR

Summary by CodeRabbit

  • New Features
    • Config fetches now advertise support for non-selectable outbounds, enabling servers to return configs that use this capability.
  • Chores
    • Updated a shared dependency to a newer version.

Report common.CapabilityNonSelectableOutbounds in the config request's
Capabilities. This build honors ConfigResponse.NonSelectableOutbounds (merges
those outbounds but excludes them from the proxy-selection groups), so the server
can gate infrastructure outbounds (e.g. the proxyless rule-set download_detour)
on the capability instead of the client version — an old client that would
surface such an outbound as a selectable proxy simply never advertises it.

Bumps getlantern/common to the branch adding Capabilities; will re-point to
merged main once getlantern/common#28 lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGpKfgkbfdJwwsTaouMDoR
Copilot AI review requested due to automatic review settings July 6, 2026 20:01
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@myleshorton, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f72dbc1-2154-4a51-a89b-f7b5f39c35ec

📥 Commits

Reviewing files that changed from the base of the PR and between 3fe1c26 and 9a6e117.

📒 Files selected for processing (1)
  • config/fetcher_test.go
📝 Walkthrough

Walkthrough

The config fetch request now advertises a Capabilities field with CapabilityNonSelectableOutbounds. The github.com/getlantern/common dependency in go.mod is updated to a newer pseudo-version.

Changes

Config request capability update

Layer / File(s) Summary
Add capability to config request and bump dependency
config/fetcher.go, go.mod
fetchConfig's ConfigRequest gains a Capabilities field advertising CapabilityNonSelectableOutbounds; go.mod updates the getlantern/common dependency pseudo-version.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • getlantern/radiance#549: Consumes the CapabilityNonSelectableOutbounds capability added here by propagating non-selectable outbounds data into vpn.BoxOptions and filtering selector tag groups.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: advertising the non_selectable_outbounds capability in config fetching.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fisk/advertise-nonselectable-cap

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.

Copilot AI 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.

Pull request overview

This PR adds an explicit capability signal to the client’s config fetch request so the server can safely gate delivery of “infrastructure/non-selectable” outbounds based on client behavior rather than client version.

Changes:

  • Adds common.CapabilityNonSelectableOutbounds to the config request’s Capabilities payload (config/fetcher.go).
  • Bumps github.com/getlantern/common to a revision that includes the new ConfigRequest.Capabilities field + capability constant (go.mod, go.sum).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
config/fetcher.go Advertises non_selectable_outbounds capability in config fetch request.
go.mod Updates github.com/getlantern/common dependency to include the new request field/constant.
go.sum Updates sums corresponding to the common dependency bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod Outdated
@myleshorton

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.


Your plan includes PR reviews subject to rate limits. More reviews will be available in 50 minutes.

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

common#28 (Capabilities field) landed; replaces the pre-merge branch
pseudo-version with the merge commit on main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

Comment thread config/fetcher.go

@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.

🧹 Nitpick comments (1)
config/fetcher.go (1)

88-91: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider asserting Capabilities in TestFetchConfig.

The existing test unmarshals the request into C.ConfigRequest and asserts several fields but doesn't verify Capabilities contains C.CapabilityNonSelectableOutbounds, per the test snippet in config/fetcher_test.go. Adding this assertion would guard against future regressions in the request payload.

🤖 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 `@config/fetcher.go` around lines 88 - 91, Add an assertion in TestFetchConfig
to verify the request payload includes Capabilities with
C.CapabilityNonSelectableOutbounds. Locate the request unmarshalling and
existing field checks in fetcher-related test code, and extend the assertions so
the capability is explicitly validated alongside the other C.ConfigRequest
fields.
🤖 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.

Nitpick comments:
In `@config/fetcher.go`:
- Around line 88-91: Add an assertion in TestFetchConfig to verify the request
payload includes Capabilities with C.CapabilityNonSelectableOutbounds. Locate
the request unmarshalling and existing field checks in fetcher-related test
code, and extend the assertions so the capability is explicitly validated
alongside the other C.ConfigRequest fields.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c461191b-1a0f-4cd1-8bfb-1f1eebacb7b9

📥 Commits

Reviewing files that changed from the base of the PR and between bce2524 and 3fe1c26.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • config/fetcher.go
  • go.mod

Server-side infra-outbound gating depends on the client advertising
non_selectable_outbounds; a refactor dropping it should fail tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.

@myleshorton myleshorton merged commit ce70c50 into main Jul 7, 2026
4 checks passed
@myleshorton myleshorton deleted the fisk/advertise-nonselectable-cap branch July 7, 2026 20:46
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