└── README.md
/README.md:
--------------------------------------------------------------------------------
1 | # Hysteria2一键安装教程,搭建歇斯底里2(windows,安卓,ios,mac)客户端下载,sing-box配置使用教程
2 | Hysteria2一键安装视频教程:▶ https://youtu.be/N6j3gWde8cQ
3 |
4 | ### 步骤:
5 | ### 一、准备一个VPS服务器(Debian)
6 | Vultr注册账号:https://www.vultr.com/?ref=8753714
7 | VPS服务器选择说明:[点击查看>>](https://raw.githubusercontent.com/kjfx/v2ray1/refs/heads/main/vps%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%80%89%E6%8B%A9%E8%AF%B4%E6%98%8E.png)
8 |
9 | ### 二、下载搭建工具 FinalShell
10 | FinalShell下载:点击下载>>
11 | 备用下载(Windows MacOS Linux):点击下载>>
12 |
13 | ### 三、更新 VPS 系统,安装组件
14 |
15 | apt update -y
16 | apt install curl sudo -y
17 |
18 | ### 四、Hysteria 2 一键安装脚本
19 |
20 | wget -N --no-check-certificate https://raw.githubusercontent.com/flame1ce/hysteria2-install/main/hysteria2-install-main/hy2/hysteria.sh && bash hysteria.sh
21 |
22 | ### 五、Hysteria 服务相关命令
23 |
24 | systemctl start hysteria-server.service # 启动 hysteria 服务
25 | systemctl enable hysteria-server.service # 设置 hysteria 服务 开机自启
26 | systemctl restart hysteria-server.service # 重启 hysteria 服务
27 | systemctl stop hysteria-server.service # 停止 hysteria 服务
28 | systemctl status hysteria-server.service # 查看 hysteria 服务 状态
29 |
30 | ### 六、客户端配置
31 | - Windows 建议使用 V2rayN,点击下载>>
32 | 如果你不清楚下载哪个文件,请下载 “zz_v2rayN-With-Core-SelfContained.7z” 解压使用。
33 |
34 | - IOS/MAC 建议使用 sing-box 或 Shadowrocket
35 | 需要使用美区 AppleID 登录 App Store 下载,如果没有美区ID,可以点击免费申请一个 美区AppleID>>
36 |
37 | - 安卓手机 建议使用 sing-box
38 | 可以在 Google Play 商店下载,或者官方下载>>
39 | 请下载.apk文件,建议下载v8a.apk
40 |
41 | ### 七、sing-box 配置文件
42 |
43 | {
44 | "dns": {
45 | "servers": [
46 | {
47 | "tag": "cf",
48 | "address": "https://1.1.1.1/dns-query"
49 | },
50 | {
51 | "tag": "local",
52 | "address": "223.5.5.5",
53 | "detour": "direct"
54 | },
55 | {
56 | "tag": "block",
57 | "address": "rcode://success"
58 | }
59 | ],
60 | "rules": [
61 | {
62 | "geosite": "category-ads-all",
63 | "server": "block",
64 | "disable_cache": true
65 | },
66 | {
67 | "outbound": "any",
68 | "server": "local"
69 | },
70 | {
71 | "geosite": "cn",
72 | "server": "local"
73 | }
74 | ],
75 | "strategy": "ipv4_only"
76 | },
77 | "inbounds": [
78 | {
79 | "type": "tun",
80 | "inet4_address": "172.19.0.1/30",
81 | "auto_route": true,
82 | "strict_route": false,
83 | "sniff": true
84 | }
85 | ],
86 | "outbounds": [
87 | {
88 | "type": "hysteria2",
89 | "tag": "proxy",
90 | "server": "IP", // VPS ip
91 | "server_port": 443, // 端口
92 | "up_mbps": 20, //上传速率,实际填写,过大会导致流量浪费
93 | "down_mbps": 100, //下载速率,实际填写,过大会导致流量浪费
94 | "password": "88888888", //hysteria2 服务密码
95 | "tls": {
96 | "enabled": true,
97 | "server_name": "www.bing.com",
98 | "insecure": true
99 | }
100 | },
101 | {
102 | "type": "direct",
103 | "tag": "direct"
104 | },
105 | {
106 | "type": "block",
107 | "tag": "block"
108 | },
109 | {
110 | "type": "dns",
111 | "tag": "dns-out"
112 | }
113 | ],
114 | "route": {
115 | "rules": [
116 | {
117 | "protocol": "dns",
118 | "outbound": "dns-out"
119 | },
120 | {
121 | "geosite": "cn",
122 | "geoip": [
123 | "private",
124 | "cn"
125 | ],
126 | "outbound": "direct"
127 | },
128 | {
129 | "geosite": "category-ads-all",
130 | "outbound": "block"
131 | }
132 | ],
133 | "auto_detect_interface": true
134 | }
135 | }
136 |
137 |
138 |
139 | ### 八、常见问题
140 | 节点如果不能正常使用,请放行端口,请将以下命令复制到搭建工具,再点回车
141 |
142 | iptables -I INPUT -p tcp --dport 443 -j ACCEPT
143 |
144 | *请将 443 改为你节点的端口再使用
145 |
146 |
147 |
--------------------------------------------------------------------------------