luci-app-eoip: Add LuCI for EoIP

LuCI Support for EoIP tunnel

Signed-off-by: Bogdan Shatik <bogdikxxx@mail.ru>
This commit is contained in:
Bogdan Shatik 2021-01-26 16:12:14 +03:00 committed by Hannu Nyman
parent af1f961589
commit a4b88152b2
7 changed files with 257 additions and 0 deletions

View file

@ -0,0 +1,16 @@
# Copyright 2020 Bogdan Shatik (bogdikxxx@mail.ru)
# This is free software, licensed under the Apache License, Version 2.0
include $(TOPDIR)/rules.mk
PKG_MAINTAINER:=Bogdan Shatik <bogdikxxx@mail.ru>
PKG_NAME:=luci-app-eoip
PKG_LICENSE:=Apache-2.0
LUCI_TITLE:=LuCI Support for EoIP
LUCI_DEPENDS:=+eoip +luci-base
LUCI_PKGARCH:=all
include ../../luci.mk
# call BuildPackage - OpenWrt buildroot signature

View file

@ -0,0 +1,50 @@
'use strict';
'require form';
'require view';
'require uci';
return view.extend({
render: function() {
var m, s, n, id, d, o, v;
m = new form.Map("eoip", _("EoIP - Tunneling"), _("Here you can configure EoIP tunnel. At current moment it is easiest way to create stateless tunnel with Mikrotik."));
s = m.section(form.TypedSection, "eoip", _("Settings"));
s.addremove = true;
s.anonymous = true;
o = s.option(form.Flag, "enabled", _("Enable tunnel"));
n = s.option(form.Value, "name", _("Name interface [zeoip"), _("If you input 0 interface name zeoip0"));
n.rmempty = false;
n.datatype = "uinteger";
n.default = 0;
n.validate = function(section_id, value) {
var sections = uci.sections('eoip');
for (var i = 0; i < sections.length; i++) {
if (uci.get('eoip', sections[i]['.name'], 'name') == value && section_id != sections[i]['.name'])
{return _('Name interface already in used');}
}
return true;
};
id = s.option(form.Value, "idtun", _("ID tunnel"), _("Indeficator id tunnel"));
id.rmempty = false;
id.datatype = "and(min(1), integer)";
id.default = 1;
d = s.option(form.Value, "dst", _("Destination"), _("Destination IP address for connection EoIP."));
d.rmempty = false;
d.datatype = "ipaddr";
d.placeholder = "0.0.0.0";
o = s.option(form.Flag, "dynamic", _("Dynamic"), _("If you use dynamic option, take attention that there is no authorization, and it is not secure. It is not good idea to use this feature with public ip or insecure(not completely under your control, each host) network."));
v = s.option(form.DynamicList,"vlan", _("VLAN"), _("VLAN TAG on this interface"));
v.datatype = "range(1,4094)";
return m.render();
}
});

View file

@ -0,0 +1,60 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: LuCI: eoip\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: Bogdan Shatik <bogdikxxx@mail.ru>\n"
"Language: en\n"
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:17
msgid "Name interface [zeoip"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:32
msgid "ID tunnel"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:32
msgid "Indeficator id tunnel"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:9
msgid "Here you can configure EoIP tunnel. At current moment it is easiest way to create stateless tunnel with Mikrotik."
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:17
msgid "If you input 0 interface name zeoip0"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:15
msgid "Enable tunnel"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:9
msgid "EoIP - Tunneling"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:25
msgid "Name interface already in used"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:37
msgid "Destination IP address for connection EoIP."
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:42
msgid "Dynamic"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:42
msgid "If you use dynamic option, take attention that there is no authorization, and it is not secure. It is not good idea to use this feature with public ip or insecure(not completely under your control, each host) network."
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:44
msgid "VLAN TAG on this interface"
msgstr ""

View file

@ -0,0 +1,56 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: LuCI: eoip\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: Bogdan Shatik <bogdikxxx@mail.ru>\n"
"Language: ru\n"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:17
msgid "Name interface [zeoip"
msgstr "Имя интерфейса [zeoip"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:32
msgid "ID tunnel"
msgstr "ID туннеля"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:32
msgid "Indeficator id tunnel"
msgstr "Индефикатор id тунеля"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:9
msgid "Here you can configure EoIP tunnel. At current moment it is easiest way to create stateless tunnel with Mikrotik."
msgstr "Здесь вы можете создавать туннели Ethernet, совместимые с туннеленгом Mikrotik EoIP. В настоящий момент это самый простой способ создать туннель на базе протокола от Mikrotik."
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:17
msgid "If you input 0 interface name zeoip0"
msgstr "Если вы введёте 0 то имя интерфейса будет zeoip0"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:15
msgid "Enable tunnel"
msgstr "Разрешить тунель"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:9
msgid "EoIP - Tunneling"
msgstr "EoIP - Туннелинг"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:25
msgid "Name interface already in used"
msgstr "Имя интерфейса уже используется"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:37
msgid "Destination IP address for connection EoIP."
msgstr "IP адрес удалённого хоста для соединения с EoIP"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:42
msgid "Dynamic"
msgstr "Динамический"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:42
msgid "If you use dynamic option, take attention that there is no authorization, and it is not secure. It is not good idea to use this feature with public ip or insecure(not completely under your control, each host) network."
msgstr "Если вы используете динамический вариант, обратите внимание, что авторизации нет, и это небезопасно. Не рекомендуется использовать эту функцию с общедоступным IP или небезопасной (не полностью контролируемой вами, каждым хостом) сетью."
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:44
msgid "VLAN TAG on this interface"
msgstr "VLAN TAG на этом интерфейсе"

View file

@ -0,0 +1,51 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:17
msgid "Name interface [zeoip"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:32
msgid "ID tunnel"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:32
msgid "Indeficator id tunnel"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:9
msgid "Here you can configure EoIP tunnel. At current moment it is easiest way to create stateless tunnel with Mikrotik."
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:17
msgid "If you input 0 interface name zeoip0"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:15
msgid "Enable tunnel"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:9
msgid "EoIP - Tunneling"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:25
msgid "Name interface already in used"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:37
msgid "Destination IP address for connection EoIP."
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:42
msgid "Dynamic"
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:42
msgid "If you use dynamic option, take attention that there is no authorization, and it is not secure. It is not good idea to use this feature with public ip or insecure(not completely under your control, each host) network."
msgstr ""
#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:44
msgid "VLAN TAG on this interface"
msgstr ""

View file

@ -0,0 +1,13 @@
{
"admin/network/eoip": {
"title": "EoIP tunnel",
"action": {
"type": "view",
"path": "eoip/eoip"
},
"depends": {
"acl": [ "luci-app-eoip" ],
"uci": { "eoip": true }
}
}
}

View file

@ -0,0 +1,11 @@
{
"luci-app-eoip": {
"description": "Grant UCI access for luci-app-eoip",
"read": {
"uci": [ "eoip" ]
},
"write": {
"uci": [ "eoip" ]
}
}
}