Surge Module that automatically switches policy groups when your network location changes — so you don't have to.
Designed for people who travel or live abroad while maintaining a local proxy / home server (e.g. via Surge Ponte), and need domestic traffic to route through home when away.
When a network change is detected (Wi-Fi / Cellular switch, Airplane Mode toggle), the script checks your exit IP against your home country. It then sets your policy groups to either Home or Abroad mode: