Net core: with capture on, the Mac's DNS goes into the core

The home router's DNS (192.168.10.1) doesn't answer; a LAN DNS server is reached around
the TUN, so with AmneziaVPN off nothing resolved. netctl now points every network service
at 198.18.0.2 (hijacked inside the TUN) when capture is on, restores the previous servers
when it goes off, and syncs this at boot. uninstall.sh puts DNS back too.
Adds scripts/netcore/diag.sh (one-minute TUN diagnosis, run by hand with sudo).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-10 00:25:54 +03:00
parent 3077404ebf
commit 817c837f5a
3 changed files with 175 additions and 0 deletions
+4
View File
@@ -4,6 +4,10 @@
# After this the Mac goes online by itself; turn AmneziaVPN back on if needed.
set -e
[ "$(id -u)" -eq 0 ] || { echo "Запусти через sudo: sudo sh $0"; exit 1; }
# DNS pointed into the core goes back to automatic.
networksetup -listallnetworkservices | tail -n +2 | grep -v '^\*' | while read -r svc; do
[ "$(networksetup -getdnsservers "$svc")" = "198.18.0.2" ] && networksetup -setdnsservers "$svc" Empty
done
for label in local.maksar.brov.netctl local.maksar.brov.netd; do
launchctl bootout "system/$label" 2>/dev/null || true
rm -f "/Library/LaunchDaemons/$label.plist"