From e0ac4592048b9cab8a585982df6e11eb1775710a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 4 Jun 2025 22:12:59 +0800 Subject: [PATCH] Fix missing home for derp service --- docs/configuration/service/derp.md | 5 +++++ option/tailscale.go | 1 + service/derp/service.go | 1 + 3 files changed, 7 insertions(+) diff --git a/docs/configuration/service/derp.md b/docs/configuration/service/derp.md index adf80d82..3d7443a3 100644 --- a/docs/configuration/service/derp.md +++ b/docs/configuration/service/derp.md @@ -20,6 +20,7 @@ DERP service is a Tailscale DERP server, similar to [derper](https://pkg.go.dev/ "config_path": "", "verify_client_endpoint": [], "verify_client_url": [], + "home": "", "mesh_with": [], "mesh_psk": "", "mesh_psk_file": "", @@ -69,6 +70,10 @@ Setting Array value to a string `__URL__` is equivalent to configuring: { "url": __URL__ } ``` +#### home + +What to serve at the root path. It may be left empty (the default, for a default homepage), `blank` for a blank page, or a URL to redirect to + #### mesh_with Mesh with other DERP servers. diff --git a/option/tailscale.go b/option/tailscale.go index 74917fcd..1a431887 100644 --- a/option/tailscale.go +++ b/option/tailscale.go @@ -36,6 +36,7 @@ type DERPServiceOptions struct { ConfigPath string `json:"config_path,omitempty"` VerifyClientEndpoint badoption.Listable[string] `json:"verify_client_endpoint,omitempty"` VerifyClientURL badoption.Listable[*DERPVerifyClientURLOptions] `json:"verify_client_url,omitempty"` + Home string `json:"home,omitempty"` MeshWith badoption.Listable[*DERPMeshOptions] `json:"mesh_with,omitempty"` MeshPSK string `json:"mesh_psk,omitempty"` MeshPSKFile string `json:"mesh_psk_file,omitempty"` diff --git a/service/derp/service.go b/service/derp/service.go index f950a813..f42e7e29 100644 --- a/service/derp/service.go +++ b/service/derp/service.go @@ -124,6 +124,7 @@ func NewService(ctx context.Context, logger log.ContextLogger, tag string, optio configPath: configPath, verifyClientEndpoint: options.VerifyClientEndpoint, verifyClientURL: options.VerifyClientURL, + home: options.Home, meshKey: options.MeshPSK, meshKeyPath: options.MeshPSKFile, meshWith: options.MeshWith,