haxpor / Potatso

Potatso is an iOS client that implements Shadowsocks proxy with the leverage of NetworkExtension framework. ***This project is unmaintained, try taking a look at this fork https://github.com/shadowcoel/shadowcoel instead.
GNU General Public License v3.0
2.05k stars 1.38k forks source link

Discuss about sock5 proxy and http proxy #96

Open zhkufish opened 6 years ago

zhkufish commented 6 years ago

http proxy, It use Privoxy to proxy http request. the rules make the request throw vpn or direct. such as www.baidu.com direct. and www.google.com.hk proxy.

But, I can't understand sock5 proxy. how it distinguish between domestic requests and foreign requests. such as wechat direct. telgram and whatsapp proxy.

英文不好, 附上中文, 有没大神可以解释一下. http代理好理解, 通过Privoxy配置不同的规则, 可以让国内的请求直连, 国外的请求走代理. 但是像一些聊天软件, 不是走http协议的, 直接tcp的, 这个app是通过什么办法来区分的呢? Antinat(SOCKS5 proxy),Privoxy(HTTP proxy), shadowsocks-libev, tun2socks 这几个之间是怎么工作的, 看了2天代码, 都没看明白.

so898 commented 6 years ago

这里依靠的是 Antinat 这个 Proxy Antinat 规则会将需要走代理的转发到 ss,不需要直接被处理并发送 tun2sock 是将设备给程序的 tcp IP packet 转换成 sock 包的形式发送给 Antinat

zhkufish commented 6 years ago

我想实现节点ping检查的功能. 但是发现, 如果是vpn没有连上之前, 是正常的, 连上vpn之后. 结果就都变成0ms的ping值了.不知道这个是不是要在antinat把需要ping检查的ip给过滤掉.