package main import ( "bytes" "compress/gzip" "io" "net/http" "strings" "testing" "github.com/klauspost/compress/zstd" "ublproxy/internal/blocklist" ) func TestBootstrapScriptTagWithSession(t *testing.T) { sm := newSessionMap() sm.Set("192.168.1.10", sessionEntry{Token: "test-token-abc", CredentialID: "cred-1"}) p := &proxyHandler{ sessions: sm, portalOrigin: "https://192.168.1.1:8443", } tag := p.bootstrapScriptTag("192.168.1.10", "example.com") if !strings.Contains(tag, "` + `
` + `` + `Content
` + `