diff --git a/contributors/cr3ative.md b/contributors/cr3ative.md new file mode 100644 index 000000000..b0c58c54e --- /dev/null +++ b/contributors/cr3ative.md @@ -0,0 +1,9 @@ +2020-11-10 + +I hereby agree to the terms of the "OpenMPTCProuter Individual Contributor License Agreement", with MD5 checksum bc827a07eb93611d793ddb7c75083c00. + +I furthermore declare that I am authorized and able to make this agreement and sign this declaration. + +Signed, + +Paul Curry https://github.com/cr3ative diff --git a/dsvpn/files/init b/dsvpn/files/init index 73a3457a3..250c409df 100755 --- a/dsvpn/files/init +++ b/dsvpn/files/init @@ -24,7 +24,9 @@ validate_section() { 'port:port' \ 'dev:string' \ 'localip:host' \ - 'remoteip:host' + 'remoteip:host' \ + 'mode:string:client' \ + 'externalip:string:auto' } start_instance() { @@ -39,7 +41,8 @@ start_instance() { [ -n "${key}" ] || return 1 [ "${key}" != "secretkey" ] || return 1 - [ -n "${port}" ] || return 1 + [ -z "${host}" ] && host="auto" + [ -z "${port}" ] && port="auto" [ -n "${dev}" ] || return 1 echo "${key}" > /tmp/${PROG_NAME}-${1}.key @@ -57,14 +60,15 @@ start_instance() { procd_open_instance - procd_set_param command ${PROG} client \ + procd_set_param command ${PROG} ${mode} \ /tmp/${PROG_NAME}-${1}.key \ $host \ $port \ $dev \ ${localip:+$localip} \ - ${remoteip:+$remoteip} \ - $(ip r get $host | awk '{print $3}' | tr -d "\n") + ${remoteip:+$remoteip} + [ "$mode" = "client" ] && procd_append_param command $(ip r get $host | awk '{print $3}' | tr -d "\n") + [ "$mode" = "server" ] && procd_append_param command externalip procd_set_param respawn 0 30 5 diff --git a/glorytun-udp/Makefile b/glorytun-udp/Makefile index 121af0912..c2dd9da15 100644 --- a/glorytun-udp/Makefile +++ b/glorytun-udp/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/angt/glorytun.git -PKG_SOURCE_VERSION:=97607fdf5c6c33df512ed85190a1fd93b5f45e77 +PKG_SOURCE_VERSION:=32267e86a6da05b285bb3bf2b136c105dc0af4bb PKG_NAME:=glorytun-udp PKG_VERSION:=0.3.4-$(PKG_SOURCE_VERSION) PKG_RELEASE:=23 diff --git a/glorytun-udp/init b/glorytun-udp/init index 638736017..5e50d59df 100755 --- a/glorytun-udp/init +++ b/glorytun-udp/init @@ -1,7 +1,7 @@ #!/bin/sh /etc/rc.common # vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 : # Copyright (C) 2015 ovh.com -# Copyright (C) 2017 Ycarus (Yannick Chabanois) +# Copyright (C) 2017-2020 Ycarus (Yannick Chabanois) START=90 STOP=10 @@ -19,22 +19,19 @@ _err() { } validate_section() { - uci_validate_section glorytun glorytun "${1}" \ - 'enable:bool:0' \ - 'key:string' \ - 'host:host' \ - 'port:port' \ - 'proto:string' \ - 'bind:string:0.0.0.0' \ - 'bindport:port' \ - 'mtu:uinteger:1450' \ - 'mtuauto:bool:0' \ - 'chacha20:bool:0' \ + uci_validate_section glorytun-udp glorytun-udp "${1}" \ + 'enable:bool:0' \ + 'mode:string' \ + 'key:string' \ + 'host:host' \ + 'port:port' \ + 'mtuauto:bool:0' \ + 'chacha:bool:0' \ 'dev:string' } start_instance() { - local enable key host port listener proto bind bindport mtu mtuauto chacha20 dev + local enable key host port listener proto mtuauto chacha dev mode validate_section "${1}" || { _err "validation failed" @@ -42,12 +39,12 @@ start_instance() { } [ "${enable}" = "1" ] || return 1 - [ "${proto}" = "udp" ] || return 1 [ -n "${key}" ] || return 1 [ "${key}" != "secretkey" ] || return 1 [ -n "${port}" ] || return 1 [ -n "${dev}" ] || return 1 + [ -n "${mode}" ] || return 1 echo "${key}" > /tmp/${PROG_NAME}-${1}.key key="" @@ -62,15 +59,13 @@ start_instance() { procd_open_instance procd_set_param command ${PROG} \ - ${bind:+bind "$bind"} \ - ${bindport:+ "$bindport"} \ - ${host:+to "$host"} \ - ${port:+ "$port"} \ + ${host:+bind ${mode} addr "$host"} \ + ${port:+port "$port"} \ ${dev:+dev "$dev"} \ keyfile /tmp/${PROG_NAME}-${1}.key \ persist - [ "${chacha20}" = "1" ] && procd_append_param command chacha + [ "${chacha}" = "1" ] && procd_append_param command chacha procd_set_param respawn 0 30 0 procd_set_param file /tmp/${PROG_NAME}-${1}.key @@ -104,8 +99,8 @@ add_glorytun_path() { start_service() { local dev - config_load glorytun - config_foreach start_instance glorytun + config_load glorytun-udp + config_foreach start_instance glorytun-udp } reload_service() { diff --git a/glorytun/glorytun.config b/glorytun/glorytun.config index 9ee6e41e6..33c93f36f 100644 --- a/glorytun/glorytun.config +++ b/glorytun/glorytun.config @@ -10,4 +10,5 @@ config glorytun 'vpn' option mtuauto '1' option localip '10.255.255.2' option remoteip '10.255.255.1' - option multiqueue '1' \ No newline at end of file + option multiqueue '1' + option label 'Default VPN' \ No newline at end of file diff --git a/glorytun/init b/glorytun/init index 5d0233157..f5b868323 100755 --- a/glorytun/init +++ b/glorytun/init @@ -22,17 +22,18 @@ validate_section() { uci_validate_section glorytun glorytun "${1}" \ 'enable:bool:0' \ 'mptcp:bool:0' \ - 'listener:bool:0' \ + 'mode:string' \ 'key:string' \ 'host:host' \ 'port:port' \ 'dev:string' \ + 'timeout:uinteger:10000' \ 'chacha20:bool:0' \ 'proto:string' } start_instance() { - local enable key host port dev listener mptcp proto chacha20 + local enable key host port dev mptcp proto chacha20 mode multiqueue timeout validate_section "${1}" || { _err "validation failed" @@ -71,14 +72,14 @@ start_instance() { ${host:+host "$host"} \ ${dev:+dev "$dev"} - [ "${listener}" = "1" ] && procd_append_param command listener + [ "${mode}" = "listener" ] && procd_append_param command listener [ "${mptcp}" = "1" ] && procd_append_param command mptcp [ "${chacha20}" = "1" ] && procd_append_param command chacha20 [ "${multiqueue}" = "1" ] && procd_append_param command multiqueue procd_append_param command \ retry count -1 const 500000 \ - timeout 10000 \ + timeout ${timeout} \ keepalive count 5 idle 20 interval 2 \ buffer-size 32768 diff --git a/luci-app-dsvpn/Makefile b/luci-app-dsvpn/Makefile index d78150d98..cc5052f9d 100644 --- a/luci-app-dsvpn/Makefile +++ b/luci-app-dsvpn/Makefile @@ -1,11 +1,11 @@ # -# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) for OpenMPTCProuter +# Copyright (C) 2018-2020 Ycarus (Yannick Chabanois) # # include $(TOPDIR)/rules.mk -LUCI_TITLE:=LuCI Support for DSVPN +LUCI_TITLE:=LuCI Interface to DSVPN LUCI_DEPENDS:=+dsvpn PKG_LICENSE:=GPLv3 diff --git a/luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js b/luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js new file mode 100644 index 000000000..453a13836 --- /dev/null +++ b/luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js @@ -0,0 +1,66 @@ +'use strict'; +'require rpc'; +'require form'; +'require fs'; +'require uci'; +'require tools.widgets as widgets'; + +var callHostHints; + +return L.view.extend({ + callHostHints: rpc.declare({ + object: 'luci-rpc', + method: 'getHostHints', + expect: { '': {} } + }), + + load: function() { + return this.callHostHints(); + }, + + render: function(hosts) { + var m, s, o; + + m = new form.Map('dsvpn', _('DSVPN')); + + s = m.section(form.GridSection, 'dsvpn', _('Instances')); + s.addremove = true; + s.anonymous = true; + s.nodescriptions = true; + + o = s.option(form.Flag, 'enable', _('Enabled')); + o.default = o.enabled; + + o = s.option(form.Value, 'label', _('Label')); + o.rmempty = true; + + o = s.option(form.ListValue, 'mode', _('Mode')); + o.value('client',_('Client')); + o.value('server',_('Server')); + o.modalonly = true; + + o = s.option(form.Value, 'host', _('Host')); + o.rmempty = false; + + o = s.option(form.Value, 'port', _('Port')); + o.rmempty = false; + + o = s.option(form.Value, 'key', _('Key')); + o.rmempty = false; + o.modalonly = true; + + o = s.option(form.Value, 'dev', _('Interface name')); + o.rmempty = false; + o.modalonly = true; + + o = s.option(form.Value, 'localip', _('Local IP')); + o.datatype = 'or(ip4addr,ip6addr)'; + o.rmempty = false; + + o = s.option(form.Value, 'remoteip', _('Remote IP')); + o.datatype = 'or(ip4addr,ip6addr)'; + o.rmempty = false; + + return m.render(); + } +}); diff --git a/luci-app-dsvpn/luasrc/controller/dsvpn.lua b/luci-app-dsvpn/luasrc/controller/dsvpn.lua deleted file mode 100644 index 99793584a..000000000 --- a/luci-app-dsvpn/luasrc/controller/dsvpn.lua +++ /dev/null @@ -1,7 +0,0 @@ -module("luci.controller.dsvpn", package.seeall) - -function index() - --entry({"admin", "openmptcprouter", "mlvpn"}, cbi("mlvpn"), _("DSVPN")) - --entry({"admin", "services", "dsvpn"}, cbi("dsvpn"), _("DSVPN")) - entry({"admin", "vpn", "dsvpn"}, cbi("dsvpn"), _("DSVPN")) -end diff --git a/luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua b/luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua deleted file mode 100644 index d0c6a3141..000000000 --- a/luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua +++ /dev/null @@ -1,44 +0,0 @@ -local net = require "luci.model.network".init() -local sys = require "luci.sys" -local ifaces = sys.net:devices() -local m, s, o - -m = Map("dsvpn", translate("DSVPN")) - -s = m:section(TypedSection, "dsvpn", translate("Settings")) -s.anonymous = true -s.addremove = false - -o = s:option(Flag, "enable", translate("Enable")) -o.rmempty = false - -o = s:option(Value, "host", translate("Remote host")) -o.placeholder = "128.128.128.128" -o.default = "128.128.128.128" -o.datatype = "host" -o.rmempty = false - -o = s:option(Value, "port", translate("Remote port")) -o.placeholder = "65011" -o.default = "65011" -o.datatype = "port" - -o = s:option(Value, "key", translate("Key")) -o.password = true -o.rmempty = false - - -o = s:option(Value, "localip", translate("Tunnel local IP")) -o.default = "10.255.251.2" -o.datatype = "host" - -o = s:option(Value, "remoteip", translate("Tunnel remote IP")) -o.default = "10.255.251.1" -o.datatype = "host" - -o = s:option(Value, "dev", translate("Interface name")) -o.placeholder = "tun0" -o.default = "tun0" -o.rmempty = false - -return m diff --git a/luci-app-dsvpn/po/de/dsvpn.po b/luci-app-dsvpn/po/de/dsvpn.po deleted file mode 100644 index 4bea475af..000000000 --- a/luci-app-dsvpn/po/de/dsvpn.po +++ /dev/null @@ -1,50 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-10-05 12:39+0000\n" -"Last-Translator: Weblate Admin \n" -"Language-Team: German \n" -"Language: de\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" - -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 -msgid "DSVPN" -msgstr "DSVPN" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 -msgid "Enable" -msgstr "Aktivieren" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 -msgid "Interface name" -msgstr "Name der Verbindung" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 -msgid "Key" -msgstr "Schlüssel" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 -msgid "Remote host" -msgstr "Gegenstelle (FQDN oder IP-Adresse)" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 -msgid "Remote port" -msgstr "Port der Gegenstelle" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 -msgid "Settings" -msgstr "Einstellungen" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 -msgid "Tunnel local IP" -msgstr "Lokale Tunnel-IP" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 -msgid "Tunnel remote IP" -msgstr "Gegenstellen-Tunnel-IP" diff --git a/luci-app-dsvpn/po/fr/dsvpn.po b/luci-app-dsvpn/po/fr/dsvpn.po index 8f06d0390..b0e57ae95 100644 --- a/luci-app-dsvpn/po/fr/dsvpn.po +++ b/luci-app-dsvpn/po/fr/dsvpn.po @@ -1,53 +1,68 @@ msgid "" msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: 2020-09-30 08:50+0000\n" -"Last-Translator: Anonymous \n" +"PO-Revision-Date: 2020-12-15 14:46+0000\n" +"Last-Translator: Weblate Admin \n" "Language-Team: French \n" "Language: fr\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.0.4\n" -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:35 +msgid "Client" +msgstr "Client" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:24 +#: luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json:3 msgid "DSVPN" msgstr "DSVPN" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 -msgid "Enable" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:31 +msgid "Enabled" msgstr "Activer" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 +#: luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json:3 +msgid "Grant access to DSVPN" +msgstr "Accorder l'accès à DSVPN" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:39 +msgid "Host" +msgstr "Hôte" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:26 +msgid "Instances" +msgstr "Instances" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:49 msgid "Interface name" msgstr "Nom de l'interface" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:45 msgid "Key" -msgstr "Clé" +msgstr "Clef" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 -msgid "Remote host" -msgstr "Nom de l'hôte distant ou adresse IP" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:61 +msgid "Label" +msgstr "Étiquette" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 -msgid "Remote port" -msgstr "Port distant" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:53 +msgid "Local IP" +msgstr "Adresse IP locale" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 -msgid "Settings" -msgstr "Paramètres" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:34 +msgid "Mode" +msgstr "Mode" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 -msgid "Tunnel local IP" -msgstr "Adresse IP locale du tunnel" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:42 +msgid "Port" +msgstr "Port" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 -msgid "Tunnel remote IP" -msgstr "Adresse IP distance du tunnel" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:57 +msgid "Remote IP" +msgstr "IP Distante" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:36 +msgid "Server" +msgstr "Serveur" diff --git a/luci-app-dsvpn/po/it/dsvpn.po b/luci-app-dsvpn/po/it/dsvpn.po deleted file mode 100644 index dd2cd86a2..000000000 --- a/luci-app-dsvpn/po/it/dsvpn.po +++ /dev/null @@ -1,50 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-09-21 12:51+0000\n" -"Last-Translator: Weblate Admin \n" -"Language-Team: Italian \n" -"Language: it\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" - -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 -msgid "DSVPN" -msgstr "DSVPN" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 -msgid "Enable" -msgstr "Attivare" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 -msgid "Interface name" -msgstr "Nome interfaccia" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 -msgid "Key" -msgstr "Key" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 -msgid "Remote host" -msgstr "Rimuovi server" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 -msgid "Remote port" -msgstr "Porta remota" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 -msgid "Settings" -msgstr "Impostazioni" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 -msgid "Tunnel local IP" -msgstr "IP locale del tunnel" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 -msgid "Tunnel remote IP" -msgstr "IP remoto del tunnel" diff --git a/luci-app-dsvpn/po/oc/dsvpn.po b/luci-app-dsvpn/po/oc/dsvpn.po deleted file mode 100644 index 4a806fe56..000000000 --- a/luci-app-dsvpn/po/oc/dsvpn.po +++ /dev/null @@ -1,50 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-08-18 17:37+0000\n" -"Last-Translator: Quentin PAGÈS \n" -"Language-Team: Occitan \n" -"Language: oc\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.0.4\n" - -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 -msgid "DSVPN" -msgstr "DSVPN" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 -msgid "Enable" -msgstr "Activat" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 -msgid "Interface name" -msgstr "Nom de l’interfàcia" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 -msgid "Key" -msgstr "Clau" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 -msgid "Remote host" -msgstr "Nom de l’òste distant o adreça IP" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 -msgid "Remote port" -msgstr "Pòrt distant" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 -msgid "Settings" -msgstr "Paramètres" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 -msgid "Tunnel local IP" -msgstr "Adreça IP locala del tunèl" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 -msgid "Tunnel remote IP" -msgstr "Adreça IP distanta del tunèl" diff --git a/luci-app-dsvpn/po/templates/dsvpn.pot b/luci-app-dsvpn/po/templates/dsvpn.pot index bc26ff694..8f77636dc 100644 --- a/luci-app-dsvpn/po/templates/dsvpn.pot +++ b/luci-app-dsvpn/po/templates/dsvpn.pot @@ -1,41 +1,59 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:35 +msgid "Client" +msgstr "" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:24 +#: luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json:3 msgid "DSVPN" msgstr "" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 -msgid "Enable" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:31 +msgid "Enabled" msgstr "" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 +#: luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json:3 +msgid "Grant access to DSVPN" +msgstr "" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:39 +msgid "Host" +msgstr "" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:26 +msgid "Instances" +msgstr "" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:49 msgid "Interface name" msgstr "" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:45 msgid "Key" msgstr "" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 -msgid "Remote host" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:61 +msgid "Label" msgstr "" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 -msgid "Remote port" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:53 +msgid "Local IP" msgstr "" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 -msgid "Settings" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:34 +msgid "Mode" msgstr "" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 -msgid "Tunnel local IP" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:42 +msgid "Port" msgstr "" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 -msgid "Tunnel remote IP" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:57 +msgid "Remote IP" +msgstr "" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:36 +msgid "Server" msgstr "" diff --git a/luci-app-dsvpn/po/zh_Hans/dsvpn.po b/luci-app-dsvpn/po/zh_Hans/dsvpn.po index f847c0504..177492257 100644 --- a/luci-app-dsvpn/po/zh_Hans/dsvpn.po +++ b/luci-app-dsvpn/po/zh_Hans/dsvpn.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-06-11 16:36+0000\n" +"PO-Revision-Date: 2020-12-04 16:03+0000\n" "Last-Translator: antrouter \n" "Language-Team: Chinese (Simplified) \n" @@ -10,41 +10,59 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.0.4\n" -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 -msgid "DSVPN" -msgstr "DS虚拟专网" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:35 +msgid "Client" +msgstr "客户端" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 -msgid "Enable" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:24 +#: luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json:3 +msgid "DSVPN" +msgstr "DSVPN" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:31 +msgid "Enabled" msgstr "开启" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 -msgid "Interface name" -msgstr "网卡名称" +#: luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json:3 +msgid "Grant access to DSVPN" +msgstr "授予对DSVPN的访问权限" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:39 +msgid "Host" +msgstr "主机" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:26 +msgid "Instances" +msgstr "实例" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:49 +msgid "Interface name" +msgstr "接口名称" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:45 msgid "Key" msgstr "秘钥" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 -msgid "Remote host" -msgstr "远程主机" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:61 +msgid "Label" +msgstr "标签" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 -msgid "Remote port" -msgstr "远程端口" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:53 +msgid "Local IP" +msgstr "本地IP" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 -msgid "Settings" -msgstr "设置" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:34 +msgid "Mode" +msgstr "模式" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 -msgid "Tunnel local IP" -msgstr "隧道本地IP" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:42 +msgid "Port" +msgstr "端口" -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 -msgid "Tunnel remote IP" -msgstr "隧道远程IP" +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:57 +msgid "Remote IP" +msgstr "远程IP" + +#: luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js:36 +msgid "Server" +msgstr "服务器" diff --git a/luci-app-dsvpn/po/zh_Hant/dsvpn.po b/luci-app-dsvpn/po/zh_Hant/dsvpn.po deleted file mode 100644 index 858741a28..000000000 --- a/luci-app-dsvpn/po/zh_Hant/dsvpn.po +++ /dev/null @@ -1,50 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-07-09 07:31+0000\n" -"Last-Translator: antrouter \n" -"Language-Team: Chinese (Traditional) \n" -"Language: zh_Hant\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.0.4\n" - -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 -#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 -msgid "DSVPN" -msgstr "DS虛擬專用網" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 -msgid "Enable" -msgstr "啟用" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 -msgid "Interface name" -msgstr "接口名稱" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 -msgid "Key" -msgstr "秘鑰" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 -msgid "Remote host" -msgstr "遠程主機" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 -msgid "Remote port" -msgstr "遠端埠" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 -msgid "Settings" -msgstr "設定" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 -msgid "Tunnel local IP" -msgstr "隧道本地IP" - -#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 -msgid "Tunnel remote IP" -msgstr "隧道遠程IP" diff --git a/luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json b/luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json index 257a29fab..49ebec311 100644 --- a/luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json +++ b/luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json @@ -1,10 +1,10 @@ { "admin/vpn/dsvpn": { "title": "DSVPN", - "order": 10, + "order": 60, "action": { - "type": "cbi", - "path": "dsvpn" + "type": "view", + "path": "services/dsvpn" }, "depends": { "acl": [ "luci-app-dsvpn" ] diff --git a/luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json b/luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json index c4c7f00c9..e11c9127c 100644 --- a/luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json +++ b/luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json @@ -1,6 +1,6 @@ { "luci-app-dsvpn": { - "description": "Grant UCI access for luci-app-dsvpn", + "description": "Grant access to DSVPN", "read": { "uci": [ "dsvpn" ] }, diff --git a/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js b/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js index 8cb1a1242..bacbbd704 100644 --- a/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js +++ b/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js @@ -308,6 +308,7 @@ return view.extend({ o.value('network-redirect'); o.value('network-unknown'); o.value('network-unreachable'); + o.value('packet-too-big'); o.value('parameter-problem'); o.value('port-unreachable'); o.value('precedence-cutoff'); diff --git a/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js b/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js index 5e2b6cd81..00e272677 100644 --- a/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js +++ b/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js @@ -177,9 +177,11 @@ return view.extend({ } return Promise.all(tasks).then(function(zone_networks) { - if (zone_networks[0]) + if (zone_networks[0]) { + zone_networks[0].clearNetworks(); for (var i = 1; i < zone_networks.length; i++) zone_networks[0].addNetwork(zone_networks[i].getName()); + } }); }; diff --git a/luci-app-glorytun-tcp/Makefile b/luci-app-glorytun-tcp/Makefile new file mode 100644 index 000000000..80d97c856 --- /dev/null +++ b/luci-app-glorytun-tcp/Makefile @@ -0,0 +1,16 @@ +# +# Copyright (C) 2018-2020 Ycarus (Yannick Chabanois) +# +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=LuCI Interface to Glorytun TCP +LUCI_DEPENDS:=+glorytun + +PKG_LICENSE:=GPLv3 + +#include ../luci/luci.mk +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js b/luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js new file mode 100644 index 000000000..c8929e0fb --- /dev/null +++ b/luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js @@ -0,0 +1,87 @@ +'use strict'; +'require rpc'; +'require form'; +'require fs'; +'require uci'; +'require tools.widgets as widgets'; + +var callHostHints; + +return L.view.extend({ + callHostHints: rpc.declare({ + object: 'luci-rpc', + method: 'getHostHints', + expect: { '': {} } + }), + + load: function() { + return this.callHostHints(); + }, + + render: function(hosts) { + var m, s, o; + + m = new form.Map('glorytun', _('Glorytun TCP')); + + s = m.section(form.GridSection, 'glorytun', _('Instances')); + s.addremove = true; + s.anonymous = true; + s.nodescriptions = true; + + s.tab('general', _('General Settings')); + s.tab('advanced', _('Advanced Settings')); + + o = s.taboption('general', form.Flag, 'enable', _('Enabled')); + o.default = o.enabled; + + o = s.taboption('general',form.Value, 'label', _('Label')); + o.rmempty = true; + + o = s.taboption('general', form.ListValue, 'mode', _('Mode')); + o.value('',_('Client')); + o.value('listener',_('Server')); + o.modalonly = true; + + o = s.taboption('general', form.Value, 'host', _('Host')); + o.rmempty = false; + + o = s.taboption('general', form.Value, 'port', _('Port')); + o.rmempty = false; + + o = s.taboption('general', form.Value, 'key', _('Key')); + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('general', form.Value, 'dev', _('Interface name')); + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('general', form.Value, 'localip', _('Local IP')); + o.datatype = 'or(ip4addr,ip6addr)'; + o.rmempty = false; + + o = s.taboption('general', form.Value, 'remoteip', _('Remote IP')); + o.datatype = 'or(ip4addr,ip6addr)'; + o.rmempty = false; + + o = s.taboption('advanced', form.Flag, 'mptcp', _('MPTCP')); + o.default = o.enabled; + o.modalonly = true; + + o = s.taboption('advanced', form.Flag, 'chacha20', _('chacha'), _('Force fallback cipher')); + o.default = o.enabled; + o.modalonly = true; + + o = s.taboption('advanced', form.Value, 'timeout', _('Timeout')); + o.default = '10000'; + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('advanced', form.Flag, 'multiqueue', _('Multiqueue')); + o.default = o.enabled; + o.rmempty = false; + o.modalonly = true; + + return m.render(); + } +}); diff --git a/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po b/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po new file mode 100644 index 000000000..cd96b6f5b --- /dev/null +++ b/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po @@ -0,0 +1,96 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-12-15 14:46+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: French \n" +"Language: fr\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:32 +msgid "Advanced Settings" +msgstr "Configuration avancée" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:38 +msgid "Client" +msgstr "Client" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:34 +msgid "Enabled" +msgstr "Activer" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:68 +msgid "Force fallback cipher" +msgstr "Forcer le chiffrement de secours" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:31 +msgid "General Settings" +msgstr "Paramètres généraux" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:24 +#: luci-app-glorytun-tcp/root/usr/share/luci/menu.d/luci-app-glorytun-tcp.json:3 +msgid "Glorytun TCP" +msgstr "Glorytun TCP" + +#: luci-app-glorytun-tcp/root/usr/share/rpcd/acl.d/luci-app-glorytun-tcp.json:3 +msgid "Grant access to glorytun TCP" +msgstr "Accorder l'accès à Glorytun TCP" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:42 +msgid "Host" +msgstr "Hôte" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:26 +msgid "Instances" +msgstr "Instances" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:52 +msgid "Interface name" +msgstr "Nom de l'interface" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:48 +msgid "Key" +msgstr "Clef" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:82 +msgid "Label" +msgstr "Étiquette" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:56 +msgid "Local IP" +msgstr "Adresse IP locale" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:64 +msgid "MPTCP" +msgstr "MPTCP" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:37 +msgid "Mode" +msgstr "Mode" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:77 +msgid "Multiqueue" +msgstr "Multiqueue" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:45 +msgid "Port" +msgstr "Port" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:60 +msgid "Remote IP" +msgstr "IP Distante" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:39 +msgid "Server" +msgstr "Serveur" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:72 +msgid "Timeout" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:68 +msgid "chacha" +msgstr "Chacha" diff --git a/luci-app-glorytun-tcp/po/templates/glorytun-tcp.pot b/luci-app-glorytun-tcp/po/templates/glorytun-tcp.pot new file mode 100644 index 000000000..4f7759dc3 --- /dev/null +++ b/luci-app-glorytun-tcp/po/templates/glorytun-tcp.pot @@ -0,0 +1,87 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:32 +msgid "Advanced Settings" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:38 +msgid "Client" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:34 +msgid "Enabled" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:68 +msgid "Force fallback cipher" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:31 +msgid "General Settings" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:24 +#: luci-app-glorytun-tcp/root/usr/share/luci/menu.d/luci-app-glorytun-tcp.json:3 +msgid "Glorytun TCP" +msgstr "" + +#: luci-app-glorytun-tcp/root/usr/share/rpcd/acl.d/luci-app-glorytun-tcp.json:3 +msgid "Grant access to glorytun TCP" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:42 +msgid "Host" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:26 +msgid "Instances" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:52 +msgid "Interface name" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:48 +msgid "Key" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:82 +msgid "Label" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:56 +msgid "Local IP" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:64 +msgid "MPTCP" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:37 +msgid "Mode" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:77 +msgid "Multiqueue" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:45 +msgid "Port" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:60 +msgid "Remote IP" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:39 +msgid "Server" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:72 +msgid "Timeout" +msgstr "" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:68 +msgid "chacha" +msgstr "" diff --git a/luci-app-glorytun-tcp/po/zh_Hans/glorytun-tcp.po b/luci-app-glorytun-tcp/po/zh_Hans/glorytun-tcp.po new file mode 100644 index 000000000..debdafdef --- /dev/null +++ b/luci-app-glorytun-tcp/po/zh_Hans/glorytun-tcp.po @@ -0,0 +1,96 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-12-04 16:03+0000\n" +"Last-Translator: antrouter \n" +"Language-Team: Chinese (Simplified) \n" +"Language: zh_Hans\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 4.0.4\n" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:32 +msgid "Advanced Settings" +msgstr "高级设置" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:38 +msgid "Client" +msgstr "客户端" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:34 +msgid "Enabled" +msgstr "开启" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:68 +msgid "Force fallback cipher" +msgstr "强制回退密码" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:31 +msgid "General Settings" +msgstr "通用设置" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:24 +#: luci-app-glorytun-tcp/root/usr/share/luci/menu.d/luci-app-glorytun-tcp.json:3 +msgid "Glorytun TCP" +msgstr "glorytun TCP" + +#: luci-app-glorytun-tcp/root/usr/share/rpcd/acl.d/luci-app-glorytun-tcp.json:3 +msgid "Grant access to glorytun TCP" +msgstr "授予访问glorytun TCP的权限" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:42 +msgid "Host" +msgstr "主机" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:26 +msgid "Instances" +msgstr "实例" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:52 +msgid "Interface name" +msgstr "接口名称" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:48 +msgid "Key" +msgstr "秘钥" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:82 +msgid "Label" +msgstr "标签" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:56 +msgid "Local IP" +msgstr "本地IP" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:64 +msgid "MPTCP" +msgstr "聚合" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:37 +msgid "Mode" +msgstr "模式" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:77 +msgid "Multiqueue" +msgstr "多队列" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:45 +msgid "Port" +msgstr "端口" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:60 +msgid "Remote IP" +msgstr "远程IP" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:39 +msgid "Server" +msgstr "服务器" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:72 +msgid "Timeout" +msgstr "超时" + +#: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:68 +msgid "chacha" +msgstr "chacha密码" diff --git a/luci-app-glorytun/root/etc/hotplug.d/iface/30-glorytun b/luci-app-glorytun-tcp/root/etc/hotplug.d/iface/30-glorytun similarity index 100% rename from luci-app-glorytun/root/etc/hotplug.d/iface/30-glorytun rename to luci-app-glorytun-tcp/root/etc/hotplug.d/iface/30-glorytun diff --git a/luci-app-glorytun/root/etc/uci-defaults/1200-luci-glorytun b/luci-app-glorytun-tcp/root/etc/uci-defaults/1200-luci-glorytun similarity index 100% rename from luci-app-glorytun/root/etc/uci-defaults/1200-luci-glorytun rename to luci-app-glorytun-tcp/root/etc/uci-defaults/1200-luci-glorytun diff --git a/luci-app-glorytun-tcp/root/usr/share/luci/menu.d/luci-app-glorytun-tcp.json b/luci-app-glorytun-tcp/root/usr/share/luci/menu.d/luci-app-glorytun-tcp.json new file mode 100644 index 000000000..03e7dcf7a --- /dev/null +++ b/luci-app-glorytun-tcp/root/usr/share/luci/menu.d/luci-app-glorytun-tcp.json @@ -0,0 +1,13 @@ +{ + "admin/vpn/glorytun-tcp": { + "title": "Glorytun TCP", + "order": 60, + "action": { + "type": "view", + "path": "services/glorytun-tcp" + }, + "depends": { + "acl": [ "luci-app-glorytun-tcp" ] + } + } +} diff --git a/luci-app-glorytun/root/usr/share/rpcd/acl.d/luci-app-glorytun.json b/luci-app-glorytun-tcp/root/usr/share/rpcd/acl.d/luci-app-glorytun-tcp.json similarity index 51% rename from luci-app-glorytun/root/usr/share/rpcd/acl.d/luci-app-glorytun.json rename to luci-app-glorytun-tcp/root/usr/share/rpcd/acl.d/luci-app-glorytun-tcp.json index 63a49918f..f4f288835 100644 --- a/luci-app-glorytun/root/usr/share/rpcd/acl.d/luci-app-glorytun.json +++ b/luci-app-glorytun-tcp/root/usr/share/rpcd/acl.d/luci-app-glorytun-tcp.json @@ -1,6 +1,6 @@ { - "luci-app-glorytun": { - "description": "Grant UCI access for luci-app-glorytun", + "luci-app-glorytun-tcp": { + "description": "Grant access to glorytun TCP", "read": { "uci": [ "glorytun" ] }, diff --git a/luci-app-glorytun-udp/Makefile b/luci-app-glorytun-udp/Makefile new file mode 100644 index 000000000..97608e0e7 --- /dev/null +++ b/luci-app-glorytun-udp/Makefile @@ -0,0 +1,16 @@ +# +# Copyright (C) 2018-2020 Ycarus (Yannick Chabanois) +# +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=LuCI Interface to Glorytun UDP +LUCI_DEPENDS:=+glorytun-udp + +PKG_LICENSE:=GPLv3 + +#include ../luci/luci.mk +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js b/luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js new file mode 100644 index 000000000..73ecb401e --- /dev/null +++ b/luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js @@ -0,0 +1,105 @@ +'use strict'; +'require rpc'; +'require poll'; +'require form'; +'require fs'; +'require uci'; +'require tools.widgets as widgets'; + +var callHostHints; + +var callServiceList = rpc.declare({ + object: 'service', + method: 'list', + params: [ 'name' ], + expect: { '': {} } +}); + +return L.view.extend({ + callHostHints: rpc.declare({ + object: 'luci-rpc', + method: 'getHostHints', + expect: { '': {} } + }), + + load: function() { + return this.callHostHints(); + }, + + render: function(hosts) { + var m, s, o; + + m = new form.Map('glorytun-udp', _('Glorytun UDP')); + + s = m.section(form.GridSection, 'glorytun-udp', _('Instances')); + s.addremove = true; + s.anonymous = true; + s.nodescriptions = true; + + s.tab('general', _('General Settings')); + s.tab('advanced', _('Advanced Settings')); + + o = s.taboption('general', form.Flag, 'enable', _('Enabled')); + o.default = o.enabled; + + o = s.taboption('general',form.Value, 'label', _('Label')); + o.rmempty = true; + + + o = s.taboption('general', form.ListValue, 'mode', _('Mode')); + o.value('to',_('Client')); + o.value('from',_('Server')); + o.modalonly = true; + + o = s.taboption('general', form.Value, 'host', _('Host')); + o.rmempty = false; + + o = s.taboption('general', form.Value, 'port', _('Port')); + o.rmempty = false; + + o = s.taboption('general', form.Value, 'key', _('Key')); + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('general', form.Value, 'dev', _('Interface name')); + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('general', form.Value, 'localip', _('Local IP')); + o.datatype = 'or(ip4addr,ip6addr)'; + o.rmempty = false; + + o = s.taboption('general', form.Value, 'remoteip', _('Remote IP')); + o.datatype = 'or(ip4addr,ip6addr)'; + o.rmempty = false; + + o = s.taboption('advanced', form.Flag, 'persist', _('Persist'), _('Keep the tunnel device after exiting')); + o.default = o.enabled; + o.modalonly = true; + + o = s.taboption('advanced', form.Flag, 'chacha', _('chacha'), _('Force fallback cipher')); + o.default = o.enabled; + o.modalonly = true; + + o = s.taboption('advanced', form.Value, 'kxtimeout', _('Key rotation timeout')); + o.default = '7d'; + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('advanced', form.Value, 'timetolerance', _('Clock sync tolerance')); + o.default = '10m'; + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('advanced', form.Value, 'keepalive', _('Keep alive timeout')); + o.default = '25s'; + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('advanced', form.Flag, 'auto', _('Dynamic rate detection')); + o.rmempty = false; + o.modalonly = true; + + return m.render(); + } +}); diff --git a/luci-app-glorytun-udp/po/fr/glorytun-udp.po b/luci-app-glorytun-udp/po/fr/glorytun-udp.po new file mode 100644 index 000000000..11849a015 --- /dev/null +++ b/luci-app-glorytun-udp/po/fr/glorytun-udp.po @@ -0,0 +1,108 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-12-15 14:46+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: French \n" +"Language: fr\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:40 +msgid "Advanced Settings" +msgstr "Configuration avancée" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:46 +msgid "Client" +msgstr "Client" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:85 +msgid "Clock sync tolerance" +msgstr "Tolérance de synchronisation d'horloge" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:95 +msgid "Dynamic rate detection" +msgstr "Détection dynamique de la vitesse" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:42 +msgid "Enabled" +msgstr "Activer" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:76 +msgid "Force fallback cipher" +msgstr "Forcer le chiffrement de secours" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:39 +msgid "General Settings" +msgstr "Paramètres généraux" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:32 +#: luci-app-glorytun-udp/root/usr/share/luci/menu.d/luci-app-glorytun-udp.json:3 +msgid "Glorytun UDP" +msgstr "Glorytun UDP" + +#: luci-app-glorytun-udp/root/usr/share/rpcd/acl.d/luci-app-glorytun-udp.json:3 +msgid "Grant access to glorytun UDP" +msgstr "Accorder l'accès à Glorytun UDP" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:50 +msgid "Host" +msgstr "Hôte" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:34 +msgid "Instances" +msgstr "Instances" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:60 +msgid "Interface name" +msgstr "Nom de l'interface" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:90 +msgid "Keep alive timeout" +msgstr "Délai de maintien de la connexion (Keep Alive)" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:72 +msgid "Keep the tunnel device after exiting" +msgstr "Gardez le périphérique tunnel après avoir quitté" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:56 +msgid "Key" +msgstr "Clef" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:80 +msgid "Key rotation timeout" +msgstr "Délai de rotation des clés" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:99 +msgid "Label" +msgstr "Étiquette" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:64 +msgid "Local IP" +msgstr "Adresse IP locale" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:45 +msgid "Mode" +msgstr "Mode" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:72 +msgid "Persist" +msgstr "Persister" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:53 +msgid "Port" +msgstr "Port" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:68 +msgid "Remote IP" +msgstr "IP Distante" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:47 +msgid "Server" +msgstr "Serveur" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:76 +msgid "chacha" +msgstr "Chacha" diff --git a/luci-app-glorytun-udp/po/templates/glorytun-udp.pot b/luci-app-glorytun-udp/po/templates/glorytun-udp.pot new file mode 100644 index 000000000..04edec275 --- /dev/null +++ b/luci-app-glorytun-udp/po/templates/glorytun-udp.pot @@ -0,0 +1,99 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:40 +msgid "Advanced Settings" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:46 +msgid "Client" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:85 +msgid "Clock sync tolerance" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:95 +msgid "Dynamic rate detection" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:42 +msgid "Enabled" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:76 +msgid "Force fallback cipher" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:39 +msgid "General Settings" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:32 +#: luci-app-glorytun-udp/root/usr/share/luci/menu.d/luci-app-glorytun-udp.json:3 +msgid "Glorytun UDP" +msgstr "" + +#: luci-app-glorytun-udp/root/usr/share/rpcd/acl.d/luci-app-glorytun-udp.json:3 +msgid "Grant access to glorytun UDP" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:50 +msgid "Host" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:34 +msgid "Instances" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:60 +msgid "Interface name" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:90 +msgid "Keep alive timeout" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:72 +msgid "Keep the tunnel device after exiting" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:56 +msgid "Key" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:80 +msgid "Key rotation timeout" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:99 +msgid "Label" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:64 +msgid "Local IP" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:45 +msgid "Mode" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:72 +msgid "Persist" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:53 +msgid "Port" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:68 +msgid "Remote IP" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:47 +msgid "Server" +msgstr "" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:76 +msgid "chacha" +msgstr "" diff --git a/luci-app-glorytun-udp/po/zh_Hans/glorytun-udp.po b/luci-app-glorytun-udp/po/zh_Hans/glorytun-udp.po new file mode 100644 index 000000000..e88aedcbb --- /dev/null +++ b/luci-app-glorytun-udp/po/zh_Hans/glorytun-udp.po @@ -0,0 +1,108 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-12-04 16:03+0000\n" +"Last-Translator: antrouter \n" +"Language-Team: Chinese (Simplified) \n" +"Language: zh_Hans\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 4.0.4\n" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:40 +msgid "Advanced Settings" +msgstr "高级设置" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:46 +msgid "Client" +msgstr "客户端" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:85 +msgid "Clock sync tolerance" +msgstr "时钟同步容限" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:95 +msgid "Dynamic rate detection" +msgstr "动态速率检测" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:42 +msgid "Enabled" +msgstr "开启" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:76 +msgid "Force fallback cipher" +msgstr "强制回退密码" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:39 +msgid "General Settings" +msgstr "通用设置" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:32 +#: luci-app-glorytun-udp/root/usr/share/luci/menu.d/luci-app-glorytun-udp.json:3 +msgid "Glorytun UDP" +msgstr "glorytun UDP" + +#: luci-app-glorytun-udp/root/usr/share/rpcd/acl.d/luci-app-glorytun-udp.json:3 +msgid "Grant access to glorytun UDP" +msgstr "授予访问glorytun UDP的权限" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:50 +msgid "Host" +msgstr "主机" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:34 +msgid "Instances" +msgstr "实例" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:60 +msgid "Interface name" +msgstr "接口名称" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:90 +msgid "Keep alive timeout" +msgstr "保持超时" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:72 +msgid "Keep the tunnel device after exiting" +msgstr "退出后保留隧道设备" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:56 +msgid "Key" +msgstr "秘钥" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:80 +msgid "Key rotation timeout" +msgstr "秘钥轮换超时" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:99 +msgid "Label" +msgstr "标签" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:64 +msgid "Local IP" +msgstr "本地IP" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:45 +msgid "Mode" +msgstr "模式" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:72 +msgid "Persist" +msgstr "保持" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:53 +msgid "Port" +msgstr "端口" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:68 +msgid "Remote IP" +msgstr "远程IP" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:47 +msgid "Server" +msgstr "服务器" + +#: luci-app-glorytun-udp/htdocs/luci-static/resources/view/services/glorytun-udp.js:76 +msgid "chacha" +msgstr "chacha密码" diff --git a/luci-app-glorytun-udp/root/etc/config/glorytun-udp b/luci-app-glorytun-udp/root/etc/config/glorytun-udp new file mode 100644 index 000000000..d5d356dd6 --- /dev/null +++ b/luci-app-glorytun-udp/root/etc/config/glorytun-udp @@ -0,0 +1,10 @@ +config glorytun-udp 'vpn' + option enable '0' + option host '127.0.0.1' + option port '65001' + option dev 'tun0' + option key '' + option chacha '1' + option localip '10.255.254.2' + option remoteip '10.255.254.1' + option mode 'to' diff --git a/luci-app-glorytun-udp/root/etc/hotplug.d/iface/30-glorytun-udp b/luci-app-glorytun-udp/root/etc/hotplug.d/iface/30-glorytun-udp new file mode 100644 index 000000000..1ccf10b8c --- /dev/null +++ b/luci-app-glorytun-udp/root/etc/hotplug.d/iface/30-glorytun-udp @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Load the glorytun config +# +# Author: Ycarus (Yannick Chabanois) +# Released under GPL 3 or later + +[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0 + +. /lib/functions.sh +. /lib/functions/network.sh + +set_default() { + local localip + local remoteip + local config="$1" + local iface + config_get enable "$config" enable + config_get iface "$config" dev + [ "$iface" = "$DEVICE" ] && [ "$enable" = "1" ] && { + config_get localip "$config" localip + config_get remoteip "$config" remoteip + config_get kxtimeout "$config" kxtimeout "7d" + config_get timetolerance "$config" timetolerance "10m" + config_get keepalive "$config" keepalive "25s" + [ "$remoteip" != "" ] && [ "$localip" != "" ] && ifconfig $DEVICE $localip pointopoint $remoteip up + while [ -z "$(glorytun-udp list | grep $iface)" ]; do + sleep 1 + done + glorytun-udp set dev $iface kxtimeout $kxtimeout timetolerance $timetolerance keepalive $keepalive + } +} + +config_load glorytun-udp +config_foreach set_default glorytun-udp diff --git a/luci-app-glorytun-udp/root/etc/uci-defaults/1201-luci-glorytun-udp b/luci-app-glorytun-udp/root/etc/uci-defaults/1201-luci-glorytun-udp new file mode 100644 index 000000000..dbecf5b5b --- /dev/null +++ b/luci-app-glorytun-udp/root/etc/uci-defaults/1201-luci-glorytun-udp @@ -0,0 +1,47 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete glorytun-udp[-1] + add ucitrack glorytun-udp + set ucitrack.@glorytun-udp[-1].init=glorytun-udp + commit ucitrack +EOF + +if [ "$(uci -q get network.glorytun-udp)" = "" ] && [ "$(uci -q get network.omrvpn)" = "" ]; then + uci -q batch <<-EOF >/dev/null + delete network.glorytun-udp + set network.glorytun-udp=interface + set network.glorytun-udp.ifname=tun0 + set network.glorytun-udp.proto=dhcp + set network.glorytun-udp.ip4table=vpn + set network.glorytun-udp.multipath=off + set network.glorytun-udp.leasetime=12h + commit network + EOF +fi + +if [ "$(uci -q show firewall | grep glorytun-udp)" = "" ] && [ "$(uci -q get network.omrvpn)" = "" ]; then + uci -q batch <<-EOF >/dev/null + set firewall.zone_vpn=zone + set firewall.zone_vpn.name=vpn + set firewall.zone_vpn.network=glorytun-udp + set firewall.zone_vpn.masq=1 + set firewall.zone_vpn.input=REJECT + set firewall.zone_vpn.forward=ACCEPT + set firewall.zone_vpn.output=ACCEPT + commit firewall + EOF +fi +if [ "$(uci -q show firewall | grep Allow-All-LAN-to-VPN)" = "" ]; then + uci -q batch <<-EOF >/dev/null + add firewall rule + set firewall.@rule[-1].enabled='1' + set firewall.@rule[-1].target='ACCEPT' + set firewall.@rule[-1].name='Allow-All-LAN-to-VPN' + set firewall.@rule[-1].dest='vpn' + set firewall.@rule[-1].src='lan' + commit firewall + EOF +fi +rm -f /tmp/luci-indexcache +exit 0 diff --git a/luci-app-glorytun-udp/root/usr/share/luci/menu.d/luci-app-glorytun-udp.json b/luci-app-glorytun-udp/root/usr/share/luci/menu.d/luci-app-glorytun-udp.json new file mode 100644 index 000000000..b84551484 --- /dev/null +++ b/luci-app-glorytun-udp/root/usr/share/luci/menu.d/luci-app-glorytun-udp.json @@ -0,0 +1,13 @@ +{ + "admin/vpn/glorytun-udp": { + "title": "Glorytun UDP", + "order": 60, + "action": { + "type": "view", + "path": "services/glorytun-udp" + }, + "depends": { + "acl": [ "luci-app-glorytun-udp" ] + } + } +} diff --git a/luci-app-glorytun-udp/root/usr/share/rpcd/acl.d/luci-app-glorytun-udp.json b/luci-app-glorytun-udp/root/usr/share/rpcd/acl.d/luci-app-glorytun-udp.json new file mode 100644 index 000000000..3e24adb8e --- /dev/null +++ b/luci-app-glorytun-udp/root/usr/share/rpcd/acl.d/luci-app-glorytun-udp.json @@ -0,0 +1,11 @@ +{ + "luci-app-glorytun-udp": { + "description": "Grant access to glorytun UDP", + "read": { + "uci": [ "glorytun-udp" ] + }, + "write": { + "uci": [ "glorytun-udp" ] + } + } +} \ No newline at end of file diff --git a/luci-app-glorytun/Makefile b/luci-app-glorytun/Makefile deleted file mode 100644 index b582773b2..000000000 --- a/luci-app-glorytun/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright (C) 2008-2014 The LuCI Team -# Copyright (C) 2017-2019 Ycarus (Yannick Chabanois) -# -# This is based on OpenVPN LuCI Support. -# This is free software, licensed under the Apache License, Version 2.0 . -# - -include $(TOPDIR)/rules.mk - -LUCI_TITLE:=LuCI Support for Glorytun -LUCI_DEPENDS:=+glorytun +glorytun-udp -LUCI_PKGARCH:=all -PKG_LICENSE:=GPLv2 - -PKG_MAINTAINER:=Ycarus (Yannick Chabanois) - -#include ../luci/luci.mk -include $(TOPDIR)/feeds/luci/luci.mk - -# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-glorytun/luasrc/controller/glorytun.lua b/luci-app-glorytun/luasrc/controller/glorytun.lua deleted file mode 100644 index c9917bb74..000000000 --- a/luci-app-glorytun/luasrc/controller/glorytun.lua +++ /dev/null @@ -1,14 +0,0 @@ --- Copyright 2018 - 2019 Ycarus (Yannick Chabanois) --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.glorytun", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/glorytun") then - return - end - --entry({"admin", "services", "glorytun"}, cbi("glorytun"), _("Glorytun") ) - --entry({"admin", "services", "glorytun", "settings"}, cbi("glorytun-settings"), nil ).leaf = true - entry({"admin", "vpn", "glorytun"}, cbi("glorytun"), _("Glorytun") ) - entry({"admin", "vpn", "glorytun", "settings"}, cbi("glorytun-settings"), nil ).leaf = true -end diff --git a/luci-app-glorytun/luasrc/model/cbi/glorytun-settings.lua b/luci-app-glorytun/luasrc/model/cbi/glorytun-settings.lua deleted file mode 100644 index aab2f460c..000000000 --- a/luci-app-glorytun/luasrc/model/cbi/glorytun-settings.lua +++ /dev/null @@ -1,83 +0,0 @@ --- Copyright 2018 Ycarus (Yannick Chabanois) --- Copyright 2008 Steven Barth --- Licensed to the public under the Apache License 2.0. - -require("luci.ip") -require("luci.model.uci") - - -local basicParams = { - -- - -- Widget, Name, Default(s), Description - -- - - { Flag,"enable",0, translate("Enable") }, - { Value,"port",65001, translate("TCP port # for both local and remote") }, - { Value,"dev","tun0", translate("Interface name") }, - { Value,"host","vpnserver.example.org", translate("Remote host name or ip address") }, - { Value,"localip","192.168.99.2", translate("Local tunnel ip address") }, - { Value,"remoteip","192.168.99.1", translate("Remote tunnel ip address") }, - { Value,"key","secretkey", translate("The secret key") }, - { ListValue,"proto",{ "tcp", "udp" }, translate("Protocol") }, - { Flag,"listener",0, translate("Server mode") }, - - { Value,"bind","", translate("Bind address") }, - --{ Value,"bind-backup","", translate("Bind backup") }, - { Value,"bindport",65002, translate("Bind port") }, - { Value,"mtu",1500, translate("MTU") }, - { Flag,"mtuauto",0, translate("MTU auto") }, - - { Flag,"mptcp",0, translate("MPTCP") }, - { Flag,"chacha20",0, translate("Use ChaCha20 stream cipher") } -} - - -local m = Map("glorytun") -local p = m:section( SimpleSection ) - -p.template = "glorytun/pageswitch" -p.mode = "settings" -p.instance = arg[1] - - -local s = m:section( NamedSection, arg[1], "glorytun" ) - -for _, option in ipairs(basicParams) do - local o = s:option( - option[1], option[2], - option[2], option[4] - ) - - o.optional = true - - if option[1] == DummyValue then - o.value = option[3] - else - if option[1] == DynamicList then - function o.cfgvalue(...) - local val = AbstractValue.cfgvalue(...) - return ( val and type(val) ~= "table" ) and { val } or val - end - end - - if type(option[3]) == "table" then - if o.optional then o:value("", "-- remove --") end - for _, v in ipairs(option[3]) do - v = tostring(v) - o:value(v) - end - o.default = tostring(option[3][1]) - else - o.default = tostring(option[3]) - end - end - - for i=5,#option do - if type(option[i]) == "table" then - o:depends(option[i]) - end - end -end - -return m - diff --git a/luci-app-glorytun/luasrc/model/cbi/glorytun.lua b/luci-app-glorytun/luasrc/model/cbi/glorytun.lua deleted file mode 100644 index 1fb1b829e..000000000 --- a/luci-app-glorytun/luasrc/model/cbi/glorytun.lua +++ /dev/null @@ -1,147 +0,0 @@ --- Copyright 2018 Ycarus (Yannick Chabanois) --- Copyright 2008 Steven Barth --- Licensed to the public under the Apache License 2.0. - -local fs = require "nixio.fs" -local sys = require "luci.sys" -local uci = require "luci.model.uci".cursor() -local testfullps = luci.sys.exec("ps --help 2>&1 | grep BusyBox") --check which ps do we have -local psstring = (string.len(testfullps)>0) and "ps w" or "ps axfw" --set command we use to get pid - -local m = Map("glorytun", translate("Glorytun")) -local s = m:section( TypedSection, "glorytun", translate("Glorytun instances"), translate("Below is a list of configured Glorytun instances and their current state") ) -s.template = "cbi/tblsection" -s.template_addremove = "glorytun/cbi-select-input-add" -s.addremove = true -s.add_select_options = { } -s.add_select_options[''] = '' -s.extedit = luci.dispatcher.build_url( - "admin", "vpn", "glorytun", "settings", "%s" -) - -uci:load("glorytun_recipes") -uci:foreach( "glorytun_recipes", "glorytun_recipe", - function(section) - s.add_select_options[section['.name']] = - section['_description'] or section['.name'] - end -) - -function s.getPID(section) -- Universal function which returns valid pid # or nil - local pid = sys.exec("%s | grep -w %s | grep glorytun | grep -v grep | awk '{print $1}'" % { psstring,section} ) - if pid and #pid > 0 and tonumber(pid) ~= nil then - return tonumber(pid) - else - return nil - end -end - -function s.parse(self, section) - local recipe = luci.http.formvalue( - luci.cbi.CREATE_PREFIX .. self.config .. "." .. - self.sectiontype .. ".select" - ) - - if recipe and not s.add_select_options[recipe] then - self.invalid_cts = true - else - TypedSection.parse( self, section ) - end -end - -function s.create(self, name) - local recipe = luci.http.formvalue( - luci.cbi.CREATE_PREFIX .. self.config .. "." .. - self.sectiontype .. ".select" - ) - name = luci.http.formvalue( - luci.cbi.CREATE_PREFIX .. self.config .. "." .. - self.sectiontype .. ".text" - ) - if #name > 3 and not name:match("[^a-zA-Z0-9_]") then - --uci:section( - -- "glorytun", "glorytun", name, - -- uci:get_all( "glorytun_recipes", recipe ) - --) - local recipe_data = uci:get_all( "glorytun_recipes", recipe ) - uci:set("glorytun", name,"glorytun") - local k, v - for k, v in pairs(recipe_data) do - uci:set("glorytun", name, k,v) - end - - uci:delete("glorytun", name, "_role") - uci:delete("glorytun", name, "_description") - uci:commit("glorytun") - uci:save("glorytun") - - luci.http.redirect( self.extedit:format(name) ) - elseif #name > 0 then - self.invalid_cts = true - end - - return 0 -end - - -s:option( Flag, "enable", translate("Enabled") ) - -local active = s:option( DummyValue, "_active", translate("Started") ) -function active.cfgvalue(self, section) - local pid = s.getPID(section) - if pid ~= nil then - return (sys.process.signal(pid, 0)) - and translatef("yes (%i)", pid) - or translate("no") - end - return translate("no") -end - -local updown = s:option( Button, "_updown", translate("Start/Stop") ) -updown._state = false -updown.redirect = luci.dispatcher.build_url( - "admin", "vpn", "glorytun" -) -function updown.cbid(self, section) - local pid = s.getPID(section) - self._state = pid ~= nil and sys.process.signal(pid, 0) - self.option = self._state and "stop" or "start" - return AbstractValue.cbid(self, section) -end -function updown.cfgvalue(self, section) - self.title = self._state and "stop" or "start" - self.inputstyle = self._state and "reset" or "reload" -end - -local port = s:option( DummyValue, "port", translate("Port") ) -function port.cfgvalue(self, section) - local val = AbstractValue.cfgvalue(self, section) - return val or "65001" -end -local dev = s:option( DummyValue, "dev", translate("Interface") ) -function dev.cfgvalue(self, section) - local val = AbstractValue.cfgvalue(self, section) - return val or "tun" -end -local proto = s:option( DummyValue, "proto", translate("Protocol") ) -function proto.cfgvalue(self, section) - local val = AbstractValue.cfgvalue(self, section) - return val or "tcp" -end - -function updown.write(self, section, value) - if self.option == "stop" then - local pid = s.getPID(section) - if pid ~= nil then - sys.process.signal(pid,15) - end - else - local type = proto.cfgvalue(self,section) - luci.sys.call("/etc/init.d/glorytun-udp start %s" % section) - luci.sys.call("/etc/init.d/glorytun start %s" % section) - end - luci.http.redirect( self.redirect ) -end - - -return m diff --git a/luci-app-glorytun/luasrc/view/glorytun/cbi-select-input-add.htm b/luci-app-glorytun/luasrc/view/glorytun/cbi-select-input-add.htm deleted file mode 100644 index 898252325..000000000 --- a/luci-app-glorytun/luasrc/view/glorytun/cbi-select-input-add.htm +++ /dev/null @@ -1,11 +0,0 @@ -
- <% if self.invalid_cts then -%>
<% end %> - - - - <% if self.invalid_cts then %>
<%:Invalid%>
<% end %> -
diff --git a/luci-app-glorytun/luasrc/view/glorytun/pageswitch.htm b/luci-app-glorytun/luasrc/view/glorytun/pageswitch.htm deleted file mode 100644 index 652494e0c..000000000 --- a/luci-app-glorytun/luasrc/view/glorytun/pageswitch.htm +++ /dev/null @@ -1,13 +0,0 @@ -<%# - Copyright 2018 Ycarus (Yannick Chabanois) - Copyright 2008 Steven Barth - Copyright 2008 Jo-Philipp Wich - Licensed to the public under the Apache License 2.0. --%> - -
- - <%:Overview%> » - <%=luci.i18n.translatef("Instance \"%s\"", self.instance)%> - -
diff --git a/luci-app-glorytun/po/de/glorytun.po b/luci-app-glorytun/po/de/glorytun.po deleted file mode 100644 index f3f01f7fd..000000000 --- a/luci-app-glorytun/po/de/glorytun.po +++ /dev/null @@ -1,104 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-10-05 12:39+0000\n" -"Last-Translator: Anonymous \n" -"Language-Team: German \n" -"Language: de\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" - -msgid "Add" -msgstr "Hinzufügen" - -msgid "" -"Below is a list of configured Glorytun instances and their current state" -msgstr "" -"Nachfolgend eine Liste der konfigurierten Glorytun-Instanzen und ihre " -"aktuelle Status." - -msgid "Bind address" -msgstr "Bindungsadresse" - -msgid "Bind backup" -msgstr "Alternative Bindungsadresse" - -msgid "Bind port" -msgstr "Verbindungs-Port" - -msgid "Enable" -msgstr "Aktivieren" - -msgid "Enabled" -msgstr "Aktiv" - -msgid "Glorytun" -msgstr "Glorytun" - -msgid "Glorytun instances" -msgstr "Glorytun-Instanzen" - -msgid "Instance \"%s\"" -msgstr "Instanz '%s'" - -msgid "Interface" -msgstr "Schnittstelle" - -msgid "Interface name" -msgstr "Name der Verbindung" - -msgid "Invalid" -msgstr "Ungültig" - -msgid "Local tunnel ip address" -msgstr "IP-Adresse des lokalen Tunnels" - -msgid "MPTCP" -msgstr "MPTCP" - -msgid "MTU" -msgstr "MTU" - -msgid "MTU auto" -msgstr "automatische MTU" - -msgid "Overview" -msgstr "Übersicht" - -msgid "Port" -msgstr "Port" - -msgid "Protocol" -msgstr "Protokoll" - -msgid "Remote host name or ip address" -msgstr "FQDN oder IP-Adresse der Gegenstelle" - -msgid "Remote tunnel ip address" -msgstr "Tunnel-IP-Adresse der Gegenstelle" - -msgid "Server mode" -msgstr "Server-Modus" - -msgid "Start/Stop" -msgstr "Start/Stop" - -msgid "Started" -msgstr "gestartet" - -msgid "TCP port # for both local and remote" -msgstr "TCP-Port Nummer lokal und gegenüber" - -msgid "The secret key" -msgstr "geheimer Schlüssel" - -msgid "Use ChaCha20 stream cipher" -msgstr "Stromverschlüsselung 'ChaCha20' nutzen" - -msgid "no" -msgstr "nein" - -msgid "yes (%i)" -msgstr "ja (%i)" diff --git a/luci-app-glorytun/po/fr/glorytun.po b/luci-app-glorytun/po/fr/glorytun.po deleted file mode 100644 index 7b6b678ee..000000000 --- a/luci-app-glorytun/po/fr/glorytun.po +++ /dev/null @@ -1,104 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: 2020-10-07 10:57+0000\n" -"Last-Translator: Weblate Admin \n" -"Language-Team: French \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.0.4\n" - -msgid "Add" -msgstr "Ajouter" - -msgid "Below is a list of configured Glorytun instances and their current state" -msgstr "Ci-dessous une liste des instances Glorytun configurées et leur état actuel" - -msgid "Bind address" -msgstr "Adresse mappée" - -msgid "Bind backup" -msgstr "Lier la sauvegarde" - -msgid "Bind port" -msgstr "Port de connexion" - -msgid "Enable" -msgstr "Activer" - -msgid "Enabled" -msgstr "Activer" - -msgid "Glorytun" -msgstr "Glorytun" - -msgid "Glorytun instances" -msgstr "Instances de Glorytun" - -msgid "Instance \"%s\"" -msgstr "Instance \"%s\"" - -msgid "Interface" -msgstr "Interface" - -msgid "Interface name" -msgstr "Nom de l'interface" - -msgid "Invalid" -msgstr "Invalide" - -msgid "Local tunnel ip address" -msgstr "Adresse IP locale du tunnel" - -msgid "MPTCP" -msgstr "MPTCP" - -msgid "MTU" -msgstr "MTU" - -msgid "MTU auto" -msgstr "MTU auto" - -msgid "Overview" -msgstr "Aperçu" - -msgid "Port" -msgstr "Port" - -msgid "Protocol" -msgstr "Protocole" - -msgid "Remote host name or ip address" -msgstr "Nom de l'hôte distant ou adresse IP" - -msgid "Remote tunnel ip address" -msgstr "Adresse IP distance du tunnel" - -msgid "Server mode" -msgstr "Mode serveur" - -msgid "Start/Stop" -msgstr "Marche/Arrêt" - -msgid "Started" -msgstr "Démarré" - -msgid "TCP port # for both local and remote" -msgstr "Port TCP local et distant" - -msgid "The secret key" -msgstr "La clef secréte" - -msgid "Use ChaCha20 stream cipher" -msgstr "Utiliser le chiffrement ChaCha20" - -msgid "no" -msgstr "non" - -msgid "yes (%i)" -msgstr "oui (%i)" diff --git a/luci-app-glorytun/po/it/glorytun.po b/luci-app-glorytun/po/it/glorytun.po deleted file mode 100644 index 96ae2b091..000000000 --- a/luci-app-glorytun/po/it/glorytun.po +++ /dev/null @@ -1,104 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-09-21 12:51+0000\n" -"Last-Translator: Weblate Admin \n" -"Language-Team: Italian \n" -"Language: it\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" - -msgid "Add" -msgstr "Aggiungi" - -msgid "" -"Below is a list of configured Glorytun instances and their current state" -msgstr "" -"Di seguito è riportato un elenco di istanze Glorytun configurate e il loro " -"stato corrente" - -msgid "Bind address" -msgstr "Associa indirizzo" - -msgid "Bind backup" -msgstr "Bind backup" - -msgid "Bind port" -msgstr "Bind port" - -msgid "Enable" -msgstr "Attivare" - -msgid "Enabled" -msgstr "Abilitato" - -msgid "Glorytun" -msgstr "Glorytun" - -msgid "Glorytun instances" -msgstr "Istanze di Glorytun" - -msgid "Instance \"%s\"" -msgstr "Istanza \"%s\"" - -msgid "Interface" -msgstr "Interfaccia" - -msgid "Interface name" -msgstr "Nome interfaccia" - -msgid "Invalid" -msgstr "Non valido" - -msgid "Local tunnel ip address" -msgstr "Indirizzo IP del tunnel locale" - -msgid "MPTCP" -msgstr "MPTCP" - -msgid "MTU" -msgstr "MTU" - -msgid "MTU auto" -msgstr "MTU auto" - -msgid "Overview" -msgstr "Panoramica" - -msgid "Port" -msgstr "Porta" - -msgid "Protocol" -msgstr "Protocollo" - -msgid "Remote host name or ip address" -msgstr "Nome host remoto o indirizzo IP" - -msgid "Remote tunnel ip address" -msgstr "Indirizzo IP del tunnel remoto" - -msgid "Server mode" -msgstr "Modalità server" - -msgid "Start/Stop" -msgstr "Marcia/arresto" - -msgid "Started" -msgstr "Iniziato" - -msgid "TCP port # for both local and remote" -msgstr "Porta TCP # sia per locale che per remoto" - -msgid "The secret key" -msgstr "Chiave segreta" - -msgid "Use ChaCha20 stream cipher" -msgstr "Usa il cifrario a flusso ChaCha20" - -msgid "no" -msgstr "no" - -msgid "yes (%i)" -msgstr "Sì (%i)" diff --git a/luci-app-glorytun/po/oc/glorytun.po b/luci-app-glorytun/po/oc/glorytun.po deleted file mode 100644 index be34c778d..000000000 --- a/luci-app-glorytun/po/oc/glorytun.po +++ /dev/null @@ -1,103 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-10-13 07:30+0000\n" -"Last-Translator: Quentin PAGÈS \n" -"Language-Team: Occitan \n" -"Language: oc\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.0.4\n" - -msgid "Add" -msgstr "Ajustar" - -msgid "" -"Below is a list of configured Glorytun instances and their current state" -msgstr "" -"Çai-jos una lista de las instàncias Glorytun configuradas e lor estat actual" - -msgid "Bind address" -msgstr "Adreça mapada" - -msgid "Bind backup" -msgstr "Associar la salvagarda" - -msgid "Bind port" -msgstr "Pòrt de connexion" - -msgid "Enable" -msgstr "Activat" - -msgid "Enabled" -msgstr "Activat" - -msgid "Glorytun" -msgstr "Glorytun" - -msgid "Glorytun instances" -msgstr "Instàncias Glorytun" - -msgid "Instance \"%s\"" -msgstr "Instància « %s »" - -msgid "Interface" -msgstr "Interfàcia" - -msgid "Interface name" -msgstr "Nom de l’interfàcia" - -msgid "Invalid" -msgstr "Invalid" - -msgid "Local tunnel ip address" -msgstr "Adreça IP locala del tunèl" - -msgid "MPTCP" -msgstr "MPTCP" - -msgid "MTU" -msgstr "MTU" - -msgid "MTU auto" -msgstr "MTU auto" - -msgid "Overview" -msgstr "Apercebut" - -msgid "Port" -msgstr "Pòrt" - -msgid "Protocol" -msgstr "Protocòl" - -msgid "Remote host name or ip address" -msgstr "Nom de l’òste alonhat o adreça IP" - -msgid "Remote tunnel ip address" -msgstr "Adreça IP alonhada del tunèl" - -msgid "Server mode" -msgstr "Mòde servidor" - -msgid "Start/Stop" -msgstr "Aviar/Arrestar" - -msgid "Started" -msgstr "Aviat" - -msgid "TCP port # for both local and remote" -msgstr "Pòrt TCP local e alonhat" - -msgid "The secret key" -msgstr "La clau secrèta" - -msgid "Use ChaCha20 stream cipher" -msgstr "Utilizar lo chiframent ChaCha20" - -msgid "no" -msgstr "non" - -msgid "yes (%i)" -msgstr "òc (%i)" diff --git a/luci-app-glorytun/po/templates/glorytun.pot b/luci-app-glorytun/po/templates/glorytun.pot deleted file mode 100644 index 9c862bb47..000000000 --- a/luci-app-glorytun/po/templates/glorytun.pot +++ /dev/null @@ -1,93 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8" - -msgid "Add" -msgstr "" - -msgid "" -"Below is a list of configured Glorytun instances and their current state" -msgstr "" - -msgid "Bind address" -msgstr "" - -msgid "Bind backup" -msgstr "" - -msgid "Bind port" -msgstr "" - -msgid "Enable" -msgstr "" - -msgid "Enabled" -msgstr "" - -msgid "Glorytun" -msgstr "" - -msgid "Glorytun instances" -msgstr "" - -msgid "Instance \"%s\"" -msgstr "" - -msgid "Interface" -msgstr "" - -msgid "Interface name" -msgstr "" - -msgid "Invalid" -msgstr "" - -msgid "Local tunnel ip address" -msgstr "" - -msgid "MPTCP" -msgstr "" - -msgid "MTU" -msgstr "" - -msgid "MTU auto" -msgstr "" - -msgid "Overview" -msgstr "" - -msgid "Port" -msgstr "" - -msgid "Protocol" -msgstr "" - -msgid "Remote host name or ip address" -msgstr "" - -msgid "Remote tunnel ip address" -msgstr "" - -msgid "Server mode" -msgstr "" - -msgid "Start/Stop" -msgstr "" - -msgid "Started" -msgstr "" - -msgid "TCP port # for both local and remote" -msgstr "" - -msgid "The secret key" -msgstr "" - -msgid "Use ChaCha20 stream cipher" -msgstr "" - -msgid "no" -msgstr "" - -msgid "yes (%i)" -msgstr "" diff --git a/luci-app-glorytun/po/zh_Hans/glorytun.po b/luci-app-glorytun/po/zh_Hans/glorytun.po deleted file mode 100644 index 051d88490..000000000 --- a/luci-app-glorytun/po/zh_Hans/glorytun.po +++ /dev/null @@ -1,102 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-06-27 17:26+0000\n" -"Last-Translator: antrouter \n" -"Language-Team: Chinese (Simplified) \n" -"Language: zh_Hans\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.0.4\n" - -msgid "Add" -msgstr "添加" - -msgid "" -"Below is a list of configured Glorytun instances and their current state" -msgstr "以下是已配置的Glorytun实例及其当前状态的列表" - -msgid "Bind address" -msgstr "绑定地址" - -msgid "Bind backup" -msgstr "绑定备份" - -msgid "Bind port" -msgstr "绑定端口" - -msgid "Enable" -msgstr "开启" - -msgid "Enabled" -msgstr "开启" - -msgid "Glorytun" -msgstr "Glorytun(隧道)" - -msgid "Glorytun instances" -msgstr "Glorytun实例" - -msgid "Instance \"%s\"" -msgstr "实例\"%s\"" - -msgid "Interface" -msgstr "接口" - -msgid "Interface name" -msgstr "网卡名称" - -msgid "Invalid" -msgstr "无效" - -msgid "Local tunnel ip address" -msgstr "本地隧道IP地址" - -msgid "MPTCP" -msgstr "MPTCP" - -msgid "MTU" -msgstr "MTU" - -msgid "MTU auto" -msgstr "自动MTU" - -msgid "Overview" -msgstr "概况" - -msgid "Port" -msgstr "端口" - -msgid "Protocol" -msgstr "协议" - -msgid "Remote host name or ip address" -msgstr "远程主机名或IP地址" - -msgid "Remote tunnel ip address" -msgstr "远程隧道IP地址" - -msgid "Server mode" -msgstr "服务器模式" - -msgid "Start/Stop" -msgstr "开始/停止" - -msgid "Started" -msgstr "开始了" - -msgid "TCP port # for both local and remote" -msgstr "本地和远程的TCP端口号" - -msgid "The secret key" -msgstr "秘钥" - -msgid "Use ChaCha20 stream cipher" -msgstr "使用ChaCha20流密码" - -msgid "no" -msgstr "不" - -msgid "yes (%i)" -msgstr "是(%i)" diff --git a/luci-app-glorytun/po/zh_Hant/glorytun.po b/luci-app-glorytun/po/zh_Hant/glorytun.po deleted file mode 100644 index 4a77f6410..000000000 --- a/luci-app-glorytun/po/zh_Hant/glorytun.po +++ /dev/null @@ -1,102 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-07-09 07:31+0000\n" -"Last-Translator: antrouter \n" -"Language-Team: Chinese (Traditional) \n" -"Language: zh_Hant\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.0.4\n" - -msgid "Add" -msgstr "添加" - -msgid "" -"Below is a list of configured Glorytun instances and their current state" -msgstr "以下是已配置的Glorytun實例及其當前狀態的列表" - -msgid "Bind address" -msgstr "綁定地址" - -msgid "Bind backup" -msgstr "綁定地址" - -msgid "Bind port" -msgstr "綁定端口" - -msgid "Enable" -msgstr "啟用" - -msgid "Enabled" -msgstr "啟用" - -msgid "Glorytun" -msgstr "Glorytun隧道" - -msgid "Glorytun instances" -msgstr "Glorytun實例" - -msgid "Instance \"%s\"" -msgstr "實例\"%s\"" - -msgid "Interface" -msgstr "接口" - -msgid "Interface name" -msgstr "接口名稱" - -msgid "Invalid" -msgstr "無效" - -msgid "Local tunnel ip address" -msgstr "本地隧道IP地址" - -msgid "MPTCP" -msgstr "MPTCP協議" - -msgid "MTU" -msgstr "MTU" - -msgid "MTU auto" -msgstr "自動MTU" - -msgid "Overview" -msgstr "總覽" - -msgid "Port" -msgstr "端口" - -msgid "Protocol" -msgstr "協議" - -msgid "Remote host name or ip address" -msgstr "遠程主機名或IP地址" - -msgid "Remote tunnel ip address" -msgstr "遠程隧道IP地址" - -msgid "Server mode" -msgstr "服務器模式" - -msgid "Start/Stop" -msgstr "開始/停止" - -msgid "Started" -msgstr "已開始" - -msgid "TCP port # for both local and remote" -msgstr "本地和遠程的TCP端口號" - -msgid "The secret key" -msgstr "秘鑰" - -msgid "Use ChaCha20 stream cipher" -msgstr "使用ChaCha20流密碼" - -msgid "no" -msgstr "沒有" - -msgid "yes (%i)" -msgstr "是(%i)" diff --git a/luci-app-glorytun/root/etc/config/glorytun_recipes b/luci-app-glorytun/root/etc/config/glorytun_recipes deleted file mode 100644 index 693eb6da6..000000000 --- a/luci-app-glorytun/root/etc/config/glorytun_recipes +++ /dev/null @@ -1,50 +0,0 @@ -config glorytun_recipe servertcp - option _description "Simple TCP server configuration" - option _role "server" - option port "65001" - option dev "tun0" - option key "secretkey" - option listener "1" - option localip "192.168.99.1" - option remoteip "192.168.99.2" - option proto "tcp" - option enable "0" - -config glorytun_recipe clienttcp - option _description "Simple TCP client configuration" - option _role "client" - option port "65001" - option dev "tun0" - option host "vpnserver.example.org" - option key "secretkey" - option localip "192.168.99.2" - option remoteip "192.168.99.1" - option proto "tcp" - option enable "0" - -config glorytun_recipe serverudp - option _description "Simple UDP server configuration" - option _role "server" - option dev "tun0" - option bindport "65003" - option bind "192.168.99.1" - option key "secretkey" - option localip "192.168.99.1" - option remoteip "192.168.99.2" - option proto "udp" - option mtuauto "1" - option enable "0" - -config glorytun_recipe clientudp - option _description "Simple UDP client configuration" - option _role "client" - option port "65003" - option dev "tun0" - option host "vpnserver.example.org" - option key "secretkey" - option localip "192.168.99.2" - option remoteip "192.168.99.1" - option proto "udp" - option mtuauto "1" - option enable "0" - diff --git a/luci-app-glorytun/root/usr/share/luci/menu.d/luci-app-glorytun.json b/luci-app-glorytun/root/usr/share/luci/menu.d/luci-app-glorytun.json deleted file mode 100644 index 414accf0b..000000000 --- a/luci-app-glorytun/root/usr/share/luci/menu.d/luci-app-glorytun.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "admin/vpn/glorytun": { - "title": "Glorytun", - "order": 20, - "action": { - "type": "cbi", - "path": "glorytun" - }, - "depends": { - "acl": [ "luci-app-glorytun" ] - } - } -} diff --git a/luci-app-iperf/po/zh_Hans/iperf.po b/luci-app-iperf/po/zh_Hans/iperf.po index d09964dbf..ca33cb025 100644 --- a/luci-app-iperf/po/zh_Hans/iperf.po +++ b/luci-app-iperf/po/zh_Hans/iperf.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-06-27 17:26+0000\n" +"PO-Revision-Date: 2020-12-04 16:02+0000\n" "Last-Translator: antrouter \n" "Language-Team: Chinese (Simplified) \n" @@ -49,7 +49,7 @@ msgstr "忽略前n秒" #: luci-app-iperf/luasrc/view/iperf/test.htm:151 msgid "Server" -msgstr "服务" +msgstr "服务器" #: luci-app-iperf/luasrc/view/iperf/test.htm:102 msgid "Settings" diff --git a/luci-app-mail/po/it/mail.po b/luci-app-mail/po/it/mail.po index 524ba6ee2..fd43053e7 100644 --- a/luci-app-mail/po/it/mail.po +++ b/luci-app-mail/po/it/mail.po @@ -1,7 +1,7 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-09-21 12:51+0000\n" -"Last-Translator: Weblate Admin \n" +"PO-Revision-Date: 2020-12-01 10:49+0000\n" +"Last-Translator: Giuseppe Dipierro \n" "Language-Team: Italian \n" "Language: it\n" @@ -14,7 +14,7 @@ msgid "From" msgstr "Da" msgid "Mail settings" -msgstr "Impostazioni mail" +msgstr "Configurazione mail" msgid "Password" msgstr "Password" @@ -32,9 +32,7 @@ msgid "Server" msgstr "Server" msgid "Set mail settings for services that need to send mails." -msgstr "" -"Configurare le impostazioni di posta per i servizi che devono inviare " -"messaggi di posta elettronica." +msgstr "Configurazione del server mail da utilizzare per inviare alert." msgid "TLS" msgstr "TLS" diff --git a/luci-app-mail/po/zh_Hans/mail.po b/luci-app-mail/po/zh_Hans/mail.po index 2f4ee7b9f..1c3a57e2f 100644 --- a/luci-app-mail/po/zh_Hans/mail.po +++ b/luci-app-mail/po/zh_Hans/mail.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-06-27 17:26+0000\n" +"PO-Revision-Date: 2020-12-04 16:02+0000\n" "Last-Translator: antrouter \n" "Language-Team: Chinese (Simplified) \n" @@ -29,7 +29,7 @@ msgid "STARTTLS" msgstr "STARTTLS设置" msgid "Server" -msgstr "服务" +msgstr "服务器" msgid "Set mail settings for services that need to send mails." msgstr "为需要发送邮件的服务设置邮件设置." diff --git a/luci-app-mlvpn/Makefile b/luci-app-mlvpn/Makefile index 33548c8e9..80d97c856 100644 --- a/luci-app-mlvpn/Makefile +++ b/luci-app-mlvpn/Makefile @@ -1,12 +1,12 @@ # -# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) +# Copyright (C) 2018-2020 Ycarus (Yannick Chabanois) # # include $(TOPDIR)/rules.mk -LUCI_TITLE:=LuCI Support for MLVPN -LUCI_DEPENDS:=+mlvpn +LUCI_TITLE:=LuCI Interface to Glorytun TCP +LUCI_DEPENDS:=+glorytun PKG_LICENSE:=GPLv3 diff --git a/luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js b/luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js new file mode 100644 index 000000000..2d5258047 --- /dev/null +++ b/luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js @@ -0,0 +1,83 @@ +'use strict'; +'require rpc'; +'require form'; +'require fs'; +'require uci'; +'require tools.widgets as widgets'; + +var callHostHints; + +return L.view.extend({ + callHostHints: rpc.declare({ + object: 'luci-rpc', + method: 'getHostHints', + expect: { '': {} } + }), + + load: function() { + return this.callHostHints(); + }, + + render: function(hosts) { + var m, s, o; + + m = new form.Map('mlvpn', _('MLVPN')); + + s = m.section(form.GridSection, 'mlvpn', _('Instances')); + s.addremove = true; + s.anonymous = true; + s.nodescriptions = true; + + s.tab('general', _('General Settings')); + s.tab('advanced', _('Advanced Settings')); + + o = s.taboption('general', form.Flag, 'enable', _('Enabled')); + o.default = o.enabled; + + o = s.taboption('general',form.Value, 'label', _('Label')); + o.rmempty = true; + + o = s.taboption('general', form.ListValue, 'mode', _('Mode')); + o.value('client',_('Client')); + o.value('server',_('Server')); + o.modalonly = true; + + o = s.taboption('general', form.Value, 'host', _('Host')); + o.rmempty = false; + + o = s.taboption('general', form.Value, 'firstport', _('First Port')); + o.default = "65201" + o.datatype = "port" + o.rmempty = false; + + o = s.taboption('general', form.Value, 'password', _('Password')); + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('general', form.Value, 'interface_name', _('Interface name')); + o.default = "mlvpn0" + o.placeholder = "mlvpn0" + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('advanced', form.Value, 'timeout', _('Timeout (s)')); + o.default = '30'; + o.datatype = "uinteger" + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('advanced', form.Value, 'reorder_buffer_size', _('Reorder buffer size')); + o.default = '128'; + o.datatype = "uinteger" + o.rmempty = false; + o.modalonly = true; + + o = s.taboption('advanced', form.Value, 'loss_tolerance', _('Loss tolerance')); + o.default = '50'; + o.datatype = "uinteger" + o.rmempty = false; + o.modalonly = true; + + return m.render(); + } +}); diff --git a/luci-app-mlvpn/luasrc/controller/mlvpn.lua b/luci-app-mlvpn/luasrc/controller/mlvpn.lua deleted file mode 100644 index 154222265..000000000 --- a/luci-app-mlvpn/luasrc/controller/mlvpn.lua +++ /dev/null @@ -1,7 +0,0 @@ -module("luci.controller.mlvpn", package.seeall) - -function index() - --entry({"admin", "openmptcprouter", "mlvpn"}, cbi("mlvpn"), _("MLVPN")) - --entry({"admin", "services", "mlvpn"}, cbi("mlvpn"), _("MLVPN")) - entry({"admin", "vpn", "mlvpn"}, cbi("mlvpn"), _("MLVPN")) -end diff --git a/luci-app-mlvpn/luasrc/model/cbi/mlvpn.lua b/luci-app-mlvpn/luasrc/model/cbi/mlvpn.lua deleted file mode 100644 index eaef23d7e..000000000 --- a/luci-app-mlvpn/luasrc/model/cbi/mlvpn.lua +++ /dev/null @@ -1,77 +0,0 @@ -local net = require "luci.model.network".init() -local sys = require "luci.sys" -local ifaces = sys.net:devices() -local m, s, o - -m = Map("mlvpn", translate("MLVPN")) - -s = m:section(TypedSection, "mlvpn", translate("Settings")) -s.anonymous = true -s.addremove = false - -o = s:option(Flag, "enable", translate("Enable")) -o.rmempty = false - -o = s:option(Value, "timeout", translate("Timeout (s)")) -o.placeholder = "30" -o.default = "30" -o.datatype = "uinteger" -o.rmempty = false - -o = s:option(Value, "reorder_buffer_size", translate("Reorder buffer size")) -o.placeholder = "64" -o.default = "64" -o.datatype = "uinteger" -o.rmempty = false - -o = s:option(Value, "loss_tolerance", translate("Loss tolerance")) -o.placeholder = "50" -o.default = "50" -o.datatype = "uinteger" -o.rmempty = false - -o = s:option(Value, "host", translate("Remote host")) -o.placeholder = "128.128.128.128" -o.default = "128.128.128.128" -o.datatype = "host" -o.rmempty = false - -o = s:option(Value, "firstport", translate("First remote port"),translate("Interface will increase port used beginning with this")) -o.default = "65201" -o.datatype = "port" -o.rmempty = false - -o = s:option(Value, "password", translate("Password")) -o.password = true -o.rmempty = false - - -o = s:option(Value, "interface_name", translate("Interface name")) -o.placeholder = "mlvpn0" -o.default = "mlvpn0" -o.rmempty = false - ---o = s:option(Value, "mode", translate("Mode")) ---o:value("client") ---o:value("server") ---o.default = "client" ---o.rmempty = false - - ---s = m:section(TypedSection, "interface", translate("Interfaces")) ---s.template_addremove = "mlvpn/cbi-select-add" ---s.addremove = true ---s.add_select_options = { } ---s.add_select_options[''] = '' ---for _, iface in ipairs(ifaces) do --- if not (iface == "lo" or iface:match("^ifb.*")) then --- s.add_select_options[iface] = iface --- end ---end - ---o = s:option(Value, "port", translate("Remote/Bind port")) ---o.placeholder = "65201" ---o.default = "65201" ---o.datatype = "port" - -return m diff --git a/luci-app-mlvpn/luasrc/view/mlvpn/cbi-select-add.htm b/luci-app-mlvpn/luasrc/view/mlvpn/cbi-select-add.htm deleted file mode 100644 index 97ee647d2..000000000 --- a/luci-app-mlvpn/luasrc/view/mlvpn/cbi-select-add.htm +++ /dev/null @@ -1,10 +0,0 @@ -
- <% if self.invalid_cts then -%>
<% end %> - - - <% if self.invalid_cts then %>
<%:Invalid%>
<% end %> -
diff --git a/luci-app-mlvpn/po/de/mlvpn.po b/luci-app-mlvpn/po/de/mlvpn.po deleted file mode 100644 index f60844ce4..000000000 --- a/luci-app-mlvpn/po/de/mlvpn.po +++ /dev/null @@ -1,59 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-10-05 12:39+0000\n" -"Last-Translator: Weblate Admin \n" -"Language-Team: German \n" -"Language: de\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" - -msgid "Add" -msgstr "Hinzufügen" - -msgid "Enable" -msgstr "Aktivieren" - -msgid "First remote port" -msgstr "Erster Gegenstellen-Port" - -msgid "Interface name" -msgstr "Name der Verbindung" - -msgid "Interface will increase port used beginning with this" -msgstr "Der Anschluss wird die Pornummern nutzen beginnend mit diesem Wert" - -msgid "Interfaces" -msgstr "Anschlüsse" - -msgid "Invalid" -msgstr "Ungültig" - -msgid "Loss tolerance" -msgstr "Verlust-Toleranz" - -msgid "MLVPN" -msgstr "MLVPN" - -msgid "Mode" -msgstr "Betriebsmodus" - -msgid "Password" -msgstr "Schlüssel" - -msgid "Remote host" -msgstr "Gegenstelle (FQDN oder IP-Adresse)" - -msgid "Remote/Bind port" -msgstr "Portnummer der Gegenstelle" - -msgid "Reorder buffer size" -msgstr "Größe des Sortierpuffers" - -msgid "Settings" -msgstr "Einstellungen" - -msgid "Timeout (s)" -msgstr "Wartezeit (in Sekunden)" diff --git a/luci-app-mlvpn/po/fr/mlvpn.po b/luci-app-mlvpn/po/fr/mlvpn.po index af2708373..b1a9a5d4a 100644 --- a/luci-app-mlvpn/po/fr/mlvpn.po +++ b/luci-app-mlvpn/po/fr/mlvpn.po @@ -1,62 +1,80 @@ msgid "" msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: 2020-10-07 10:57+0000\n" +"PO-Revision-Date: 2020-12-15 14:46+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" "Language: fr\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.0.4\n" -msgid "Add" -msgstr "Ajouter" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:32 +msgid "Advanced Settings" +msgstr "Configuration avancée" -msgid "Enable" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:38 +msgid "Client" +msgstr "Client" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:34 +msgid "Enabled" msgstr "Activer" -msgid "First remote port" -msgstr "Premier port distant" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:45 +msgid "First Port" +msgstr "Premier port" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:31 +msgid "General Settings" +msgstr "Paramètres généraux" + +#: luci-app-mlvpn/root/usr/share/rpcd/acl.d/luci-app-mlvpn.json:3 +msgid "Grant UCI access for luci-app-mlvpn" +msgstr "Accorder l'accès UCI pour luci-app-mlvpn" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:42 +msgid "Host" +msgstr "Hôte" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:26 +msgid "Instances" +msgstr "Instances" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:54 msgid "Interface name" msgstr "Nom de l'interface" -msgid "Interface will increase port used beginning with this" -msgstr "L'interface augmentera le port utilisé à partir de celui ci" - -msgid "Interfaces" -msgstr "Interfaces" - -msgid "Invalid" -msgstr "Invalide" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:78 +msgid "Label" +msgstr "Étiquette" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:72 msgid "Loss tolerance" msgstr "Tolérance aux pertes" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:24 +#: luci-app-mlvpn/root/usr/share/luci/menu.d/luci-app-mlvpn.json:3 msgid "MLVPN" msgstr "MLVPN" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:37 msgid "Mode" msgstr "Mode" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:50 msgid "Password" msgstr "Mot de passe" -msgid "Remote host" -msgstr "Nom de l'hôte distant ou adresse IP" - -msgid "Remote/Bind port" -msgstr "Port de connexion distant" - +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:66 msgid "Reorder buffer size" msgstr "Taille du tampon de réordonnancement" -msgid "Settings" -msgstr "Paramètres" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:39 +msgid "Server" +msgstr "Serveur" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:60 msgid "Timeout (s)" msgstr "Délais d'attente (s)" diff --git a/luci-app-mlvpn/po/it/mlvpn.po b/luci-app-mlvpn/po/it/mlvpn.po deleted file mode 100644 index f7c495c5c..000000000 --- a/luci-app-mlvpn/po/it/mlvpn.po +++ /dev/null @@ -1,59 +0,0 @@ -msgid "" -msgstr "" -"PO-Revision-Date: 2020-09-21 12:51+0000\n" -"Last-Translator: Weblate Admin \n" -"Language-Team: Italian \n" -"Language: it\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" - -msgid "Add" -msgstr "Aggiungi" - -msgid "Enable" -msgstr "Attivare" - -msgid "First remote port" -msgstr "Prima porta remota" - -msgid "Interface name" -msgstr "Nome interfaccia" - -msgid "Interface will increase port used beginning with this" -msgstr "L'interfaccia aumenterà la porta utilizzata a partire da questa" - -msgid "Interfaces" -msgstr "Interfaccia" - -msgid "Invalid" -msgstr "Non valido" - -msgid "Loss tolerance" -msgstr "Tolleranza alla perdita" - -msgid "MLVPN" -msgstr "MLVPN" - -msgid "Mode" -msgstr "Modo" - -msgid "Password" -msgstr "Password" - -msgid "Remote host" -msgstr "Rimuovi server" - -msgid "Remote/Bind port" -msgstr "Porta remota / Bind" - -msgid "Reorder buffer size" -msgstr "" - -msgid "Settings" -msgstr "Impostazioni" - -msgid "Timeout (s)" -msgstr "" diff --git a/luci-app-mlvpn/po/templates/mlvpn.pot b/luci-app-mlvpn/po/templates/mlvpn.pot index 0eecd2f65..45e559267 100644 --- a/luci-app-mlvpn/po/templates/mlvpn.pot +++ b/luci-app-mlvpn/po/templates/mlvpn.pot @@ -1,50 +1,71 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" -msgid "Add" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:32 +msgid "Advanced Settings" msgstr "" -msgid "Enable" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:38 +msgid "Client" msgstr "" -msgid "First remote port" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:34 +msgid "Enabled" msgstr "" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:45 +msgid "First Port" +msgstr "" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:31 +msgid "General Settings" +msgstr "" + +#: luci-app-mlvpn/root/usr/share/rpcd/acl.d/luci-app-mlvpn.json:3 +msgid "Grant UCI access for luci-app-mlvpn" +msgstr "" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:42 +msgid "Host" +msgstr "" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:26 +msgid "Instances" +msgstr "" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:54 msgid "Interface name" msgstr "" -msgid "Interface will increase port used beginning with this" -msgstr "" - -msgid "Interfaces" -msgstr "" - -msgid "Invalid" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:78 +msgid "Label" msgstr "" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:72 msgid "Loss tolerance" msgstr "" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:24 +#: luci-app-mlvpn/root/usr/share/luci/menu.d/luci-app-mlvpn.json:3 msgid "MLVPN" msgstr "" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:37 msgid "Mode" msgstr "" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:50 msgid "Password" msgstr "" -msgid "Remote host" -msgstr "" - -msgid "Remote/Bind port" -msgstr "" - +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:66 msgid "Reorder buffer size" msgstr "" -msgid "Settings" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:39 +msgid "Server" msgstr "" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:60 msgid "Timeout (s)" msgstr "" diff --git a/luci-app-mlvpn/po/zh_Hans/mlvpn.po b/luci-app-mlvpn/po/zh_Hans/mlvpn.po index eca37c59d..868ff2e57 100644 --- a/luci-app-mlvpn/po/zh_Hans/mlvpn.po +++ b/luci-app-mlvpn/po/zh_Hans/mlvpn.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-06-11 16:36+0000\n" +"PO-Revision-Date: 2020-12-04 16:03+0000\n" "Last-Translator: antrouter \n" "Language-Team: Chinese (Simplified) \n" @@ -10,50 +10,71 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.0.4\n" -msgid "Add" -msgstr "添加" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:32 +msgid "Advanced Settings" +msgstr "高级设置" -msgid "Enable" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:38 +msgid "Client" +msgstr "客户端" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:34 +msgid "Enabled" msgstr "开启" -msgid "First remote port" -msgstr "第一个远程端口" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:45 +msgid "First Port" +msgstr "第一端口" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:31 +msgid "General Settings" +msgstr "通用设置" + +#: luci-app-mlvpn/root/usr/share/rpcd/acl.d/luci-app-mlvpn.json:3 +msgid "Grant UCI access for luci-app-mlvpn" +msgstr "授予UCI访问luci-app-mlvpn的权限" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:42 +msgid "Host" +msgstr "主机" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:26 +msgid "Instances" +msgstr "实例" + +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:54 msgid "Interface name" -msgstr "网卡名称" +msgstr "接口名称" -msgid "Interface will increase port used beginning with this" -msgstr "接口将从此开始增加使用的端口" - -msgid "Interfaces" -msgstr "网卡" - -msgid "Invalid" -msgstr "无效" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:78 +msgid "Label" +msgstr "标签" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:72 msgid "Loss tolerance" msgstr "损失容忍" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:24 +#: luci-app-mlvpn/root/usr/share/luci/menu.d/luci-app-mlvpn.json:3 msgid "MLVPN" -msgstr "MLVPN设置" +msgstr "mlvpn" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:37 msgid "Mode" msgstr "模式" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:50 msgid "Password" msgstr "密码" -msgid "Remote host" -msgstr "远程主机" - -msgid "Remote/Bind port" -msgstr "远程/绑定端口" - +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:66 msgid "Reorder buffer size" msgstr "重新排序缓冲区大小" -msgid "Settings" -msgstr "设置" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:39 +msgid "Server" +msgstr "服务器" +#: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:60 msgid "Timeout (s)" -msgstr "超时 (秒)" +msgstr "超时(s)" diff --git a/luci-app-mlvpn/root/usr/share/luci/menu.d/luci-app-mlvpn.json b/luci-app-mlvpn/root/usr/share/luci/menu.d/luci-app-mlvpn.json index 085d95305..90afc4494 100644 --- a/luci-app-mlvpn/root/usr/share/luci/menu.d/luci-app-mlvpn.json +++ b/luci-app-mlvpn/root/usr/share/luci/menu.d/luci-app-mlvpn.json @@ -3,8 +3,8 @@ "title": "MLVPN", "order": 30, "action": { - "type": "cbi", - "path": "mlvpn" + "type": "view", + "path": "services/mlvpn" }, "depends": { "acl": [ "luci-app-mlvpn" ] diff --git a/luci-app-mptcp/luasrc/view/mptcp/multipath.htm b/luci-app-mptcp/luasrc/view/mptcp/multipath.htm index 3e72fa34b..8d375c359 100644 --- a/luci-app-mptcp/luasrc/view/mptcp/multipath.htm +++ b/luci-app-mptcp/luasrc/view/mptcp/multipath.htm @@ -906,13 +906,13 @@ window.setTimeout(function() <% if curifname == "all" then %> <%:Download:%> - +
-
<%:Upload:%> - +
-
@@ -920,7 +920,7 @@ window.setTimeout(function() <% else %> - +
-

diff --git a/luci-app-mptcp/po/it/mptcp.po b/luci-app-mptcp/po/it/mptcp.po index 9302b4a4c..272ac94dc 100644 --- a/luci-app-mptcp/po/it/mptcp.po +++ b/luci-app-mptcp/po/it/mptcp.po @@ -1,7 +1,7 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-10-02 08:44+0000\n" -"Last-Translator: Weblate Admin \n" +"PO-Revision-Date: 2020-12-01 10:49+0000\n" +"Last-Translator: Giuseppe Dipierro \n" "Language-Team: Italian \n" "Language: it\n" @@ -164,7 +164,7 @@ msgstr "Un'interfaccia deve essere impostata come master" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:939 msgid "Outbound:" -msgstr "In uscita:" +msgstr "Upload:" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:323 #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:326 @@ -193,7 +193,7 @@ msgstr "Test" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914 msgid "Upload:" -msgstr "Carica:" +msgstr "Upload:" #: luci-app-mptcp/luasrc/view/mptcp/mptcp_check.htm:21 #: luci-app-mptcp/luasrc/view/mptcp/mptcp_connections.htm:21 diff --git a/luci-app-mptcp/po/zh_Hans/mptcp.po b/luci-app-mptcp/po/zh_Hans/mptcp.po index 91de029d0..f40ceecd8 100644 --- a/luci-app-mptcp/po/zh_Hans/mptcp.po +++ b/luci-app-mptcp/po/zh_Hans/mptcp.po @@ -1,7 +1,7 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-11-06 06:58+0000\n" -"Last-Translator: 马 \n" +"PO-Revision-Date: 2020-12-04 16:02+0000\n" +"Last-Translator: antrouter \n" "Language-Team: Chinese (Simplified) \n" "Language: zh_Hans\n" @@ -97,7 +97,7 @@ msgstr "MB/s" #: luci-app-mptcp/luasrc/controller/mptcp.lua:9 #: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:7 msgid "MPTCP" -msgstr "MPTCP" +msgstr "聚合" #: luci-app-mptcp/luasrc/controller/mptcp.lua:16 msgid "MPTCP Fullmesh" diff --git a/luci-app-omr-bypass/root/etc/init.d/omr-bypass b/luci-app-omr-bypass/root/etc/init.d/omr-bypass index b5bd902a0..3708a0fce 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -56,12 +56,12 @@ _bypass_domain() { domain=$(echo $domain | sed 's:^\.::') #logger -t "omr-bypass" "Get IPs of $domain..." if [ -z $RELOAD ]; then - resolve=$(dig a +timeout=1 +tries=1 +nocmd +noall +answer $domain | awk '{print $5}') + resolve=$(dig a +timeout=1 +tries=1 +nocmd +noall +answer $domain | grep -v CNAME | awk '{print $5}') for ip in $resolve; do _bypass_ip $ip $intf done if [ "$disableipv6" = "0" ]; then - resolve=$(dig aaaa +timeout=1 +tries=1 +nocmd +noall +answer $domain | awk '{print $5}') + resolve=$(dig aaaa +timeout=1 +tries=1 +nocmd +noall +answer $domain | grep AAAA | awk '{print $5}') for ip in $resolve; do _bypass_ip $ip $intf done @@ -331,21 +331,33 @@ _bypass_proto() { local domains domains="$(cat /proc/net/xt_ndpi/host_proto | grep -i $proto: | sed -e "s/$proto://i" -e 's/*//' -e 's/,/ /g')" if [ -n "$domains" ]; then + tlds=`curl --max-time 4 -s -k https://data.iana.org/TLD/tlds-alpha-by-domain.txt` for domain in $domains; do if [ -n "$domain" ]; then domain="$(echo $domain | sed 's/^\.//')" if [ "$(echo $domain | grep '\.$')" != "" ]; then - tlds=`curl --max-time 4 -s -k https://data.iana.org/TLD/tlds-alpha-by-domain.txt` - if [ -n "tlds" ]; then - i=0 - for tld in $tlds; do - i=$((i+1)) - tld="$(echo $tld | awk '{print tolower($0)}')" - if [ "$i" -gt "11" ] && [ "$(dig a +timeout=1 +tries=1 +retry=1 +nocmd +noall +answer ${domain}${tld})" != "" ]; then - _bypass_domain ${domain}${tld} $intf - fi - done - fi + domainlist="" + # construct list of domains to query + for tld in $tlds; do + i=$((i+1)) + # trim off header + if [ "$i" -lt "12" ] || [ "$i" -gt "50" ]; then + continue + fi + # add to command + domainlist="${domainlist} ${domain}${tld}" + done + domainlist="$(echo $domainlist `# Get the list of valid domains, pass it to awk` \ + | awk '{print tolower($0)}' `# awk lowercases the whole string and passes it to ` \ + | xargs -n8 -P12 `# xargs sends 8 arguments at a time to` \ + dig a +timeout=1 +tries=1 +retry=1 +nocmd +noall +answer `# dig, which passes results (if any) to` \ + | awk '{print $1}' `# awk, which outputs queried domain to` \ + | sed -e 's/.$//' `# sed, which trims off the trailing dot (google.com. -> google.com)` to \ + | grep $domain `# grep, only keep wanted domain` \ + | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}')" # deduplicate + for validdomain in $domainlist; do + _bypass_domain $validdomain $intf + done else _bypass_domain $domain $intf fi diff --git a/luci-app-omr-tracker/po/zh_Hans/omr-tracker.po b/luci-app-omr-tracker/po/zh_Hans/omr-tracker.po index fa9ff694a..856001abd 100644 --- a/luci-app-omr-tracker/po/zh_Hans/omr-tracker.po +++ b/luci-app-omr-tracker/po/zh_Hans/omr-tracker.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-06-11 16:36+0000\n" +"PO-Revision-Date: 2020-12-04 16:02+0000\n" "Last-Translator: antrouter \n" "Language-Team: Chinese (Simplified) \n" @@ -31,7 +31,7 @@ msgid "Retry interval (s)" msgstr "重试间隔 (秒)" msgid "Timeout (s)" -msgstr "超时 (秒)" +msgstr "超时(s)" msgid "Tries" msgstr "尝试多少次" diff --git a/luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter.png b/luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter.png new file mode 100644 index 000000000..f4683f2c5 Binary files /dev/null and b/luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter.png differ diff --git a/luci-app-openmptcprouter/htdocs/luci-static/resources/overthebox.png b/luci-app-openmptcprouter/htdocs/luci-static/resources/overthebox.png deleted file mode 100644 index 7b578c01f..000000000 Binary files a/luci-app-openmptcprouter/htdocs/luci-static/resources/overthebox.png and /dev/null differ diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index d6d4001ad..c9a264ed8 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -8,20 +8,19 @@ local ipc = require "luci.ip" module("luci.controller.openmptcprouter", package.seeall) function index() --- entry({"admin", "openmptcprouter"}, firstchild(), _("OpenMPTCProuter"), 19).index = true --- entry({"admin", "openmptcprouter", "wizard"}, template("openmptcprouter/wizard"), _("Wizard"), 1).leaf = true --- entry({"admin", "openmptcprouter", "wizard_add"}, post("wizard_add")).leaf = true - entry({"admin", "system", "openmptcprouter"}, alias("admin", "system", "openmptcprouter", "wizard"), _("OpenMPTCProuter"), 1) - entry({"admin", "system", "openmptcprouter", "wizard"}, template("openmptcprouter/wizard"), _("Settings Wizard"), 1) - entry({"admin", "system", "openmptcprouter", "wizard_add"}, post("wizard_add")) - entry({"admin", "system", "openmptcprouter", "status"}, template("openmptcprouter/wanstatus"), _("Status"), 2).leaf = true - entry({"admin", "system", "openmptcprouter", "interfaces_status"}, call("interfaces_status")).leaf = true - entry({"admin", "system", "openmptcprouter", "settings"}, template("openmptcprouter/settings"), _("Advanced Settings"), 3).leaf = true - entry({"admin", "system", "openmptcprouter", "settings_add"}, post("settings_add")) - entry({"admin", "system", "openmptcprouter", "update_vps"}, post("update_vps")) - entry({"admin", "system", "openmptcprouter", "backup"}, template("openmptcprouter/backup"), _("Backup on server"), 3).leaf = true - entry({"admin", "system", "openmptcprouter", "backupgr"}, post("backupgr")) - entry({"admin", "system", "openmptcprouter", "debug"}, template("openmptcprouter/debug"), _("Show all settings"), 5).leaf = true + local ucic = luci.model.uci.cursor() + menuentry = ucic:get("openmptcprouter","settings","menu") or "OpenMPTCProuter" + entry({"admin", "system", menuentry:lower()}, alias("admin", "system", menuentry:lower(), "wizard"), _(menuentry), 1) + entry({"admin", "system", menuentry:lower(), "wizard"}, template("openmptcprouter/wizard"), _("Settings Wizard"), 1) + entry({"admin", "system", menuentry:lower(), "wizard_add"}, post("wizard_add")) + entry({"admin", "system", menuentry:lower(), "status"}, template("openmptcprouter/wanstatus"), _("Status"), 2).leaf = true + entry({"admin", "system", menuentry:lower(), "interfaces_status"}, call("interfaces_status")).leaf = true + entry({"admin", "system", menuentry:lower(), "settings"}, template("openmptcprouter/settings"), _("Advanced Settings"), 3).leaf = true + entry({"admin", "system", menuentry:lower(), "settings_add"}, post("settings_add")) + entry({"admin", "system", menuentry:lower(), "update_vps"}, post("update_vps")) + entry({"admin", "system", menuentry:lower(), "backup"}, template("openmptcprouter/backup"), _("Backup on server"), 3).leaf = true + entry({"admin", "system", menuentry:lower(), "backupgr"}, post("backupgr")) + entry({"admin", "system", menuentry:lower(), "debug"}, template("openmptcprouter/debug"), _("Show all settings"), 5).leaf = true end function interface_from_device(dev) @@ -72,6 +71,7 @@ function wizard_add() if nbserver == 1 and server_ip ~= "" and server_ip ~= nil then ucic:set("shadowsocks-libev","sss0","server",server_ip) ucic:set("glorytun","vpn","host",server_ip) + ucic:set("glorytun-udp","vpn","host",server_ip) ucic:set("dsvpn","vpn","host",server_ip) ucic:set("mlvpn","general","host",server_ip) ucic:set("ubond","general","host",server_ip) @@ -448,14 +448,26 @@ function wizard_add() -- Get Proxy set by default local default_proxy = luci.http.formvalue("default_proxy") or "shadowsocks" if default_proxy == "shadowsocks" and serversnb > 0 and serversnb > disablednb then - ucic:set("shadowsocks-libev","sss0","disabled","0") + --ucic:set("shadowsocks-libev","sss0","disabled","0") ucic:set("v2ray","main","enabled","0") + ucic:foreach("shadowsocks-libev", "server", function(s) + local sectionname = s[".name"] + ucic:set("shadowsocks-libev",sectionname,"disabled","0") + end) elseif default_proxy == "v2ray" and serversnb > 0 and serversnb > disablednb then - ucic:set("shadowsocks-libev","sss0","disabled","1") + --ucic:set("shadowsocks-libev","sss0","disabled","1") ucic:set("v2ray","main","enabled","1") + ucic:foreach("shadowsocks-libev", "server", function(s) + local sectionname = s[".name"] + ucic:set("shadowsocks-libev",sectionname,"disabled","1") + end) else - ucic:set("shadowsocks-libev","sss0","disabled","1") + --ucic:set("shadowsocks-libev","sss0","disabled","1") ucic:set("v2ray","main","enabled","0") + ucic:foreach("shadowsocks-libev", "server", function(s) + local sectionname = s[".name"] + ucic:set("shadowsocks-libev",sectionname,"disabled","1") + end) end ucic:set("openmptcprouter","settings","proxy",default_proxy) ucic:save("openmptcprouter") @@ -480,6 +492,7 @@ function wizard_add() ss_ip=server_ip ucic:set("shadowsocks-libev","sss0","server",server_ip) ucic:set("glorytun","vpn","host",server_ip) + ucic:set("glorytun-udp","vpn","host",server_ip) ucic:set("dsvpn","vpn","host",server_ip) ucic:set("mlvpn","general","host",server_ip) ucic:set("ubond","general","host",server_ip) @@ -501,6 +514,7 @@ function wizard_add() ucic:set("nginx-ha","VPN","enable","0") ucic:set("shadowsocks-libev","sss0","server",server_ip) ucic:set("glorytun","vpn","host",server_ip) + ucic:set("glorytun-udp","vpn","host",server_ip) ucic:set("dsvpn","vpn","host",server_ip) ucic:set("mlvpn","general","host",server_ip) ucic:set("ubond","general","host",server_ip) @@ -527,6 +541,7 @@ function wizard_add() ucic:save("dsvpn") --ucic:commit("dsvpn") ucic:save("glorytun") + ucic:save("glorytun-udp") --ucic:commit("glorytun") ucic:save("shadowsocks-libev") --ucic:commit("shadowsocks-libev") @@ -541,24 +556,28 @@ function wizard_add() elseif encryption == "aes-256-gcm" then ucic:set("shadowsocks-libev","sss0","method","aes-256-gcm") ucic:set("glorytun","vpn","chacha20","0") + ucic:set("glorytun-udp","vpn","chacha","0") ucic:set("openvpn","omr","cipher","AES-256-GCM") ucic:set("v2ray","omrout","s_vmess_user_security","aes-128-gcm") ucic:set("v2ray","omrout","s_vless_user_security","aes-128-gcm") elseif encryption == "aes-256-cfb" then ucic:set("shadowsocks-libev","sss0","method","aes-256-cfb") ucic:set("glorytun","vpn","chacha20","0") + ucic:set("glorytun-udp","vpn","chacha","0") ucic:set("openvpn","omr","cipher","AES-256-CFB") ucic:set("v2ray","omrout","s_vmess_user_security","aes-128-gcm") ucic:set("v2ray","omrout","s_vless_user_security","aes-128-gcm") elseif encryption == "chacha20-ietf-poly1305" then ucic:set("shadowsocks-libev","sss0","method","chacha20-ietf-poly1305") ucic:set("glorytun","vpn","chacha20","1") + ucic:set("glorytun-udp","vpn","chacha","1") ucic:set("openvpn","omr","cipher","AES-256-CBC") ucic:set("v2ray","omrout","s_vmess_user_security","chacha20-poly1305") ucic:set("v2ray","omrout","s_vless_user_security","chacha20-poly1305") end ucic:save("openvpn") ucic:save("glorytun") + ucic:save("glorytun-udp") ucic:save("shadowsocks-libev") ucic:save("v2ray") @@ -595,7 +614,7 @@ function wizard_add() -- Set Glorytun settings - if default_vpn:match("^glorytun.*") and disablednb ~= serversnb then + if default_vpn:match("glorytun_tcp") and disablednb ~= serversnb then ucic:set("glorytun","vpn","enable",1) else ucic:set("glorytun","vpn","enable",0) @@ -606,20 +625,14 @@ function wizard_add() ucic:set("glorytun","vpn","port","65001") ucic:set("glorytun","vpn","key",glorytun_key) ucic:set("glorytun","vpn","mptcp",1) - if default_vpn == "glorytun_udp" then - ucic:set("glorytun","vpn","proto","udp") - ucic:set("glorytun","vpn","localip","10.255.254.2") - ucic:set("glorytun","vpn","remoteip","10.255.254.1") - ucic:set("network","omr6in4","ipaddr","10.255.254.2") - ucic:set("network","omr6in4","peeraddr","10.255.254.1") - else + if default_vpn == "glorytun_tcp" then ucic:set("glorytun","vpn","proto","tcp") ucic:set("glorytun","vpn","localip","10.255.255.2") ucic:set("glorytun","vpn","remoteip","10.255.255.1") ucic:set("network","omr6in4","ipaddr","10.255.255.2") ucic:set("network","omr6in4","peeraddr","10.255.255.1") + ucic:set("network","omrvpn","proto","none") end - ucic:set("network","omrvpn","proto","none") else ucic:set("glorytun","vpn","key","") --ucic:set("glorytun","vpn","enable",0) @@ -628,6 +641,29 @@ function wizard_add() ucic:save("glorytun") ucic:commit("glorytun") + if default_vpn:match("glorytun_udp") and disablednb ~= serversnb then + ucic:set("glorytun-udp","vpn","enable",1) + else + ucic:set("glorytun-udp","vpn","enable",0) + end + + local glorytun_key = luci.http.formvalue("glorytun_key") + if glorytun_key ~= "" then + ucic:set("glorytun-udp","vpn","port","65001") + ucic:set("glorytun-udp","vpn","key",glorytun_key) + if default_vpn == "glorytun_udp" then + ucic:set("glorytun-udp","vpn","localip","10.255.254.2") + ucic:set("glorytun-udp","vpn","remoteip","10.255.254.1") + ucic:set("network","omr6in4","ipaddr","10.255.254.2") + ucic:set("network","omr6in4","peeraddr","10.255.254.1") + ucic:set("network","omrvpn","proto","none") + end + else + ucic:set("glorytun-udp","vpn","key","") + end + ucic:save("glorytun-udp") + ucic:commit("glorytun-udp") + -- Set A Dead Simple VPN settings if default_vpn == "dsvpn" and disablednb ~= serversnb then ucic:set("dsvpn","vpn","enable",1) @@ -641,9 +677,11 @@ function wizard_add() ucic:set("dsvpn","vpn","key",dsvpn_key) ucic:set("dsvpn","vpn","localip","10.255.251.2") ucic:set("dsvpn","vpn","remoteip","10.255.251.1") - ucic:set("network","omr6in4","ipaddr","10.255.251.2") - ucic:set("network","omr6in4","peeraddr","10.255.251.1") - ucic:set("network","omrvpn","proto","none") + if default_vpn == "dsvpn" then + ucic:set("network","omr6in4","ipaddr","10.255.251.2") + ucic:set("network","omr6in4","peeraddr","10.255.251.1") + ucic:set("network","omrvpn","proto","none") + end else ucic:set("dsvpn","vpn","key","") --ucic:set("dsvpn","vpn","enable",0) @@ -718,7 +756,9 @@ function wizard_add() ucic:commit("openmptcprouter") -- Restart all + menuentry = ucic:get("openmptcprouter","settings","menu") or "openmptcprouter" if gostatus == true then + luci.sys.call("/etc/init.d/macvlan restart >/dev/null 2>/dev/null") luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/omr-tracker stop >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/mptcp restart >/dev/null 2>/dev/null") @@ -732,15 +772,16 @@ function wizard_add() luci.sys.call("/etc/init.d/mlvpn restart >/dev/null 2>/dev/null") --luci.sys.call("/etc/init.d/ubond restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/openvpn restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/openvpnbonding restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/dsvpn restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/omr-tracker start >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/omr-6in4 restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/mptcpovervpn restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/vnstat restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/v2ray restart >/dev/null 2>/dev/null") - luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/status")) + luci.http.redirect(luci.dispatcher.build_url("admin/system/" .. menuentry:lower() .. "/status")) else - luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/wizard")) + luci.http.redirect(luci.dispatcher.build_url("admin/system/" .. menuentry:lower() .. "/wizard")) end return end @@ -800,7 +841,8 @@ function settings_add() -- Disable IPv6 local disable_ipv6 = luci.http.formvalue("enableipv6") or "1" - local dump = require("luci.util").ubus("openmptcprouter", "disableipv6", { disable_ipv6 = tonumber(disable_ipv6)}) + ucic:set("openmptcprouter","settings","disable_ipv6",disable_ipv6) + --local dump = require("luci.util").ubus("openmptcprouter", "disableipv6", { disable_ipv6 = tonumber(disable_ipv6)}) -- Enable/disable external check local externalcheck = luci.http.formvalue("externalcheck") or "1" @@ -831,6 +873,10 @@ function settings_add() local disableserverping = luci.http.formvalue("disableserverping") or "0" ucic:set("openmptcprouter","settings","disableserverping",disableserverping) + -- Enable/disable shadowsocks upd + local shadowsocksudp = luci.http.formvalue("shadowsocksudp") or "0" + ucic:set("openmptcprouter","settings","shadowsocksudp",shadowsocksudp) + -- Enable/disable fast open local disablefastopen = luci.http.formvalue("disablefastopen") or "0" if disablefastopen == "0" then @@ -897,9 +943,11 @@ function settings_add() -- Apply all settings luci.sys.call("/etc/init.d/openmptcprouter restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/omr-6in4 restart >/dev/null 2>/dev/null") -- Done, redirect - luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/settings")) + menuentry = ucic:get("openmptcprouter","settings","menu") or "openmptcprouter" + luci.http.redirect(luci.dispatcher.build_url("admin/system/" .. menuentry:lower() .. "/settings")) return end @@ -922,7 +970,8 @@ function backupgr() if send_backup ~= "" then luci.sys.call("/etc/init.d/openmptcprouter-vps backup_send >/dev/null 2>/dev/null") end - luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/backup")) + menuentry = ucic:get("openmptcprouter","settings","menu") or "openmptcprouter" + luci.http.redirect(luci.dispatcher.build_url("admin/system/" .. menuentry:lower() .. "/backup")) return end diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm index 174e7cda1..f7ebf5bb0 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm @@ -1,9 +1,11 @@ <%+header%> <% luci.sys.call("/etc/init.d/openmptcprouter-vps backup_list >/dev/null 2>/dev/null") +local ucic = luci.model.uci.cursor() +menuentry = ucic:get("openmptcprouter","settings","menu") or "openmptcprouter" %> <% if stderr and #stderr > 0 then %>
<%=pcdata(stderr)%>
<% end %> -
+

<%:Backup on server%>

diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm index da7e9f494..50c4ccce3 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm @@ -3,6 +3,8 @@ <% if stderr and #stderr > 0 then %>
<%=pcdata(stderr)%>
<% end %> <% local latest_omr_version=luci.model.uci.cursor():get("openmptcprouter","latest_versions","vps") + local ucic = luci.model.uci.cursor() + menuentry = ucic:get("openmptcprouter","settings","menu") or "openmptcprouter" omr_test = false uci:foreach("openmptcprouter","server", function(s) servername = s[".name"] @@ -13,7 +15,7 @@ end) if omr_test == true then %> - +

<%:Update VPS%>

@@ -34,7 +36,7 @@ %>
- +

<%:Advanced Settings%>

@@ -242,6 +244,12 @@
+
+ +
+ checked<% end %>> +
+
diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm index 77cc6fef5..b35f3344f 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm @@ -31,6 +31,11 @@ -- * Many tests -%> <%+header%> +<% +local ucic = luci.model.uci.cursor() +local menuentry = ucic:get("openmptcprouter","settings","menu") or "openmptcprouter" +local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openmptcprouter.png" +%> @@ -48,7 +53,7 @@ } } function formatBytes(a,b=2){if(0===a)return"0 Bytes";const c=0>b?0:b,d=Math.floor(Math.log(a)/Math.log(1024));return parseFloat((a/Math.pow(1024,d)).toFixed(c))+" "+["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"][d]} - XHR.poll(20, '<%=build_url("admin/system/openmptcprouter/interfaces_status")%>', null, + XHR.poll(20, '<%=build_url("admin/system/" .. menuentry:lower() .. "/interfaces_status")%>', null, function(x, mArray) { var status = document.getElementById('openmptcprouter_status'); @@ -103,7 +108,7 @@ } } temp += ''; - var equipmentIcon = ''; + var equipmentIcon = ''; var title = String.format("%s (%s)", mArray.openmptcprouter.hostname, mArray.openmptcprouter.local_addr); var statusMessageClass = ""; var statusIcon = "<%=resource%>/openmptcprouter/images/statusOK.png"; @@ -218,7 +223,7 @@ temp += ''; temp += '
'; temp += ''; - temp += '
'; + temp += ''; var statusIcon = "<%=resource%>/openmptcprouter/images/statusOK.png"; var equipmentIcon = ''; content = ""; @@ -266,6 +271,9 @@ } else if (mArray.openmptcprouter.shadowsocks_enabled == true && mArray.openmptcprouter.ss_addr == "" && mArray.openmptcprouter.external_check == true) { statusMessage += '<%:Can\'t get public IP address from ShadowSocks%>' + '
'; + } else if (mArray.openmptcprouter.v2ray_enabled == true && mArray.openmptcprouter.ss_addr == "" && mArray.openmptcprouter.external_check == true) + { + statusMessage += '<%:Can\'t get public IP address from V2Ray%>' + '
'; } else if (mArray.openmptcprouter.wan_addr == "" && mArray.openmptcprouter.external_check == true) { statusMessage += '<%:No WAN IP address detected in less than 1 second%>' + '
'; diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index 0ee9ad9a2..13f998979 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -7,14 +7,15 @@ local sys = require "luci.sys" local ut = require "luci.util" local ifaces = sys.net:devices() - + menuentry = uci:get("openmptcprouter","settings","menu") or "openmptcprouter" function device_notvirtual(dev) for _, iface in ipairs(net:get_networks()) do local ifacen = iface:name() local ifacename = uci:get("network",ifacen,"ifname") local ifacetype = uci:get("network",ifacen,"type") or "" local ifaceproto = uci:get("network",ifacen,"proto") or "" - if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then + --if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then + if ifacename == dev and (ifacetype == "macvlan" or ifaceproto == "6in4") then return false end end @@ -34,7 +35,7 @@ } <% if stderr and #stderr > 0 then %>
<%=pcdata(stderr)%>
<% end %> - +

<%:Wizard%>

@@ -171,9 +172,9 @@

@@ -304,7 +305,9 @@ <% elseif vpn == "ubond" then %> <% if nixio.fs.access("/usr/sbin/ubond") then %><% end %> <% elseif vpn == "openvpn" then %> - <% if nixio.fs.access("/usr/sbin/openvpn") then %><% end %> + <% if nixio.fs.access("/etc/init.d/openvpn") then %><% end %> + <% elseif vpn == "openvpn_bonding" then %> + <% if nixio.fs.access("/etc/init.d/openvpnbonding") then %><% end %> <% end end @@ -318,7 +321,8 @@ <% if nixio.fs.access("/usr/sbin/dsvpn") then %><% end %> <% if nixio.fs.access("/usr/sbin/mlvpn") then %><% end %> <% if nixio.fs.access("/usr/sbin/ubond") then %><% end %> - <% if nixio.fs.access("/usr/sbin/openvpn") then %><% end %> + <% if nixio.fs.access("/etc/init.d/openvpn") then %><% end %> + <% if nixio.fs.access("/etc/init.d/openvpnbonding") then %><% end %> <% end @@ -380,7 +384,7 @@ <% iffind=0 for _, ifacea in ipairs(ifaces) do - if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) then + if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then if uci:get("network",ifname,"proto") ~= "macvlan" then %> @@ -469,7 +473,7 @@
@@ -485,7 +489,7 @@ +
+
+ <%:Only one interface must be set as "Master", this should be the most stable interface.%> +
<% else %> @@ -736,15 +744,15 @@ local upload = "0" download = uci:get("network",ifname,"downloadspeed") or "0" upload = uci:get("network",ifname,"uploadspeed") or "0" - if download == "0" or upload == "0" then - if nixio.fs.access("/etc/init.d/sqm") then - download = uci:get("sqm",ifname,"download") - upload = uci:get("sqm",ifname,"upload") - else - download = uci:get("qos",ifname,"download") - upload = uci:get("qos",ifname,"upload") - end - end + --if download == "0" or upload == "0" then + -- if nixio.fs.access("/etc/init.d/sqm") then + -- download = uci:get("sqm",ifname,"download") + -- upload = uci:get("sqm",ifname,"upload") + -- else + -- download = uci:get("qos",ifname,"download") + -- upload = uci:get("qos",ifname,"upload") + -- end + --end %>
@@ -808,7 +816,7 @@