txthinking / brook

A cross-platform programmable network tool
https://brook.app
GNU General Public License v3.0
14.57k stars 2.4k forks source link

I've found that disabling fakeDNS makes Instagram work better. 我发现关闭fakeDNS能让 Instagram 更好的工作 #1018

Closed txthinking closed 1 year ago

txthinking commented 1 year ago

iOS

Instagram can block your server IP? Instagram 会 ban IP? https://github.com/shadowsocks/shadowsocks-android/issues/2354#issuecomment-555390093

Instagram won't fall back, so requires your server support both ipv4 and ipv6. Instagram 不会 fallback 所以需要你的服务器支持 ipv4 和 ipv6. https://github.com/shadowsocks/shadowsocks-android/issues/1632#issuecomment-365849380

txthinking-bot commented 1 year ago

😑 Instagram and WhatsApp problems have started again since yesterday!! It is different in each isp ! I thought this problem was solved in v20220707 ! 😰 by paxox

txthinking-bot commented 1 year ago

此结论是由观察了两天所得,一天开启fakedns,一天关闭fakedns,然后观察了下。 其中有情况是instagram缓存fake ip的情况。 所以结论是感性的,无法提供客观证据支持。

这两情况相对于instagram客户端来说,区别就是instagram得到的自己将要发往的 IP 不同,其内部是否有此因子相关的逻辑与否,不得而知 by unknown

txthinking commented 1 year ago

Android 又没问题,无论安全dns,fakedns开启与否

txthinking commented 1 year ago

Fake DNS开启会返回Fake IP,也就是会在断开VPN后或断开再连接后,一些app可能有自己的DNS缓存机制(比如instagram),仍去连接之前的 Fake IP,直到app自己的dns缓存机制失效。Fake DNS的TTL是60s,也就是说按照标准任何DNS查询发起端应该遵守60秒后让之前的查询结果失效并进行新的查询,但是某些app不遵守标准(比如instagram),所以要等待或进行某些操作才能让其自己的dns缓存失效,进而重新查询IP。

所以可以关闭 Fake DNS 即可。或。等待或让操作些什么让instagram的缓存机制失效。

但是关闭 Fake DNS后,如果你的服务器不支持IPv6,有可能会遇到IPv6的问题(取决于app的双栈机制)。首先brook是偏爱双栈网络环境的也鼓励大家购买双栈服务器,对于双栈网络的fallback机制目前看各个系统甚至app处理不同。也就是说有可能个别app会解析到AAAA,然后就将ipv6 address送到服务端并要求其代理,并不再进行ipv4的尝试。

所以让服务器支持IPv6即可。或。让服务器 relay 到另外一个支持IPv6的服务器落地。


或使用可编程机制用脚本细粒度控制

txthinking commented 1 year ago

When Fake DNS is turned on, it will return Fake IP, that is, after disconnecting the VPN or after disconnecting and reconnecting, some apps may have their own DNS caching mechanism (such as instagram), and still connect to the previous Fake IP until the app's own dns The caching mechanism fails. The TTL of Fake DNS is 60s, that is to say, according to the standard, any DNS query initiator should invalidate the previous query result and make a new query after 60 seconds, but some apps do not comply with the standard (such as instagram), so wait or Only by performing certain operations can its own dns cache be invalidated, and then the IP can be re-queried.

So you can turn off Fake DNS. or. Wait or do something to invalidate instagram's caching mechanism.

But after turning off Fake DNS, if your server does not support IPv6, you may encounter IPv6 problems (depending on the dual-stack mechanism of the app). First of all, Brook prefers a dual-stack network environment and encourages everyone to purchase a dual-stack server. The fallback mechanism for a dual-stack network currently depends on each system and even app. That is to say, it is possible that individual apps will resolve to AAAA, and then send the ipv6 address to the server and request its proxy, and will not try ipv4 again.

So let the server support IPv6. or. Let the server relay to another server that supports IPv6 to land.


Or use a programmable mechanism for fine-grained control with scripts

txthinking-bot commented 1 year ago

电信宽带重启光猫能拿到240e的ipv6,但不能访问ipv6站点,就是之前正常,重启就废。客服不懂,师傅说ipv6不稳定,感觉也是半瓶子。据同事说。看来ipv6任重而道远 by