mirror of
https://github.com/teddysun/across.git
synced 2025-01-19 06:19:35 +08:00
Update wireguard.sh
This commit is contained in:
parent
d9f6fab4ea
commit
c90af7d498
@ -341,7 +341,7 @@ set_firewall() {
|
||||
if _exists "firewall-cmd"; then
|
||||
if [ "$(firewall-cmd --state | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g")" = "running" ]; then
|
||||
default_zone="$(firewall-cmd --get-default-zone)"
|
||||
if [ "$(firewall-cmd --zone=${default_zone} --query-masquerade | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g")" = "no" ]; then
|
||||
if [ "$(firewall-cmd --zone=${default_zone} --query-masquerade)" = "no" ]; then
|
||||
_error_detect "firewall-cmd --zone=${default_zone} --add-masquerade"
|
||||
fi
|
||||
if ! firewall-cmd --list-ports | grep -qw "${SERVER_WG_PORT}/udp"; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user