From 0f352ab56746bfaa58c270f35a8f55e4a3a8032e Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Tue, 3 Mar 2020 01:11:06 -0800 Subject: [PATCH 1/5] luci-app-ssr-plus: enable unlock Netflix proxy DNS at the same server --- package/lean/luci-app-ssr-plus/Makefile | 2 +- package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index ffe7610b84..c19a75dd54 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:=157 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules index ba03efaf3f..140da4ce60 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules @@ -85,7 +85,7 @@ ipset_r() { EOF ipset -N gfwlist hash:net 2>/dev/null $IPT -N SS_SPEC_WAN_AC - $IPT -I SS_SPEC_WAN_AC -d $server -j RETURN + $IPT -I SS_SPEC_WAN_AC -p tcp ! --dport 53 -d $server -j RETURN $IPT -A SS_SPEC_WAN_AC -m set --match-set ss_spec_wan_ac dst -j RETURN $IPT -A SS_SPEC_WAN_AC -j SS_SPEC_WAN_FW elif [ "$RUNMODE" == "gfw" ]; then @@ -94,18 +94,18 @@ ipset_r() { $IPT -A SS_SPEC_WAN_AC -m set --match-set gfwlist dst -j SS_SPEC_WAN_FW $IPT -A SS_SPEC_WAN_AC -m set --match-set gmlan src -m set ! --match-set china dst -j SS_SPEC_WAN_FW $IPT -A SS_SPEC_WAN_AC -m set --match-set china dst -j RETURN - $IPT -I SS_SPEC_WAN_AC -d $server -j RETURN + $IPT -I SS_SPEC_WAN_AC -p tcp ! --dport 53 -d $server -j RETURN elif [ "$RUNMODE" == "oversea" ]; then ipset -N oversea hash:net 2>/dev/null $IPT -N SS_SPEC_WAN_AC ipset -N gmlan hash:net 2>/dev/null for ip in $LAN_GM_IP; do ipset -! add gmlan $ip; done $IPT -A SS_SPEC_WAN_AC -m set --match-set china dst -j SS_SPEC_WAN_FW - $IPT -I SS_SPEC_WAN_AC -d $server -j RETURN + $IPT -I SS_SPEC_WAN_AC -p tcp ! --dport 53 -d $server -j RETURN elif [ "$RUNMODE" == "all" ]; then $IPT -N SS_SPEC_WAN_AC $IPT -A SS_SPEC_WAN_AC -j SS_SPEC_WAN_FW - $IPT -I SS_SPEC_WAN_AC -d $server -j RETURN + $IPT -I SS_SPEC_WAN_AC -p tcp ! --dport 53 -d $server -j RETURN fi ipset -N fplan hash:net 2>/dev/null for ip in $LAN_FP_IP; do ipset -! add fplan $ip; done @@ -194,7 +194,7 @@ tp_rule() { $ipt -A SS_SPEC_TPROXY -p udp -d 192.168.0.0/16 -j RETURN $ipt -A SS_SPEC_TPROXY -p udp -d 224.0.0.0/4 -j RETURN $ipt -A SS_SPEC_TPROXY -p udp -d 240.0.0.0/4 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d $SERVER -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp ! --dport 53 -d $server -j RETURN $ipt -A SS_SPEC_TPROXY -p udp -m set --match-set bplan src -j RETURN $ipt -A SS_SPEC_TPROXY -p udp $PROXY_PORTS -m set --match-set fplan src \ -j TPROXY --on-port "$LOCAL_PORT" --tproxy-mark 0x01/0x01 From 852bc51e9365cf1f2506a513f06a2639f246a99c Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Tue, 3 Mar 2020 04:19:59 -0800 Subject: [PATCH 2/5] luci-app-ssr-plus: add sock5 server username/password auth method --- package/lean/luci-app-ssr-plus/Makefile | 13 ++----- .../model/cbi/shadowsocksr/advanced.lua | 38 +++++++++---------- .../luasrc/model/cbi/shadowsocksr/status.lua | 6 +-- .../luasrc/view/shadowsocksr/server_list.htm | 2 +- .../luci-app-ssr-plus/po/zh-cn/ssr-plus.po | 14 ++++++- .../root/etc/init.d/shadowsocksr | 11 ++++-- .../root/usr/bin/ssr-monitor | 17 +++++---- package/lean/microsocks/Makefile | 38 +++++++++++++++++++ 8 files changed, 93 insertions(+), 46 deletions(-) create mode 100644 package/lean/microsocks/Makefile diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index c19a75dd54..3c26b58db6 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus -PKG_VERSION:=157 -PKG_RELEASE:=2 +PKG_VERSION:=158 +PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) @@ -36,10 +36,6 @@ 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_ShadowsocksR_Socks - bool "Include Socks Sever" - default y if x86_64 endef define Package/$(PKG_NAME) @@ -48,15 +44,14 @@ 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 +ipt2socks \ + DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +pdnsd-alt +wget +lua +ipt2socks +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 \ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray \ +PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:trojan \ +PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun:kcptun-client \ - +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-server \ - +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks:srelay + +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-server endef define Build/Prepare diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua index 7e1070cb1e..3c550e0844 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua @@ -1,22 +1,5 @@ -local shadowsocksr = "shadowsocksr" -local uci = luci.model.uci.cursor() -local server_table = {} -uci:foreach(shadowsocksr, "servers", function(s) - if s.alias then - server_table[s[".name"]] = "[%s]:%s" %{string.upper(s.type), s.alias} - elseif s.server and s.server_port then - server_table[s[".name"]] = "[%s]:%s:%s" %{string.upper(s.type), s.server, s.server_port} - end -end) - -local key_table = {} -for key,_ in pairs(server_table) do - table.insert(key_table,key) -end - -table.sort(key_table) -m = Map(shadowsocksr) +m = Map("shadowsocksr") -- [[ global ]]-- s = m:section(TypedSection, "global", translate("Server failsafe auto swith settings")) s.anonymous = true @@ -65,11 +48,11 @@ o = s:option(Value, "chnroute_url", translate("Update url")) o.default = "https://cdn.jsdelivr.net/gh/17mon/china_ip_list/china_ip_list.txt" -- [[ SOCKS Proxy ]]-- -if nixio.fs.access("/usr/bin/srelay") then -s = m:section(TypedSection, "socks5_proxy", translate("SOCKS Proxy")) +if nixio.fs.access("/usr/bin/microsocks") then +s = m:section(TypedSection, "socks5_proxy", translate("SOCKS5 Proxy Server Settings")) s.anonymous = true -o = s:option(Flag, "socks", translate("Enable SOCKS Proxy")) +o = s:option(Flag, "socks", translate("Enable SOCKS5 Proxy Server")) o.rmempty = false o = s:option(Value, "local_port", translate("Local Port")) @@ -77,5 +60,18 @@ o.datatype = "port" o.default = 1080 o.rmempty = false +o = s:option(Flag, "auth_enable", translate("Enable Authentication")) +o.rmempty = false +o.default = "0" + +o = s:option(Value, "username", translate("Username")) +o.rmempty = false +o:depends("auth_enable", "1") + +o = s:option(Value, "password", translate("Password")) +o.password = true +o.rmempty = false +o:depends("auth_enable", "1") + end return m diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua index 614a362bf4..bb10379f31 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua @@ -65,7 +65,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 srelay >/dev/null") == 0 then +if luci.sys.call("pidof microsocks >/dev/null") == 0 then sock5_run=1 end @@ -113,8 +113,8 @@ else s.value = translate("Not Running") end -if nixio.fs.access("/usr/bin/srelay") then -s=m:field(DummyValue,"sock5_run",translate("SOCKS Proxy")) +if nixio.fs.access("/usr/bin/microsocks") then +s=m:field(DummyValue,"sock5_run",translate("SOCKS5 Proxy Server")) s.rawhtml = true if sock5_run == 1 then s.value =font_blue .. bold_on .. translate("Running") .. bold_off .. font_off diff --git a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm index be523e600e..ca9b70db84 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm +++ b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm @@ -14,7 +14,7 @@ local dsp = require "luci.dispatcher" const dom = doms[index]; const port = ports[index]; if (!dom) res() - port.innerHTML = 'connecting...'; + port.innerHTML = 'connect'; XHR.get('<%=dsp.build_url("admin/services/shadowsocksr/ping")%>', { index, diff --git a/package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po b/package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po index da1bbec08a..c590f7fdb9 100644 --- a/package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po +++ b/package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po @@ -422,7 +422,7 @@ msgid "Auto Update Server subscription, GFW list and CHN route" msgstr "自动更新服务器订阅、GFW列表和 CHN路由表" msgid "Subscribe URL" -msgstr "SS/SSR/V2RAY/Trojan订阅URL地址" +msgstr "SS/SSR/V2/TROJAN订阅URL" msgid "Update" msgstr "更新" @@ -603,3 +603,15 @@ msgstr "订阅新节点自动切换设置" msgid "Subscribe new add server default Auto-Switch on" msgstr "订阅加入的新节点默认开启自动切换" + +msgid "SOCKS5 Proxy Server Settings" +msgstr "SOCKS5 代理服务端设置" + +msgid "Enable SOCKS5 Proxy Server" +msgstr "启用 SOCKS5 代理服务" + +msgid "Enable Authentication" +msgstr "启用 用户名/密码 认证" + +msgid "SOCKS5 Proxy Server" +msgstr "SOCKS5 代理服务端" diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index 4a247925e7..aea402a42c 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -452,10 +452,12 @@ start_server() { start_local() { local local_server=$(uci_get_by_type socks5_proxy socks 0) [ "$local_server" == "0" ] && return 0 - mkdir -p /var/run /var/etc - echo '0.0.0.0 any' >/var/etc/srelay.conf - /usr/bin/srelay -q -c /var/etc/srelay.conf \ - -i:$(uci_get_by_type socks5_proxy local_port 1080) >/dev/null 2>&1 + local auth_enable=$(uci_get_by_type socks5_proxy auth_enable 0) + if [ "$auth_enable" == "1" ]; then + microsocks -i 0.0.0.0 -p $(uci_get_by_type socks5_proxy local_port 1080) -1 -u $(uci_get_by_type socks5_proxy username) -P $(uci_get_by_type socks5_proxy password) >/dev/null 2>&1 & + else + microsocks -i 0.0.0.0 -p $(uci_get_by_type socks5_proxy local_port 1080) >/dev/null 2>&1 & + fi local_enable=1 } @@ -538,6 +540,7 @@ stop() { killall -q -9 ssr-server killall -q -9 kcptun-client killall -q -9 srelay + killall -q -9 microsocks if [ -f /var/run/pdnsd.pid ]; then kill $(cat /var/run/pdnsd.pid) >/dev/null 2>&1 else diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-monitor b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-monitor index 678846d794..a6d581aa67 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-monitor +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-monitor @@ -40,8 +40,6 @@ password=$(uci_get_by_name $GLOBAL_SERVER kcp_password) kcp_param=$(uci_get_by_name $GLOBAL_SERVER kcp_param) [ "$password" != "" ] && password="--key "${password} -sock5_port=$(uci_get_by_type socks5_proxy local_port 1080) - if echo "$server" | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then server=${server} else @@ -97,13 +95,18 @@ while [ "1" == "1" ]; do #死循环 (/usr/bin/kcptun-client -r $server:$kcp_port -l :$server_port $password $kcp_param &) fi fi - #srelay + #microsocks if [ "$local_process" -gt 0 ]; then - icount=$(busybox ps -w | grep srelay | grep -v grep | wc -l) + icount=$(busybox ps -w | grep microsocks | grep -v grep | wc -l) if [ "$icount" -lt "$local_process" ]; then #如果进程挂掉就重启它 - logger -t "$NAME" "srelay error.restart!" - killall -q -9 srelay - (/usr/bin/srelay -q -c /etc/srelay.conf -i:$sock5_port -p /var/run/srelay.pid >/dev/null 2>&1) + logger -t "$NAME" "microsocks error.restart!" + killall -q -9 microsocks + local auth_enable=$(uci_get_by_type socks5_proxy auth_enable 0) + if [ "$auth_enable" == "1" ]; then + microsocks -i 0.0.0.0 -p $(uci_get_by_type socks5_proxy local_port 1080) -1 -u $(uci_get_by_type socks5_proxy username) -P $(uci_get_by_type socks5_proxy password) >/dev/null 2>&1 & + else + microsocks -i 0.0.0.0 -p $(uci_get_by_type socks5_proxy local_port 1080) >/dev/null 2>&1 & + fi fi fi #pdnsd diff --git a/package/lean/microsocks/Makefile b/package/lean/microsocks/Makefile new file mode 100644 index 0000000000..3153b79220 --- /dev/null +++ b/package/lean/microsocks/Makefile @@ -0,0 +1,38 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=microsocks +PKG_VERSION=1.0 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=lean +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/rofl0r/microsocks.git +PKG_SOURCE_VERSION:=be545814aeca1158ae38e2d6c66b1197679dab63 + +PKG_SOURCE_SUBDIR:=$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).$(PKG_RELEASE).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/microsocks + SECTION:=net + CATEGORY:=Network + TITLE:=microsocks for OpenWRT + DEPENDS:= +endef + +define Package/microsocks/description + microsocks is a Tiny Proxy in C. +endef + +define Package/microsocks/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/microsocks $(1)/usr/bin/microsocks +endef + +$(eval $(call BuildPackage,microsocks)) From 91dbacc6ac832583d7213feab279b2bc213fcf4e Mon Sep 17 00:00:00 2001 From: Xiaok Date: Tue, 3 Mar 2020 21:30:24 +0800 Subject: [PATCH 3/5] luci-app-nps: Optimize translations for zh-cn (#3507) * luci-app-nps: Adjust translations for zh-cn * luci-app-nps: Improve log file path * luci-app-nps: Bump release version to v4 --- package/lean/luci-app-nps/Makefile | 4 +-- .../luci-app-nps/luasrc/i18n/nps.zh-cn.lmo | Bin 296 -> 0 bytes .../luci-app-nps/luasrc/i18n/nps.zh_CN.po | 28 ----------------- .../luci-app-nps/luasrc/model/cbi/nps.lua | 2 -- .../luasrc/view/nps/nps_status.htm | 4 +-- package/lean/luci-app-nps/po/zh-cn/nps.po | 29 ++++++++++++++++++ package/lean/luci-app-nps/root/etc/init.d/nps | 2 +- 7 files changed, 33 insertions(+), 36 deletions(-) delete mode 100644 package/lean/luci-app-nps/luasrc/i18n/nps.zh-cn.lmo delete mode 100644 package/lean/luci-app-nps/luasrc/i18n/nps.zh_CN.po create mode 100644 package/lean/luci-app-nps/po/zh-cn/nps.po diff --git a/package/lean/luci-app-nps/Makefile b/package/lean/luci-app-nps/Makefile index b677bcdeed..6f3ec99fc8 100644 --- a/package/lean/luci-app-nps/Makefile +++ b/package/lean/luci-app-nps/Makefile @@ -10,10 +10,8 @@ LUCI_TITLE:=LuCI for Nps LUCI_DEPENDS:=+wget +npc LUCI_PKGARCH:=all PKG_VERSION:=1.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature - - diff --git a/package/lean/luci-app-nps/luasrc/i18n/nps.zh-cn.lmo b/package/lean/luci-app-nps/luasrc/i18n/nps.zh-cn.lmo deleted file mode 100644 index 940bd4e7dc167aaadd5c74bdafca9a22f93a1043..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmeY(D1O@3`h4%i=PUQWZ0KirvUmUUDJ!1#bwA&;^2weBFZNAlfQfZ2c)Gp~CWfp6 zXu#8TJKyi=c?wjrfAzDijW65#U+i7;w148uhWSr-EdxqD*)!|qqPb6(OnbJi<3+=C zh2(-#g%?{}p6!~zzyQ()Gg%?8AX(wbjy@n=tng%K_si*9p3iD|*)Z$L{)KRRfQCJr z)A?*_$IBU;o~>O3wQ$kuXWh%5b*y5DQ~%Fc{KjcD0|SEv5PLP)1bzNmvBMb1ZUJKd v*7vU!_c-o-2V@HXvC!qelI|-T0tJC=5a7R_zV}Y diff --git a/package/lean/luci-app-nps/luasrc/i18n/nps.zh_CN.po b/package/lean/luci-app-nps/luasrc/i18n/nps.zh_CN.po deleted file mode 100644 index 8910c020c9..0000000000 --- a/package/lean/luci-app-nps/luasrc/i18n/nps.zh_CN.po +++ /dev/null @@ -1,28 +0,0 @@ -# zh_CN translation for npc. -# Copyright (C) 2015 Yoyodyne, Inc. (msgids) -# This file is distributed under the same license as the gettext package. -# -msgid "" -msgstr "" -"PO-Revision-Date: 2015-09-01 09:53中国标准时间\n" -"Last-Translator: Ardentwheel \n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - - -msgid "Nps Setting" -msgstr "Nps内网穿透" - -msgid "Enable Compression" -msgstr "使用压缩传输" - -msgid "Enable Encryption" -msgstr "使用加密传输" - -msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources" -msgstr "压缩传输内容,加快流量转发速度,会额外消耗 cpu 资源" - -msgid "Encrypted the communication between Npc and Nps, will effectively prevent the traffic intercepted." -msgstr "加密传输 npc 与 nps 之间的通信内容,会有效防止流量被拦截" \ No newline at end of file diff --git a/package/lean/luci-app-nps/luasrc/model/cbi/nps.lua b/package/lean/luci-app-nps/luasrc/model/cbi/nps.lua index ea7a4e0ec2..829e1bea3e 100755 --- a/package/lean/luci-app-nps/luasrc/model/cbi/nps.lua +++ b/package/lean/luci-app-nps/luasrc/model/cbi/nps.lua @@ -43,5 +43,3 @@ log_level:value(7,"Debug") log_level.default="3" return m - - diff --git a/package/lean/luci-app-nps/luasrc/view/nps/nps_status.htm b/package/lean/luci-app-nps/luasrc/view/nps/nps_status.htm index 5952344bb7..aef743b9cf 100755 --- a/package/lean/luci-app-nps/luasrc/view/nps/nps_status.htm +++ b/package/lean/luci-app-nps/luasrc/view/nps/nps_status.htm @@ -4,10 +4,10 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[nps]], [[status]])%>', null, var tb = document.getElementById('nps_status'); if (data && tb) { if (data.running) { - var links = 'nps <%:RUNNING%>'; + var links = "Nps <%:RUNNING%>"; tb.innerHTML = links; } else { - tb.innerHTML = 'nps <%:NOT RUNNING%>'; + tb.innerHTML = "Nps <%:NOT RUNNING%>"; } } } diff --git a/package/lean/luci-app-nps/po/zh-cn/nps.po b/package/lean/luci-app-nps/po/zh-cn/nps.po new file mode 100644 index 0000000000..4fb9ad411e --- /dev/null +++ b/package/lean/luci-app-nps/po/zh-cn/nps.po @@ -0,0 +1,29 @@ +msgid "Nps Setting" +msgstr "Nps 内网穿透" + +msgid "Nps is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet." +msgstr "Nps 是一种快速反向代理,可帮助您将 NAT 或防火墙后面的本地服务器公开到 Internet。" + +msgid "Must an IPv4 address" +msgstr "必须是 IPv4 地址" + +msgid "vkey" +msgstr "密钥(vkey)" + +msgid "Enable Compression" +msgstr "使用压缩传输" + +msgid "Enable Encryption" +msgstr "使用加密传输" + +msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources." +msgstr "压缩传输内容,加快流量转发速度,会额外消耗 CPU 资源。" + +msgid "Encrypted the communication between Npc and Nps, will effectively prevent the traffic intercepted." +msgstr "加密传输 npc 与 nps 之间的通信内容,会有效防止流量被拦截。" + +msgid "Nps is running." +msgstr "Nps 运行中" + +msgid "Nps is not running." +msgstr "Nps 未运行" \ No newline at end of file diff --git a/package/lean/luci-app-nps/root/etc/init.d/nps b/package/lean/luci-app-nps/root/etc/init.d/nps index 525d06935f..3ea722b618 100755 --- a/package/lean/luci-app-nps/root/etc/init.d/nps +++ b/package/lean/luci-app-nps/root/etc/init.d/nps @@ -4,7 +4,7 @@ START=50 USE_PROCD=1 -LOGFILE="/var/etc/nps.log" +LOGFILE="/tmp/nps.log" tmpconf="/tmp/etc/nps.conf" nps_header() { From 67195ba9cbc6f43d0c8ecc3324c6c7d6ae7af34b Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Tue, 3 Mar 2020 21:33:08 +0800 Subject: [PATCH 4/5] ci: add g++-multilib to dependence (#3496) --- .github/ISSUE_TEMPLATE.md | 4 ++-- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- .github/workflows/openwrt-ci.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 7c0748e509..e6877ba7dd 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -2,8 +2,8 @@ ## 1.关于你要提交的问题 -Q:是否搜索了issue -A:* [ ] 没有类似的issue +Q:是否搜索了issue (使用 "x" 选择) +* [ ] 没有类似的issue ## 2. 详细叙述 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4eb491058e..b9b4232d7c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,2 +1,2 @@ -Q:你知道这是`pull request`吗? -A:* [ ] 我知道 +Q:你知道这是`pull request`吗?(使用 "x" 选择) +* [ ] 我知道 diff --git a/.github/workflows/openwrt-ci.yml b/.github/workflows/openwrt-ci.yml index 284b111677..35c8a63a08 100644 --- a/.github/workflows/openwrt-ci.yml +++ b/.github/workflows/openwrt-ci.yml @@ -33,7 +33,7 @@ jobs: sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d sudo -E apt-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* mysql* php* sudo -E apt-get update - sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler + sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler sudo -E apt-get -y autoremove --purge sudo -E apt-get clean From d88beedb89f3f94170f306453344b69cccf17615 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Tue, 3 Mar 2020 07:36:55 -0800 Subject: [PATCH 5/5] update README --- README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README b/README index ca393473b1..d09e64b42a 100644 --- a/README +++ b/README @@ -32,6 +32,10 @@ sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git 3. 想学习OpenWrt开发,但是摸不着门道?自学没毅力?基础太差?怕太难学不会?跟着佐大学OpenWrt开发入门培训班助你能学有所成 报名地址:http://forgotfun.org/2018/04/openwrt-training-2018.html +去广告订阅地址默认内置来自以下源,如有去广告的误杀漏杀问题可以到这里报告: + +https://github.com/privacy-protection-tools/anti-AD + Please use "make menuconfig" to choose your preferred configuration for the toolchain and firmware.