1. 前言
Hysteria 2 是基于 QUIC 协议的重构版本,专为高延迟和高丢包网络环境优化。它不使用多倍发包,而是通过改进的拥塞控制算法实现暴力加速,是目前突破带宽限制最有效的协议之一。
二、Hysteria 2 一键安装脚本
首先更新系统组件(Debian/Ubuntu):
apt update -y && apt install curl sudo wget -y已复制!
执行安装脚本(官方推荐):
wget -N --no-check-certificate https://raw.githubusercontent.com/flame1ce/hysteria2-install/main/hysteria2-install-main/hy2/hysteria.sh && bash hysteria.sh已复制!
三、Hysteria 服务相关命令
systemctl start hysteria-server.service # 启动服务 systemctl restart hysteria-server.service # 重启服务 systemctl stop hysteria-server.service # 停止服务 systemctl status hysteria-server.service # 查看状态 systemctl enable hysteria-server.service # 开机自启已复制!
四、sing-box 配置文件
在客户端中使用 sing-box 核心时,参考以下出站配置(Outbounds):
{ "type": "hysteria2", "tag": "proxy", "server": "你的服务器IP", "server_port": 443, "up_mbps": 20, "down_mbps": 100, "password": "你的服务密码", "tls": { "enabled": true, "server_name": "www.bing.com", "insecure": true } }已复制!
五、常见问题排查
无法连接? 请务必放行 UDP 端口(默认 443):
iptables -I INPUT -p udp --dport 443 -j ACCEPT已复制!
注意: Hysteria 主要走 UDP 协议,若运营商对 UDP 限制严重,建议开启端口跳跃(Port Hopping)功能。