fscarmen / sing-box

Sing-box 全家桶 --- 一键多协议脚本
999 stars 219 forks source link

Hysteria-2协议增加端口跳跃 #84

Closed sagehere closed 1 month ago

sagehere commented 2 months ago

Hysteria-2端口跳跃能够防止被运营商QOS,希望作者在脚本中增加该功能。谢谢!

fscarmen commented 2 months ago

现在有哪些主流客户端支持的呢?

sagehere commented 2 months ago

现在有哪些主流客户端支持的呢?

singbox的客户端和NekoBox的安卓、PC都是支持的。

fscarmen commented 2 months ago

应该可以弄弄了。

支持的:

  1. v2rayN with hysteria2 code
  2. 小火箭
  3. clash mihomo
  4. nekoray

不支持的:

  1. v2rayN with sing-box code
  2. sing-box
sagehere commented 2 months ago

应该可以弄弄了。

支持的:

  1. v2rayN with hysteria2 code
  2. 小火箭
  3. clash mihomo
  4. nekoray

不支持的:

  1. v2rayN with sing-box code
  2. sing-box

加油大佬,用iptables 转发就可以,等大佬写进脚本里就更加方便了!

fscarmen commented 2 months ago

v1.2.4 添加 hysteria2 的跳跃端口,支持客户端: ShadowRocket / NekoBox / Clash 麻烦你试一下,有两个方式,期待你的反馈。

  1. 重装
  2. 使用 sb -r 删除原来的 hy2 协议,再使用多一次 sb -r 增加 hy2 协议,这时会有是否使用跳跃端口及范围的交互了
sagehere commented 2 months ago

v1.2.4 添加 hysteria2 的跳跃端口,支持客户端: ShadowRocket / NekoBox / Clash 麻烦你试一下,有两个方式,期待你的反馈。

  1. 重装
  2. 使用 sb -r 删除原来的 hy2 协议,再使用多一次 sb -r 增加 hy2 协议,这时会有是否使用跳跃端口及范围的交互了

目前的情况是使用脚本后如果VPS重启,原本设置的IPtables的规则会消失,所以只能使用原端口连接,需要在脚本中加入Iptables规则重启后生效的内容。

fscarmen commented 2 months ago

有用 iptables-persistent,一个在基于 Debian 的 Linux 发行版(如 Ubuntu)中用于持久化 iptables 防火墙规则的工具。你是什么系统?重启后规则没有了?

sagehere commented 2 months ago

有用 iptables-persistent,一个在基于 Debian 的 Linux 发行版(如 Ubuntu)中用于持久化 iptables 防火墙规则的工具。你是什么系统?重启后规则没有了?

破案了,我的机器iptables-persistent没安装,安装之后再运用脚本就好了,建议大佬加入检测安装的代码!

fscarmen commented 2 months ago

有的啊 https://github.com/fscarmen/sing-box/blob/d74115d209ad2f8e9c70b3149fd106f76f07ae73/sing-box.sh#L663-L666

你运行以下的看看


! [ -x "$(type -p netfilter-persistent)" ] && echo yes || echo no