rename project to runaway

This commit is contained in:
2026-11-09 10:13:51 +08:00
parent 20946dd445
commit 205f2faf02
95 changed files with 1034 additions and 1034 deletions
+10 -10
View File
@@ -1,11 +1,11 @@
VPN_RULES_ANCHOR="com.unleash/vpn-kill"
VPN_RULES_FILE="/etc/pf.anchors/com.unleash/vpn-kill"
VPN_RULES_ANCHOR="com.runaway/vpn-kill"
VPN_RULES_FILE="/etc/pf.anchors/com.runaway/vpn-kill"
vpn_kill_install() {
header "VPN Kill-Switch — MDM Leak Protection"
if ! is_root; then
error_exit "VPN kill-switch needs sudo: sudo ./unleash vpn-kill"
error_exit "VPN kill-switch needs sudo: sudo ./runaway vpn-kill"
fi
local vpn_if=""
@@ -15,7 +15,7 @@ vpn_kill_install() {
interfaces=$(ifconfig 2>/dev/null | grep -E "^utun[0-9]+:" | sed 's/:.*//' || true)
if [ -z "$interfaces" ]; then
warn "No VPN interfaces detected"
info "You can specify manually: sudo ./unleash vpn-kill --interface utunX"
info "You can specify manually: sudo ./runaway vpn-kill --interface utunX"
info "Common VPN interfaces: utun0-9 (WireGuard), utun10+ (OpenVPN), ppp0 (L2TP)"
else
for iface in $interfaces; do
@@ -33,16 +33,16 @@ vpn_kill_install() {
if [ -z "$vpn_if" ]; then
warn "No active VPN detected. Installing kill-switch anyway (no default route)."
info "Usage: sudo ./unleash vpn-kill --interface utunX"
info "Usage: sudo ./runaway vpn-kill --interface utunX"
return 1
fi
step "Installing pf rules for VPN kill-switch..."
local anchor_dir="/etc/pf.anchors/com.unleash"
local anchor_dir="/etc/pf.anchors/com.runaway"
mkdir -p "$anchor_dir"
cat > "$VPN_RULES_FILE" << RULES
# Unleash VPN kill-switch
# Runaway VPN kill-switch
# Only allow MDM traffic through VPN interface $vpn_if
block drop out proto {tcp,udp} to {17.0.0.0/8, 17.128.0.0/10}
pass out proto {tcp,udp} to {17.0.0.0/8, 17.128.0.0/10} no state
@@ -58,7 +58,7 @@ RULES
if grep -q "vpn-kill" "$pf_conf" 2>/dev/null; then
info "pf.conf already has VPN kill-switch anchor"
else
printf '\n%s\n%s\n%s\n' "# Added by unleash — VPN kill-switch (prevents MDM leaks)" "$anchor_line" "$load_line" >> "$pf_conf"
printf '\n%s\n%s\n%s\n' "# Added by runaway — VPN kill-switch (prevents MDM leaks)" "$anchor_line" "$load_line" >> "$pf_conf"
fi
if pfctl -e -f "$pf_conf" 2>/dev/null; then
@@ -81,7 +81,7 @@ vpn_kill_remove() {
header "Remove VPN Kill-Switch"
if ! is_root; then
error_exit "Needs sudo: sudo ./unleash vpn-kill-remove"
error_exit "Needs sudo: sudo ./runaway vpn-kill-remove"
fi
if [ -f "$VPN_RULES_FILE" ]; then
@@ -91,7 +91,7 @@ vpn_kill_remove() {
local pf_conf="/etc/pf.conf"
if [ -f "$pf_conf" ]; then
sed -i '' '/# Added by unleash — VPN kill-switch/d' "$pf_conf" 2>/dev/null || true
sed -i '' '/# Added by runaway — VPN kill-switch/d' "$pf_conf" 2>/dev/null || true
sed -i '' '/vpn-kill/d' "$pf_conf" 2>/dev/null || true
success "pf.conf cleaned"
fi