Merge Lean's source

This commit is contained in:
CN_SZTL 2020-02-14 01:08:14 +08:00
commit 5ef3c35ad3
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
16 changed files with 101 additions and 35 deletions

View File

@ -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

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_RELEASE:=137
PKG_RELEASE:=139
PKG_VERSION:=1
include $(INCLUDE_DIR)/package.mk
@ -12,11 +12,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
@ -36,7 +36,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
@ -55,7 +55,7 @@ define Package/luci-app-ssr-plus
+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
endef
define Build/Prepare

View File

@ -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"))

View File

@ -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

View File

@ -166,8 +166,11 @@ msgstr "编辑服务器配置"
msgid "Alias"
msgstr "别名"
msgid "SOCKS5 Proxy"
msgstr "SOCKS5代理"
msgid "SOCKS Proxy"
msgstr "SOCKS(4/5)代理"
msgid "Enable SOCKS Proxy"
msgstr "启用 SOCKS 代理"
msgid "Server"
msgstr "服务器"

View File

@ -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

View File

@ -105,13 +105,13 @@ do
fi
#local
if [ $local_process -gt 0 ] ;then
icount=`busybox ps -w | grep ssr-local |grep -v grep| wc -l`
icount=`busybox ps -w | grep srelay |grep -v grep| wc -l`
if [ $icount -lt $local_process ] #如果进程挂掉就重启它
then
logger -t "$NAME" "ssr local error.restart!"
killall -q -9 ssr-local
killall -q -9 srelay
( /usr/bin/ssr-local -c /var/etc/shadowsocksr_s.json -u -l $sock5_port -f /var/run/ssr-local.pid &)
( /usr/bin/srelay -q -c /etc/srelay.conf -i:$sock5_port -p /var/run/ssr-local.pid >/dev/null 2>&1)
fi
fi
#pdnsd

View File

@ -0,0 +1,47 @@
#
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=srelay
PKG_VERSION:=0.4.8p3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/socks-relay
PKG_MD5SUM:=8121ff3d1b741de95dd6eacc5ad5811c
include $(INCLUDE_DIR)/package.mk
define Package/srelay
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libwrap
SUBMENU:=Web Servers/Proxies
TITLE:=A socks 4/5 proxy server
URL:=http://www.c-wind.com/srelay/
endef
define Package/srelay/conffiles
/etc/srelay.conf
endef
CONFIGURE_ARGS += \
--disable-thread \
--with-libwrap="$(STAGING_DIR)/usr" \
CONFIGURE_VARS += \
CPPFLAGS="-DLINUX $$$$CPPFLAGS" \
define Package/srelay/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) files/$(PKG_NAME).conf $(1)/etc/
endef
$(eval $(call BuildPackage,srelay))

View File

@ -0,0 +1,2 @@
# allow local subnet to access socks proxy
0.0.0.0 any

View File

@ -0,0 +1,14 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=50
SERVICE_USE_PID=1
start() {
service_start /usr/bin/srelay -c /etc/srelay.conf -r -s
}
stop() {
service_stop /usr/bin/srelay
}

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_VERSION:=2.80
PKG_RELEASE:=5
PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq

View File

@ -20,6 +20,7 @@ config dnsmasq
#list notinterface lo
#list bogusnxdomain '64.94.110.11'
option localservice 1 # disable to allow DNS requests from non-local subnets
option filter_aaaa 1
config dhcp lan
option interface lan

View File

@ -829,6 +829,8 @@ dnsmasq_start()
append_bool "$cfg" allservers "--all-servers"
append_bool "$cfg" noping "--no-ping"
append_bool "$cfg" filter_aaaa "--filter-aaaa"
append_parm "$cfg" logfacility "--log-facility"
append_parm "$cfg" cachesize "--cache-size"

View File

@ -87,9 +87,6 @@ DRIVER_MAKEOPTS= \
CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
space :=
space +=
ifneq ($(LOCAL_VARIANT),mini)
DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT)
endif

View File

@ -13,7 +13,7 @@ FEATURES:=usbgadget
CPU_TYPE:=24kc
SUBTARGETS:=generic tiny nand mikrotik
KERNEL_PATCHVER:=4.14
KERNEL_PATCHVER:=4.9
include $(INCLUDE_DIR)/target.mk

View File

@ -5614,6 +5614,7 @@ CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
# CONFIG_X25 is not set
# CONFIG_X509_CERTIFICATE_PARSER is not set
# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set
# CONFIG_X86_DECODER_SELFTEST is not set
# CONFIG_X86_PKG_TEMP_THERMAL is not set
CONFIG_X86_SYSFB=y
# CONFIG_XEN is not set