feat: update protocol version and remove obsolete comment from registry
Kim committed
May 14, 2026 at 15:26 UTC
3a33467ff6b390d81aae5c370341bc58cfca1c11
5 files changed
+15
-17
cmd/portal-tunnel/agent/control.go
+2
@@ -200,6 +200,7 @@ func (s *controlHandler) serveWalletAuth(w http.ResponseWriter, r *http.Request)
200
Value: token,
201
Path: types.PathAgentPrefix,
202
HttpOnly: true,
203
+ Secure: true,
204
SameSite: http.SameSiteStrictMode,
205
MaxAge: 86400,
206
})
@@ -217,6 +218,7 @@ func (s *controlHandler) serveWalletAuth(w http.ResponseWriter, r *http.Request)
218
Value: "",
219
Path: types.PathAgentPrefix,
220
HttpOnly: true,
221
+ Secure: true,
222
SameSite: http.SameSiteStrictMode,
223
MaxAge: -1,
224
})
config.toml
+2
-12
@@ -2,19 +2,9 @@
2
# Bump protocol versions only when wire-level behavior changes.
3
4
[release]
5
-version = "v2.2.1"
5
+version = "v2.2.2"
6
base_url = "https://github.com/gosuda/portal-tunnel/releases"
7
8
[protocol]
9
-tunnel = "6"
9
+tunnel = "7"
10
discovery = "7"
11
-
12
-[bootstrap]
13
-relays = [
14
- "https://portal.thumbgo.kr/",
15
- "https://portal.rabbitson87.dev/",
16
- "https://s-h.day/",
17
- "https://portal.dawnfullstack.com/",
18
- "https://portal.damn.it.com/",
19
- "https://kakashit.org",
20
-]
manifest.go
+3
@@ -4,3 +4,6 @@ import _ "embed"
4
5
//go:embed config.toml
6
var ConfigTOML []byte
7
+
8
+//go:embed registry.json
9
+var RegistryJSON []byte
registry.json
-1
@@ -1,5 +1,4 @@
1
{
2
- "_comment": "The Go binary now reads bootstrap relays from config.toml's [bootstrap].relays. This file is retained because the relay-server frontend (frontend/src/components/ServerListView.tsx) and the VS Code extension (extensions/vscode) still fetch it from raw.githubusercontent.com. Keep this list in sync with config.toml until those consumers migrate.",
2
"relays": [
3
"https://portal.thumbgo.kr/",
4
"https://portal.rabbitson87.dev/",
types/types.go
+8
-4
@@ -1,6 +1,7 @@
1
package types
2
3
import (
4
+ "encoding/json"
5
"fmt"
6
7
"github.com/pelletier/go-toml/v2"
@@ -33,16 +34,19 @@ func init() {
34
Tunnel string `toml:"tunnel"`
35
Discovery string `toml:"discovery"`
36
} `toml:"protocol"`
36
- Bootstrap struct {
37
- Relays []string `toml:"relays"`
38
- } `toml:"bootstrap"`
37
}
38
if err := toml.Unmarshal(portaltunnel.ConfigTOML, &m); err != nil {
39
panic(fmt.Errorf("unmarshal config TOML: %w", err))
40
}
41
+ var registry struct {
42
+ Relays []string `json:"relays"`
43
+ }
44
+ if err := json.Unmarshal(portaltunnel.RegistryJSON, ®istry); err != nil {
45
+ panic(fmt.Errorf("unmarshal registry JSON: %w", err))
46
+ }
47
ReleaseVersion = m.Release.Version
48
OfficialReleaseBaseURL = m.Release.BaseURL
49
SDKVersion = m.Protocol.Tunnel
50
DiscoveryVersion = m.Protocol.Discovery
47
- BootstrapRelays = m.Bootstrap.Relays
51
+ BootstrapRelays = registry.Relays
52
}