chore: some renaming and fix lint

This commit is contained in:
seiuneko 2024-12-03 18:49:52 +08:00
parent c9542bf333
commit 103b069f1f
No known key found for this signature in database
GPG Key ID: A5A75952899A0179
2 changed files with 5 additions and 3 deletions

View File

@ -220,7 +220,7 @@ func NewHeadscale(cfg *types.Config) (*Headscale, error) {
}
if cfg.DERP.ServerVerifyClients {
t := http.DefaultTransport.(*http.Transport)
t := http.DefaultTransport.(*http.Transport) //nolint:forcetypeassert
t.RegisterProtocol(
derpServer.DerpVerifyScheme,
derpServer.NewDERPVerifyTransport(app.handleVerifyRequest),

View File

@ -30,8 +30,10 @@ import (
// server that the DERP HTTP client does not want the HTTP 101 response
// headers and it will begin writing & reading the DERP protocol immediately
// following its HTTP request.
const fastStartHeader = "Derp-Fast-Start"
const DerpVerifyScheme = "derp-verify"
const (
fastStartHeader = "Derp-Fast-Start"
DerpVerifyScheme = "headscale-derp-verify"
)
type DERPServer struct {
serverURL string