shadowsocks-libev: add plugin options support
authorYousong Zhou <redacted>
Sun, 5 May 2019 16:53:39 +0000 (16:53 +0000)
committerYousong Zhou <redacted>
Mon, 6 May 2019 15:11:09 +0000 (15:11 +0000)
Reference: https://github.com/openwrt/packages/issues/8903
Signed-off-by: Yousong Zhou <redacted>
net/shadowsocks-libev/Makefile
net/shadowsocks-libev/files/shadowsocks-libev.init

index 3214a3cc597829ff6eff63927f326925a23ae2e6..b1dc6bfe75231f767209f43071fac1d90ffde002 100644 (file)
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
 #
 PKG_NAME:=shadowsocks-libev
 PKG_VERSION:=3.2.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
index 42ffe9e0ddd5d8f27da41f07d52bf4e16c3be251..2f51681774d7746ca5dc35821e053cf81e5d9ad0 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh /etc/rc.common
 #
-# Copyright (C) 2017 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v3.
 # See /LICENSE for more information.
@@ -73,6 +73,8 @@ 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"
 
@@ -237,6 +239,8 @@ 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'
 }
 
git clone https://git.99rst.org/PROJECT