- A+
Hysteria 是一个功能丰富的,专为恶劣网络环境进行优化的网络工具(双边加速),比如卫星网络、拥挤的公共 Wi-Fi、在中国连接国外服务器等。 基于修改版的 QUIC 协议。目前有以下模式:(仍在增加中)
- SOCKS5 代理 (TCP & UDP)
- HTTP/HTTPS 代理
- TCP/UDP 转发
- TCP/UDP TPROXY 透明代理 (Linux)
- TUN (Windows 下为 TAP)
效果对比:
一键安装:
su - root #Change to root
bash <(curl -fsSL https://git.io/hysteria.sh)
配置过程
首次安装后: hihy
命令调出菜单,如更新了hihy脚本,请执行选项9
或者12
,获得最新的配置
-------------------------------------------
|********** Hi Hysteria **********|
|********** Author: emptysuns ************|
|********** Version: 0.3.5 **********|
-------------------------------------------
Tips:hihy 命令再次运行本脚本.
.............................................
###############################
.....................
1) 安装 hysteria
2) 卸载 hysteria
.....................
3) 启动 hysteria
4) 暂停 hysteria
5) 重新启动 hysteria
6) 运行状态
.....................
7) 更新hysteria core
8) 查看当前配置
9) 重新配置hysteria
10) 切换ipv4/ipv6优先级
11) 更新hihy
12) 完全重置所有配置
###############################
0)退出
.............................................
请选择:
脚本每次更新都可能会发生改变,请一定要展开并仔细参考演示过程,避免发生不必要的错误!
展开
请选择:1
Ready to install.
Update.wait...
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:3 https://packagecloud.io/ookla/speedtest-cli/ubuntu bionic InRelease
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Fetched 252 kB in 2s (118 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
72 packages can be upgraded. Run 'apt list --upgradable' to see them.
Done.
Install wget curl netfilter-persistent lsof
*wget
Installed.Ignore.
*curl
Installed.Ignore.
*netfilter-persistent
Installed.Ignore.
*lsof
Installed.Ignore.
Done.
The Latest hysteria version:v1.0.3
Download...
Download completed.
开始配置:
请输入您的域名(不输入回车,则默认自签wechat.com证书,不推荐):
您选择自签wechat证书.公网ip:1.2.3.4
请输入你想要开启的端口,此端口是server端口,建议10000-65535.(默认随机)
随机端口:10294
选择协议类型:
1、udp(QUIC)
2、faketcp
3、wechat-video(回车默认)
输入序号:
2
IPTABLES OPEN: tcp/10294
传输协议:faketcp
请输入您到此服务器的平均延迟,关系到转发速度(默认200,单位:ms):
60
期望速度,这是客户端的峰值速度,服务端默认不受限。Tips:脚本会自动*1.25做冗余,您期望过低或者过高会影响转发效率,请如实填写!
请输入客户端期望的下行速度:(默认50,单位:mbps):
200
请输入客户端期望的上行速度(默认10,单位:mbps):
40
请输入认证口令:
pekopeko
配置录入完成!
执行配置...
SIGN...
.
.
.
Signature ok
subject=C = CN, ST = GuangDong, L = ShenZhen, O = PonyMa, OU = Tecent, emailAddress = admin@qq.com, CN = Tencent Root CA
Getting CA Private Key
SUCCESS.
Wait,test config...
Test success.
net.core.rmem_max = 8000000
install.sh: line 533: 27680 Killed /etc/hihy/bin/appS -c /etc/hihy/conf/hihyServer.json server > /tmp/hihy_debug.info 2>&1
Created symlink /etc/systemd/system/multi-user.target.wants/hihy.service → /etc/systemd/system/hihy.service.
配置文件输出如下且已经在本目录生成(直接下载本目录生成的config.json[推荐]/自行复制粘贴到本地)
Tips:客户端默认只开启http(8888)、socks5(8889)代理!其他方式请参照hysteria文档自行修改客户端config.json
↓↓↓copy↓↓↓*******************************↓
{
"server": "1.2.3.4:10294",
"protocol": "faketcp",
"up_mbps": 50,
"down_mbps": 250,
"http": {
"listen": "127.0.0.1:8888",
"timeout" : 300,
"disable_udp": false
},
"socks5": {
"listen": "127.0.0.1:8889",
"timeout": 300,
"disable_udp": false
},
"alpn": "h3",
"acl": "acl/routes.acl",
"mmdb": "acl/Country.mmdb",
"auth_str": "pekopeko",
"server_name": "wechat.com",
"insecure": true,
"recv_window_conn": 7864320,
"recv_window": 31457280,
"disable_mtu_discovery": true,
"resolver": "119.29.29.29:53",
"retry": 3,
"retry_interval": 3
}
↑↑↑↑copy↑↑↑*******************************↑
Shadowrocket/Sagernet/Passwall一键链接:
hysteria://1.2.3.4:10294?protocol=faketcp&auth=pekopeko&peer=wechat.com&insecure=1&upmbps=50&downmbps=250&alpn=h3#Hys-1.2.3.4
安装完毕
root@ubuntu:~/hysteria# systemctl status hihy
● hihy.service - hysteria:Hello World!
Loaded: loaded (/etc/systemd/system/hihy.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-04-18 01:45:35 EDT; 25s ago
Main PID: 27793 (appS)
Tasks: 6 (limit: 1077)
CGroup: /system.slice/hihy.service
└─27793 /etc/hihy/bin/appS --log-level warn -c /etc/hihy/conf/hihyServer.json server
Apr 18 01:45:35 ubuntu systemd[1]: Started hysteria:Hello World!.
其实就是一路回车到请输入认证口令 这里是密码自己填一个,然后就是延迟、上传、下载速度如实填写就行了
在把防火墙的自己开放一下端口
安装完会出现下面图上的代码
把中间的代码复制出来新建json放进去,
把127.0.0.1:8888改成127.0.0.1:10809
127.0.0.1:8889改成127.0.0.1:10808
官方电脑端不好用 所以用的v2rayN,下面是教程
电脑端手动兼容教程
下载v2rayN最新客户端:https://github.com/2dust/v2rayN/releases/download/5.16/v2rayN-Core.zip
下载Hysteria官方客户端:
https://github.com/emptysuns/Hi_Hysteria/releases/download/0.3a/hihysteria_cmd_0.3a.rar
下载Hysteria-cora:
https://github.com/HyNetwork/hysteria/releases/download/v1.0.3/hysteria-tun-windows-6.0-amd64.exe
把Hysteria官方客户端里的acl文件夹整个复制到v2rayN客户端根目录
把下载的hysteria-tun-windows-6.0-amd64.exe放进v2rayN客户端根目录
不想麻烦的直接下载我兼容好的v2rayN客户端
https://wwb.lanzoub.com/ii8ku03eipzg 密码:mjj(别人大佬做的)
导入节点
v2rayn右键添加自定义配置服务器,点击浏览 然后选择之前新建的json文件,core类型选择hysteria后确认就行了
软路由最新的passwall也支持。需要注意的"混淆密码",“认证类型”,“
一键代码地址:https://github.com/emptysuns/Hi_Hysteria(原版修改作者)
手动编辑地址:https://github.com/HyNetwork/hysteria (官方原版)
