1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Set again custom rules for each proxy, else current rules are removed on another proxy stop

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-01-17 16:44:13 +01:00
parent 37b059f39a
commit 6da3a4768a
4 changed files with 8 additions and 6 deletions

View file

@ -15,7 +15,7 @@ ss_confdir=/var/etc/shadowsocks-rust
ss_bindir=/usr/bin
ssrules_uc="/usr/share/ssr-rules/ss-rules.uc"
ssrules_nft="/etc/nftables.d/90-proxy-rules.nft"
ssrules_nft="/etc/nftables.d/90-proxy-ssr-rules.nft"
ss_mkjson_server_conf() {
local cfgserver
@ -172,8 +172,9 @@ ss_rules_nft_gen() {
}
ss_rules_nft_reset() {
if [ -f "$ssrules_nft" ]; then
if [ -f "$ssrules_nft" ] || [ -f "${ssrules_nft}.down" ]; then
rm -f "$ssrules_nft"
rm -f "${ssrules_nft}.down"
fw4 -q restart
fi
}