diff options
Diffstat (limited to 'applications/luci-app-eoip')
7 files changed, 340 insertions, 0 deletions
diff --git a/applications/luci-app-eoip/Makefile b/applications/luci-app-eoip/Makefile new file mode 100644 index 0000000000..f28b00e151 --- /dev/null +++ b/applications/luci-app-eoip/Makefile @@ -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 diff --git a/applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js b/applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js new file mode 100644 index 0000000000..9419d6183d --- /dev/null +++ b/applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js @@ -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(); + } +}); diff --git a/applications/luci-app-eoip/po/en/eoip.po b/applications/luci-app-eoip/po/en/eoip.po new file mode 100644 index 0000000000..7164191264 --- /dev/null +++ b/applications/luci-app-eoip/po/en/eoip.po @@ -0,0 +1,81 @@ +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" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:38 +msgid "Destination" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:38 +msgid "Destination IP address for connection EoIP." +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:43 +msgid "Dynamic" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:16 +msgid "Enable tunnel" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:10 +msgid "EoIP - Tunneling" +msgstr "" + +#: applications/luci-app-eoip/root/usr/share/luci/menu.d/luci-app-eoip.json:3 +msgid "EoIP tunnel" +msgstr "" + +#: applications/luci-app-eoip/root/usr/share/rpcd/acl.d/luci-app-eoip.json:3 +msgid "Grant UCI access for luci-app-eoip" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:10 +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:33 +msgid "ID tunnel" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:18 +msgid "If you input 0 interface name zeoip0" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:43 +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:33 +msgid "Indeficator id tunnel" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:18 +msgid "Name interface [zeoip" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:26 +msgid "Name interface already in used" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:12 +msgid "Settings" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:45 +msgid "VLAN" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:45 +msgid "VLAN TAG on this interface" +msgstr "" diff --git a/applications/luci-app-eoip/po/ru/eoip.po b/applications/luci-app-eoip/po/ru/eoip.po new file mode 100644 index 0000000000..04a3d70cb8 --- /dev/null +++ b/applications/luci-app-eoip/po/ru/eoip.po @@ -0,0 +1,94 @@ +msgid "" +msgstr "" +"Project-Id-Version: LuCI: eoip\n" +"PO-Revision-Date: 2021-06-06 05:59+0000\n" +"Last-Translator: Nikolay Parukhin <parukhin@gmail.com>\n" +"Language-Team: Russian <https://hosted.weblate.org/projects/openwrt/" +"luciapplicationseoip/ru/>\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.7-dev\n" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:38 +msgid "Destination" +msgstr "Направление" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:38 +msgid "Destination IP address for connection EoIP." +msgstr "IP адрес удалённого хоста для соединения с EoIP." + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:43 +msgid "Dynamic" +msgstr "Динамический" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:16 +msgid "Enable tunnel" +msgstr "Разрешить тунель" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:10 +msgid "EoIP - Tunneling" +msgstr "EoIP - Туннелинг" + +#: applications/luci-app-eoip/root/usr/share/luci/menu.d/luci-app-eoip.json:3 +msgid "EoIP tunnel" +msgstr "Туннель EoIP" + +#: applications/luci-app-eoip/root/usr/share/rpcd/acl.d/luci-app-eoip.json:3 +msgid "Grant UCI access for luci-app-eoip" +msgstr "Предоставить UCI доступ для luci-app-eoip" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:10 +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:33 +msgid "ID tunnel" +msgstr "ID туннеля" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:18 +msgid "If you input 0 interface name zeoip0" +msgstr "Если вы введёте 0 то имя интерфейса будет zeoip0" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:43 +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:33 +msgid "Indeficator id tunnel" +msgstr "Индефикатор id тунеля" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:18 +msgid "Name interface [zeoip" +msgstr "Имя интерфейса [zeoip" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:26 +msgid "Name interface already in used" +msgstr "Имя интерфейса уже используется" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:12 +msgid "Settings" +msgstr "Настройки" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:45 +msgid "VLAN" +msgstr "VLAN" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:45 +msgid "VLAN TAG on this interface" +msgstr "VLAN TAG на этом интерфейсе" diff --git a/applications/luci-app-eoip/po/templates/eoip.pot b/applications/luci-app-eoip/po/templates/eoip.pot new file mode 100644 index 0000000000..adfd354b76 --- /dev/null +++ b/applications/luci-app-eoip/po/templates/eoip.pot @@ -0,0 +1,75 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:38 +msgid "Destination" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:38 +msgid "Destination IP address for connection EoIP." +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:43 +msgid "Dynamic" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:16 +msgid "Enable tunnel" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:10 +msgid "EoIP - Tunneling" +msgstr "" + +#: applications/luci-app-eoip/root/usr/share/luci/menu.d/luci-app-eoip.json:3 +msgid "EoIP tunnel" +msgstr "" + +#: applications/luci-app-eoip/root/usr/share/rpcd/acl.d/luci-app-eoip.json:3 +msgid "Grant UCI access for luci-app-eoip" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:10 +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:33 +msgid "ID tunnel" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:18 +msgid "If you input 0 interface name zeoip0" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:43 +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:33 +msgid "Indeficator id tunnel" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:18 +msgid "Name interface [zeoip" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:26 +msgid "Name interface already in used" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:12 +msgid "Settings" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:45 +msgid "VLAN" +msgstr "" + +#: applications/luci-app-eoip/htdocs/luci-static/resources/view/eoip/eoip.js:45 +msgid "VLAN TAG on this interface" +msgstr "" diff --git a/applications/luci-app-eoip/root/usr/share/luci/menu.d/luci-app-eoip.json b/applications/luci-app-eoip/root/usr/share/luci/menu.d/luci-app-eoip.json new file mode 100644 index 0000000000..be121c545e --- /dev/null +++ b/applications/luci-app-eoip/root/usr/share/luci/menu.d/luci-app-eoip.json @@ -0,0 +1,13 @@ +{ + "admin/network/eoip": { + "title": "EoIP tunnel", + "action": { + "type": "view", + "path": "eoip/eoip" + }, + "depends": { + "acl": [ "luci-app-eoip" ], + "uci": { "eoip": true } + } + } +} diff --git a/applications/luci-app-eoip/root/usr/share/rpcd/acl.d/luci-app-eoip.json b/applications/luci-app-eoip/root/usr/share/rpcd/acl.d/luci-app-eoip.json new file mode 100644 index 0000000000..e8ddb55517 --- /dev/null +++ b/applications/luci-app-eoip/root/usr/share/rpcd/acl.d/luci-app-eoip.json @@ -0,0 +1,11 @@ +{ + "luci-app-eoip": { + "description": "Grant UCI access for luci-app-eoip", + "read": { + "uci": [ "eoip" ] + }, + "write": { + "uci": [ "eoip" ] + } + } +} |