From b890508f6fe68a2e32b1aa84e8603e5651a7242d Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Thu, 5 Mar 2020 22:26:56 -0800 Subject: [PATCH] luci-app-ssr-plus: let dns2socks as option --- .github/issue_template | 13 ------------- .github/pull_request_template | 8 -------- package/lean/luci-app-ssr-plus/Makefile | 11 ++++++++--- .../luasrc/model/cbi/shadowsocksr/client.lua | 2 ++ .../luasrc/model/cbi/unblockmusiclog.lua | 2 +- 5 files changed, 11 insertions(+), 25 deletions(-) delete mode 100644 .github/issue_template delete mode 100644 .github/pull_request_template diff --git a/.github/issue_template b/.github/issue_template deleted file mode 100644 index dc2b2da70c..0000000000 --- a/.github/issue_template +++ /dev/null @@ -1,13 +0,0 @@ -This repository is a mirror of our main repo at https://git.openwrt.org/openwrt/openwrt.git -It is for reference only and is not active for checkins or for reporting issues. - -All issues should be reported at: https://bugs.openwrt.org - -Please do not open any NEW issue here - we will be closing the Github issues -capability in the near future. - -We will continue to accept Pull Requests here as described in the repo description. - -Close this now and click here: https://bugs.openwrt.org - -Thankyou for your co-operation. diff --git a/.github/pull_request_template b/.github/pull_request_template deleted file mode 100644 index a2d6bd185f..0000000000 --- a/.github/pull_request_template +++ /dev/null @@ -1,8 +0,0 @@ -Thanks for your contribution to OpenWrt! - -To help keep the codebase consistent and readable, -and to help people review your contribution, -we ask you to follow the rules you find in the wiki at this link -https://openwrt.org/submitting-patches - -Please remove this message before posting the pull request. diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index f639c9492a..8aeb0b8dcf 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=163 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) @@ -40,6 +40,10 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server bool "Include ShadowsocksR Server" default y if x86_64 + +config PACKAGE_$(PKG_NAME)_INCLUDE_DNS2SOCKS + bool "Include DNS2SOCKS" + default n endef define Package/$(PKG_NAME) @@ -48,7 +52,7 @@ define Package/$(PKG_NAME) SUBMENU:=3. Applications TITLE:=SS/SSR/V2Ray/Trojan LuCI interface PKGARCH:=all - DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +pdnsd-alt +wget +lua +microsocks +dns2socks \ + DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +pdnsd-alt +wget +lua +microsocks \ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks:shadowsocks-libev-ss-redir \ +PACKAGE_$(PKG_NAME)_INCLUDE_Simple_obfs:simple-obfs \ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_plugin:v2ray-plugin \ @@ -56,7 +60,8 @@ define Package/$(PKG_NAME) +PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:trojan \ +PACKAGE_$(PKG_NAME)_INCLUDE_Redsocks2:redsocks2 \ +PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun:openwrt-kcptun-client \ - +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-server + +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-server \ + +PACKAGE_$(PKG_NAME)_INCLUDE_DNS2SOCKS:dns2socks endef define Build/Prepare diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua index 18ec3d9c75..d5912b62cc 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua @@ -70,7 +70,9 @@ o.default = 1 o = s:option(ListValue, "pdnsd_enable", translate("Resolve Dns Mode")) o:value("1", translate("Use Pdnsd tcp query and cache")) +if nixio.fs.access("/usr/bin/dns2socks") then o:value("2", translate("Use DNS2SOCKS query and cache")) +end o:value("0", translate("Use Local DNS Service listen port 5335")) o:value("2", translate("Use system DNS")) o.default = 1 diff --git a/package/lean/luci-app-unblockmusic/luasrc/model/cbi/unblockmusiclog.lua b/package/lean/luci-app-unblockmusic/luasrc/model/cbi/unblockmusiclog.lua index a9dc137330..c02d1cc4bc 100644 --- a/package/lean/luci-app-unblockmusic/luasrc/model/cbi/unblockmusiclog.lua +++ b/package/lean/luci-app-unblockmusic/luasrc/model/cbi/unblockmusiclog.lua @@ -7,7 +7,7 @@ t = f:field(TextValue, "conf") t.rmempty = true t.rows = 20 function t.cfgvalue() - luci.sys.exec("grep -B 1 'http' /tmp/unblockmusic.log | grep -v -e'running' -e'TLS' -e'Transport' -e'POST' -e'github' -e'consumed' -e'starting'-e'error' > /tmp/music.log") + luci.sys.exec("grep -B 1 'http' /tmp/unblockmusic.log | grep -v -e'running' -e'TLS' -e'Transport' -e'POST' -e'github' -e'consumed' -e'starting' -e'error' > /tmp/music.log") return fs.readfile(conffile) or "" end t.readonly="readonly"