wireNode is the wire form of [tailcfg.DERPNode].
| 39 | |
| 40 | // wireNode is the wire form of [tailcfg.DERPNode]. |
| 41 | type wireNode struct { |
| 42 | Name string `cbor:"n,omitempty" json:"Name,omitempty"` |
| 43 | RegionID int `cbor:"i,omitempty" json:"RegionID,omitempty"` |
| 44 | HostName string `cbor:"h,omitempty" json:"HostName,omitempty"` |
| 45 | |
| 46 | // CertName is the expected TLS cert name when it differs from |
| 47 | // HostName (which is used for the SNI). Empty means the cert is |
| 48 | // expected to match HostName, as with [tailcfg.DERPNode.CertName]; |
| 49 | // the production DERP map sets it on no nodes today, so this is |
| 50 | // usually absent. |
| 51 | CertName string `cbor:"t,omitempty" json:"CertName,omitempty"` |
| 52 | |
| 53 | IPv4 string `cbor:"4,omitempty" json:"IPv4,omitempty"` |
| 54 | IPv6 string `cbor:"6,omitempty" json:"IPv6,omitempty"` |
| 55 | STUNPort int `cbor:"s,omitempty" json:"STUNPort,omitempty"` |
| 56 | DERPPort int `cbor:"d,omitempty" json:"DERPPort,omitempty"` |
| 57 | InsecureForTests bool `cbor:"x,omitempty" json:"InsecureForTests,omitempty"` |
| 58 | } |
| 59 | |
| 60 | // wireRegionOf converts a [tailcfg.DERPRegion] (such as one from the |
| 61 | // control plane's DERP map) to its wire form. Fields tailcat doesn't |
nothing calls this directly
no outgoing calls
no test coverage detected