mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-21 10:27:30 +00:00
tailcfg: break DERPNode.DERPTestPort into DERPPort & InsecureForTests
The DERPTestPort int meant two things before: which port to use, and whether to disable TLS verification. Users would like to set the port without disabling TLS, so break it into two options. Updates #1264 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
92077ae78c
commit
7e7c4c1bbe
@@ -130,10 +130,15 @@ type DERPNode struct {
|
||||
// server.
|
||||
STUNOnly bool `json:",omitempty"`
|
||||
|
||||
// DERPTestPort is used in tests to override the port, instead
|
||||
// of using the default port of 443. If non-zero, TLS
|
||||
// verification is skipped.
|
||||
DERPTestPort int `json:",omitempty"`
|
||||
// DERPPort optionally provides an alternate TLS port number
|
||||
// for the DERP HTTPS server.
|
||||
//
|
||||
// If zero, 443 is used.
|
||||
DERPPort int `json:",omitempty"`
|
||||
|
||||
// InsecureForTests is used by unit tests to disable TLS verification.
|
||||
// It should not be set by users.
|
||||
InsecureForTests bool `json:",omitempty"`
|
||||
|
||||
// STUNTestIP is used in tests to override the STUN server's IP.
|
||||
// If empty, it's assumed to be the same as the DERP server.
|
||||
|
Reference in New Issue
Block a user