From c059c283fed882885afb2c854ea9c55700df8d4c Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Tue, 22 Jan 2019 07:48:53 +0000 Subject: [PATCH] shadowsocks-libev: ss-rules: simplify grep_af Signed-off-by: Yousong Zhou --- net/shadowsocks-libev/Makefile | 2 +- net/shadowsocks-libev/files/ss-rules | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile index 81731283f..98b579305 100644 --- a/net/shadowsocks-libev/Makefile +++ b/net/shadowsocks-libev/Makefile @@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk # PKG_NAME:=shadowsocks-libev PKG_VERSION:=3.2.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION) diff --git a/net/shadowsocks-libev/files/ss-rules b/net/shadowsocks-libev/files/ss-rules index 3d7bcdce3..b3dda4fef 100755 --- a/net/shadowsocks-libev/files/ss-rules +++ b/net/shadowsocks-libev/files/ss-rules @@ -101,7 +101,7 @@ o_src_default=bypass o_dst_default=bypass o_local_default=bypass -alias grep_af="sed -nre '/^([0-9]+\.){3}[0-9]+$/p'" +alias grep_af="sed -ne '/:/!p'" o_dst_bypass_="$o_dst_bypass4_" if [ -n "$o_use_ipv6" ]; then alias grep_af="sed -ne /:/p" @@ -183,8 +183,8 @@ ss_rules_ipset_mkadd() { local i for i in $*; do - echo "$i" - done | grep_af | sed -e "s/^/add $setname /" + echo "add $setname $i" + done | grep_af } ss_rules_iptchains_init() {