[长文] 移动白名单上传限速机制,以及解决办法

181 天前
 mikewang

背景

移动开始对白名单以外的域名、网络协议进行上传限速。

具体表现在:

除了移动以外,其他运营商也有类似表现:

限速机制

深度包检测。默认限速 1 Mbps ( 125 kB/s ),检测到白名单协议、域名之后,放开至正常速(我测得 100 Mbps )。

以下均是我在移动宽带下测得的结果。

TCP

UDP

补充

该检测会追踪整个 TCP 的状态。在已建立的 TCP 连接中,构造 SYN 之后再发 SNI 或者 HTTP 特征并不会骗过检测机制,达成解除限速的效果。

话说,这个探测方式是不是很眼熟。我怀疑是不是某个神秘技术下放到了运营商,区别只在:一个是检测到就断流,一个是检测到就恢复上传速度。

解决方案

这里介绍除了投诉以外的规避方案。

带 HTTP 混淆的网络工具

设置混淆的 host 为白名单网站即可。

udp2raw 中加上 HTTP 特征

使用 TCP 协议作为隧道可能不是最佳,因此我 fork 了 udp2raw ,在上面加上了 HTTP 特征: https://github.com/MikeWang000000/udp2raw

这个特征很明显的通过了运营商的检测,上传速度恢复到 100 Mbps 。

可以参考这个提交:commit c4995ea

使用方法是在参数后加上 --fake-http speedtest.cn 这样就会混淆为在访问测速网站。

对于一般的 TCP 连接

(理论上,未验证)可以使用 eBPF 等手段,在 TCP 连接建立时,使用较小的 TTL 发送 HTTP 特征。这样既通过了运营商的检测,又不会到达服务器。

后记

因为省间结算,运营商费尽心机限制用户上传。这种白名单机制也让用户难以投诉:常见网站、测速网站的上传检测都是正常。运营商可以直接不承认有限速行为,而归结为用户问题。不知道以后还有什么新的手段呢?

14120 次点击
所在节点    宽带症候群
47 条回复
3Fulieak
86 天前
@ntplay4 长沙也一样 上报解开了一个月 一个月整又开始被限了 没辙了
molezznet
61 天前
原来不是我的宽带问题,还自己浪费时间了。
学到了,真是白花钱了。
https://www.v2ex.com/t/1144916
molezznet
61 天前
我还想怎么现在国内两个 nas 之间,v6 直连动不动就降到 100 多 k 每秒,不能愉快的玩 nas
molezznet
60 天前
https://img.netok.xyz/1752459962567.png

真的是精准限速, 上海移动 v6 直连,128k/s

就是不知道是我个人账号上了 isp 黑名单, 还是所有用户都被适配
molezznet
60 天前
上海移动,我还测出来一个精准 8M 的限速,腾讯云的 vps

```
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.01 sec 896 KBytes 7.24 Mbits/sec
[ 5] 1.01-2.01 sec 1.00 MBytes 8.44 Mbits/sec
[ 5] 2.01-3.01 sec 1.00 MBytes 8.33 Mbits/sec
[ 5] 3.01-4.01 sec 1.00 MBytes 8.41 Mbits/sec
[ 5] 4.01-5.01 sec 1.00 MBytes 8.43 Mbits/sec
[ 5] 5.01-6.00 sec 1.00 MBytes 8.44 Mbits/sec
[ 5] 6.00-7.01 sec 1.00 MBytes 8.33 Mbits/sec
[ 5] 7.01-8.01 sec 1.00 MBytes 8.34 Mbits/sec
[ 5] 8.01-9.01 sec 1.00 MBytes 8.45 Mbits/sec
[ 5] 9.01-10.00 sec 1.00 MBytes 8.43 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.02 sec 10.3 MBytes 8.58 Mbits/sec 0 sender
[ 5] 0.00-10.00 sec 9.88 MBytes 8.28 Mbits/sec receiver

```
ENE
6 天前
发现使用 Frp 解决运营商对境外服务器的 QOS
使用 frp 双向 tls 验证,并在证书中添加 dns 域名 speedtest.cn
```frps.toml
transport.tls.force = true
transport.tls.serverName = "speedtest.cn"
transport.tls.certFile = "/cert/FRP-Server_crt.pem"
transport.tls.keyFile = "/cert/FRP-Server_prv.pem"
transport.tls.trustedCaFile = "/cert/FRP-CA_crt.pem"
```

```frpc.toml
transport.tls.force = true
transport.tls.serverName = "speedtest.cn"
transport.tls.certFile = "/cert/FRP-Server_crt.pem"
transport.tls.keyFile = "/cert/FRP-Server_prv.pem"
transport.tls.trustedCaFile = "/cert/FRP-CA_crt.pem"
```
ENE
6 天前
修正一下
```frpc.toml
transport.tls.enable = true
transport.tls.serverName = "speedtest.cn"
transport.tls.disableCustomTLSFirstByte = true
transport.tls.certFile = "/cert/FRP-Client_crt.pem"
transport.tls.keyFile = "/cert/FRP-Client_prv.pem"
transport.tls.trustedCaFile = "/cert/FRP-CA_crt.pem"
```

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1118730

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX