⛄ Sync 2024-01-01 23:36:07
@ -9,16 +9,16 @@ Supported LuCI themes: luci-theme-bootstrap, luci-theme-material, luci-theme-ope
|
||||
|
||||
**OpenWrt >= 21.02:**
|
||||
|
||||
wget --no-check-certificate -O /tmp/luci-app-log-viewer_1.1-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-log-viewer_1.1-1_all.ipk
|
||||
opkg install /tmp/luci-app-log-viewer_1.1-1_all.ipk
|
||||
rm /tmp/luci-app-log-viewer_1.1-1_all.ipk
|
||||
wget --no-check-certificate -O /tmp/luci-app-log-viewer_1.1-2_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-log-viewer_1.1-2_all.ipk
|
||||
opkg install /tmp/luci-app-log-viewer_1.1-2_all.ipk
|
||||
rm /tmp/luci-app-log-viewer_1.1-2_all.ipk
|
||||
/etc/init.d/rpcd restart
|
||||
|
||||
i18n-ru:
|
||||
|
||||
wget --no-check-certificate -O /tmp/luci-i18n-log-viewer-ru_1.1-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-log-viewer-ru_1.1-1_all.ipk
|
||||
opkg install /tmp/luci-i18n-log-viewer-ru_1.1-1_all.ipk
|
||||
rm /tmp/luci-i18n-log-viewer-ru_1.1-1_all.ipk
|
||||
wget --no-check-certificate -O /tmp/luci-i18n-log-viewer-ru_1.1-2_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-log-viewer-ru_1.1-2_all.ipk
|
||||
opkg install /tmp/luci-i18n-log-viewer-ru_1.1-2_all.ipk
|
||||
rm /tmp/luci-i18n-log-viewer-ru_1.1-2_all.ipk
|
||||
|
||||
**OpenWrt 19.07:**
|
||||
|
||||
|
@ -1,64 +1,64 @@
|
||||
{
|
||||
"admin/services/log-viewer": {
|
||||
"title": "Log viewer",
|
||||
"order": 22,
|
||||
"admin/status/log-viewer": {
|
||||
"title": "Log Viewer",
|
||||
"order": 5,
|
||||
"action": {
|
||||
"type": "alias",
|
||||
"path": "admin/services/log-viewer/messages"
|
||||
"path": "admin/status/log-viewer/messages"
|
||||
},
|
||||
"depends": {
|
||||
"acl": [ "luci-app-log-viewer" ]
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/log-viewer/messages": {
|
||||
"admin/status/log-viewer/messages": {
|
||||
"title": "messages",
|
||||
"order": 10,
|
||||
"order": 1,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "log-viewer/multilog/messages"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/log-viewer/secure": {
|
||||
"admin/status/log-viewer/secure": {
|
||||
"title": "secure",
|
||||
"order": 20,
|
||||
"order": 2,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "log-viewer/multilog/secure"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/log-viewer/maillog": {
|
||||
"admin/status/log-viewer/maillog": {
|
||||
"title": "maillog",
|
||||
"order": 30,
|
||||
"order": 3,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "log-viewer/multilog/maillog"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/log-viewer/cron": {
|
||||
"admin/status/log-viewer/cron": {
|
||||
"title": "cron",
|
||||
"order": 40,
|
||||
"order": 4,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "log-viewer/multilog/cron"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/log-viewer/boot": {
|
||||
"admin/status/log-viewer/boot": {
|
||||
"title": "boot",
|
||||
"order": 50,
|
||||
"order": 5,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "log-viewer/multilog/boot"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/log-viewer/dmesg": {
|
||||
"admin/status/log-viewer/dmesg": {
|
||||
"title": "kernel",
|
||||
"order": 60,
|
||||
"order": 6,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "log-viewer/dmesg"
|
||||
|
150
luci-app-log/po/ru/log-viewer.po
Normal file
@ -0,0 +1,150 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ru\n"
|
||||
"X-Generator: Poedit 2.0.6\n"
|
||||
|
||||
msgid "Alert"
|
||||
msgstr "Тревога"
|
||||
|
||||
msgid "All"
|
||||
msgstr "Все"
|
||||
|
||||
msgid "Apply"
|
||||
msgstr "Применить"
|
||||
|
||||
msgid "Apply message filter as regular expression"
|
||||
msgstr "Применять фильтр сообщений как регулярное выражение"
|
||||
|
||||
msgid "Apply timestamp filter as regular expression"
|
||||
msgstr "Применять фильтр даты как регулярное выражение"
|
||||
|
||||
msgid "Auto refresh"
|
||||
msgstr "Автообновление"
|
||||
|
||||
msgid "Critical"
|
||||
msgstr "Критическая ситуация"
|
||||
|
||||
msgid "Debug"
|
||||
msgstr "Отладка"
|
||||
|
||||
msgid "Dismiss"
|
||||
msgstr "Закрыть"
|
||||
|
||||
msgid "Download log"
|
||||
msgstr "Скачать журнал"
|
||||
|
||||
msgid "Edit"
|
||||
msgstr "Изменить"
|
||||
|
||||
msgid "Emergency"
|
||||
msgstr "Чрезвычайная ситуация"
|
||||
|
||||
msgid "Entries"
|
||||
msgstr "Записи"
|
||||
|
||||
msgid "Error"
|
||||
msgstr "Ошибка"
|
||||
|
||||
msgid "Facility"
|
||||
msgstr "Категория"
|
||||
|
||||
msgid "Facilities"
|
||||
msgstr "Категории"
|
||||
|
||||
msgid "Filter is regexp"
|
||||
msgstr "Фильтр - рег.выражение"
|
||||
|
||||
msgid "Filter settings"
|
||||
msgstr "Настройки фильтра"
|
||||
|
||||
msgid "Get all entries"
|
||||
msgstr "Все записи"
|
||||
|
||||
msgid "Get more entries"
|
||||
msgstr "Больше записей"
|
||||
|
||||
msgid "Host"
|
||||
msgstr "Хост"
|
||||
|
||||
msgid "Hosts"
|
||||
msgstr "Хосты"
|
||||
|
||||
msgid "Info"
|
||||
msgstr "Информация"
|
||||
|
||||
msgid "Invalid regular expression"
|
||||
msgstr "Неправильное регулярное выражение"
|
||||
|
||||
msgid "Kernel Log"
|
||||
msgstr "Журнал ядра"
|
||||
|
||||
msgid "Last entries"
|
||||
msgstr "Последние записи"
|
||||
|
||||
msgid "Level"
|
||||
msgstr "Уровень"
|
||||
|
||||
msgid "Log"
|
||||
msgstr "Лог"
|
||||
|
||||
msgid "Log Viewer"
|
||||
msgstr "Просмотр лога"
|
||||
|
||||
msgid "Logging levels"
|
||||
msgstr "Уровни логирования"
|
||||
|
||||
msgid "Logread not found"
|
||||
msgstr "Logread не найден"
|
||||
|
||||
msgid "Message"
|
||||
msgstr "Сообщение"
|
||||
|
||||
msgid "Message filter"
|
||||
msgstr "Фильтр сообщений"
|
||||
|
||||
msgid "No entries available..."
|
||||
msgstr "Нет доступных записей..."
|
||||
|
||||
msgid "Notice"
|
||||
msgstr "Сообщение"
|
||||
|
||||
msgid "Refresh log"
|
||||
msgstr "Обновить лог"
|
||||
|
||||
msgid "Sorting entries"
|
||||
msgstr "Сортировка записей"
|
||||
|
||||
msgid "System Log"
|
||||
msgstr "Системный журнал"
|
||||
|
||||
msgid "Timestamp"
|
||||
msgstr "Время"
|
||||
|
||||
msgid "Timestamp filter"
|
||||
msgstr "Фильтр даты"
|
||||
|
||||
msgid "Type a search pattern..."
|
||||
msgstr "Введите шаблон для поиска..."
|
||||
|
||||
msgid "Unable to load log data:"
|
||||
msgstr "Невозможно загрузить данные лога:"
|
||||
|
||||
msgid "Unsupported log format"
|
||||
msgstr "Неподдерживаемый формат лога"
|
||||
|
||||
msgid "Warning"
|
||||
msgstr "Внимание"
|
||||
|
||||
msgid "ascending"
|
||||
msgstr "по возрастанию"
|
||||
|
||||
msgid "descending"
|
||||
msgstr "по убыванию"
|
@ -85,7 +85,7 @@ msgstr ""
|
||||
msgid "Log"
|
||||
msgstr ""
|
||||
|
||||
msgid "Log viewer"
|
||||
msgid "Log Viewer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Logging levels"
|
||||
|
@ -1,28 +1,28 @@
|
||||
{
|
||||
"admin/services/log-viewer": {
|
||||
"title": "Log viewer",
|
||||
"order": 30,
|
||||
"admin/status/log-viewer": {
|
||||
"title": "Log Viewer",
|
||||
"order": 5,
|
||||
"action": {
|
||||
"type": "alias",
|
||||
"path": "admin/services/log-viewer/syslog"
|
||||
"path": "admin/status/log-viewer/syslog"
|
||||
},
|
||||
"depends": {
|
||||
"acl": [ "luci-app-log-viewer" ]
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/log-viewer/syslog": {
|
||||
"admin/status/log-viewer/syslog": {
|
||||
"title": "System Log",
|
||||
"order": 10,
|
||||
"order": 1,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "log-viewer/syslog"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/log-viewer/dmesg": {
|
||||
"admin/status/log-viewer/dmesg": {
|
||||
"title": "Kernel Log",
|
||||
"order": 20,
|
||||
"order": 2,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "log-viewer/dmesg"
|
||||
|
13
luci-app-natter2/Makefile
Executable file
@ -0,0 +1,13 @@
|
||||
# Copyright (C) 2020-2024 Hyy2001X <https://github.com/Hyy2001X>
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-natter2
|
||||
|
||||
LUCI_TITLE:=LuCI Support for Natter v2.0.0-rc1
|
||||
LUCI_PKGARCH:=all
|
||||
LUCI_DEPENDS:=+natter2
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
3
luci-app-natter2/README.md
Executable file
@ -0,0 +1,3 @@
|
||||
# luci-app-natter2
|
||||
|
||||
项目地址: https://github.com/MikeWang000000/Natter
|
21
luci-app-natter2/luasrc/controller/natter2.lua
Executable file
@ -0,0 +1,21 @@
|
||||
module("luci.controller.natter2",package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/natter2")then
|
||||
return
|
||||
end
|
||||
entry({"admin","network","natter2"},alias("admin","network","natter2","base"),_("Natter v2"),99).dependent=true
|
||||
entry({"admin","network","natter2","base"},cbi("natter2/base"),_("Base Settings"),10).leaf=true
|
||||
entry({"admin","network","natter2","instances"},cbi("natter2/instances")).leaf=true
|
||||
entry({"admin","network","natter2","log"},form("natter2/log"),_("Log"),20).leaf=true
|
||||
entry({"admin","network","natter2","print_log"},call("print_log")).leaf=true
|
||||
entry({"admin","network","natter2","del_log"},call("del_log")).leaf=true
|
||||
end
|
||||
|
||||
function print_log()
|
||||
luci.http.write(luci.sys.exec("sh /usr/share/luci-app-natter2/log.sh print"))
|
||||
end
|
||||
|
||||
function del_log()
|
||||
luci.http.write(luci.sys.exec("sh /usr/share/luci-app-natter2/log.sh del"))
|
||||
end
|
73
luci-app-natter2/luasrc/model/cbi/natter2/base.lua
Executable file
@ -0,0 +1,73 @@
|
||||
m = Map("natter2", translate("Natter v2"),
|
||||
translate("Expose your port behind full-cone NAT to the Internet")
|
||||
.. [[<br /><br /><a href="https://github.com/MikeWang000000/Natter">]]
|
||||
.. translate("Project")
|
||||
.. [[</a>]]
|
||||
)
|
||||
|
||||
s = m:section(TypedSection, "base")
|
||||
s.addremove = false
|
||||
s.anonymous = true
|
||||
|
||||
local function check_file(e)
|
||||
return luci.sys.exec('ls "%s" 2> /dev/null' % e) ~= "" and true or false
|
||||
end
|
||||
|
||||
enable = s:option(Flag, "enable", translate("Enable"))
|
||||
enable.default = 0
|
||||
|
||||
if check_file("/tmp/natter2_nat_type") then
|
||||
natter_nat_type_tcp = luci.sys.exec ("grep TCP /tmp/natter2_nat_type")
|
||||
natter_nat_type_udp = luci.sys.exec ("grep UDP /tmp/natter2_nat_type")
|
||||
nat_check = s:option (Button, "nat_check", translate("Check NAT Status"), translate("Proxy programs may affect NAT types") .. "<br><br>" .. natter_nat_type_tcp .. "<br><br>" .. natter_nat_type_udp)
|
||||
else
|
||||
nat_check = s:option (Button, "nat_check", translate("Check NAT Status"))
|
||||
end
|
||||
|
||||
nat_check.inputtitle = translate("Exec")
|
||||
nat_check.write = function()
|
||||
luci.sys.call ("sh /usr/share/luci-app-natter2/nat-check.sh")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "natter2", "base"))
|
||||
end
|
||||
|
||||
tmp_path = s:option(Value, "tmp_path", translate("Tmp Path"))
|
||||
tmp_path.default = "/tmp/natter2"
|
||||
tmp_path.placeholder = "/tmp/natter2"
|
||||
tmp_path.rmempty = false
|
||||
|
||||
s = m:section(TypedSection, "instances", translate("Instances"), translate("Setting up multiple instances"))
|
||||
s.anonymous = true
|
||||
s.addremove = true
|
||||
s.template = "cbi/tblsection"
|
||||
s.extedit = luci.dispatcher.build_url("admin", "network", "natter2", "instances", "%s")
|
||||
function s.create(...)
|
||||
local e=TypedSection.create(...)
|
||||
if e then
|
||||
luci.http.redirect(s.extedit%e)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
enable_instance = s:option(Flag, "enable_instance", translate("Enable"))
|
||||
enable_instance.default = 1
|
||||
enable_instance.width = "5%"
|
||||
|
||||
remark = s:option(DummyValue,"remark",translate("Remark"))
|
||||
remark.width = "5%"
|
||||
|
||||
protocol = s:option(DummyValue,"protocol",translate("Protocol"))
|
||||
remark.width = "5%"
|
||||
|
||||
tmp_public_port = s:option(DummyValue, "tmp_public_port", translate("Public Port"))
|
||||
remark.width = "5%"
|
||||
|
||||
target_address = s:option(DummyValue, "target_address", translate("Target Address"))
|
||||
remark.width = "5%"
|
||||
|
||||
target_port = s:option(DummyValue, "target_port", translate("Target Port"))
|
||||
remark.width = "5%"
|
||||
|
||||
notify_path = s:option(DummyValue, "notify_path", translate("Notify Script Path"))
|
||||
remark.width = "5%"
|
||||
|
||||
return m
|
119
luci-app-natter2/luasrc/model/cbi/natter2/instances.lua
Executable file
@ -0,0 +1,119 @@
|
||||
m = Map("natter2",translate("Instances Settings"),
|
||||
translate("")
|
||||
.. [[<a href="https://github.com/MikeWang000000/Natter/blob/master/docs/usage.md">]]
|
||||
.. translate("Instructions")
|
||||
.. [[</a>]])
|
||||
m.redirect=luci.dispatcher.build_url("admin","network","natter2")
|
||||
|
||||
s = m:section(NamedSection,arg[1],"instances","")
|
||||
s.addremove = false
|
||||
s.dynamic = false
|
||||
|
||||
local function check_binary(e)
|
||||
return luci.sys.exec('which "%s" 2> /dev/null' % e) ~= "" and true or false
|
||||
end
|
||||
|
||||
enable_instance = s:option(Flag,"enable_instance",translate("Enable"))
|
||||
|
||||
local e = luci.sys.exec("cut -d '-' -f1 /proc/sys/kernel/random/uuid 2> /dev/null")
|
||||
id = s:option(Value,"id",translate("ID"))
|
||||
id.default = e
|
||||
|
||||
remark = s:option(Value,"remark",translate("Remark"))
|
||||
remark.rmempty=false
|
||||
|
||||
protocol = s:option(ListValue,"protocol",translate("Protocol"))
|
||||
protocol:value('tcp',translate("TCP"))
|
||||
protocol:value('udp',translate("UDP"))
|
||||
protocol.default = 'tcp'
|
||||
|
||||
enable_stun_server = s:option(Flag, "enable_stun_server", translate("Enable Stun Server"), translate("Using customized STUN server"))
|
||||
stun_server = s:option(DynamicList, "stun_server", translate("STUN Server"))
|
||||
stun_server.rmempty = true
|
||||
stun_server:depends({enable_stun_server = "1"})
|
||||
|
||||
enable_keepalive_server = s:option(Flag, "enable_keepalive_server", translate("Enable Keepalive Server"), translate("Using customized Keepalive server"))
|
||||
keepalive_server = s:option(Value, "keepalive_server", translate("Keepalive Server"))
|
||||
keepalive_server.rmempty = true
|
||||
keepalive_server:depends({enable_keepalive_server = "1"})
|
||||
|
||||
interval = s:option(Value,"interval",translate("Interval (Seconds)"),translate("The number of seconds between keepalive"))
|
||||
interval.default = 15
|
||||
interval.datatype = "uinteger"
|
||||
|
||||
enable_bonding = s:option(Flag,"enable_bonding",translate("Enable Bonding Options"))
|
||||
enable_bonding.rmempty = true
|
||||
bonding_interface = s:option(Value, "bonding_interface", translate("Bonding Interface"))
|
||||
bonding_interface.rmempty = true
|
||||
bonding_interface.default = '0.0.0.0'
|
||||
bonding_interface:depends({enable_bonding = "1"})
|
||||
|
||||
bonding_port = s:option(Value, "bonding_port", translate("Bonding Port"))
|
||||
bonding_port.rmempty = true
|
||||
bonding_port.default = '0'
|
||||
bonding_port:depends({enable_bonding = "1"})
|
||||
|
||||
enable_forwarding = s:option(Flag,"enable_forwarding",translate("Enable Forwarding Options"),translate("Forwarding to internal devices"))
|
||||
|
||||
forwarding_method = s:option(ListValue,"forwarding_method",translate("Forwarding Method"),
|
||||
translate("")
|
||||
.. [[<a href="https://github.com/MikeWang000000/Natter/blob/master/docs/forward.md">]]
|
||||
.. translate("Instructions for forwarding method")
|
||||
.. [[</a>]])
|
||||
forwarding_method:value('socket',translate("socket (Integrated)"))
|
||||
if check_binary("iptables") then
|
||||
forwarding_method:value('iptables',translate("iptables (Kernel)"))
|
||||
end
|
||||
if check_binary("nftables") then
|
||||
forwarding_method:value('nftables',translate("nftables (Kernel)"))
|
||||
end
|
||||
if check_binary("socat") then
|
||||
forwarding_method:value('socat',translate("socat"))
|
||||
end
|
||||
if check_binary("gost") then
|
||||
forwarding_method:value('gost',translate("gost"))
|
||||
end
|
||||
forwarding_method.default = 'socket'
|
||||
forwarding_method:depends({enable_forwarding = "1"})
|
||||
|
||||
target_address = s:option(Value, "target_address", translate("Target Address"))
|
||||
target_address.datatype = "ipmask4"
|
||||
luci.sys.net.ipv4_hints(
|
||||
function(ip, name)
|
||||
target_address:value(ip, "%s (%s)" %{ ip, name })
|
||||
end)
|
||||
target_address:depends({enable_forwarding = "1"})
|
||||
|
||||
target_port = s:option(Value, "target_port", translate("Target Port"))
|
||||
target_port.datatype = "port"
|
||||
target_port:depends({enable_forwarding = "1"})
|
||||
|
||||
enable_forwarding_retry = s:option(Flag,"enable_forwarding_retry",translate("Enable Forwarding Retry"),translate("Retry until the target port is open"))
|
||||
enable_forwarding_retry:depends({enable_forwarding = "1"})
|
||||
enable_forwarding_retry.default = 1
|
||||
enable_forwarding_retry.rmempty = false
|
||||
|
||||
enable_quit = s:option(Flag,"enable_quit",translate("Enable Quit"),translate("Exit immediately when the mapping address changes"))
|
||||
enable_quit.default = "0"
|
||||
|
||||
delay = s:option(Value,"delay",translate("Start delay (Seconds)"),translate("Time to wait before starting this instance"))
|
||||
delay.default = 0
|
||||
delay.datatype = "uinteger"
|
||||
delay.rmempty = false
|
||||
|
||||
log_level = s:option(ListValue,"log_level",translate("Log Level"))
|
||||
log_level:value('normal',translate("Normal"))
|
||||
log_level:value('verbose',translate("Verbose"))
|
||||
|
||||
enable_notify = s:option(Flag,"enable_notify",translate("Enable Notify Script"))
|
||||
enable_notify.rmempty = false
|
||||
notify_path = s:option(Value, "notify_path", translate("Notify Script Path"),
|
||||
translate("")
|
||||
.. [[<a href="https://github.com/MikeWang000000/Natter/blob/master/docs/script.md">]]
|
||||
.. translate("Instructions for using the notification script")
|
||||
.. [[</a>]])
|
||||
notify_path.rmempty = true
|
||||
notify_path.default = "/usr/share/luci-app-natter2/notify-example.sh"
|
||||
notify_path:depends({enable_notify = "1"})
|
||||
|
||||
return m
|
5
luci-app-natter2/luasrc/model/cbi/natter2/log.lua
Executable file
@ -0,0 +1,5 @@
|
||||
log=SimpleForm("natter2")
|
||||
log.reset=false
|
||||
log.submit=false
|
||||
log:append(Template("natter2/natter_log"))
|
||||
return log
|
29
luci-app-natter2/luasrc/view/natter2/natter_log.htm
Executable file
@ -0,0 +1,29 @@
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function del_log(btn) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin/network/natter2/del_log")%>', null,
|
||||
function(x, data) {
|
||||
if(x && x.status == 200) {
|
||||
var log_textarea = document.getElementById('log_textarea');
|
||||
log_textarea.innerHTML = "";
|
||||
log_textarea.scrollTop = log_textarea.scrollHeight;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin/network/natter2/print_log")%>', null,
|
||||
function(x, data) {
|
||||
if(x && x.status == 200) {
|
||||
var log_textarea = document.getElementById('log_textarea');
|
||||
log_textarea.innerHTML = x.responseText;
|
||||
log_textarea.scrollTop = log_textarea.scrollHeight;
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<fieldset class="cbi-section" id="_log_fieldset" >
|
||||
<input class="cbi-button cbi-input-remove" type="button" onclick="del_log()" value="<%:Delete Logs%>" />
|
||||
<textarea id="log_textarea" class="cbi-input-textarea" style="width: 100%;margin-top: 10px;" data-update="change" rows="30" wrap="off" readonly="readonly"></textarea>
|
||||
</fieldset>
|
143
luci-app-natter2/po/zh-cn/natter2.po
Executable file
@ -0,0 +1,143 @@
|
||||
msgid "Natter v2"
|
||||
msgstr "Natter v2"
|
||||
|
||||
msgid "Base Settings"
|
||||
msgstr "基础设置"
|
||||
|
||||
msgid "Log"
|
||||
msgstr "日志"
|
||||
|
||||
msgid "Expose your port behind full-cone NAT to the Internet"
|
||||
msgstr "将 FullCone NAT (NAT 1) 后的端口,打洞暴露至互联网"
|
||||
|
||||
msgid "Project"
|
||||
msgstr "项目地址"
|
||||
|
||||
msgid "Enable"
|
||||
msgstr "启用"
|
||||
|
||||
msgid "Check NAT Status"
|
||||
msgstr "NAT 类型检测"
|
||||
|
||||
msgid "Proxy programs may affect NAT types"
|
||||
msgstr "代理程序可能会影响 NAT 类型"
|
||||
|
||||
msgid "Tmp Path"
|
||||
msgstr "临时路径"
|
||||
|
||||
msgid "Instances"
|
||||
msgstr "实例"
|
||||
|
||||
msgid "Setting up multiple instances"
|
||||
msgstr "设置多个实例"
|
||||
|
||||
msgid "Remark"
|
||||
msgstr "备注"
|
||||
|
||||
msgid "Public Port"
|
||||
msgstr "公开端口"
|
||||
|
||||
msgid "Target Address"
|
||||
msgstr "目标地址"
|
||||
|
||||
msgid "Target Port"
|
||||
msgstr "目标端口"
|
||||
|
||||
msgid "Notify Script Path"
|
||||
msgstr "通知脚本路径"
|
||||
|
||||
msgid "Enable Stun Server"
|
||||
msgstr "自定义 STUN 服务器"
|
||||
|
||||
msgid "STUN Server"
|
||||
msgstr "STUN 服务器"
|
||||
|
||||
msgid "Enable Keepalive Server"
|
||||
msgstr "自定义保活服务器"
|
||||
|
||||
msgid "Keepalive Server"
|
||||
msgstr "保活服务器"
|
||||
|
||||
msgid "Interval (Seconds)"
|
||||
msgstr "保活间隔(秒)"
|
||||
|
||||
msgid "The number of seconds between keepalive"
|
||||
msgstr "每次保活的间隔秒数"
|
||||
|
||||
msgid "Enable Bonding Options"
|
||||
msgstr "启用绑定"
|
||||
|
||||
msgid "Bonding Interface"
|
||||
msgstr "绑定接口"
|
||||
|
||||
msgid "Bonding Port"
|
||||
msgstr "绑定端口"
|
||||
|
||||
msgid "Enable Forwarding Options"
|
||||
msgstr "启用转发"
|
||||
|
||||
msgid "Forwarding to internal devices"
|
||||
msgstr "转发至内部设备"
|
||||
|
||||
msgid "Forwarding Method"
|
||||
msgstr "转发方式"
|
||||
|
||||
msgid "Instructions for forwarding method"
|
||||
msgstr "转发方式说明"
|
||||
|
||||
msgid "socket (Integrated)"
|
||||
msgstr "Socket(内置)"
|
||||
|
||||
msgid "iptables (Kernel)"
|
||||
msgstr "iptables(内核级)"
|
||||
|
||||
msgid "nftables (Kernel)"
|
||||
msgstr "nftables(内核级 新版)"
|
||||
|
||||
msgid "Target Address"
|
||||
msgstr "目标地址"
|
||||
|
||||
msgid "Target Port"
|
||||
msgstr "目标端口"
|
||||
|
||||
msgid "Enable Forwarding Retry"
|
||||
msgstr "自动重试"
|
||||
|
||||
msgid "Retry until the target port is open"
|
||||
msgstr "重试直至目标端口开放"
|
||||
|
||||
msgid "Enable Quit"
|
||||
msgstr "自动退出"
|
||||
|
||||
msgid "Exit immediately when the mapping address changes"
|
||||
msgstr "映射地址改变时立即退出"
|
||||
|
||||
msgid "Time to wait before starting this instance"
|
||||
msgstr "启动该实例前等待的时间"
|
||||
|
||||
msgid "Enable Notify Script"
|
||||
msgstr "启用通知脚本"
|
||||
|
||||
msgid "Instructions for using the notification script"
|
||||
msgstr "通知脚本说明"
|
||||
|
||||
msgid "Start delay (Seconds)"
|
||||
msgstr "启动延时(秒)"
|
||||
|
||||
msgid "Log Level"
|
||||
msgstr "日志级别"
|
||||
|
||||
msgid "Normal"
|
||||
msgstr "正常"
|
||||
|
||||
msgid "Verbose"
|
||||
msgstr "详细"
|
||||
|
||||
msgid "Instructions"
|
||||
msgstr "使用说明"
|
||||
|
||||
msgid "Using customized STUN server"
|
||||
msgstr "使用自定义的 STUN 服务器"
|
||||
|
||||
msgid "Using customized Keepalive server"
|
||||
msgstr "使用自定义的保活服务器"
|
143
luci-app-natter2/po/zh_Hans/natter2.po
Executable file
@ -0,0 +1,143 @@
|
||||
msgid "Natter v2"
|
||||
msgstr "Natter v2"
|
||||
|
||||
msgid "Base Settings"
|
||||
msgstr "基础设置"
|
||||
|
||||
msgid "Log"
|
||||
msgstr "日志"
|
||||
|
||||
msgid "Expose your port behind full-cone NAT to the Internet"
|
||||
msgstr "将 FullCone NAT (NAT 1) 后的端口,打洞暴露至互联网"
|
||||
|
||||
msgid "Project"
|
||||
msgstr "项目地址"
|
||||
|
||||
msgid "Enable"
|
||||
msgstr "启用"
|
||||
|
||||
msgid "Check NAT Status"
|
||||
msgstr "NAT 类型检测"
|
||||
|
||||
msgid "Proxy programs may affect NAT types"
|
||||
msgstr "代理程序可能会影响 NAT 类型"
|
||||
|
||||
msgid "Tmp Path"
|
||||
msgstr "临时路径"
|
||||
|
||||
msgid "Instances"
|
||||
msgstr "实例"
|
||||
|
||||
msgid "Setting up multiple instances"
|
||||
msgstr "设置多个实例"
|
||||
|
||||
msgid "Remark"
|
||||
msgstr "备注"
|
||||
|
||||
msgid "Public Port"
|
||||
msgstr "公开端口"
|
||||
|
||||
msgid "Target Address"
|
||||
msgstr "目标地址"
|
||||
|
||||
msgid "Target Port"
|
||||
msgstr "目标端口"
|
||||
|
||||
msgid "Notify Script Path"
|
||||
msgstr "通知脚本路径"
|
||||
|
||||
msgid "Enable Stun Server"
|
||||
msgstr "自定义 STUN 服务器"
|
||||
|
||||
msgid "STUN Server"
|
||||
msgstr "STUN 服务器"
|
||||
|
||||
msgid "Enable Keepalive Server"
|
||||
msgstr "自定义保活服务器"
|
||||
|
||||
msgid "Keepalive Server"
|
||||
msgstr "保活服务器"
|
||||
|
||||
msgid "Interval (Seconds)"
|
||||
msgstr "保活间隔(秒)"
|
||||
|
||||
msgid "The number of seconds between keepalive"
|
||||
msgstr "每次保活的间隔秒数"
|
||||
|
||||
msgid "Enable Bonding Options"
|
||||
msgstr "启用绑定"
|
||||
|
||||
msgid "Bonding Interface"
|
||||
msgstr "绑定接口"
|
||||
|
||||
msgid "Bonding Port"
|
||||
msgstr "绑定端口"
|
||||
|
||||
msgid "Enable Forwarding Options"
|
||||
msgstr "启用转发"
|
||||
|
||||
msgid "Forwarding to internal devices"
|
||||
msgstr "转发至内部设备"
|
||||
|
||||
msgid "Forwarding Method"
|
||||
msgstr "转发方式"
|
||||
|
||||
msgid "Instructions for forwarding method"
|
||||
msgstr "转发方式说明"
|
||||
|
||||
msgid "socket (Integrated)"
|
||||
msgstr "Socket(内置)"
|
||||
|
||||
msgid "iptables (Kernel)"
|
||||
msgstr "iptables(内核级)"
|
||||
|
||||
msgid "nftables (Kernel)"
|
||||
msgstr "nftables(内核级 新版)"
|
||||
|
||||
msgid "Target Address"
|
||||
msgstr "目标地址"
|
||||
|
||||
msgid "Target Port"
|
||||
msgstr "目标端口"
|
||||
|
||||
msgid "Enable Forwarding Retry"
|
||||
msgstr "自动重试"
|
||||
|
||||
msgid "Retry until the target port is open"
|
||||
msgstr "重试直至目标端口开放"
|
||||
|
||||
msgid "Enable Quit"
|
||||
msgstr "自动退出"
|
||||
|
||||
msgid "Exit immediately when the mapping address changes"
|
||||
msgstr "映射地址改变时立即退出"
|
||||
|
||||
msgid "Time to wait before starting this instance"
|
||||
msgstr "启动该实例前等待的时间"
|
||||
|
||||
msgid "Enable Notify Script"
|
||||
msgstr "启用通知脚本"
|
||||
|
||||
msgid "Instructions for using the notification script"
|
||||
msgstr "通知脚本说明"
|
||||
|
||||
msgid "Start delay (Seconds)"
|
||||
msgstr "启动延时(秒)"
|
||||
|
||||
msgid "Log Level"
|
||||
msgstr "日志级别"
|
||||
|
||||
msgid "Normal"
|
||||
msgstr "正常"
|
||||
|
||||
msgid "Verbose"
|
||||
msgstr "详细"
|
||||
|
||||
msgid "Instructions"
|
||||
msgstr "使用说明"
|
||||
|
||||
msgid "Using customized STUN server"
|
||||
msgstr "使用自定义的 STUN 服务器"
|
||||
|
||||
msgid "Using customized Keepalive server"
|
||||
msgstr "使用自定义的保活服务器"
|
4
luci-app-natter2/root/etc/config/natter2
Executable file
@ -0,0 +1,4 @@
|
||||
|
||||
config base
|
||||
option tmp_path '/tmp/natter2'
|
||||
option enable '0'
|
125
luci-app-natter2/root/etc/init.d/natter2
Executable file
@ -0,0 +1,125 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
script_path="/usr/share/natter2/natter.py"
|
||||
|
||||
start_service() {
|
||||
local basic_list="enable tmp_path"
|
||||
local instance_list="enable_instance id remark protocol enable_stun_server \
|
||||
stun_server enable_keepalive_server keepalive_server \
|
||||
interval enable_bonding bonding_interface bonding_port \
|
||||
enable_forwarding forwarding_method target_address target_port \
|
||||
enable_forwarding_retry enable_quit delay log_level enable_notify \
|
||||
notify_path"
|
||||
for i in $basic_list
|
||||
do
|
||||
local eval $i="$(uci_get_by_type base 0 $i)"
|
||||
done ; unset i
|
||||
if [ "$enable" == 1 ]
|
||||
then
|
||||
mkdir -p ${tmp_path}
|
||||
mkdir -p /var/etc/natter2
|
||||
for u in $(seq 0 $(($(uci show natter2 2> /dev/null | egrep '@instances\[[0-9]\]+=instances' | wc -l) - 1)))
|
||||
do
|
||||
for i in $instance_list
|
||||
do
|
||||
local eval $i="$(uci_get_by_type instances $u $i)"
|
||||
echo "$i : $(uci_get_by_type instances $u $i)"
|
||||
done ; unset i
|
||||
|
||||
[ "$enable_instance" != 1 ] && continue
|
||||
script_command=""
|
||||
|
||||
[ "$protocol" == udp ] && script_command="$script_command -u"
|
||||
|
||||
if [ "$enable_stun_server" == 1 ]
|
||||
then
|
||||
for i in $stun_server
|
||||
do
|
||||
script_command="$script_command -s $i"
|
||||
done ; unset i
|
||||
fi
|
||||
|
||||
[ "$enable_keepalive_server" == 1 ] && script_command="$script_command -h $keepalive_server"
|
||||
[ "$interval" ] && script_command="$script_command -k $interval"
|
||||
|
||||
if [ "$enable_bonding" == 1 ]
|
||||
then
|
||||
[ "$bonding_interface" ] && script_command="$script_command -i $bonding_interface"
|
||||
[ "$bonding_port" ] && script_command="$script_command -b $bonding_port"
|
||||
fi
|
||||
|
||||
if [ "$enable_forwarding" == 1 ]
|
||||
then
|
||||
[ "$forwarding_method" ] && script_command="$script_command -m $forwarding_method"
|
||||
[ "$target_address" ] && script_command="$script_command -t $target_address"
|
||||
[ "$target_port" ] && script_command="$script_command -p $target_port"
|
||||
[ "$enable_forwarding_retry" == 1 ] && script_command="$script_command -r"
|
||||
fi
|
||||
|
||||
[ "$enable_quit" == 1 ] && script_command="$script_command -q"
|
||||
|
||||
[ "$log_level" == "verbose" ] && script_command="$script_command -v"
|
||||
|
||||
if [ "$enable_notify" == 1 ]
|
||||
then
|
||||
echo "$notify_path" > /var/etc/natter2/${id}-notify
|
||||
var_file=/var/etc/natter2/${id}-${u}-1
|
||||
else
|
||||
var_file=/var/etc/natter2/${id}-${u}-0
|
||||
fi
|
||||
|
||||
log_file=${tmp_path}/natter2-${id}.log
|
||||
|
||||
cp -a /usr/share/luci-app-natter2/notify-base.sh $var_file
|
||||
chmod +x $var_file
|
||||
|
||||
echo "log_file: $log_file"
|
||||
echo "var_file: $var_file"
|
||||
|
||||
sleep $delay
|
||||
for i in $(ps -efww | grep "$script_path" | grep -v grep | grep -v $$ | grep "$id" | awk '{print $1}')
|
||||
do
|
||||
kill -9 "$i" 2> /dev/null
|
||||
done
|
||||
|
||||
nohup $(command -v python) "$script_path" $script_command -e $var_file > "$log_file" 2>&1 &
|
||||
|
||||
for i in $instance_list
|
||||
do
|
||||
unset $(echo $i)
|
||||
done ; unset i
|
||||
unset script_command
|
||||
done ; unset u
|
||||
else
|
||||
stop_service
|
||||
fi
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
echo "Stopping Natter2 ..."
|
||||
for i in $(ps -efww | grep "$script_path" | grep -v grep | grep -v $$ | awk '{print $1}')
|
||||
do
|
||||
kill -9 "$i" 2> /dev/null
|
||||
done
|
||||
rm -r "$tmp_path" 2> /dev/null
|
||||
for u in $(seq 0 $(($(uci show natter2 2> /dev/null | egrep '@instances\[[0-9]\]+=instances' | wc -l) - 1)))
|
||||
do
|
||||
uci set natter2.@instances[$u].tmp_public_port=""
|
||||
uci commit natter2
|
||||
done
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop_service
|
||||
start_service
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "natter2"
|
||||
}
|
||||
|
||||
uci_get_by_type() {
|
||||
local ret=$(uci get natter2.@$1[$2].$3 2>/dev/null)
|
||||
echo ${ret:=$4}
|
||||
}
|
10
luci-app-natter2/root/etc/uci-defaults/luci-natter2
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@natter2[-1]
|
||||
add ucitrack natter2
|
||||
set ucitrack.@natter2[-1].init=natter2
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
exit 0
|
19
luci-app-natter2/root/usr/share/luci-app-natter2/log.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
log_path=$(uci get natter2.@base[0].tmp_path 2> /dev/null)
|
||||
|
||||
for i in $(ls -1 ${log_path} | grep natter2 | grep .log)
|
||||
do
|
||||
case $1 in
|
||||
print)
|
||||
echo -e "\n======> $i <======"
|
||||
tail -n 30 ${log_path}/$i 2> /dev/null
|
||||
echo -e "======> END of $i <======"
|
||||
;;
|
||||
del)
|
||||
echo > ${log_path}/$i
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit 0
|
18
luci-app-natter2/root/usr/share/luci-app-natter2/nat-check.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
script_file='/usr/share/natter2/natter-check/natter-check.py'
|
||||
tmp_path=$(uci get natter2.@base[0].tmp_path)
|
||||
[ ! "$tmp_path" ] && tmp_path="/tmp/natter2"
|
||||
|
||||
mkdir -p $tmp_path
|
||||
rm -f /tmp/natter2_nat_type
|
||||
rm -f $tmp_path/natter2_nat_type.tmp
|
||||
python3 $script_file | egrep 'Checking TCP|Checking UDP' > $tmp_path/natter2_nat_type.tmp
|
||||
TCP=$(awk -F '[:]+' '/TCP/{print $2}' $tmp_path/natter2_nat_type.tmp | sed 's/\[//g;s/\]//g')
|
||||
UDP=$(awk -F '[:]+' '/UDP/{print $2}' $tmp_path/natter2_nat_type.tmp | sed 's/\[//g;s/\]//g')
|
||||
rm -f $tmp_path/natter2_nat_type.tmp
|
||||
[ ! "$TCP" ] && TCP="未知"
|
||||
[ ! "$UDP" ] && UDP="未知"
|
||||
|
||||
echo "TCP: NAT $TCP" > /tmp/natter2_nat_type
|
||||
echo "UDP: NAT $UDP" >> /tmp/natter2_nat_type
|
28
luci-app-natter2/root/usr/share/luci-app-natter2/notify-base.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
protocol="$1"; private_ip="$2"; private_port="$3"; public_ip="$4"; public_port="$5"
|
||||
|
||||
script_name=$(basename $0)
|
||||
script_path=$(dirname $0)
|
||||
instance_id=$(echo $script_name | cut -d '-' -f1)
|
||||
instance_num=$(echo $script_name | cut -d '-' -f2)
|
||||
instance_isnotify=$(echo $script_name | cut -d '-' -f3)
|
||||
|
||||
# echo script_path:$script_path
|
||||
# echo script_name:$script_name
|
||||
# echo instance_id:$instance_id
|
||||
# echo instance_num:$instance_num
|
||||
# echo instance_isnotify:$instance_isnotify
|
||||
|
||||
uci set natter2.@instances[$instance_num].tmp_public_port="$public_port"
|
||||
uci commit natter2
|
||||
|
||||
if [ "$instance_isnotify" == 1 ]
|
||||
then
|
||||
notify_path=$(cat $script_path/${instance_id}-notify)
|
||||
if [ -f "${notify_path}" ]
|
||||
then
|
||||
chmod +x ${notify_path}
|
||||
${notify_path} $1 $2 $3 $4 $5
|
||||
fi
|
||||
fi
|
12
luci-app-natter2/root/usr/share/luci-app-natter2/notify-example.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 参数序号 参数说明 参数格式
|
||||
# 1 传输层协议 tcp, udp 二者之一
|
||||
# 2 内部 IP 点分十进制 IPv4 地址
|
||||
# 3 内部端口 1 - 65535 的整数
|
||||
# 4 外部 IP 点分十进制 IPv4 地址
|
||||
# 5 外部端口 1 - 65535 的整数
|
||||
|
||||
protocol="$1"; private_ip="$2"; private_port="$3"; public_ip="$4"; public_port="$5"
|
||||
|
||||
echo $1 $2 $3 $4 $5
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"luci-app-natter2": {
|
||||
"description": "Grant UCI access for luci-app-natter2",
|
||||
"read": {
|
||||
"uci": [ "natter2" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "natter2" ]
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ THEME_TITLE:=Alpha
|
||||
|
||||
PKG_NAME:=luci-theme-$(THEME_NAME)
|
||||
PKG_VERSION:=0.3.9-beta
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
[issues]: https://github.com/jerrykuku/luci-app-argon-config/issues/new
|
||||
[issues]: https://github.com/derisamedia/luci-theme-alpha/issues
|
||||
[issues-badge]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=flat-square
|
||||
[release]: https://github.com/derisamedia/luci-theme-alpha/releases
|
||||
[release-badge]: https://img.shields.io/badge/check-releases-blue
|
||||
[group]: https://facebook.com/groups/indowrt
|
||||
[group-badge]: https://img.shields.io/badge/visit_Facebook-Comunity-cyan
|
||||
[discord]: https://discord.gg/gdZwmDQGUm
|
||||
[discord-badge]: https://img.shields.io/badge/visit_Discord-Comunity-blue
|
||||
|
||||
|
||||
|
||||
|
||||
@ -11,7 +18,9 @@
|
||||
<img src="https://raw.githubusercontent.com/derisamedia/luci-theme-alpha/master/luasrc/brand.png">
|
||||
|
||||
[![issues][issues-badge]][issues]
|
||||
|
||||
[![release][release-badge]][release]
|
||||
[![group][group-badge]][group]
|
||||
[![discord][discord-badge]][discord]
|
||||
|
||||
|
||||
Luci theme for Official Openwrt and Alpha OS build ,based on bootstrap and material luCi theme refferences,
|
||||
@ -22,11 +31,22 @@ Luci theme for Official Openwrt and Alpha OS build ,based on bootstrap and mater
|
||||
|
||||
![image](https://raw.githubusercontent.com/derisamedia/luci-theme-alpha/master/ss2.png)
|
||||
|
||||
![image](https://raw.githubusercontent.com/derisamedia/luci-theme-alpha/master/ss3.png)
|
||||
|
||||
![image](https://raw.githubusercontent.com/derisamedia/luci-theme-alpha/master/mobileview1.png)
|
||||
|
||||
![image](https://raw.githubusercontent.com/derisamedia/luci-theme-alpha/master/mobileview2.png)
|
||||
|
||||
![image](https://raw.githubusercontent.com/derisamedia/luci-theme-alpha/master/mobileview3.png)
|
||||
|
||||
</p>
|
||||
|
||||
### FYI
|
||||
|
||||
alpha os is my idea which is to develop the Indonesian OpenWrt community so that it can grow even overseas (China already has looking), in the sense that we have to make an innovation that appears and is new, not the existing one, made our version, Mr. Sibondt once they said 'jalan ditempat komunitas indo', that's what moved my heart to make an innovation that I named alpha os (alpha = initial version, because it hasn't been perfect until now 😁)
|
||||
alpha os is my idea which wants to develop the OpenWrt community in Indonesia, even the world, thanks to friends who have supported this alpha-os theme, hopefully given health to all of us.
|
||||
|
||||
|
||||
(old text) Mr. Sibondt once they said 'jalan ditempat komunitas indo', that's what moved my heart to make an innovation that I named alpha os (alpha = initial version, because it hasn't been perfect until now 😁)
|
||||
|
||||
donate
|
||||
buy me a padang rice or coffee
|
||||
|
@ -394,6 +394,8 @@ label {
|
||||
transition: box-shadow 0.2s;
|
||||
color: var(--header-color);
|
||||
background: #2222359a;
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
header > .fill > .container {
|
||||
@ -2016,14 +2018,14 @@ strong {
|
||||
.ifacebox {
|
||||
line-height: 1.25;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
min-width: 150px;
|
||||
flex-direction: column;
|
||||
min-width: 100px;
|
||||
background-color: #54545450;
|
||||
border-radius: 20px;
|
||||
flex-wrap: nowrap;
|
||||
align-content: stretch;
|
||||
justify-content: space-evenly;
|
||||
align-items: flex-start;
|
||||
align-content: center;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
div.ifacebox-head {
|
||||
|
BIN
luci-theme-alpha/mobileview1.png
Normal file
After Width: | Height: | Size: 223 KiB |
BIN
luci-theme-alpha/mobileview2.png
Normal file
After Width: | Height: | Size: 238 KiB |
BIN
luci-theme-alpha/mobileview3.png
Normal file
After Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 758 KiB |
Before Width: | Height: | Size: 612 KiB After Width: | Height: | Size: 549 KiB |
BIN
luci-theme-alpha/ss3.png
Normal file
After Width: | Height: | Size: 482 KiB |
@ -20,10 +20,42 @@
|
||||
|
||||
<% local ver = require "luci.version" %>
|
||||
</div>
|
||||
|
||||
<footer class="mobile">
|
||||
<a href="https://github.com/derisamedia/luci-theme-alpha"><%= ver.luciname %> | <%= ver.luciversion %> | Alpha OS Theme v3.8</a>
|
||||
</footer>
|
||||
</div>
|
||||
<div class="navbar active">
|
||||
<div class="dropdown">
|
||||
|
||||
<a href="/cgi-bin/luci/admin/status/overview"><img src="<%=media%>/gaya/icon/navbar/status.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/services/ttyd"><img src="<%=media%>/gaya/icon/navbar/terminal.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/services/openclash"><img src="<%=media%>/gaya/icon/navbar/oc.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/nas/tinyfm"><img src="<%=media%>/gaya/icon/navbar/nas.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/modem/main"><img src="<%=media%>/gaya/icon/navbar/modem.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/network/network"><img src="<%=media%>/gaya/icon/navbar/interface.png" /></a>
|
||||
|
||||
</div>
|
||||
<label class="toggler">
|
||||
<img src="<%=media%>/gaya/icon/arrow.svg" alt="">
|
||||
</label>
|
||||
</div>
|
||||
<script>
|
||||
{
|
||||
const nav = document.querySelector(".navbar");
|
||||
let lastScrollY = window.scrollY;
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
if (lastScrollY < window.scrollY) {
|
||||
nav.classList.add("navbar--hidden");
|
||||
} else {
|
||||
nav.classList.remove("navbar--hidden");
|
||||
}
|
||||
|
||||
lastScrollY = window.scrollY;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">L.require('menu-alpha')</script>
|
||||
|
@ -59,37 +59,7 @@
|
||||
</head>
|
||||
<body class="lang_<%=luci.i18n.context.lang%> <% if luci.dispatcher.context.authsession then %>logged-in<% end %> <% if not (path == "") then %>node-<%= path %><% else %>node-main-login<% end %>" data-page="<%= pcdata(path) %>">
|
||||
<header>
|
||||
<div class="navbar active">
|
||||
<div class="dropdown">
|
||||
|
||||
<a href="/cgi-bin/luci/admin/status/overview"><img src="<%=media%>/gaya/icon/navbar/status.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/services/ttyd"><img src="<%=media%>/gaya/icon/navbar/terminal.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/services/openclash"><img src="<%=media%>/gaya/icon/navbar/oc.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/nas/tinyfm"><img src="<%=media%>/gaya/icon/navbar/nas.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/modem/main"><img src="<%=media%>/gaya/icon/navbar/modem.png" /></a>
|
||||
<a href="/cgi-bin/luci/admin/network/network"><img src="<%=media%>/gaya/icon/navbar/interface.png" /></a>
|
||||
|
||||
</div>
|
||||
<label class="toggler">
|
||||
<img src="<%=media%>/gaya/icon/arrow.svg" alt="">
|
||||
</label>
|
||||
</div>
|
||||
<script>
|
||||
{
|
||||
const nav = document.querySelector(".navbar");
|
||||
let lastScrollY = window.scrollY;
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
if (lastScrollY < window.scrollY) {
|
||||
nav.classList.add("navbar--hidden");
|
||||
} else {
|
||||
nav.classList.remove("navbar--hidden");
|
||||
}
|
||||
|
||||
lastScrollY = window.scrollY;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="fill">
|
||||
<div class="container">
|
||||
|
||||
|
40
natter2/Makefile
Executable file
@ -0,0 +1,40 @@
|
||||
# Copyright (C) 2020-2024 Hyy2001X <https://github.com/Hyy2001X>
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=natter2
|
||||
PKG_VERSION=2.0.0-rc1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_VERSION:=ba7385de8edf869486f01b724780497939eccd24
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/MikeWang000000/Natter/tar.gz/$(PKG_SOURCE_VERSION)?
|
||||
PKG_HASH:=skip
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Open Port under FullCone NAT (NAT 1)
|
||||
URL:=https://github.com/MikeWang000000/Natter
|
||||
DEPENDS:=+python3-light
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
tar -zxvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/Natter-$(PKG_SOURCE_VERSION)/natter.py $(1)/usr/share/$(PKG_NAME)/natter.py
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/natter-check
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/Natter-$(PKG_SOURCE_VERSION)/natter-check/natter-check.py $(1)/usr/share/$(PKG_NAME)/natter-check/natter-check.py
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|