From d1ad585ca9aa322ac98eb664488750a50a571e97 Mon Sep 17 00:00:00 2001 From: Kirill Fertikov Date: Sat, 22 Apr 2023 00:48:21 +0500 Subject: [PATCH] shadowsocks-libev: ACL support Link: https://github.com/openwrt/packages/pull/20647 Signed-off-by: Kirill Fertikov [indentation fix] Signed-off-by: Yousong Zhou --- net/shadowsocks-libev/Makefile | 2 +- net/shadowsocks-libev/files/shadowsocks-libev.init | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile index 3642746e94..0c4ce1bd68 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.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) diff --git a/net/shadowsocks-libev/files/shadowsocks-libev.init b/net/shadowsocks-libev/files/shadowsocks-libev.init index f9aee76a78..5330b87353 100644 --- a/net/shadowsocks-libev/files/shadowsocks-libev.init +++ b/net/shadowsocks-libev/files/shadowsocks-libev.init @@ -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() { -- 2.30.2