Skip to content

Commit 9c40178

Browse files
committed
Rename HTTPForTests to ForceHTTP to force DERP connecting over HTTP
1 parent 3daa7f1 commit 9c40178

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

derp/derphttp/derphttp_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (c *Client) targetString(reg *tailcfg.DERPRegion) string {
179179
}
180180

181181
func (c *Client) useHTTPS(node *tailcfg.DERPNode) bool {
182-
if node.HTTPForTests {
182+
if node.ForceHTTP {
183183
return false
184184
}
185185
if c.url != nil && c.url.Scheme == "http" {

tailcfg/derpmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ type DERPNode struct {
140140
// It should not be set by users.
141141
InsecureForTests bool `json:",omitempty"`
142142

143-
// HTTPForTests is used by unit tests to force HTTP.
143+
// ForceHTTP is used by unit tests to force HTTP.
144144
// It should not be set by users.
145-
HTTPForTests bool `json:",omitempty"`
145+
ForceHTTP bool `json:",omitempty"`
146146

147147
// STUNTestIP is used in tests to override the STUN server's IP.
148148
// If empty, it's assumed to be the same as the DERP server.

tailcfg/tailcfg_clone.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tailcfg/tailcfg_view.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)