luci-app-ssr-plus: let dns2socks as option

This commit is contained in:
LEAN-ESX 2020-03-05 22:26:56 -08:00 committed by CN_SZTL
parent 336b5ee040
commit b890508f6f
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
5 changed files with 11 additions and 25 deletions

View File

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

View File

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

View File

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

View File

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

View File

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