Merge Lean's source
This commit is contained in:
parent
f7ae70316d
commit
10979c88b3
@ -20,6 +20,8 @@ PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=madeye <max.c.lv@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/shadowsocks/v2ray-plugin
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_RELEASE:=136
|
||||
PKG_RELEASE:=139
|
||||
PKG_VERSION:=1
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
@ -10,11 +10,11 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks
|
||||
default y if x86_64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_Simple_obfs
|
||||
bool "Include Shadowsocks simple-obfs plugin"
|
||||
bool "Include Shadowsocks Simple-obfs Plugin"
|
||||
default y if x86_64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_plugin
|
||||
bool "Include Shadowsocks v2ray plugin"
|
||||
bool "Include Shadowsocks V2ray Plugin"
|
||||
default y if x86_64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray
|
||||
@ -34,7 +34,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server
|
||||
default y if x86_64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks
|
||||
bool "Include ShadowsocksR Socks and Tunnel"
|
||||
bool "Include Socks Sever"
|
||||
default y if x86_64
|
||||
endef
|
||||
|
||||
@ -49,7 +49,7 @@ LUCI_DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsm
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:ipt2socks \
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun:kcptun-client \
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-server \
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks:shadowsocksr-libev-ssr-local
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks:srelay
|
||||
|
||||
define Package/luci-app-ssr-plus/conffiles
|
||||
/etc/ssr_ip
|
||||
|
||||
@ -49,15 +49,12 @@ s.anonymous = true
|
||||
o = s:option(Flag, "adblock", translate("Enable adblock"))
|
||||
o.rmempty = false
|
||||
|
||||
-- [[ SOCKS5 Proxy ]]--
|
||||
if nixio.fs.access("/usr/bin/ssr-local") then
|
||||
s = m:section(TypedSection, "socks5_proxy", translate("SOCKS5 Proxy"))
|
||||
-- [[ SOCKS Proxy ]]--
|
||||
if nixio.fs.access("/usr/bin/srelay") then
|
||||
s = m:section(TypedSection, "socks5_proxy", translate("SOCKS Proxy"))
|
||||
s.anonymous = true
|
||||
|
||||
o = s:option(ListValue, "server", translate("Server"))
|
||||
o:value("nil", translate("Disable"))
|
||||
for _,key in pairs(key_table) do o:value(key,server_table[key]) end
|
||||
o.default = "nil"
|
||||
o = s:option(Flag, "socks", translate("Enable SOCKS Proxy"))
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(Value, "local_port", translate("Local Port"))
|
||||
|
||||
@ -70,7 +70,7 @@ if luci.sys.call("busybox ps -w | grep ssr-retcp | grep -v grep >/dev/null") ==
|
||||
redir_run=1
|
||||
end
|
||||
|
||||
if luci.sys.call("pidof ssr-local >/dev/null") == 0 then
|
||||
if luci.sys.call("pidof srelay >/dev/null") == 0 then
|
||||
sock5_run=1
|
||||
end
|
||||
|
||||
@ -118,8 +118,8 @@ else
|
||||
s.value = translate("Not Running")
|
||||
end
|
||||
|
||||
if nixio.fs.access("/usr/bin/ssr-local") then
|
||||
s=m:field(DummyValue,"sock5_run",translate("SOCKS5 Proxy"))
|
||||
if nixio.fs.access("/usr/bin/srelay") then
|
||||
s=m:field(DummyValue,"sock5_run",translate("SOCKS Proxy"))
|
||||
s.rawhtml = true
|
||||
if sock5_run == 1 then
|
||||
s.value =font_blue .. bold_on .. translate("Running") .. bold_off .. font_off
|
||||
@ -179,8 +179,8 @@ s.rawhtml = true
|
||||
s.template = "shadowsocksr/refresh"
|
||||
s.value =ip_count .. " " .. translate("Records")
|
||||
|
||||
s=m:field(DummyValue,"check_port",translate("Check Server Port"))
|
||||
s.template = "shadowsocksr/checkport"
|
||||
s.value =translate("No Check")
|
||||
-- s=m:field(DummyValue,"check_port",translate("Check Server Port"))
|
||||
-- s.template = "shadowsocksr/checkport"
|
||||
-- s.value =translate("No Check")
|
||||
|
||||
return m
|
||||
|
||||
@ -788,6 +788,12 @@ msgstr "插件"
|
||||
msgid "Plugin Opts"
|
||||
msgstr "插件参数"
|
||||
|
||||
msgid "SOCKS Proxy"
|
||||
msgstr "SOCKS(4/5)代理"
|
||||
|
||||
msgid "Enable SOCKS Proxy"
|
||||
msgstr "启用 SOCKS 代理"
|
||||
|
||||
#~ msgid "ShadowSocksR Client"
|
||||
#~ msgstr "ShadowSocksR 客户端"
|
||||
|
||||
|
||||
@ -474,14 +474,13 @@ start_server() {
|
||||
}
|
||||
|
||||
start_local() {
|
||||
local local_server=$(uci_get_by_type socks5_proxy server)
|
||||
[ "$local_server" = "nil" ] && return 1
|
||||
local local_server=$(uci_get_by_type socks5_proxy socks 0)
|
||||
[ "$local_server" = 0 ] && return 0
|
||||
mkdir -p /var/run /var/etc
|
||||
gen_config_file $local_server 2
|
||||
/usr/bin/ssr-local -c $CONFIG_SOCK5_FILE -u \
|
||||
-l $(uci_get_by_type socks5_proxy local_port 1080) \
|
||||
-b $(uci_get_by_type socks5_proxy local_address 0.0.0.0) \
|
||||
-f /var/run/ssr-local.pid >/dev/null 2>&1
|
||||
|
||||
/usr/bin/srelay -q -c /etc/srelay.conf \
|
||||
-i:$(uci_get_by_type socks5_proxy local_port 1080) \
|
||||
-p /var/run/ssr-local.pid >/dev/null 2>&1
|
||||
local_enable=1
|
||||
}
|
||||
|
||||
@ -568,6 +567,7 @@ stop() {
|
||||
killall -q -9 kcptun-client
|
||||
killall -q -9 ssr-local
|
||||
killall -q -9 pdnsd
|
||||
killall -q -9 srelay
|
||||
|
||||
if [ -f "/tmp/dnsmasq.d/dnsmasq-ssr.conf" ]; then
|
||||
rm -f /tmp/dnsmasq.d/dnsmasq-ssr.conf
|
||||
|
||||
Loading…
Reference in New Issue
Block a user