aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2017-08-30 10:07:06 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2017-08-30 10:13:29 +0800
commitec6f7f7f5373bf6a1f9ff0b7eef63b4820fd5a20 (patch)
tree0ced4a91c59e07a27cb22dbb91b188c4b6ccb0ab /net
parentcff4f65d818514c0220056b46df2d0e852f6c46a (diff)
shadowsocks-libev: ss-rules: resolve server names before adding to ipset
ipset command line utility supports ranges of address: IP-IP, but the dash character is also valid character in host names. If we have a remote server ss-00.example.com, ipset may complain that ipset v6.32: Syntax error: cannot parse ss: resolving to IPv4 address failed Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/shadowsocks-libev/Makefile4
-rwxr-xr-xnet/shadowsocks-libev/files/ss-rules1
2 files changed, 3 insertions, 2 deletions
diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile
index 969868f07..1fbee8d60 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.0.8
-PKG_RELEASE:=9
+PKG_RELEASE:=10
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
@@ -81,7 +81,7 @@ define Package/shadowsocks-libev-ss-rules
SUBMENU:=Web Servers/Proxies
TITLE:=shadowsocks-libev ss-rules
URL:=https://github.com/shadowsocks/shadowsocks-libev
- DEPENDS:=+ip +ipset +iptables-mod-tproxy +shadowsocks-libev-ss-redir +shadowsocks-libev-config
+ DEPENDS:=+ip +ipset +iptables-mod-tproxy +resolveip +shadowsocks-libev-ss-redir +shadowsocks-libev-config
endef
define Package/shadowsocks-libev-ss-rules/install
diff --git a/net/shadowsocks-libev/files/ss-rules b/net/shadowsocks-libev/files/ss-rules
index d0de77a0b..58ce2c279 100755
--- a/net/shadowsocks-libev/files/ss-rules
+++ b/net/shadowsocks-libev/files/ss-rules
@@ -112,6 +112,7 @@ ss_rules_parse_args() {
__errmsg "Please install iptables-mod-conntrack-extra with opkg"
return 1
fi
+ o_remote_servers="$(for s in $o_remote_servers; do resolveip "$s"; done)"
}
ss_rules_flush() {