Browse Source

shadowsocks-libev: ss-rules: setup policy rules for udp/ip6

Supersedes: https://github.com/openwrt/packages/pull/18852
Fixes: https://github.com/openwrt/packages/issues/18850
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit a67ad632b6)
lilik-openwrt-22.03
Yousong Zhou 2 years ago
parent
commit
53952a136a
2 changed files with 9 additions and 5 deletions
  1. +1
    -1
      net/shadowsocks-libev/Makefile
  2. +8
    -4
      net/shadowsocks-libev/files/ss-rules/chain.uc

+ 1
- 1
net/shadowsocks-libev/Makefile View File

@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
#
PKG_NAME:=shadowsocks-libev
PKG_VERSION:=3.3.5
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)


+ 8
- 4
net/shadowsocks-libev/files/ss-rules/chain.uc View File

@ -52,10 +52,14 @@ if (proto == "tcp") {
redir_port = o_redir_udp_port;
if (system("
set -o errexit
while ip rule del fwmark 1 lookup 100 2>/dev/null; do true; done
ip rule add fwmark 1 lookup 100
ip route flush table 100 2>/dev/null || true
ip route add local default dev lo table 100
iprr() {
while ip $1 rule del fwmark 1 lookup 100 2>/dev/null; do true; done
ip $1 rule add fwmark 1 lookup 100
ip $1 route flush table 100 2>/dev/null || true
ip $1 route add local default dev lo table 100
}
iprr -4
iprr -6
") != 0) {
return ;
}


Loading…
Cancel
Save