mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 10:31:51 +00:00
A few changes and better description in OMR-ByPass interface
This commit is contained in:
parent
3daacde7bc
commit
7a63841f86
1 changed files with 41 additions and 41 deletions
|
@ -17,7 +17,10 @@ return L.view.extend({
|
||||||
load: function() {
|
load: function() {
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
L.resolveDefault(fs.stat('/proc/net/xt_ndpi/proto'), null),
|
L.resolveDefault(fs.stat('/proc/net/xt_ndpi/proto'), null),
|
||||||
this.callHostHints()
|
this.callHostHints(),
|
||||||
|
L.resolveDefault(fs.read_direct('/proc/net/xt_ndpi/proto'), ''),
|
||||||
|
L.resolveDefault(fs.read_direct('/proc/net/xt_ndpi/host_proto'), ''),
|
||||||
|
fs.read_direct('/usr/share/omr-bypass/omr-bypass-proto.lst')
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -51,7 +54,7 @@ return L.view.extend({
|
||||||
o = s.option(form.Flag, 'vpn', _('VPN on server'),_('Bypass using VPN configured on server.'));
|
o = s.option(form.Flag, 'vpn', _('VPN on server'),_('Bypass using VPN configured on server.'));
|
||||||
o.modalonly = true
|
o.modalonly = true
|
||||||
|
|
||||||
o = s.option(widgets.DeviceSelect, 'interface', _('Interface'),_('When none selected, MPTCP master interface is used.'));
|
o = s.option(widgets.DeviceSelect, 'interface', _('Output interface'),_('When none selected, MPTCP master interface is used.'));
|
||||||
o.noaliases = true;
|
o.noaliases = true;
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
@ -85,7 +88,7 @@ return L.view.extend({
|
||||||
o = s.option(form.Flag, 'vpn', _('VPN on server'),_('Bypass using VPN configured on server.'));
|
o = s.option(form.Flag, 'vpn', _('VPN on server'),_('Bypass using VPN configured on server.'));
|
||||||
o.modalonly = true
|
o.modalonly = true
|
||||||
|
|
||||||
o = s.option(widgets.DeviceSelect, 'interface', _('Interface'),_('When none selected, MPTCP master interface is used.'));
|
o = s.option(widgets.DeviceSelect, 'interface', _('Output interface'),_('When none selected, MPTCP master interface is used.'));
|
||||||
o.noaliases = true;
|
o.noaliases = true;
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
@ -112,7 +115,7 @@ return L.view.extend({
|
||||||
o.value('udp');
|
o.value('udp');
|
||||||
o.value('icmp');
|
o.value('icmp');
|
||||||
|
|
||||||
o = s.option(widgets.DeviceSelect, 'interface', _('Interface'),_('When none selected, MPTCP master interface is used.'));
|
o = s.option(widgets.DeviceSelect, 'interface', _('Output interface'),_('When none selected, MPTCP master interface is used.'));
|
||||||
o.noaliases = true;
|
o.noaliases = true;
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
@ -138,7 +141,7 @@ return L.view.extend({
|
||||||
o.value('udp');
|
o.value('udp');
|
||||||
o.value('icmp');
|
o.value('icmp');
|
||||||
|
|
||||||
o = s.option(widgets.DeviceSelect, 'interface', _('Interface'),_('When none selected, MPTCP master interface is used.'));
|
o = s.option(widgets.DeviceSelect, 'interface', _('Output interface'),_('When none selected, MPTCP master interface is used.'));
|
||||||
o.noaliases = true;
|
o.noaliases = true;
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
@ -162,7 +165,7 @@ return L.view.extend({
|
||||||
o.value(mac, hint ? '%s (%s)'.format(mac, hint) : mac);
|
o.value(mac, hint ? '%s (%s)'.format(mac, hint) : mac);
|
||||||
});
|
});
|
||||||
|
|
||||||
o = s.option(widgets.DeviceSelect, 'interface', _('Interface'),_('When none selected, MPTCP master interface is used.'));
|
o = s.option(widgets.DeviceSelect, 'interface', _('Output interface'),_('When none selected, MPTCP master interface is used.'));
|
||||||
o.noaliases = true;
|
o.noaliases = true;
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
@ -188,7 +191,7 @@ return L.view.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
o = s.option(widgets.DeviceSelect, 'interface', _('Interface'),_('When none selected, MPTCP master interface is used.'));
|
o = s.option(widgets.DeviceSelect, 'interface', _('Output interface'),_('When none selected, MPTCP master interface is used.'));
|
||||||
o.noaliases = true;
|
o.noaliases = true;
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
@ -210,7 +213,7 @@ return L.view.extend({
|
||||||
o = s.option(form.Flag, 'vpn', _('VPN on server'),_('Bypass using VPN configured on server.'));
|
o = s.option(form.Flag, 'vpn', _('VPN on server'),_('Bypass using VPN configured on server.'));
|
||||||
o.modalonly = true
|
o.modalonly = true
|
||||||
|
|
||||||
o = s.option(widgets.DeviceSelect, 'interface', _('Interface'),_('When none selected, MPTCP master interface is used.'));
|
o = s.option(widgets.DeviceSelect, 'interface', _('Output interface'),_('When none selected, MPTCP master interface is used.'));
|
||||||
o.noaliases = true;
|
o.noaliases = true;
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
@ -230,14 +233,9 @@ return L.view.extend({
|
||||||
o = s.option(form.ListValue, 'proto', _('Protocol/Service'));
|
o = s.option(form.ListValue, 'proto', _('Protocol/Service'));
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.load = function(section_id) {
|
o.load = function(section_id) {
|
||||||
return Promise.all([
|
var proto = testhosts[2].split(/\n/),
|
||||||
L.resolveDefault(fs.read_direct('/proc/net/xt_ndpi/proto'), ''),
|
host = testhosts[3].split(/\n/),
|
||||||
L.resolveDefault(fs.read_direct('/proc/net/xt_ndpi/host_proto'), ''),
|
protofile = testhosts[4].split(/\n/),
|
||||||
fs.read_direct('/usr/share/omr-bypass/omr-bypass-proto.lst')
|
|
||||||
]).then(L.bind(function(filesi) {
|
|
||||||
var proto = filesi[0].split(/\n/),
|
|
||||||
host = filesi[1].split(/\n/),
|
|
||||||
protofile = filesi[2].split(/\n/),
|
|
||||||
name = [];
|
name = [];
|
||||||
if (proto.length > 2) {
|
if (proto.length > 2) {
|
||||||
for (var i = 0; i < proto.length; i++) {
|
for (var i = 0; i < proto.length; i++) {
|
||||||
|
@ -259,18 +257,20 @@ return L.view.extend({
|
||||||
name.push(m);
|
name.push(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (host.length > 2) {
|
||||||
name = Array.from(new Set(name)).sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase())}).reduce(function(a, b){ if (a.slice(-1)[0] !== b) a.push(b);return a;},[]);
|
name = Array.from(new Set(name)).sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase())}).reduce(function(a, b){ if (a.slice(-1)[0] !== b) a.push(b);return a;},[]);
|
||||||
|
}
|
||||||
for (var i = 0; i < name.length; i++) {
|
for (var i = 0; i < name.length; i++) {
|
||||||
this.value(name[i]);
|
this.value(name[i]);
|
||||||
}
|
}
|
||||||
return this.super('load', [section_id]);
|
return this.super('load', [section_id]);
|
||||||
},this));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
o = s.option(form.Flag, 'vpn', _('VPN on server'),_('Bypass using VPN configured on server.'));
|
o = s.option(form.Flag, 'vpn', _('VPN on server'),_('Bypass using VPN configured on server.'));
|
||||||
o.modalonly = true
|
o.modalonly = true
|
||||||
|
|
||||||
o = s.option(widgets.DeviceSelect, 'interface', _('Interface'),_('When none selected, MPTCP master interface is used (or an other interface if master is down).'));
|
o = s.option(widgets.DeviceSelect, 'interface', _('Output interface'),_('When none selected, MPTCP master interface is used (or an other interface if master is down).'));
|
||||||
o.noaliases = true;
|
o.noaliases = true;
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
@ -287,7 +287,7 @@ return L.view.extend({
|
||||||
o.modalonly = true
|
o.modalonly = true
|
||||||
|
|
||||||
o = s.option(form.Flag, 'noipv6', _('Disable AAAA IPv6 DNS'));
|
o = s.option(form.Flag, 'noipv6', _('Disable AAAA IPv6 DNS'));
|
||||||
o.default = o.enabled;
|
o.default = true;
|
||||||
o.modalonly = true
|
o.modalonly = true
|
||||||
|
|
||||||
if (testhosts[0]) {
|
if (testhosts[0]) {
|
||||||
|
|
Loading…
Reference in a new issue