Already sponsored. Already add more information. Alpine系统在1.11 beta23使用Hysteria2协议的节点端口跳跃断流不稳定 Already change to use chinese template 1月17日增加在alpine系统测试,情况类似。debian和windows端口跳跃功能正常 #2445
Labels
from end user
An end user is asking a developer to fix their problem for free
need more information
在英语模版中填入中文
一种滥用行为
操作系统
Linux
系统版本
在最新Alpine系统Standard版和ImmortalWrt都测试过,存在相同的问题
测试系统1:Alpine系统镜像从Alpine官方渠道下载的最新Standard版,文件名为alpine-standard-3.21.2-x86_64.iso,执行cat /etc/os-release结果如下:
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.21.2
PRETTY_NAME="Alpine Linux v3.21"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
测试系统2:ImmortalWrt 23.05.4
安装类型
sing-box 原始命令行程序
如果您使用图形客户端程序,请提供该程序版本。
No response
版本
描述
使用Hysteria2协议的节点,只要节点配置加入server_ports,想使用端口跳跃的功能,比如"server_ports": ["40001:40010"],访问外网就会不稳定甚至无法访问。只要把server_ports去掉就很稳定,即使单个端口的"server_port"使用40001~40010端口跳跃范围内的节点,比如"server_port": 40005,节点连接和网络访问都是稳定无误的。
可以查看下方提供的日志:
基本上规律是,当大量出现类似如下upload finished和download finished的日志之后,网络连接会短暂恢复一下
+0800 2025-01-17 10:29:50 TRACE [3222012465 1m7s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [3609809014 14.45s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2484228186 56.64s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [3310477468 19.69s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [2847352276 19.69s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [184033207 1m18s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [1541729084 1m21s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [3332558864 19.69s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [2869954254 1m19s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [511791788 19.69s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [2879172525 1m18s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [2746860676 14.45s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [2509843910 58.39s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [2562437394 56.45s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [837560914 53.85s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [2088047402 19.69s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [3039426114 53.80s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [1330693410 1m21s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [723976617 52.69s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [2876287385 1m18s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [196810427 20.0s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [3239023703 1m18s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2484228186 56.64s] connection: connection upload closed
+0800 2025-01-17 10:29:50 TRACE [3310477468 19.69s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [184033207 1m18s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2869954254 1m19s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2486020876 14.75s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2879172525 1m18s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2509843910 58.39s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2562437394 56.45s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [837560914 53.85s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [3039426114 53.80s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [1330693410 1m21s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2876287385 1m18s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [3222012465 1m7s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [511791788 19.69s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2746860676 14.45s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2847352276 19.69s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [1541729084 1m21s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [3332558864 19.69s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [2088047402 19.69s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [723976617 52.69s] connection: connection download closed
+0800 2025-01-17 10:29:50 TRACE [196810427 20.0s] connection: connection download closed
类似于网络自动断开然后自动重连的情况,在此之前的几秒到十几秒甚至几十秒,网页都不断尝试刷新,一直在加载,无法加载出内容
重点:在测试运行sing-box整个过程,电脑浏览器都在不断刷新网页,不断加载油管页面的状态,不存在关掉网页或者停止刷新的情况,所以日志停止刷新,不可能是因为没有网络请求导致的
比如下方新提供的alpine运行日志,在下面一行时间在2025-01-17 10:29:09的日志记录后,开始断连,日志不再刷新
+0800 2025-01-17 10:29:09 INFO [839871290 3ms] outbound/direct[direct]: outbound connection to 192.168.1.33:8006
直到20秒过去以后,才刷新下一行日志,在20秒期间,电脑浏览器都在不断刷新网页,不断加载油管页面,但无法加载出内容。
而且即使20秒过去以后刷新了下一行日志,网络依然没有连上,直到出现大量upload finished和download finished的日志之后,网络连接才会短暂恢复一下。
再比如immortalwrt的运行日志,在下面一行时间在2025-01-15 10:12:58的日志记录,然后开始断联,日志不再刷新
+0000 2025-01-15 10:12:58 DEBUG dns: lookup succeed for 14sg.networklinkpro.net: 13.212.59.159 13.250.61.151 13.212.228.121 13.250.172.191 18.140.243.13 54.179.131.147 13.213.33.157 13.229.69.10 13.212.152.162 3.0.139.196
直到下一行,时间在同一天10:13:19后,间隔超过20秒后,才重新刷新,连接恢复,日志重新开始记录
+0000 2025-01-15 10:13:19 DEBUG [2757371279 40.98s] connection: connection upload finished
但后面的连接依然不稳定,
详情麻烦查看后面部分日志
重现方式
Alpine重现方式:
官网下载最新Standard版,文件名为alpine-standard-3.21.2-x86_64.iso,放在pve虚拟机配置安装,基本上保持默认配置,2核2G内存。安装成功后,配置好软件源,然后apk update && apk add curl tar sing-box。安装好后,把最新beta23版的sing-box内核替换到/usr/bin目录下,使用下面的完整配置文件,加上hy2节点信息和"server_ports": ["40001:40010"],执行service sing-box start,然后尝试通过socks5入站信息代理访问,5分钟内必开始出现不稳定的情况。
全新安装的alpine,连nftables都没有安装,即没有配置任何防火墙规则
Immortalwrt重现方式:
在编译时就把sing-box加入再进行编译的immortalwrt,编辑/etc/config/sing-box,把option enabled '0'改成1,把option user 'sing-box'改成option user 'root',其他不变,保存。再把最新beta23版的sing-box内核替换到/usr/bin目录下
运行sing-box的方式是执行,service sing-box start。immortalwrt也会开机自启不需要额外配置。
不稳定的出站节点配置:
连接稳定的出站节点配置:
以下是去掉节点后的完整配置文件:
为了避免tun入站的复杂配置和路由、防火墙规则配置可能产生的影响,特意不使用tun入站,才使用了mixed入站进行测试,然后浏览器使用socks5://sing-box所在ip:1080代理访问的。
但并不代表tun入站没有问题,日常都是使用tun入站的,发现端口跳跃不稳定,才使用mixed入站测试的。结果发现情况一样。所以才发issue。
在Immortalwrt跑时,防火墙保持默认不变,然后电脑浏览器使用socks5://immortalwrt所在ip:1080代理访问的。
如果不加入端口跳跃参数,电脑浏览器科学访问很稳定没有问题的。
只要加入类似"server_ports": ["40001:40010"]这样的参数,无论单服务端口"server_port": 20000是否删除,都存在延迟响应不稳定等情况
日志
以下是alpine-standard-3.21.2-x86_64.iso安装的系统运行的日志的一部分:
Alpine运行sing-box的完整日志在以下附件中
alpine运行sing-box的完整日志.txt
Immortalwrt运行sing-box的完整日志在以下附件中
immortalwrt运行sing-box日志.log
支持我们
完整性要求
The text was updated successfully, but these errors were encountered: