-
Notifications
You must be signed in to change notification settings - Fork 0
Add UnboundedConfig for widget proxy #20
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,6 +16,9 @@ const ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Whether or not users should have the option to launch private servers on GCP. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GCP = "private.gcp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Whether or not the client should run the unbounded widget proxy. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| UNBOUNDED = "unbounded" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type ServerLocation struct { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -58,6 +61,15 @@ type RuleSet struct { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DownloadDetour string `json:"download_detour,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type UnboundedConfig struct { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DiscoverySrv string `json:"discovery_srv,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DiscoveryEndpoint string `json:"discovery_endpoint,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EgressAddr string `json:"egress_addr,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EgressEndpoint string `json:"egress_endpoint,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CTableSize int `json:"ctable_size,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PTableSize int `json:"ptable_size,omitempty"` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+64
to
+70
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type UnboundedConfig struct { | |
| DiscoverySrv string `json:"discovery_srv,omitempty"` | |
| DiscoveryEndpoint string `json:"discovery_endpoint,omitempty"` | |
| EgressAddr string `json:"egress_addr,omitempty"` | |
| EgressEndpoint string `json:"egress_endpoint,omitempty"` | |
| CTableSize int `json:"ctable_size,omitempty"` | |
| PTableSize int `json:"ptable_size,omitempty"` | |
| // UnboundedConfig configures the client-side unbounded widget proxy. | |
| type UnboundedConfig struct { | |
| // DiscoverySrv is the DNS SRV record used to discover unbounded widget proxy | |
| // backends when SRV-based service discovery is enabled. | |
| DiscoverySrv string `json:"discovery_srv,omitempty"` | |
| // DiscoveryEndpoint is the HTTP(S) endpoint used to discover unbounded widget | |
| // proxy backends when not relying on SRV records. | |
| DiscoveryEndpoint string `json:"discovery_endpoint,omitempty"` | |
| // EgressAddr is the local or remote address that the unbounded widget proxy | |
| // should use for sending egress traffic (for example, a bound IP/port). | |
| EgressAddr string `json:"egress_addr,omitempty"` | |
| // EgressEndpoint is the HTTP(S) endpoint through which the unbounded widget | |
| // proxy sends its egress traffic once a backend has been selected. | |
| EgressEndpoint string `json:"egress_endpoint,omitempty"` | |
| // CTableSize controls the size of the connection table used by the unbounded | |
| // widget proxy to track active or recently active connections. | |
| CTableSize int `json:"ctable_size,omitempty"` | |
| // PTableSize controls the size of the path/table used by the unbounded widget | |
| // proxy to maintain per-path or per-peer state. | |
| PTableSize int `json:"ptable_size,omitempty"` |
Copilot
AI
Feb 23, 2026
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.
The BanditURLOverrides field is not mentioned in the PR description. The PR description states it "Adds UnboundedConfig struct" and "Adds Unbounded field to ConfigResponse", but does not mention this bandit-related field. If this field is intentional and part of this PR, please update the PR description to include it. If it was added unintentionally, it should be removed.
Copilot
AI
Feb 23, 2026
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.
The newly added Unbounded field in ConfigResponse lacks test coverage. The existing tests (TestConfigResponseSerialization) cover serialization of ConfigResponse fields, but don't include the new Unbounded field. Consider adding a test case that includes an UnboundedConfig instance to ensure proper JSON serialization and deserialization of all fields including DiscoverySrv, DiscoveryEndpoint, EgressAddr, EgressEndpoint, CTableSize, and PTableSize.
Copilot
AI
Feb 23, 2026
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.
The Version field added to ConfigRequest is not mentioned in the PR description. The PR description only mentions additions related to UnboundedConfig. If this field is intentional and part of this PR, please update the PR description to include it. If it was added unintentionally, it should be removed.
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.
The field name DiscoverySrv uses the abbreviation "Srv" which is inconsistent with the rest of the codebase. Other fields use full words rather than abbreviations (e.g., ServerLocation, Servers, StunServers in config/types.pb.go). Consider renaming this to DiscoveryServer for consistency, unless "Srv" has a specific technical meaning in the unbounded widget proxy context.