Skip to content

fix(coderd): prevent agent reverse proxy from using HTTP[S]_PROXY envs #12875

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
close transport before removing proxy setting
  • Loading branch information
coadler committed Apr 5, 2024
commit e33a7e52d677003eb050f0be8d237df76f944ba4
4 changes: 2 additions & 2 deletions coderd/tailnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
var tailnetTransport *http.Transport

func init() {
var valid bool
tailnetTransport, valid = http.DefaultTransport.(*http.Transport)
tp, valid := http.DefaultTransport.(*http.Transport)
if !valid {
panic("dev error: default transport is the wrong type")
}
tailnetTransport = tp.Clone()
// We do not want to respect the proxy settings from the environment, since
// all network traffic happens over wireguard.
tailnetTransport.Proxy = nil
Expand Down