buywatermelon/tunpilot/deploying-hy2-nodes
Claude Code and agent skill by buywatermelon/tunpilot
- community
Checking that the SKILL.md file is still in the repository.
Deploys UDP/QUIC Hysteria2 proxy nodes with Brutal or BBR congestion control, inline ACME (or self-signed EC P-256), HTTP masquerade, QUIC receive/send window tuning based on server memory, systemd hardening with CAP_NET_ADMIN, and HTTP auth callback registration in TunPilot. Use when deploying a new Hysteria2 node, choosing Brutal vs BBR, tuning QUIC windows, setting up masquerade, or switching between ACME and self-signed TLS. Not for Xray/Trojan — see deploying-xray-nodes.
Install
npx vskill@latest install buywatermelon/tunpilot/deploying-hy2-nodesSKILL.md
The same SKILL.md was published earlier as buywatermelon/tunpilot/deploying-hy2-nodes.
TunPilot Hysteria2 Node Deployment
Deploy a production-grade Hysteria2 proxy node with automatic performance tuning, security hardening, and censorship resistance.
Prerequisite: TunPilot server running and tunpilot CLI configured (use getting-started skill if not). All TunPilot operations below go through the CLI — it wraps the REST API with the user's saved server + token.
Auxiliary files (read when referenced below):
- hysteria2-template.md — config templates (ACME / self-signed variants)
- ../_shared/DIAG_SETUP.md — diagnostic tooling install
- ../_shared/SYSTEMD_HARDENING.md — hardening drop-in template
- ../_shared/SSH_TROUBLESHOOTING.md — generic SSH/systemd issues
Phase 1: Gather Information & Probe Server
1.1 Ask the User
- SSH destination — e.g.
root@node1.example.comor SSH config alias - Domain name (optional) — if none, self-signed certs will be used
- Node name — human-readable label (e.g.
tokyo-01)
1.2 Test SSH
1.3 Probe Server (single SSH round trip)
1.4 Build Server Profile
| Parameter | Source | Derived Setting | |
|---|---|---|---|
| Memory | free -b | QUIC window size — <4 GB → 8 MB; ≥4 GB → 16 MB | |
| CPU cores | nproc | maxStreams = cores × 256 (cap 1024) | |
| Port conflicts | ss -tulnp | Whether to use alternative ports | |
| Firewall type | probe | ufw / firewall-cmd / manual | |
| Kernel tuning | sysctl | Skip 2.1 if already tuned | |
| IPv6 | ip -6 addr | Enable dual-stack if present |
1.5 Confirm With User
- Congestion control — Brutal (dedicated bandwidth, explicit up/down) vs BBR (shared/variable)
- Bandwidth limits — if Brutal: confirm up/down Mbps based on server specs
- Masquerade site — default
https://www.bing.com/or custom
Phase 2: Deploy
2.1 Kernel Tuning
Skip if probe showed values already tuned.
2.2 Install Hysteria2
2.3 Install Diagnostic Tooling
Read ../_shared/DIAG_SETUP.md and run both steps on this server. This enables the testing-nodes skill to run without prompting later.
2.4 TLS Certificate
Option A — Domain + inline ACME:
Hysteria2 handles ACME itself inside config.yaml (no separate hysteria cert needed). Just prep the directory and confirm port 80 is free for the HTTP-01 challenge:
Option B — Self-signed EC P-256:
2.5 Register Node in TunPilot
Run tunpilot node add with the fields below. The response includes an auth_callback_url — Hysteria2 uses HTTP auth callback (unlike Trojan/Xray which uses gRPC sync), so capture this URL for the config in 2.6.
Save the returned auth_callback_url — format: http://<tunpilot-ip>:3000/auth/<node-id>/<auth-secret>.
2.6 Write Production Config
Read hysteria2-template.md and pick:
- Config A (ACME) — domain + inline
acmeblock - Config B (Self-signed) — direct
cert/keypaths
Fill placeholders from the Phase 1.4 profile (QUIC windows, maxStreams) and Phase 1.5 choices (CC, bandwidth, masquerade). Write:
2.7 Systemd Hardening
Read ../_shared/SYSTEMD_HARDENING.md and apply with:
{{SERVICE}}=hysteria-server{{READ_WRITE_PATHS}}=/etc/hysteria{{CAPABILITIES}}=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW(Hysteria2 binds UDP/443 and may need raw sockets for BBR pacing)
2.8 Firewall
Hysteria2 needs UDP/443 (main traffic), TCP/443 (optional masquerade fallback), and TCP/80 (ACME only).
2.9 Start Service
If inactive:
Phase 3: Verify
3.1 Health Check
3.2 Masquerade Test (ACME only)
Response should show headers from the masquerade target (e.g. Bing).
3.3 Stats API
Expect JSON with online user count.
3.4 Deployment Summary
Report to user: node name and ID, server IP/domain, protocol and port, TLS type, congestion control and bandwidth, kernel tuning status, health check result, and subscription instructions (tunpilot user update <user-id> --nodes <node-id>,… to grant access, then tunpilot sub create --user <user-id> --format <format> to issue a link).
Troubleshooting
| Symptom | Diagnosis | Fix | ||
|---|---|---|---|---|
tunpilot health shows unreachable | Stats API not accessible | Verify stats_port and stats_secret match between TunPilot and the node config | ||
| Service won't start | Config syntax error | journalctl -u hysteria-server --no-pager -n 50 and validate YAML | ||
| ACME cert fails | DNS not pointing to server, or port 80 occupied | dig <domain>; `ss -tlnp \ | grep ':80 '` | |
| Clients can't connect | Firewall blocking UDP/443 | `ss -ulnp \ | grep 443; test with nc -u <ip> 443` | |
| Slow speeds | Brutal bandwidth mis-set, or ISP shaping | Confirm Brutal up/down match actual capacity; try BBR | ||
| Auth callback failures | Node can't reach TunPilot | curl <auth_callback_url> from the node |
For generic SSH / systemd issues, see ../_shared/SSH_TROUBLESHOOTING.md.
CLI Reference
| Command | Use When | |
|---|---|---|
tunpilot node list | See all registered nodes | |
tunpilot node add … | Register a new node (Phase 2.5) | |
tunpilot node update <id> … | Change node config (port, SNI, enable/disable) | |
tunpilot node remove <id> | Delete a node (cascades user assignments) | |
tunpilot health [<id>] | Verify node reachability | |
tunpilot traffic --node <id> | Query traffic usage | |
tunpilot user update <id> --nodes <node-id>,… | Grant a user access to specific nodes | |
tunpilot sub create --user <id> --format <format> | Generate a subscription link |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/deploying-hy2-nodes/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/buywatermelon/tunpilot/deploying-hy2-nodes)