/Hi_Hysteria

Hello World!非钟国优化线路使用不佳?不想中转?hysteria一键搞定。

Primary LanguageShellGNU General Public License v3.0GPL-3.0

Hi Hysteria

一·简介

Hysteria 是一个功能丰富的,专为恶劣网络环境进行优化的网络工具(双边加速),比如卫星网络、拥挤的公共 Wi-Fi、在**连接国外服务器等。 基于修改版的 QUIC 协议。

Hysteria这是一款由go编写的非常优秀的“轻量”代理程序,它很好的解决了在搭建富强魔法服务器时最大的痛点——线路拉跨

在魔法咏唱时最难的不是搭建维护,而是在晚高峰时期的交付质量。当三大运营商晚高变成了:奠信、连不通、移不动时,你我都有感触。 虽然是走的udp但是提供obfs,暂时不会被运营商针对性的QoS(不开obfs也不会被QoS)。

1、原项目提供的bench:

image

2、50mbps北方电信,北京出口 直连落地vir San Jose机房163线路,22-23点测试YT 1080p60直播流:

image

190 dropped of 131329

3、无对钟国大陆线路优化,洛杉矶shockhosting机房,1c128m ovznat 4k@p60: image

139783 Kbps

该项目仅作学习用途,请查看的访客在5s之内立即删除并停止使用。

由它所引起的任何问题,作者并不承担风险和任何法律责任。

因为脚本现处于0.x的测试版本,可能会有一些bug,如果遇到请发issue,欢迎star,您的⭐是我维护的动力。

适配ubuntu/debian, centos操作系统,misple/arm/x86架构。

windows使用请仔细阅读cmd客户端(伪)介绍其他平台看这里

(2022/04/12) 0.3.4:[请通过"重新安装/升级"选项更新]
1. 修复高丢包环境下的断流问题
2. 对齐菜单
3. 增加命令检测而不是每次修改配置时重复install

历史改进

二·使用

第一次使用?

拉取安装

su - root #Change to root
bash <(curl -fsSL https://git.io/hysteria.sh)

配置过程

首次安装后: hihy命令调出菜单,如更新了hihy脚本,请执行选项9或者12,获得最新的配置

 -------------------------------------------
|**********      Hi Hysteria       **********|
|**********    Author: emptysuns ************|
|**********     Version: 0.3.4     **********|
 -------------------------------------------
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) 完全重置所有配置 

############################### 
[Update] hihy有更新,version:v0.3.4,建议更新并查看日志: https://github.com/emptysuns/Hi_Hysteria 


0)退出 
............................................. 
请选择:

脚本每次更新都可能会发生改变,请一定要展开并仔细参考演示过程,避免发生不必要的错误!

演示较长,点我查看
 
请选择:1
Ready to install.

Update.wait... Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Hit:2 https://packagecloud.io/ookla/speedtest-cli/ubuntu bionic InRelease Fetched 74.6 kB in 2s (35.6 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 64 packages can be upgraded. Run 'apt list --upgradable' to see them.

Done. Install wget curl netfilter-persistent lsof *wget Reading package lists... Building dependency tree... Reading state information... wget is already the newest version (1.19.4-1ubuntu2.2). 0 upgraded, 0 newly installed, 0 to remove and 64 not upgraded. *curl Reading package lists... Building dependency tree... Reading state information... curl is already the newest version (7.58.0-2ubuntu3.16). 0 upgraded, 0 newly installed, 0 to remove and 64 not upgraded. *netfilter-persistent Reading package lists... Building dependency tree... Reading state information... netfilter-persistent is already the newest version (1.0.4+nmu2ubuntu1.1). 0 upgraded, 0 newly installed, 0 to remove and 64 not upgraded. *lsof Reading package lists... Building dependency tree... Reading state information... lsof is already the newest version (4.89+dfsg-0.1). 0 upgraded, 0 newly installed, 0 to remove and 64 not upgraded.

Done. The Latest hysteria version:v1.0.2 Download...

Download completed. 开始配置: 请输入您的域名(不输入回车,则默认自签wechat.com证书,不推荐):

您选择自签wechat证书.公网ip:1.2.3.4

请输入你想要开启的端口,此端口是server端口,建议10000-65535.(默认随机)

随机端口:34249

选择协议类型:

1、udp(QUIC) 2、faketcp 3、wechat-video(回车默认)

输入序号:

传输协议:wechat-video

请输入您到此服务器的平均延迟,关系到转发速度(默认200,单位:ms):

delay:200 ms

期望速度,这是客户端的峰值速度,服务端默认不受限。Tips:脚本会自动*1.25做冗余,您期望过低或者过高会影响转发效率,请如实填写! 请输入客户端期望的下行速度:(默认50,单位:mbps):

客户端下行速度:50 mbps

请输入客户端期望的上行速度(默认10,单位:mbps):

客户端上行速度:50 mbps

请输入认证口令: pekopeko

配置录入完成!

执行配置... SIGN...

Wait,test config...

Test success. net.core.rmem_max = 8000000 install.sh: line 600: 4003 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:34249", "protocol": "wechat-video", "up_mbps": 12, "down_mbps": 62, "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": "emptysuns", "server_name": "wechat.com", "insecure": true, "recv_window_conn": 6291456, "recv_window": 25165824, "disable_mtu_discovery": false, "resolver": "119.29.29.29:53", "retry": 3, "retry_interval": 3 } ↑↑↑↑copy↑↑↑*******************************↑

Shadowrocket/Sagernet/Passwall一键链接: hysteria://1.2.3.4:34249?protocol=wechat-video&auth=pekopeko&peer=wechat.com&insecure=1&upmbps=12&downmbps=62&alpn=h3#Hys-1.2.3.4

安装完毕

root@dedicated:~# systemctl status hihy

  • hihy.service - hysteria:Hello World! Loaded: loaded (/etc/systemd/system/hysteria.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-01-10 04:17:23 EST; 15s ago Main PID: 29691 (hihy) Tasks: 6 (limit: 1120) CGroup: /system.slice/hihy.service `-29691 /etc/hihy/appS --log-level warn -c /etc/hihy/config.json server

Jan 10 04:17:23 dedicated systemd[1]: Started hysteria:Hello World!.

三·高级玩法(伪

四·Todo

如果您有好的功能建议,请不要忘记开个issue提出来欧~~~欢迎PR来完成Todo或者给我纠正我的渣代码

我的爱好是写bug ( ̄▽ ̄)~

  • 检测端口是否被占用
  • 利用xray s5 inbound来支持按域名分流(warp)
  • 生成分享链接
  • 客户端自动更新
  • hihy替换掉hysteria
  • 规范化脚本代码
  • 利用docker安装?(不知道是否有必要)
  • cmd客户端的优化,利用一键链接导入非复制config.json,增加多配置切换管理(奇怪的方向越走越远...)
  • 多密码支持
  • 利用base64加密替换原来的auth_str
  • 兼容v2rayN,放弃cmd的更新

五·结语

魔改UDP的QUIC协议,加了tls和混淆的话,个人跑了一段时间大流量,未被运营商QoS,落地ip并没有被墙,也不知道什么时候被针对,大家且用且珍惜吧。

六·鸣谢

@HyNetwork/hysteria

@Loyalsoldier/geoip

@mack-a/v2ray-agent