How to build and run the portal-tunnel relay-server locally for HTTP/browser testing of the embedded SPA frontend and admin/policy APIs.
npx skills add https://github.com/gosuda/portal-tunnel --skill testing-relay-server
/usr/local/go/bin (add to PATH); frontend needs Node 22+ for vite.make build-frontend → populates cmd/relay-server/dist/app (required before server build; missing assets make startup fail with a 'make build-frontend' error).make build-server-bin → bin/relay-server.ADMIN_TOKEN=<token> IDENTITY_PATH=/tmp/pt-id ./bin/relay-server serve --sni-port 8443
--sni-port 443 fails to bind unprivileged — always override.curl -k; plain HTTP returns 400).GET/POST /api/policy with Authorization: Bearer $ADMIN_TOKEN.{"approval_mode":"auto","landing_page_enabled":true,"udp":{"enabled":false,"max_leases":0},"tcp_port":{"enabled":false,"max_leases":0}}); partial bodies get 400 invalid_mode.<IDENTITY_PATH>/policy.json.pkill -x relay-server — pkill -f patterns containing the binary path match your own shell command and kill it./api, /sdk, /discovery, /v1 (types.ReservedRootPrefixes in types/paths.go).Take gosuda/testing-relay-server from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.