Hysteria2 部署笔记
1. 安装与初始化 Hysteria2 提供了一键安装脚本,支持大部分 Linux 发行版 1 2 # 执行官方安装脚本 bash <(curl -fsSL [https://get.hy2.sh/](https://get.hy2.sh/)) 安装完成后,主程序位于 /usr/local/bin/hysteria,配置文件默认位于 /etc/hysteria/config.yaml 2. 服务端配置 (YAML) 以下配置启用了 ACME 自动证书申请、HTTP 后端认证以及 反向代理伪装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # /etc/hysteria/config.yaml listen: :443 acme: domains: - your.domain.net # 替换为你的解析好的域名 email: your@email.com # 接收证书通知的邮箱 auth: # 使用 HTTP 认证模式,适合对接自己的用户管理系统 http: url: [http://your.backend.com/auth](http://your.backend.com/auth) insecure: false masquerade: type: proxy proxy: url: [https://news.ycombinator.com/](https://news.ycombinator.com/) # 流量探测时伪装的目标 rewriteHost: true 3. 核心黑科技:端口跳跃 (Port Hopping) 由于部分运营商会对单一 UDP 端口进行限速或断流,通过 iptables 实现多端口转发(端口跳跃)可以显著提升稳定性 ...