diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile index b1dc6bfe7..0374e7ece 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.5 -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/README.md b/net/shadowsocks-libev/README.md index 30181ce25..742d1316b 100644 --- a/net/shadowsocks-libev/README.md +++ b/net/shadowsocks-libev/README.md @@ -32,6 +32,8 @@ Section type `server` is for definition of remote shadowsocks servers. They wil Section type `ss_local`, `ss_redir`, `ss_tunnel` are for specification of shadowsocks-libev components. They share mostly a common set of options like `local_port`, `verbose`, `fast_open`, `timeout`, etc. +Plugin options should be specified in `server` section and will be inherited by other compoenents referring to it. + We can have multiple instances of component and `server` sections. The relationship between them is many-to-one. This will have the following implications - It's possible to have both `ss_local` and `ss_redir` referring to the same `server` definition diff --git a/net/shadowsocks-libev/files/shadowsocks-libev.init b/net/shadowsocks-libev/files/shadowsocks-libev.init index 2f5168177..79ec2e8b3 100644 --- a/net/shadowsocks-libev/files/shadowsocks-libev.init +++ b/net/shadowsocks-libev/files/shadowsocks-libev.init @@ -30,6 +30,8 @@ ss_mkjson_server_conf_() { [ -z "$method" ] || json_add_string method "$method" [ -z "$key" ] || json_add_string key "$key" [ -z "$password" ] || json_add_string password "$password" + [ -z "$plugin" ] || json_add_string plugin "$plugin" + [ -z "$plugin_opts" ] || json_add_string plugin_opts "$plugin_opts" } ss_mkjson_ss_local_conf() { @@ -73,8 +75,6 @@ ss_xxx() { [ -z "$mode" ] || json_add_string mode "$mode" [ -z "$mtu" ] || json_add_int mtu "$mtu" [ -z "$timeout" ] || json_add_int timeout "$timeout" - [ -z "$plugin" ] || json_add_string plugin "$plugin" - [ -z "$plugin_opts" ] || json_add_string plugin_opts "$plugin_opts" [ -z "$user" ] || json_add_string user "$user" json_dump -i >"$confjson" @@ -214,7 +214,9 @@ validate_common_server_options_() { 'server_port:port' \ 'password:string' \ 'key:string' \ - "method:or($stream_methods, $aead_methods)" + "method:or($stream_methods, $aead_methods)" \ + 'plugin:string' \ + 'plugin_opts:string' } validate_common_client_options_() { @@ -239,8 +241,6 @@ validate_common_options_() { 'mode:or("tcp_only", "udp_only", "tcp_and_udp"):tcp_only' \ 'mtu:uinteger' \ 'timeout:uinteger' \ - 'plugin:string' \ - 'plugin_opts:string' \ 'user:string' }