1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 11:31:51 +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-libev
ss_bindir=/usr/bin
ssrules_uc="/usr/share/ss-rules/ss-rules.uc"
ssrules_nft="/etc/nftables.d/90-ss-rules.nft"
ssrules_nft="/etc/nftables.d/90-proxy-ss-rules.nft"
ss_mkjson_server_conf() {
local cfgserver
@ -219,8 +219,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
}

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
}

View file

@ -13,7 +13,7 @@ NAME=v2ray
CONFIG_FOLDER=/var/etc/$NAME
v2rrules_uc="/usr/share/v2ray-rules/v2r-rules.uc"
v2rrules_nft="/etc/nftables.d/90-proxy-rules.nft"
v2rrules_nft="/etc/nftables.d/90-proxy-v2ray-rules.nft"
FILE_V2RAY_DNSMASQ=/tmp/dnsmasq.d/$NAME
FILE_V2RAY_DNSMASQ_CACHE=/tmp/$NAME.dnsmasq.cache

View file

@ -13,7 +13,7 @@ NAME=xray
CONFIG_FOLDER=/var/etc/$NAME
xrrules_uc="/usr/share/xray-rules/xr-rules.uc"
xrrules_nft="/etc/nftables.d/90-proxy-rules.nft"
xrrules_nft="/etc/nftables.d/90-proxy-x2ray-rules.nft"
FILE_XRAY_DNSMASQ=/tmp/dnsmasq.d/$NAME
FILE_XRAY_DNSMASQ_CACHE=/tmp/$NAME.dnsmasq.cache