Every commercial VPN client stores its server catalog as a JSON on the backend and lets the panel pick from a dropdown; this pulls that shape into the extension. - server-list.json: baked-in default the tarball ships with. Three Silent Mode slots (sm-1..sm-3), status "coming-soon" until the VLESS URLs land — the toggle stays disabled for any entry whose status is not "ready", so a placeholder cannot be selected by accident. - Gateway overlay: index.js fetches https://navigate.st/api/vpn/servers on activation (with a 6-hour TTL and a "refresh" button in the panel) and merges by id — remote wins, new remote entries append. Cached to per-addon storage so an offline boot still has the last-good catalog. - turnOn now accepts { serverId } or { vless }. Server id is resolved through the catalog inside the addon; the panel only sees a public view (label, flag, country, ready/coming-soon), never the raw URL. - Panel: dropdown of servers + a "Custom vless://" option that reveals the paste box. Selection persists per-machine, refresh button forces a re-fetch, disabled toggle explains why in the hint area. No behavioural change for anyone with a saved vless:// paste — that path is now "Custom" in the dropdown and still works identically.
30 lines
884 B
JSON
30 lines
884 B
JSON
{
|
|
"schema": 1,
|
|
"note": "Baked-in default server list. The addon fetches https://navigate.st/api/vpn/servers on activation and overlays that on top of this — any entry with a matching id replaces the baked-in one, new entries append. Users' saved selection persists by id, so a server can be re-parameterised (Reality key rotated, new host) without the panel losing its state.",
|
|
"servers": [
|
|
{
|
|
"id": "sm-1",
|
|
"label": "Silent Mode · 1",
|
|
"flag": "🌐",
|
|
"country": "",
|
|
"vless": "",
|
|
"status": "coming-soon"
|
|
},
|
|
{
|
|
"id": "sm-2",
|
|
"label": "Silent Mode · 2",
|
|
"flag": "🌐",
|
|
"country": "",
|
|
"vless": "",
|
|
"status": "coming-soon"
|
|
},
|
|
{
|
|
"id": "sm-3",
|
|
"label": "Silent Mode · 3",
|
|
"flag": "🌐",
|
|
"country": "",
|
|
"vless": "",
|
|
"status": "coming-soon"
|
|
}
|
|
]
|
|
}
|