🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 0d155c70be
commit 32600acc60
14258 files changed
+3954570

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI page for Web Admin
LUCI_DEPENDS:=+uhttpd
PKG_VERSION:=1.0
PKG_RELEASE:=1
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
@@ -0,0 +1,17 @@
-- Copyright 2018 lean <coolsnowwolf@gmail.com>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.webadmin", package.seeall)
function index()
if not nixio.fs.access("/etc/config/uhttpd") then
return
end
local page
page = entry({"admin", "system", "webadmin"}, cbi("webadmin"), _("Web Admin"), 1)
page.leaf = true
page.acl_depends = { "luci-app-webadmin" }
end
@@ -0,0 +1,50 @@
-- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com>
-- Licensed to the public under the Apache License 2.0.
local fs = require("nixio.fs")
local m = Map("uhttpd", translate("Web Admin Settings"),
translate("Web Admin Settings Page"))
local ucs = m:section(TypedSection, "uhttpd")
ucs.addremove = false
ucs.anonymous = true
lhttp = ucs:option(DynamicList, "listen_http", translate("HTTP listeners (address:port)"), translate("Bind to specific interface:port (by specifying interface address"))
lhttp.datatype = "list(ipaddrport(1))"
function lhttp.validate(self, value, section)
local have_https_listener = false
local have_http_listener = false
if lhttp and lhttp:formvalue(section) and (#(lhttp:formvalue(section)) > 0) then
for k, v in pairs(lhttp:formvalue(section)) do
if v and (v ~= "") then
have_http_listener = true
break
end
end
end
if lhttps and lhttps:formvalue(section) and (#(lhttps:formvalue(section)) > 0) then
for k, v in pairs(lhttps:formvalue(section)) do
if v and (v ~= "") then
have_https_listener = true
break
end
end
end
if not (have_http_listener or have_https_listener) then
return nil, "must listen on at list one address:port"
end
return DynamicList.validate(self, value, section)
end
o = ucs:option(Flag, "redirect_https", translate("Redirect all HTTP to HTTPS"))
o.default = o.enabled
o.rmempty = false
o.description = translate("Redirect all HTTP to HTTPS when SSl cert was installed")
o = ucs:option(Flag, "rfc1918_filter", translate("Ignore private IPs on public interface"), translate("Prevent access from private (RFC1918) IPs on an interface if it has an public IP address"))
o.default = o.enabled
o.rmempty = false
return m
+1
View File
@@ -0,0 +1 @@
zh_Hans
+41
View File
@@ -0,0 +1,41 @@
msgid ""
msgstr ""
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
msgid "Web Admin"
msgstr "Web 管理"
msgid "Web Admin Settings"
msgstr "Web 管理页面设置"
msgid "Web Admin Settings Page"
msgstr "设置更改Web管理页面端口,绑定地址,是否允许从互联网访问等"
msgid "HTTP listeners (address:port)""
msgstr "HTTP 监听 (IP地址:端口)""
msgid "Bind to specific interface:port (by specifying interface address"
msgstr "绑定到指定的IP地址:端口"
msgid "Redirect all HTTP to HTTPS"
msgstr "重定向HTTP到HTTPS"
msgid "Redirect all HTTP to HTTPS when SSl cert was installed"
msgstr "当安装了SSL证书后,重定向HTTP到HTTPS管理页面"
msgid "Auto activate"
msgstr "自动激活局域网客户端"
msgid "configfile"
msgstr "配置文件"
msgid "Ignore private IPs on public interface"
msgstr "只允许内网访问"
msgid "Prevent access from private (RFC1918) IPs on an interface if it has an public IP address"
msgstr "拒绝从互联网访问Web管理页面"
@@ -0,0 +1,11 @@
{
"luci-app-webadmin": {
"description": "Grant UCI access for luci-app-webadmin",
"read": {
"uci": [ "uhttpd" ]
},
"write": {
"uci": [ "uhttpd" ]
}
}
}