From edd05df89ccb6fd4986344963007b258c85bb357 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sun, 30 Oct 2022 15:45:11 -0500 Subject: [PATCH] Update IKEv2 script - Improve the optional VPN On Demand feature on macOS and iOS. Connect only on WiFi networks (instead of any network), with captive portal detection. This is the most common use case. --- extras/ikev2setup.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/extras/ikev2setup.sh b/extras/ikev2setup.sh index f087b5a..0cd6c54 100755 --- a/extras/ikev2setup.sh +++ b/extras/ikev2setup.sh @@ -157,7 +157,7 @@ confirm_or_abort() { show_header() { cat <<'EOF' -IKEv2 Script Copyright (c) 2020-2022 Lin Song 22 Oct 2022 +IKEv2 Script Copyright (c) 2020-2022 Lin Song 30 Oct 2022 EOF } @@ -932,8 +932,22 @@ cat > "$mc_file" <OnDemandRules - Action - Connect + InterfaceTypeMatch + WiFi + URLStringProbe + http://captive.apple.com/hotspot-detect.html + Action + Connect + + + InterfaceTypeMatch + Cellular + Action + Disconnect + + + Action + Ignore RemoteAddress