luci-app: tidy up code (#8277)

1.文件尾部添加换行并删除多余的换行

2.整理代码,看起来更直观

3.更正文件的权限

4.将一些文件的CR LF末行符全部转为LF
This commit is contained in:
Beginner 2021-11-21 14:48:21 +08:00 committed by GitHub
parent 3c36b75de5
commit 95f915abf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
155 changed files with 804 additions and 793 deletions

0
package/lean/ddns-scripts_dnspod/update_dnspod_cn.sh Normal file → Executable file
View File

0
package/lean/ddns-scripts_dnspod/update_dnspod_com.sh Normal file → Executable file
View File

0
package/lean/dns2socks/Makefile Executable file → Normal file
View File

0
package/lean/dsmboot/files/dsmboot Normal file → Executable file
View File

View File

View File

@ -15,4 +15,3 @@ PKG_RELEASE:=75
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -18,21 +18,18 @@ m:section(SimpleSection).template = "adbyby/adbyby_status"
s = m:section(TypedSection, "adbyby")
s.anonymous = true
o = s:option(Flag, "enable")
o.title = translate("Enable")
o = s:option(Flag, "enable", translate("Enable"))
o.default = 0
o.rmempty = false
o = s:option(ListValue, "wan_mode")
o.title = translate("Running Mode")
o = s:option(ListValue, "wan_mode", translate("Running Mode"))
o:value("0", translate("Global Mode (The slowest and the best effects)"))
o:value("1", translate("Plus + Mode (Filter domain name list and blacklist website.Recommended)"))
o:value("2", translate("No filter Mode (Must set in Client Filter Mode Settings manually)"))
o.default = 1
o.rmempty = false
o = s:option(Button, "restart")
o.title = translate("Adbyby and Rule state")
o = s:option(Button, "restart", translate("Adbyby and Rule state"))
o.inputtitle = translate("Update Adbyby Rules Manually")
o.description = string.format("<strong>"..translate("Last Update Checked")..":</strong> %s<br /><strong>"..translate("Lazy Rule")..":</strong>%s <br /><strong>"..translate("Video Rule")..":</strong>%s", UD, DL, DV)
o.inputstyle = "reload"
@ -42,8 +39,8 @@ o.write = function()
HTTP.redirect(DISP.build_url("admin", "services", "adbyby"))
end
t=m:section(TypedSection,"acl_rule",translate("<strong>Client Filter Mode Settings</strong>"),
translate("Filter mode settings can be set to specific LAN clients ( <font color=blue> No filter , Global filter </font> ) . Does not need to be set by default."))
t = m:section(TypedSection, "acl_rule", translate("<strong>Client Filter Mode Settings</strong>"))
t.description = translate("Filter mode settings can be set to specific LAN clients ( <font color=blue> No filter , Global filter </font> ) . Does not need to be set by default.")
t.template = "cbi/tblsection"
t.sortable = true
t.anonymous = true

View File

@ -21,4 +21,3 @@ function f.handle(self, state, data)
end
return f

View File

@ -21,4 +21,3 @@ function f.handle(self, state, data)
end
return f

View File

@ -21,4 +21,3 @@ function f.handle(self, state, data)
end
return f

View File

@ -21,4 +21,3 @@ function f.handle(self, state, data)
end
return f

View File

@ -21,4 +21,3 @@ function f.handle(self, state, data)
end
return f

View File

@ -15,4 +15,3 @@ PKG_RELEASE:=10
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,7 +1,9 @@
-- Copyright 2020 Lean <coolsnowwolf@gmail.com>
-- Licensed to the public under the Apache License 2.0.
m = Map("shairport-sync", translate("Apple AirPlay 2 Receiver"), translate("Apple AirPlay 2 Receiver is a simple AirPlay server implementation"))
m = Map("shairport-sync")
m.title = translate("Apple AirPlay 2 Receiver")
m.description = translate("Apple AirPlay 2 Receiver is a simple AirPlay server implementation")
m:section(SimpleSection).template = "shairport-sync/shairport-sync_status"

View File

@ -12,4 +12,3 @@ LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -357,4 +357,3 @@ msgstr "已有文件将被覆盖,是否继续?"
msgid "Percentage"
msgstr "百分比"

View File

1
package/lean/luci-app-arpbind/Makefile Executable file → Normal file
View File

@ -15,4 +15,3 @@ PKG_RELEASE:=3
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -3,8 +3,9 @@
local sys = require "luci.sys"
local ifaces = sys.net:devices()
m = Map("arpbind", translate("IP/MAC Binding"),
translatef("ARP is used to convert a network address (e.g. an IPv4 address) to a physical address such as a MAC address.Here you can add some static ARP binding rules."))
m = Map("arpbind")
m.title = translate("IP/MAC Binding")
m.description = translatef("ARP is used to convert a network address (e.g. an IPv4 address) to a physical address such as a MAC address.Here you can add some static ARP binding rules.")
s = m:section(TypedSection, "arpbind", translate("Rules"))
s.template = "cbi/tblsection"
@ -39,5 +40,3 @@ a.default = "br-lan"
a.rmempty = false
return m

View File

@ -14,4 +14,3 @@ PKG_RELEASE:=8
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,4 +1,5 @@
module("luci.controller.autoreboot",package.seeall)
function index()
if not nixio.fs.access("/etc/config/autoreboot") then
return

View File

@ -1,8 +1,10 @@
require("luci.sys")
m=Map("autoreboot",translate("Scheduled Reboot"),translate("Scheduled reboot Setting"))
m = Map("autoreboot")
m.title = translate("Scheduled Reboot")
m.description = translate("Scheduled reboot Setting")
s=m:section(TypedSection,"login","")
s = m:section(TypedSection, "login")
s.addremove = false
s.anonymous = true

View File

@ -4,4 +4,3 @@ config login
option hour '5'
option week '3'
option enable '0'

View File

@ -1,6 +1,8 @@
local fs = require "nixio.fs"
m = Map("cifs", translate("Mount SMB/CIFS Netshare"), translate("Mount SMB/CIFS Netshare for OpenWrt"))
m = Map("cifs")
m.title = translate("Mount SMB/CIFS Netshare")
m.description = translate("Mount SMB/CIFS Netshare for OpenWrt")
s = m:section(TypedSection, "cifs")
s.anonymous = true

View File

View File

@ -1,4 +1,3 @@
module("luci.controller.cpufreq", package.seeall)
function index()

View File

@ -1,4 +1,5 @@
module("luci.controller.dnsforwarder", package.seeall)
function index()
if not nixio.fs.access("/etc/config/dnsforwarder") then
return

View File

@ -36,6 +36,7 @@ else if dnsforwarder_on then
state_msg = state_msg .. "<b><font color=\"red\"></font></b>"
end
end
m = Map("dnsforwarder",translate("dnsforwarder"),translate("Dnsforwarder是企业级DNS服务器可以通过TCP协议进行DNS解析,可以方便的使用iptables进行透明代理配合ipset、GFWList使用效果更佳。默认上游服务器为114DNSSSR和Redsocks的GFWList模式要依赖本软件包提供的功能").. "<br><br>状态 - " .. state_msg)
s = m:section(TypedSection,"arguments", translate("通用配置"))
s.addremove=false

View File

@ -9,14 +9,14 @@ function sync_value_to_file(value, file)
end
end
m = Map("dnsforwarder", translate("运行日志"),translate("如果想观察日志需要在配置文件中写明LogOn true 和 LogFileFolder /var/log"))
m = Map("dnsforwarder")
m.title = translate("运行日志")
m.description = translate("如果想观察日志需要在配置文件中写明LogOn true 和 LogFileFolder /var/log")
s = m:section(TypedSection,"arguments","")
s.addremove = false
s.anonymous = true
gfwlist = s:option(TextValue, "gfwlist",nil, nil)
gfwlist.description = translate("日志文件默认位置:" .. log)
gfwlist.rows = 26
@ -25,7 +25,4 @@ gfwlist.cfgvalue = function(self, section)
return fs.readfile(log) or ""
end
return m

1
package/lean/luci-app-docker/Makefile Executable file → Normal file
View File

@ -15,4 +15,3 @@ PKG_RELEASE:=12
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,4 +1,3 @@
config docker
option wan_mode '0'

0
package/lean/luci-app-easymesh/Makefile Executable file → Normal file
View File

View File

@ -1,4 +1,4 @@
#-- Copyright (C) 2021 dz <dingzhong110@gmail.com>
-- Copyright (C) 2021 dz <dingzhong110@gmail.com>
module("luci.controller.easymesh", package.seeall)
@ -8,7 +8,6 @@ function index()
end
local page
page = entry({"admin", "network", "easymesh"}, cbi("easymesh"), _("EASY MESH"), 60)
page.dependent = true
page.acl_depends = { "luci-app-easymesh" }

View File

View File

View File

@ -15,4 +15,3 @@ PKG_RELEASE:=6
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,4 +1,3 @@
module("luci.controller.familycloud", package.seeall)
function index()
@ -9,7 +8,7 @@ function index()
entry({"admin", "services", "familycloud"}, firstchild(), _("天翼家庭云/云盘提速"), 80).dependent = false
entry({"admin", "services", "familycloud", "general"}, cbi("familycloud/familycloud"), _("Base Setting"), 1)
entry({"admin", "services", "familycloud", "log"}, form("familycloud/familycloudlog"), _("Log"), 2)
entry({"admin", "services", "familycloud", "log"}, form("familycloud/familycloud_log"), _("Log"), 2)
entry({"admin", "services", "familycloud", "status"}, call("act_status")).leaf = true
end
@ -20,4 +19,3 @@ function act_status()
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -1,5 +1,5 @@
mp = Map("familycloud", translate("天翼家庭云/天翼云盘提速"))
mp = Map("familycloud")
mp.title = translate("天翼家庭云/天翼云盘提速")
mp.description = translate("天翼家庭云/天翼云盘提速 (最高可达500Mbps)")
mp:section(SimpleSection).template = "familycloud/familycloud_status"

View File

@ -14,5 +14,3 @@ PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -15,5 +15,3 @@ PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -24,31 +24,31 @@ o.disabled = "false"
o.defalut = o.enabled
o.rmempty = false
o = s:option(Flag, "tls_only", translate("Enforce frps only accept TLS connection"),
translatef("Requirements: frpc v0.25.0+, frps v0.32.0+"))
o = s:option(Flag, "tls_only", translate("Enforce frps only accept TLS connection"))
o.description = translatef("Requirements: frpc v0.25.0+, frps v0.32.0+")
o.enabled = "true"
o.disabled = "false"
o.default = o.disabled
o.rmempty = false
o = s:option(Value, "bind_udp_port", translate("UDP bind port"),
translatef("Optional: udp port to help make udp hole to penetrate nat"))
o = s:option(Value, "bind_udp_port", translate("UDP bind port"))
o.description = translatef("Optional: udp port to help make udp hole to penetrate nat")
o.datatype = "port"
o = s:option(Value, "kcp_bind_port", translate("KCP bind port"),
translatef("Optional: udp port used for kcp protocol, it can be same with 'bind port'; if not set, kcp is disabled in frps"))
o = s:option(Value, "kcp_bind_port", translate("KCP bind port"))
o.description = translatef("Optional: udp port used for kcp protocol, it can be same with 'bind port'; if not set, kcp is disabled in frps")
o.datatype = "port"
o = s:option(Value, "vhost_http_port", translate("vhost http port"),
translatef("Optional: if you want to support virtual host, you must set the http port for listening"))
o = s:option(Value, "vhost_http_port", translate("vhost http port"))
o.description = translatef("Optional: if you want to support virtual host, you must set the http port for listening")
o.datatype = "port"
o = s:option(Value, "vhost_https_port", translate("vhost https port"),
translatef("Optional: Note: http port and https port can be same with bind_port"))
o = s:option(Value, "vhost_https_port", translate("vhost https port"))
o.description = translatef("Optional: Note: http port and https port can be same with bind_port")
o.datatype = "port"
o = s:option(DynamicList, "extra_setting", translate("Extra Settings"),
translatef("List of extra settings will be added to config file. Format: option=value, eg. <code>detailed_errors_to_client=false</code>.(NO SPACE!)"))
o = s:option(DynamicList, "extra_setting", translate("Extra Settings"))
o.description = translatef("List of extra settings will be added to config file. Format: option=value, eg. <code>detailed_errors_to_client=false</code>.(NO SPACE!)")
o.placeholder = "option=value"
return m

0
package/lean/luci-app-frps/root/etc/init.d/frps Normal file → Executable file
View File

View File

View File

@ -63,4 +63,3 @@ leasetime.default = "1h"
leasetime.rmempty = true
return m

View File

@ -1,4 +1,5 @@
module("luci.controller.haproxy", package.seeall)
function index()
if not nixio.fs.access("/etc/config/haproxy") then
return

View File

@ -64,4 +64,5 @@ local apply = luci.http.formvalue("cbi.apply")
if apply then
os.execute("/etc/haproxy_init.sh restart >/dev/null 2>&1 &")
end
return m

View File

@ -14,5 +14,3 @@ PKG_RELEASE:=11
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,4 +1,3 @@
module("luci.controller.ipsec-server", package.seeall)
function index()
@ -7,7 +6,7 @@ function index()
end
entry({"admin", "vpn"}, firstchild(), "VPN", 45).dependent = false
entry({"admin", "vpn", "ipsec-server"}, cbi("ipsec-server/ipsec-server"), _("IPSec VPN Server"), 80).dependent = false
entry({"admin", "vpn", "ipsec-server"}, cbi("ipsec-server"), _("IPSec VPN Server"), 80).dependent = false
entry({"admin", "vpn", "ipsec-server", "status"}, call("act_status")).leaf = true
end

View File

@ -1,5 +1,5 @@
mp = Map("ipsec", translate("IPSec VPN Server"))
mp = Map("ipsec")
mp.title = translate("IPSec VPN Server")
mp.description = translate("IPSec VPN connectivity using the native built-in VPN Client on iOS or Andriod (IKEv1 with PSK and Xauth)")
mp:section(SimpleSection).template = "ipsec/ipsec_status"

View File

@ -1,6 +1,8 @@
m = Map("kodexplorer", translate("KodExplorer"), translate(
"KodExplorer is a fast and efficient private cloud and online document management system that provides secure, controllable, easy-to-use and highly customizable private cloud products for personal websites, enterprise private cloud deployment, network storage, online document management, and online office. With Windows style interface and operation habits, it can be used quickly without adaptation. It supports online preview of hundreds of common file formats and is extensible and easy to customize."))
m:append(Template("kodexplorer/status"))
m = Map("kodexplorer")
m.title = translate("KodExplorer")
m.description = translate("KodExplorer is a fast and efficient private cloud and online document management system that provides secure, controllable, easy-to-use and highly customizable private cloud products for personal websites, enterprise private cloud deployment, network storage, online document management, and online office. With Windows style interface and operation habits, it can be used quickly without adaptation. It supports online preview of hundreds of common file formats and is extensible and easy to customize.")
m:section(SimpleSection).template = "kodexplorer/kodexplorer_status"
s = m:section(TypedSection, "global", translate("Global Settings"))
s.anonymous = true
@ -14,41 +16,36 @@ o.datatype = "port"
o.default = 8081
o.rmempty = false
o = s:option(Value, "memory_limit", translate("Maximum memory usage"),
translate(
"If your device has a lot of memory, you can increase it."))
o = s:option(Value, "memory_limit", translate("Maximum memory usage"))
o.description = translate("If your device has a lot of memory, you can increase it.")
o.default = "8M"
o.rmempty = false
o = s:option(Value, "post_max_size", translate("Maximum POST capacity"),
translate(
"This value cannot be greater than the maximum memory usage"))
o = s:option(Value, "post_max_size", translate("Maximum POST capacity"))
o.description = translate("This value cannot be greater than the maximum memory usage")
o.default = "12M"
o.rmempty = false
o = s:option(Value, "upload_max_filesize",
translate("Maximum memory usage for uploading files"), translate(
"This value cannot be greater than the POST maximum capacity"))
o = s:option(Value, "upload_max_filesize", translate("Maximum memory usage for uploading files"))
o.description = translate("This value cannot be greater than the POST maximum capacity")
o.default = "12M"
o.rmempty = false
o = s:option(Value, "storage_device_path", translate("Storage device path"),
translate(
"It is recommended to insert a usb flash drive or hard disk and enter the path. For example, /mnt/sda1/"))
o = s:option(Value, "storage_device_path", translate("Storage device path"))
o.description = translate("It is recommended to insert a usb flash drive or hard disk and enter the path. For example, /mnt/sda1/")
o.default = "/mnt/sda1/"
o.rmempty = false
o = s:option(Value, "project_directory", translate("Project directory"),
translate(
"It is recommended to insert a usb flash drive or hard disk and enter the path. For example, /mnt/sda1/kodexplorer"))
o = s:option(Value, "project_directory", translate("Project directory"))
o.description = translate("It is recommended to insert a usb flash drive or hard disk and enter the path. For example, /mnt/sda1/kodexplorer")
o.default = "/mnt/sda1/kodexplorer"
o.rmempty = false
s:append(Template("kodexplorer/version"))
s:section(SimpleSection).template = "kodexplorer/kodexplorer_version"
o = s:option(Button, "_download", translate("Manually update"), translate(
"Make sure you have enough space.<br /><font style='color:red'>Be sure to fill out the device path and store path for the first run, and then save the application. Then manually download, otherwise can not use!</font>"))
o.template = "kodexplorer/download"
o = s:option(Button, "_download", translate("Manually update"))
o.description = translate("Make sure you have enough space.<br /><font style='color:red'>Be sure to fill out the device path and store path for the first run, and then save the application. Then manually download, otherwise can not use!</font>")
o.template = "kodexplorer/kodexplorer_download"
o.inputstyle = "apply"
o.btnclick = "downloadClick(this);"
o.id = "download_btn"

View File

@ -15,4 +15,3 @@ PKG_RELEASE:=6
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,4 +1,3 @@
module("luci.controller.forked-daapd", package.seeall)
function index()

View File

@ -1,7 +1,9 @@
-- Copyright 2020 Lean <coolsnowwolf@gmail.com>
-- Licensed to the public under the Apache License 2.0.
m = Map("forked-daapd", translate("Music Remote Center"), translate("Music Remote Center is a DAAP (iTunes Remote), MPD (Music Player Daemon) and RSP (Roku) media server."))
m = Map("forked-daapd")
m.title = translate("Music Remote Center")
m.description = translate("Music Remote Center is a DAAP (iTunes Remote), MPD (Music Player Daemon) and RSP (Roku) media server.")
m:section(SimpleSection).template = "forked-daapd/forked-daapd_status"

View File

@ -14,5 +14,3 @@ PKG_RELEASE:=3
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,5 +1,3 @@
m = Map("mwan3helper")
m.title = translate("MWAN3 Helper")
m.description = translate("MWAN3 Helper generate IPSets")

View File

@ -1,5 +1,3 @@
m = Map("mwan3helper")
m.title = translate("MWAN3 IPSets")

View File

@ -11,13 +11,13 @@ function index()
end
entry({"admin", "vpn"}, firstchild(), "VPN", 45).dependent = false
entry({"admin", "vpn", "n2n_v2", "status"}, call("n2n_status")).leaf = true
entry({"admin", "vpn", "n2n_v2", "status"}, call("act_status")).leaf = true
entry({"admin", "vpn", "n2n_v2"}, cbi("n2n_v2"), _("N2N v2 VPN"), 45).dependent = true
end
function n2n_status()
local status = {}
status.running = luci.sys.call("pgrep edge >/dev/null")==0
function act_status()
local e = {}
e.running = luci.sys.call("pgrep edge >/dev/null") == 0
luci.http.prepare_content("application/json")
luci.http.write_json(status)
luci.http.write_json(e)
end

View File

@ -22,12 +22,11 @@ function get_mask(v)
v:value("30", "255.255.255.252(30)")
end
m = Map("n2n_v2", translate("N2N v2 VPN"), translatef(
"n2n is a layer-two peer-to-peer virtual private network (VPN) which allows users to exploit features typical of P2P applications at network instead of application level."))
m = Map("n2n_v2")
m.title = translate("N2N v2 VPN")
m.description = translatef("n2n is a layer-two peer-to-peer virtual private network (VPN) which allows users to exploit features typical of P2P applications at network instead of application level.")
-- Basic config
-- edge
m:section(SimpleSection).template = "n2n_v2/status"
m:section(SimpleSection).template = "n2n_v2/n2n_v2_status"
s = m:section(TypedSection, "edge", translate("N2N Edge Settings"))
s.anonymous = true

View File

@ -0,0 +1,20 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=url([[admin]], [[vpn]], [[n2n_v2]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('n2n_v2_status');
if (data && tb) {
if (data.running) {
tb.innerHTML = "<em><b style='color:green;'>N2N v2 VPN <%:RUNNING%></b></em>";
} else {
tb.innerHTML = "<em><b style='color:red;'>N2N v2 VPN <%:NOT RUNNING%></b></em>";
}
}
}
);
//]]>
</script>
<fieldset class="cbi-section">
<p id="n2n_v2_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -1,20 +0,0 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=url([[admin]], [[vpn]], [[n2n_v2]], [[status]])%>', null,
function(x, data) {
var status = document.getElementById('n2n_status');
if (data && status) {
if (data.running) {
status.innerHTML = "<em><b style='color:green;'>N2N v2 VPN <%:RUNNING%></b></em>";
} else {
status.innerHTML = "<em><b style='color:red;'>N2N v2 VPN <%:NOT RUNNING%></b></em>";
}
}
}
);
//]]>
</script>
<fieldset class="cbi-section">
<p id="n2n_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -14,4 +14,3 @@ PKG_RELEASE:=1
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

View File

@ -5,7 +5,7 @@ function index()
return
end
entry({"admin", "services", "nps"}, cbi("nps"), _("Nps"), 100).dependent = true
entry({"admin", "services", "nps"}, cbi("nps"), _("Nps Penetrate"), 100).dependent = true
entry({"admin", "services", "nps", "status"}, call("act_status")).leaf = true
end

View File

@ -1,5 +1,5 @@
m = Map("nps")
m.title = translate("Nps")
m.title = translate("Nps Penetrate")
m.description = translate("Nps is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.")
m:section(SimpleSection).template = "nps/nps_status"
@ -44,11 +44,11 @@ crypt.default = "1"
crypt.rmempty = false
log_level = s:option(ListValue, "log_level", translate("Log Level"))
log_level:value(0,"Emergency", translate("Emergency"))
log_level:value(2,"Critical", translate("Critical"))
log_level:value(3,"Error", translate("Error"))
log_level:value(4,"Warning", translate("Warning"))
log_level:value(7,"Debug", translate("Debug"))
log_level:value("0", "Emergency")
log_level:value("2", "Critical")
log_level:value("3", "Error")
log_level:value("4", "Warning")
log_level:value("7", "Debug")
log_level.default = "3"
return m

View File

View File

@ -1,4 +1,4 @@
msgid "Nps"
msgid "Nps Penetrate"
msgstr "Nps 内网穿透"
msgid "Nps is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."

0
package/lean/luci-app-nps/root/etc/config/nps Executable file → Normal file
View File

View File

@ -14,5 +14,3 @@ PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -3,8 +3,10 @@ local net = require "luci.model.network".init()
local ifaces = s.net:devices()
local m,s,o
m=Map("pppoe-relay",translate("PPPoE Relay"))
m = Map("pppoe-relay")
m.title = translate("PPPoE Relay")
m.description = translate("Opening the PPPoE relay allows devices in the Intranet to create a separate PPPoE connection that can cross NAT.")
s = m:section(TypedSection, "service")
s.addremove = true
s.anonymous = true

View File

@ -15,7 +15,3 @@ PKG_RELEASE:=13
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,4 +1,3 @@
module("luci.controller.pptp-server", package.seeall)
function index()
@ -7,7 +6,7 @@ function index()
end
entry({"admin", "vpn"}, firstchild(), "VPN", 45).dependent = false
entry({"admin", "vpn", "pptp-server"}, cbi("pptp-server/pptp-server"), _("PPTP VPN Server"), 80).dependent=false
entry({"admin", "vpn", "pptp-server"}, cbi("pptp-server"), _("PPTP VPN Server"), 80).dependent = false
entry({"admin", "vpn", "pptp-server","status"},call("act_status")).leaf = true
end

View File

@ -1,8 +1,8 @@
mp = Map("pptpd", translate("PPTP VPN Server"))
mp = Map("pptpd")
mp.title = translate("PPTP VPN Server")
mp.description = translate("PPTP VPN Server connectivity using the native built-in VPN Client on Windows/Linux or Andriod")
mp:section(SimpleSection).template = "pptp/pptp_status"
mp:section(SimpleSection).template = "pptp-server/pptp-server_status"
s = mp:section(NamedSection, "pptpd", "service")
s.anonymouse = true
@ -15,8 +15,8 @@ localip = s:option(Value, "localip", translate("Local IP"))
localip.datatype = "ip4addr"
clientip = s:option(Value, "remoteip", translate("Client IP"))
clientip.datatype = "string"
clientip.description = translate("LAN DHCP reserved start-to-end IP addresses with the same subnet mask")
clientip.datatype = "string"
remotedns = s:option(Value, "remotedns", translate("Remote Client DNS"))
remotedns.datatype = "ip4addr"

View File

@ -1,7 +1,7 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[vpn]], [[pptp-server]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('pptp_status');
var tb = document.getElementById('pptp-server_status');
if (data && tb) {
if (data.running) {
var links = '<em><b><font color=green>PPTP VPN Server <%:RUNNING%></font></b></em>';
@ -16,7 +16,7 @@ XHR.poll(3, '<%=url([[admin]], [[vpn]], [[pptp-server]], [[status]])%>', null,
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="pptp_status">
<p id="pptp-server_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -15,4 +15,3 @@ PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,7 +1,9 @@
-- Copyright 2020 Lean <coolsnowwolf@gmail.com>
-- Licensed to the public under the Apache License 2.0.
m = Map("ps3netsrv", translate("PS3 NET Server"), translate("PS3NETSRV is ISO/PKG server for Sony PlayStation 3 webMAN-MOD plugin"))
m = Map("ps3netsrv")
m.title = translate("PS3 NET Server")
m.description = translate("PS3NETSRV is ISO/PKG server for Sony PlayStation 3 webMAN-MOD plugin")
m:section(SimpleSection).template = "ps3netsrv/ps3netsrv_status"

View File

@ -13,5 +13,3 @@ PKG_RELEASE:=1
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -16,8 +16,8 @@ h = s:taboption("general", Flag, "homes", translate("Share home-directories"),
"network shares"))
h.rmempty = false
macos = s:taboption("general", Flag, "macos", translate("Enable macOS compatible shares"),
translate("Enables Apple's AAPL extension globally and adds macOS compatibility options to all shares."))
macos = s:taboption("general", Flag, "macos", translate("Enable macOS compatible shares"))
macos.description = translate("Enables Apple's AAPL extension globally and adds macOS compatibility options to all shares.")
macos.rmempty = false
if nixio.fs.access("/usr/sbin/nmbd") then

View File

@ -15,5 +15,3 @@ PKG_RELEASE:=7
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -15,6 +15,7 @@ local n={
"chacha20",
"chacha20-ietf-poly1305",
}
local s = {
"origin",
"verify_deflate",
@ -28,6 +29,7 @@ local s={
"auth_chain_e",
"auth_chain_f",
}
local i={
"plain",
"http_simple",
@ -36,12 +38,14 @@ local i={
"tls1.2_ticket_auth",
"tls1.2_ticket_fastauth",
}
local o={
"false",
"true",
}
a= Map("ssrs", translate("ShadowSocksR Server Config"))
a = Map("ssrs")
a.title = translate("ShadowSocksR Server Config")
a.description = translate("ShadowsocksR Python Server is a fork of the Shadowsocks project, claimed to be superior in terms of security and stability")
a:section(SimpleSection).template = "ssrs/ssrs_status"

1
package/lean/luci-app-syncdial/Makefile Executable file → Normal file
View File

@ -14,4 +14,3 @@ PKG_RELEASE:=25
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
#Makefile for syncdial

View File

@ -1,4 +1,5 @@
module("luci.controller.syncdial",package.seeall)
function index()
if not nixio.fs.access("/etc/config/syncdial") then
return

View File

@ -4,59 +4,86 @@ local e="mwan3 status | grep -c \"is online and tracking is active\""
local e = io.popen(e,"r")
local t = e:read("*a")
e:close()
m=Map("syncdial",translate("多线多拨"),
translate("使用macvlan驱动创建多个虚拟WAN口支持并发多拨 <br />当前在线接口数量:")..t)
s=m:section(TypedSection,"syncdial",translate(" "))
m = Map("syncdial")
m.title = translate("多线多拨")
m.description = translate("使用macvlan驱动创建多个虚拟WAN口支持并发多拨 <br />当前在线接口数量:")..t
s = m:section(TypedSection, "syncdial")
s.anonymous = true
o=s:option(Flag,"enabled","启用")
o = s:option(Flag, "enabled", translate("启用"))
o.rmempty = false
o=s:option(Flag,"syncon","启用并发多拨")
o = s:option(Flag, "syncon", translate("启用并发多拨"))
o.rmempty = false
o = s:option(ListValue, "dial_type", translate("多拨类型"))
o:value("1", translate("单线多拨"))
o:value("2", translate("双线多拨"))
o.rmempty = false
o=s:option(Value,"wanselect",translate("选择外网接口"),translate("指定要多拨的外网接口如wan"))
o = s:option(Value, "wanselect", translate("选择外网接口"))
o.description = translate("指定要多拨的外网接口如wan")
luci.tools.webadmin.cbi_add_networks(o)
o.optional = false
o.rmempty = false
o=s:option(Value,"wannum","虚拟WAN接口数量")
o = s:option(Value, "wannum", translate("虚拟WAN接口数量"))
o.datatype = "range(0,249)"
o.optional = false
o.default = 1
o=s:option(Flag,"bindwan","绑定物理接口")
o = s:option(Flag, "bindwan", translate("绑定物理接口"))
o.rmempty = false
o=s:option(Value,"wanselect2",translate("选择第二个外网接口"),translate("<font color=\"red\">指定要多拨的第二个外网接口如wan2</font>"))
o = s:option(Value, "wanselect2", translate("选择第二个外网接口"))
o.description = translate("<font color=\"red\">指定要多拨的第二个外网接口如wan2</font>")
luci.tools.webadmin.cbi_add_networks(o)
o.optional=false
o:depends("dial_type","2")
o=s:option(Value,"wannum2",translate("第二条线虚拟WAN接口数量"),translate("设置第二条线的拨号数"))
o = s:option(Value, "wannum2", translate("第二条线虚拟WAN接口数量"))
o.description = translate("设置第二条线的拨号数")
o.datatype = "range(0,249)"
o.optional = false
o.default = 1
o:depends("dial_type","2")
o=s:option(Flag,"bindwan2","绑定物理接口","第二条线生成的虚拟接口绑定当前物理接口")
o = s:option(Flag, "bindwan2", translate("绑定物理接口"))
o.description = translate("第二条线生成的虚拟接口绑定当前物理接口")
o.rmempty = false
o:depends("dial_type","2")
o=s:option(Flag,"dialchk","启用掉线检测")
o = s:option(Flag, "dialchk", translate("启用掉线检测"))
o.rmempty = false
o=s:option(Value,"dialnum","最低在线接口数量","如果在线接口数量小于这个值则重拨。")
o = s:option(Value, "dialnum", translate("最低在线接口数量"))
o.description = translate("如果在线接口数量小于这个值则重拨。")
o.datatype = "range(0,248)"
o.optional = false
o.default = 2
o=s:option(Value,"dialnum2","第二条线最低在线接口数量","如果第二条线在线接口数量小于这个值则重拨。")
o = s:option(Value, "dialnum2", translate("第二条线最低在线接口数量"))
o.description = translate("如果第二条线在线接口数量小于这个值则重拨。")
o.datatype = "range(0,248)"
o.optional = false
o.default = 2
o:depends("dial_type","2")
o=s:option(Value,"dialwait","重拨等待时间","重拨时,接口全部下线后下一次拨号前的等待时间。单位:秒 最小值5秒")
o = s:option(Value, "dialwait", translate("重拨等待时间"))
o.description = translate("重拨时,接口全部下线后下一次拨号前的等待时间。单位:秒 最小值5秒")
o.datatype = "and(uinteger,min(5))"
o.optional = false
o=s:option(Flag,"old_frame","使用旧的macvlan创建方式")
o = s:option(Flag, "old_frame", translate("使用旧的macvlan创建方式"))
o.rmempty = false
o=s:option(Flag,"nomwan","不自动配置MWAN3负载均衡","需要自定义负载均衡设置或者要使用策略路由的用户选择")
o = s:option(Flag, "nomwan", translate("不自动配置MWAN3负载均衡"))
o.description = translate("需要自定义负载均衡设置或者要使用策略路由的用户选择")
o.rmempty = false
o=s:option(DummyValue,"_redial","重新并发拨号")
o = s:option(DummyValue, "_redial", translate("重新并发拨号"))
o.template = "syncdial/redial_button"
o.width = "10%"
return m

View File

View File

View File

@ -14,4 +14,3 @@ PKG_RELEASE:=3
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -8,11 +8,10 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=USB Printer Share via TCP/IP
LUCI_DEPENDS:=+p910nd +kmod-usb-printer
PKG_NAME:=luci-app-usb-printer
PKG_VERSION:=1.0
PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
#applications/luci-app-usb-printer/
#applications/luci-app-usb-printer/

View File

@ -56,4 +56,3 @@ function v2ray_update()
http_write_json(json)
end

View File

@ -1,11 +1,12 @@
local ds = require "luci.dispatcher"
local o = "v2ray_server"
m = Map(o, translate("V2ray Server"))
m = Map("v2ray_server")
m.title = translate("V2ray Server")
t = m:section(TypedSection, "global", translate("Global Settings"))
t.anonymous = true
t.addremove = false
e = t:option(Flag, "enable", translate("Enable"))
e.rmempty = false
t:append(Template("v2ray_server/v2ray"))
@ -14,17 +15,17 @@ t = m:section(TypedSection, "user", translate("Users Manager"))
t.anonymous = true
t.addremove = true
t.template = "cbi/tblsection"
t.extedit = ds.build_url("admin", "services", o, "config", "%s")
t.extedit = ds.build_url("admin", "services", "v2ray_server", "config", "%s")
function t.create(t, e)
local uuid = luci.sys.exec("echo -n $(cat /proc/sys/kernel/random/uuid)") or ""
uuid = string.gsub(uuid, "-", "")
local e = TypedSection.create(t, uuid)
luci.http.redirect(ds.build_url("admin", "services", o, "config", uuid))
luci.http.redirect(ds.build_url("admin", "services", "v2ray_server", "config", uuid))
end
function t.remove(t, a)
t.map.proceed = true
t.map:del(a)
luci.http.redirect(ds.build_url("admin", "services", o))
luci.http.redirect(ds.build_url("admin", "services", "v2ray_server"))
end
e = t:option(Flag, "enable", translate("Enable"))
@ -53,5 +54,5 @@ end
m:append(Template("v2ray_server/log"))
m:append(Template("v2ray_server/users_list_status"))
return m
return m

View File

@ -14,4 +14,3 @@ PKG_RELEASE:=3
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -12,14 +12,16 @@ You may obtain a copy of the License at
$Id$
]]--
m = Map("vsftpd", translate("FTP Server - Anonymous Settings"))
m = Map("vsftpd")
m.title = translate("FTP Server - Anonymous Settings")
sa = m:section(NamedSection, "anonymous", "anonymous", translate("Anonymous Settings"))
o = sa:option(Flag, "enabled", translate("Enabled"))
o.default = false
o = sa:option(Value, "username", translate("Username"), translate("An actual local user to handle anonymous user"))
o = sa:option(Value, "username", translate("Username"))
o.description = translate("An actual local user to handle anonymous user")
o.default = "ftp"
o = sa:option(Value, "root", translate("Root directory"))
@ -28,7 +30,8 @@ o.default = "/home/ftp"
o = sa:option(Value, "umask", translate("File mode umask"))
o.default = "022"
o = sa:option(Value, "maxrate", translate("Max transmit rate"), translate("0 means no limitation"))
o = sa:option(Value, "maxrate", translate("Max transmit rate"))
o.description = translate("0 means no limitation")
o.default = "0"
o = sa:option(Flag, "writemkdir", translate("Enable write/mkdir"))
@ -37,8 +40,8 @@ o.default = false
o = sa:option(Flag, "upload", translate("Enable upload"))
o.default = false
o = sa:option(Flag, "others", translate("Enable other rights"), translate("Include rename, deletion ..."))
o = sa:option(Flag, "others", translate("Enable other rights"))
o.description = translate("Include rename, deletion ...")
o.default = false
return m

View File

@ -12,7 +12,8 @@ You may obtain a copy of the License at
$Id$
]]--
m = Map("vsftpd", translate("FTP Server - General Settings"))
m = Map("vsftpd")
m.description = translate("FTP Server - General Settings")
sl = m:section(NamedSection, "listen", "listen", translate("Listening Settings"))
@ -50,26 +51,32 @@ o.default = "51000"
sg = m:section(NamedSection, "global", "global", translate("Global Settings"))
o = sg:option(Flag, "write", translate("Enable write"), translate("When disabled, all write request will give permission denied."));
o = sg:option(Flag, "write", translate("Enable write"))
o.description = translate("When disabled, all write request will give permission denied.")
o.default = true
o = sg:option(Flag, "download", translate("Enable download"), translate("When disabled, all download request will give permission denied."));
o = sg:option(Flag, "download", translate("Enable download"))
o.description = translate("When disabled, all download request will give permission denied.")
o.default = true
o = sg:option(Flag, "dirlist", translate("Enable directory list"), translate("When disabled, list commands will give permission denied."))
o = sg:option(Flag, "dirlist", translate("Enable directory list"))
o.description = translate("When disabled, list commands will give permission denied.")
o.default = true
o = sg:option(Flag, "lsrecurse", translate("Allow directory recursely list"))
o = sg:option(Flag, "dotfile", translate("Show dot files"), translate(". and .. are excluded."));
o = sg:option(Flag, "dotfile", translate("Show dot files"))
o.description = translate(". and .. are excluded.")
o.default = true
o = sg:option(Value, "umask", translate("File mode umask"), translate("Uploaded file mode will be 666 - &lt;umask&gt;; directory mode will be 777 - &lt;umask&gt;."))
o = sg:option(Value, "umask", translate("File mode umask"))
o.description = translate("Uploaded file mode will be 666 - &lt;umask&gt;; directory mode will be 777 - &lt;umask&gt;.")
o.default = "022"
o = sg:option(Value, "banner", translate("FTP Banner"))
o = sg:option(Flag, "dirmessage", translate("Enable directory message"), translate("A message will be displayed when entering a directory."))
o = sg:option(Flag, "dirmessage", translate("Enable directory message"))
o.description = translate("A message will be displayed when entering a directory.")
o = sg:option(Value, "dirmsgfile", translate("Directory message filename"))
o.default = ".message"
@ -80,7 +87,8 @@ sl = m:section(NamedSection, "local", "local", translate("Local Users"))
o = sl:option(Flag, "enabled", translate("Enable local user"))
o.rmempty = false
o = sl:option(Value, "root", translate("Root directory"), translate("Leave empty will use user's home directory"))
o = sl:option(Value, "root", translate("Root directory"))
o.description = translate("Leave empty will use user's home directory")
o.default = ""
@ -96,27 +104,39 @@ o:value("upload", translate("Upload only"))
o:value("both", translate("Both download and upload"))
o.default = "both"
o = sc:option(Value, "idletimeout", translate("Idle session timeout"), translate("in seconds"))
o = sc:option(Value, "idletimeout", translate("Idle session timeout"))
o.description = translate("in seconds")
o.datatype = "uinteger"
o.default = "1800"
o = sc:option(Value, "conntimeout", translate("Connection timeout"), translate("in seconds"))
o = sc:option(Value, "conntimeout", translate("Connection timeout"))
o.description = translate("in seconds")
o.datatype = "uinteger"
o.default = "120"
o = sc:option(Value, "dataconntimeout", translate("Data connection timeout"), translate("in seconds"))
o = sc:option(Value, "dataconntimeout", translate("Data connection timeout"))
o.description = translate("in seconds")
o.datatype = "uinteger"
o.default = "120"
o = sc:option(Value, "maxclient", translate("Max clients"), translate("0 means no limitation"))
o = sc:option(Value, "maxclient", translate("Max clients"))
o.description = translate("0 means no limitation")
o.datatype = "uinteger"
o.default = "0"
o = sc:option(Value, "maxperip", translate("Max clients per IP"), translate("0 means no limitation"))
o = sc:option(Value, "maxperip", translate("Max clients per IP"))
o.description = translate("0 means no limitation")
o.datatype = "uinteger"
o.default = "0"
o = sc:option(Value, "maxrate", translate("Max transmit rate"), translate("in KB/s, 0 means no limitation"))
o = sc:option(Value, "maxrate", translate("Max transmit rate"))
o.description = translate("in KB/s, 0 means no limitation")
o.datatype = "uinteger"
o.default = "0"
o = sc:option(Value, "maxretry", translate("Max login fail count"), translate("Can not be zero, default is 3"))
o = sc:option(Value, "maxretry", translate("Max login fail count"))
o.description = translate("Can not be zero, default is 3")
o.datatype = "uinteger"
o.default = "3"
return m

View File

@ -15,7 +15,8 @@ $Id$
local sid = arg[1]
local utl = require "luci.util"
m = Map("vsftpd", translate("FTP Server - Virtual User &lt;new&gt;"))
m = Map("vsftpd")
m.title = translate("FTP Server - Virtual User &lt;new&gt;")
m.redirect = luci.dispatcher.build_url("admin/nas/vsftpd/users")
@ -54,7 +55,8 @@ o.default = "/home/ftp"
o = s:option(Value, "umask", translate("File mode umask"))
o.default = "022"
o = s:option(Value, "maxrate", translate("Max transmit rate"), translate("0 means no limitation"))
o = s:option(Value, "maxrate", translate("Max transmit rate"))
o.description = translate("0 means no limitation")
o.default = "0"
o = s:option(Flag, "writemkdir", translate("Enable write/mkdir"))
@ -63,8 +65,8 @@ o.default = false
o = s:option(Flag, "upload", translate("Enable upload"))
o.default = false
o = s:option(Flag, "others", translate("Enable other rights"), translate("Include rename, deletion ..."))
o = s:option(Flag, "others", translate("Enable other rights"))
o.description = translate("Include rename, deletion ...")
o.default = false
return m

View File

@ -12,7 +12,8 @@ You may obtain a copy of the License at
$Id$
]]--
m = Map("vsftpd", translate("FTP Server - Log Settings"))
m = Map("vsftpd")
m.title = translate("FTP Server - Log Settings")
sl = m:section(NamedSection, "log", "log", translate("Log Settings"))
@ -25,5 +26,4 @@ o.default = true
o = sl:option(Value, "file", translate("Log file"))
o.default = "/var/log/vsftpd.log"
return m

Some files were not shown because too many files have changed in this diff Show More