From a0ea9e1b21ac745a33cd7b5d21132331dde37cdc Mon Sep 17 00:00:00 2001 From: Ajit Date: Wed, 7 Aug 2024 03:59:44 +0530 Subject: [PATCH] feat: hint tsnet to make a login If I don't set this var, I get the message "Authkey is set; but state is NoState. Ignoring authkey. Re-run with TSNET_FORCE_LOGIN=1 to force use of authkey." The thing to note here is the program runs fine even in the absence of this var. --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 6ce69c2..9b89980 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( "io" "log" "net/http" + "os" "github.com/r3labs/sse/v2" "tailscale.com/tsnet" @@ -107,6 +108,8 @@ func (h *assetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } func main() { + os.Setenv("TSNET_FORCE_LOGIN", "1") + s := &tsnet.Server{ Hostname: "telltail", }