1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2023-12-27 11:31:37 +08:00 committed by GitHub
commit 2606f4e59b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 6 deletions

View file

@ -73,7 +73,9 @@ _bypass_domains() {
config_get enabled $1 enabled
config_get noipv6 $1 noipv6
config_get family $1 family
config_get vpn $1 vpn
[ -z "$intf" ] && intf="all"
[ "$vpn" = "1" ] && intf="srv_vpn1"
[ "$enabled" = "0" ] && return
[ -z "$domain" ] && return
[ -z "$family" ] && family="ipv4ipv6"
@ -995,6 +997,12 @@ start_service() {
create omr_dst_bypass_all hash:net hashsize 64
create omr6_dst_bypass_all hash:net family inet6 hashsize 64
EOF
ipset -q flush omr_dst_bypass_srv_vpn1 > /dev/null 2>&1
ipset -q flush omr6_dst_bypass_srv_vpn1 > /dev/null 2>&1
ipset -q --exist restore <<-EOF
create omr_dst_bypass_srv_vpn1 hash:net hashsize 64
create omr6_dst_bypass_srv_vpn1 hash:net family inet6 hashsize 64
EOF
}
$IPTABLESSAVE --counters 2>/dev/null | grep -v omr-bypass | $IPTABLESRESTORE -w --counters 2>/dev/null
$IPTABLESRESTORE -w --wait=60 --noflush <<-EOF