使用Sing-Box搭建Hysteria2协议的游戏加速服务器

1.基本步骤与3x-ui类似,但是3x-ui不支持hysteria2协议,所以必须用singbox搭建,hy2协议为基于udp协议的quic协议,游戏加速器必须使用此协议。以下是一键安装脚本

bash -c "$(curl -fsSL https://sing-box.app/deb-install.sh)"

2.生成tls证书。hy2必须进行tls加密,直接生成自签名证书即可

sudo mkdir -p /etc/sing-box/certs/
sudo openssl ecparam -genkey -name prime256v1 -out /etc/sing-box/certs/private.key
sudo openssl req -new -x509 -days 3650 -key /etc/sing-box/certs/private.key -out /etc/sing-box/certs/certificate.crt -subj "/CN=zdx.com"

3.服务器安装singbox之后,开启bbr加速。打开配置文件编辑

sudo nano /etc/sysctl.conf

4.添加以下命令,设置bbr加速

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

5.配置singbox配置文件,singbox没有web图形界面,所有配置均在.json配置文件里编辑,json文件不允许有任何语法错误。

sudo nano /etc/sing-box/config.json

6.具体配置待编辑

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注