Disclaimer
The following are some personalized configurations I made for a better user experience while using Surge personally, for your reference.
Some of these refer to the configuration guide and rule sets from SukkaW, and I would like to express my gratitude.
It is not ruled out that the following configurations may not work well on your device; please try and modify them yourself.
Also: Please support genuine software.
General Section
Skip local IPs and common software proxy detection domains
Hijack Google DNS requests to prevent Google products from bypassing the Surge proxy
For proxy software, IPv6 is not yet perfect; it is recommended to keep it disabled for now
Bypass proxy for localhost, etc., show error page for rejections, read system hosts
Latency and UDP test URLs. Recommend SukkaW's Mini Test Tool
DNS configuration. If DNS hijacking is not particularly severe, it is recommended to use the built-in one for optimal resolution
Makes Surge treat TCP connections as HTTP requests, enabling rewriting of google.cn requests from other devices in Mac gateway mode
Subsequent action for proxies that do not support UDP forwarding; it is recommended to use REJECT to prevent connection leaks
The merged General configuration is as follows:
Proxy and Proxy Group Section
This section mainly consists of your own server sets and routing rules. The best configuration is the one that best suits your usage habits.
Personally, I don't like very complex policy group selections, and I don't have that need. Routing rules can be referenced from Github
Additionally: It is recommended to use Surge's latest feature: Smart Policy Group, which can significantly reduce concerns about testing policy group availability.
Rule Section
The Rule field uses SukkaW's rule sets, trimmed according to my actual situation. For details, see SukkaW.
Host Section
Since most domestic ISPs currently perform DNS pollution on Github, the above configuration uses 1.1.1.1 DNS resolution for Github URLs.
MITM & Script
The MITM and script functions mainly depend on personal needs. For script searching, you can follow NobyDa's TG channel
Here are some scripts I am currently using, for your reference.
These are Alibaba Cloud check-in script, AliYun Drive check-in, Amap Ride-hailing check-in, and Longfor Tianjie check-in. The four below are Cookie acquisition scripts.
The corresponding hostname needs to be added:
Modules
Refer to LoonKissSurge Repository. Please choose the required modules yourself. Grateful for the selfless dedication of various developers.
Special Configuration for China Broadnet
Because China Broadnet's network infrastructure is not yet perfect, there is a high probability of experiencing long spinning circles for "Connecting" / "Receiving" while using WeChat. The following configuration has been tested and can effectively improve this.
Trash Broadnet, already canceled the card, switched to Unicom which has even worse network
Add the above to [Rule] to drop all UDP and QUIC requests on port 443
Add the above to [Host] to resolve WeChat-related domains using 360 DNS
The above are the tested working configurations that can significantly improve the WeChat spinning issue. If you have better configurations, please feel free to comment and share.