shadowsocks-libev: ACL support
authorKirill Fertikov <kirill.fertikov@gmail.com>
Fri, 21 Apr 2023 19:48:21 +0000 (00:48 +0500)
committerYousong Zhou <yszhou4tech@gmail.com>
Sun, 23 Apr 2023 05:54:08 +0000 (13:54 +0800)
Link: https://github.com/openwrt/packages/pull/20647
Signed-off-by: Kirill Fertikov <kirill.fertikov@gmail.com>
[indentation fix]
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
net/shadowsocks-libev/Makefile
net/shadowsocks-libev/files/shadowsocks-libev.init

index 3642746e947828d8a830ccaded432737d19ac071..0c4ce1bd689b3399a7405356763a13073f505854 100644 (file)
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
 #
 PKG_NAME:=shadowsocks-libev
 PKG_VERSION:=3.3.5
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
index f9aee76a78e985aef55612d42982dfea217d9127..5330b873531705fcfe4260008a51748f7e92196d 100644 (file)
@@ -81,6 +81,7 @@ ss_xxx() {
        [ -z "$mtu" ] || json_add_int mtu "$mtu"
        [ -z "$timeout" ] || json_add_int timeout "$timeout"
        [ -z "$user" ] || json_add_string user "$user"
+       [ -z "$acl" ] || json_add_string acl "$acl"
        json_dump -i >"$confjson"
 
        procd_open_instance "$cfgtype.$cfg"
@@ -273,7 +274,8 @@ validate_server_section() {
 }
 
 validate_ss_local_section() {
-       validate_common_client_options_ ss_local "$1" "$2"
+       validate_common_client_options_ ss_local "$1" "$2" \
+               'acl:file'
 }
 
 validate_ss_redir_section() {
@@ -307,7 +309,8 @@ validate_ss_server_section() {
                'local_address:ipaddr' \
                'local_ipv4_address:ip4addr' \
                'local_ipv6_address:ip6addr' \
-               'bind_address:ipaddr'
+               'bind_address:ipaddr' \
+               'acl:file'
 }
 
 validate_ss_tunnel_section() {