From 5074d855f047cadd3ec9a166650c3004f61eb64c Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 15 Jan 2024 09:17:44 +0100 Subject: [PATCH 1/2] Use same nft file for all proxy --- shadowsocks-libev/files/shadowsocks-libev.init-nft | 2 +- shadowsocks-rust/files/shadowsocks-rust.init-nft | 2 +- v2ray-core/files/etc/init.d/v2ray-nft | 2 +- xray-core/files/etc/init.d/xray-nft | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shadowsocks-libev/files/shadowsocks-libev.init-nft b/shadowsocks-libev/files/shadowsocks-libev.init-nft index b531605155..a42fce5d88 100755 --- a/shadowsocks-libev/files/shadowsocks-libev.init-nft +++ b/shadowsocks-libev/files/shadowsocks-libev.init-nft @@ -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-rules.nft" ss_mkjson_server_conf() { local cfgserver diff --git a/shadowsocks-rust/files/shadowsocks-rust.init-nft b/shadowsocks-rust/files/shadowsocks-rust.init-nft index 4f9fd0d211..d1d153deb5 100755 --- a/shadowsocks-rust/files/shadowsocks-rust.init-nft +++ b/shadowsocks-rust/files/shadowsocks-rust.init-nft @@ -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-ssr-rules.nft" +ssrules_nft="/etc/nftables.d/90-proxy-rules.nft" ss_mkjson_server_conf() { local cfgserver diff --git a/v2ray-core/files/etc/init.d/v2ray-nft b/v2ray-core/files/etc/init.d/v2ray-nft index 3c4e70ea27..30d342fac8 100755 --- a/v2ray-core/files/etc/init.d/v2ray-nft +++ b/v2ray-core/files/etc/init.d/v2ray-nft @@ -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-v2r-rules.nft" +v2rrules_nft="/etc/nftables.d/90-proxy-rules.nft" FILE_V2RAY_DNSMASQ=/tmp/dnsmasq.d/$NAME FILE_V2RAY_DNSMASQ_CACHE=/tmp/$NAME.dnsmasq.cache diff --git a/xray-core/files/etc/init.d/xray-nft b/xray-core/files/etc/init.d/xray-nft index 94d197f76c..a92efe7dfb 100755 --- a/xray-core/files/etc/init.d/xray-nft +++ b/xray-core/files/etc/init.d/xray-nft @@ -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-xr-rules.nft" +xrrules_nft="/etc/nftables.d/90-proxy-rules.nft" FILE_XRAY_DNSMASQ=/tmp/dnsmasq.d/$NAME FILE_XRAY_DNSMASQ_CACHE=/tmp/$NAME.dnsmasq.cache From f10191f25b903d168e72e15e724718825679b8ef Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 15 Jan 2024 10:27:29 +0100 Subject: [PATCH 2/2] Fix tracker on down interface --- omr-tracker/files/bin/omr-tracker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index 8dacbc24bc..c95d58c611 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -271,7 +271,7 @@ while true; do } if [ -n "$OMR_TRACKER_DEVICE" ] && [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then - if [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep UP)" ]; then + if [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UP')" ]; then # retrieve iface ip and gateway if ([ "$OMR_TRACKER_FAMILY" = "ipv4" ] || [ "$OMR_TRACKER_FAMILY" = "ipv4ipv6" ]) && [ "$OMR_TRACKER_INTERFACE_PROTO" != "dhcpv6" ]; then OMR_TRACKER_DEVICE_IP=$(ip -4 -br addr ls dev "$OMR_TRACKER_DEVICE" | awk -F'[ /]+' '{print $3}')