Shadowsocks-libev: SOCKS5 Proxy 5x-10x faster than Transparent Proxy

Created on 24 Nov 2016  ·  3Comments  ·  Source: shadowsocks/shadowsocks-libev

What version of shadowsocks-libev are you using?

Shadowsocks-libev for OpenWrt 2.5.6

What operating system are you using?

OpenWrt

What did you do?

Transparent Proxy or SOCKS5 Proxy?

What did you expect to see?

Transparent Proxy 和 SOCKS5 Proxy有同样的速度?

What did you see instead?

不知道为什么同一台服务器 SOCKS5 Proxy 比Transparent Proxy平均快5-10倍的速度

What is your config in detail (with all sensitive info masked)?

qq 20161124155805

Transparent Proxy 900Kbps~2500Kbps
qq 20161124154922

SOCKS5 Proxy 9000Kbps~20000Kbps
qq 20161124155038

qq 20161124155235

Most helpful comment

Transparent Proxy是指的全局代理吧?应该和地区和ISP都有关系,我这里联通也是这样的,UDP容易被限速,有时候还会被阻断几分钟,同一时间TCP很快而且很稳定。
你应该是用的Chrome浏览器吧,Chrome支持QUIC协议,QUIC是走UDP的,YouTube会优先尝试QUIC,如果不通就会走TCP,所以你可以在你的VPS上用iptables禁止VPS访问80和443UDP端口来禁止QUIC。

iptables -A OUTPUT -p udp --dport 80 -j DROP
iptables -A OUTPUT -p udp --dport 443 -j DROP

另外也可以在Chrome的flags里面关闭QUIC
chrome://flags/#enable-quic

但我个人认为iptables的方法更好,从源头上关闭了所有可能的QUIC。
比如安卓手机上的YouTube应用也会用QUIC,但是YouTube应用本身没有选项关闭QUIC。

All 3 comments

Possible issues:

  1. Your OpenWRT device has a broken kernel or limited resource, so that the NAT performance is very poor.
  2. You didn't add any *.googlevideo.com rules to your dnsmasq.conf
  3. The two videos you tested were located at different Google's cache server, and the first one is far away from your shadowsocks server.

Transparent Proxy是指的全局代理吧?应该和地区和ISP都有关系,我这里联通也是这样的,UDP容易被限速,有时候还会被阻断几分钟,同一时间TCP很快而且很稳定。
你应该是用的Chrome浏览器吧,Chrome支持QUIC协议,QUIC是走UDP的,YouTube会优先尝试QUIC,如果不通就会走TCP,所以你可以在你的VPS上用iptables禁止VPS访问80和443UDP端口来禁止QUIC。

iptables -A OUTPUT -p udp --dport 80 -j DROP
iptables -A OUTPUT -p udp --dport 443 -j DROP

另外也可以在Chrome的flags里面关闭QUIC
chrome://flags/#enable-quic

但我个人认为iptables的方法更好,从源头上关闭了所有可能的QUIC。
比如安卓手机上的YouTube应用也会用QUIC,但是YouTube应用本身没有选项关闭QUIC。

@fiercebead 应该就是你说的这个问题,我尝试了换Edge或者关闭UDP-Relay或者关闭chrome://flags/#enable-quic就都正常了,买的服务,所以VPS动不了
好气,杭州电信

Was this page helpful?
0 / 5 - 0 ratings