Hysteria 2 是一个比较新的协议,类似于v2ray,但比v2ray节点速度更快,支持全平台使用。Hysteria 是一个强大、快速、抗审查的代理工具,抗封锁能力强。
搭建步骤:
Vultr服务器注册:https://www.vultr.com/?ref=8753714
FinalShell下载(Windows版):点击下载>>
备用下载(Windows MacOS Linux):点击下载>>
复制
apt update -y
apt install curl sudo -y
复制 wget -N --no-check-certificate https://raw.githubusercontent.com/flame1ce/hysteria2-install/main/hysteria2-install-main/hy2/hysteria.sh && bash hysteria.sh
复制
systemctl start hysteria-server.service # 启动 hysteria 服务
systemctl enable hysteria-server.service # 设置 hysteria 服务 开机自启动
systemctl restart hysteria-server.service # 重启 hysteria 服务
systemctl stop hysteria-server.service # 停止 hysteria 服务
systemctl status hysteria-server.service # 查看 hysteria 服务 状态
复制
{
"dns": {
"servers": [
{
"tag": "cf",
"address": "https://1.1.1.1/dns-query"
},
{
"tag": "local",
"address": "223.5.5.5",
"detour": "direct"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"rules": [
{
"geosite": "category-ads-all",
"server": "block",
"disable_cache": true
},
{
"outbound": "any",
"server": "local"
},
{
"geosite": "cn",
"server": "local"
}
],
"strategy": "ipv4_only"
},
"inbounds": [
{
"type": "tun",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"strict_route": false,
"sniff": true
}
],
"outbounds": [
{
"type": "hysteria2",
"tag": "proxy",
"server": "IP", // VPS IP
"server_port": 443, // 端口
"up_mbps": 30, //上传速率,按本地速度填写
"down_mbps": 100, //下载速率,按本地速度填写
"password": "88888888", //hysteria2 服务密码
"tls": {
"enabled": true,
"server_name": "www.bing.com",
"insecure": true
}
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"geosite": "cn",
"geoip": [
"private",
"cn"
],
"outbound": "direct"
},
{
"geosite": "category-ads-all",
"outbound": "block"
}
],
"auto_detect_interface": true
}
}