1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 20:19:45 +00:00

fix: Update firewall management to use socketfilterfw for improved reliability on macOS.

This commit is contained in:
Tw93
2025-12-28 09:39:53 +08:00
parent c8e33931c2
commit 504eda835f
4 changed files with 6 additions and 6 deletions

View File

@@ -260,8 +260,7 @@ ask_for_security_fixes() {
}
apply_firewall_fix() {
if sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 1; then
sudo pkill -HUP socketfilterfw 2> /dev/null || true
if sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on > /dev/null 2>&1; then
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Firewall enabled"
FIREWALL_DISABLED=false
return 0