feat(channel): support insecure TLS verification - #2021
Open
BugMasterLab wants to merge 1 commit into
Open
Conversation
Allow certificate verification bypass per channel for model discovery and upstream requests without affecting other channels.
Contributor
Greptile SummaryThis PR adds per-channel control over HTTPS certificate verification. The main changes are:
Confidence Score: 5/5The main channel flow looks safe to merge after a small compatibility cleanup for custom transports.
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
UI[Channel TLS setting] --> GQL[GraphQL settings]
GQL --> Stored[Stored channel]
UI --> Discovery[Model discovery]
Stored --> Requests[Upstream requests]
Discovery --> Client[Derived HTTP client]
Requests --> Client
Client --> TLS[TLS verification policy]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart LR
UI[Channel TLS setting] --> GQL[GraphQL settings]
GQL --> Stored[Stored channel]
UI --> Discovery[Model discovery]
Stored --> Requests[Upstream requests]
Discovery --> Client[Derived HTTP client]
Requests --> Client
Client --> TLS[TLS verification policy]
Reviews (1): Last reviewed commit: "feat(channel): support insecure TLS veri..." | Re-trigger Greptile |
Comment on lines
+99
to
+108
| return &http.Transport{ | ||
| Proxy: proxy, | ||
| DialContext: (&net.Dialer{Timeout: 30 * time.Second, KeepAlive: 30 * time.Second}).DialContext, | ||
| ForceAttemptHTTP2: true, | ||
| MaxIdleConns: 100, | ||
| IdleConnTimeout: 90 * time.Second, | ||
| TLSHandshakeTimeout: 10 * time.Second, | ||
| ExpectContinueTimeout: 1 * time.Second, | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Custom RoundTripper Is Discarded
When an HttpClient uses a non-*http.Transport RoundTripper, enabling insecureSkipVerify replaces it with this fallback transport. Clients created with an authentication, tracing, or routing wrapper then bypass that wrapper, causing requests to lose its behavior instead of only changing TLS verification.
Owner
|
有冲突 |
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
Test plan
pnpm -C frontend build