mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Some changes for IPv6 support in omr-bypass
This commit is contained in:
parent
84a0fe47b3
commit
34c6565016
2 changed files with 43 additions and 3 deletions
|
@ -23,6 +23,16 @@ return L.view.extend({
|
||||||
|
|
||||||
m = new form.Map('omr-bypass', _('OMR-Bypass'),_('OpenMPTCProuter IP must be used as DNS.'));
|
m = new form.Map('omr-bypass', _('OMR-Bypass'),_('OpenMPTCProuter IP must be used as DNS.'));
|
||||||
|
|
||||||
|
/*
|
||||||
|
s = m.section(form.TypedSection, 'global', _('Global settings'));
|
||||||
|
s.addremove = false;
|
||||||
|
s.anonymous = true;
|
||||||
|
|
||||||
|
o = s.option(form.Flag, 'noipv6', _('Disable IPv6 AAAA DNS results for bypassed domains'));
|
||||||
|
o.default = o.disabled;
|
||||||
|
o.optional = true;
|
||||||
|
*/
|
||||||
|
|
||||||
s = m.section(form.GridSection, 'domains', _('Domains'));
|
s = m.section(form.GridSection, 'domains', _('Domains'));
|
||||||
s.addremove = true;
|
s.addremove = true;
|
||||||
s.anonymous = true;
|
s.anonymous = true;
|
||||||
|
@ -42,6 +52,17 @@ return L.view.extend({
|
||||||
o = s.option(form.Value, 'note', _('Note'));
|
o = s.option(form.Value, 'note', _('Note'));
|
||||||
o.rmempty = true;
|
o.rmempty = true;
|
||||||
|
|
||||||
|
o = s.option(form.ListValue, 'family', _('Restrict to address family'));
|
||||||
|
o.value('ipv4ipv6', _('IPv4 and IPv6'));
|
||||||
|
o.value('ipv4', _('IPv4 only'));
|
||||||
|
o.value('ipv4', _('IPv6 only'));
|
||||||
|
o.default = 'ipv4ipv6';
|
||||||
|
o.modalonly = true
|
||||||
|
|
||||||
|
o = s.option(form.Flag, 'noipv6', _('Disable AAAA IPv6 DNS'));
|
||||||
|
o.default = o.enabled;
|
||||||
|
o.modalonly = true
|
||||||
|
|
||||||
s = m.section(form.GridSection, 'ips', _('IPs and Networks'));
|
s = m.section(form.GridSection, 'ips', _('IPs and Networks'));
|
||||||
s.addremove = true;
|
s.addremove = true;
|
||||||
s.anonymous = true;
|
s.anonymous = true;
|
||||||
|
@ -223,12 +244,24 @@ return L.view.extend({
|
||||||
o.noinactive = true;
|
o.noinactive = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
|
|
||||||
o = s.option(form.Flag, 'ndpi', _('Enable ndpi'));
|
|
||||||
o.default = o.enabled;
|
|
||||||
|
|
||||||
o = s.option(form.Value, 'note', _('Note'));
|
o = s.option(form.Value, 'note', _('Note'));
|
||||||
o.rmempty = true;
|
o.rmempty = true;
|
||||||
|
|
||||||
|
o = s.option(form.ListValue, 'family', _('Restrict to address family'));
|
||||||
|
o.value('ipv4ipv6', _('IPv4 and IPv6'));
|
||||||
|
o.value('ipv4', _('IPv4 only'));
|
||||||
|
o.value('ipv4', _('IPv6 only'));
|
||||||
|
o.default = 'ipv4ipv6';
|
||||||
|
o.modalonly = true
|
||||||
|
|
||||||
|
o = s.option(form.Flag, 'noipv6', _('Disable AAAA IPv6 DNS'));
|
||||||
|
o.default = o.enabled;
|
||||||
|
o.modalonly = true
|
||||||
|
|
||||||
|
o = s.option(form.Flag, 'ndpi', _('Enable ndpi'));
|
||||||
|
o.default = o.enabled;
|
||||||
|
o.modalonly = true
|
||||||
|
|
||||||
return m.render();
|
return m.render();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -118,6 +118,13 @@ if [ "$(uci -q get omr-bypass.amazonvideo)" = "" ]; then
|
||||||
commit omr-bypass
|
commit omr-bypass
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
#if [ "$(uci -q get omr-bypass.global)" = "" ]; then
|
||||||
|
# uci -q batch <<-EOF >/dev/null
|
||||||
|
# set omr-bypass.global=global
|
||||||
|
# set omr-bypass.global.noipv6='0'
|
||||||
|
# commit omr-bypass
|
||||||
|
# EOF
|
||||||
|
#fi
|
||||||
if [ ! -f /etc/crontabs/root ] || [ "$(cat /etc/crontabs/root | grep bypass)" = "" ]; then
|
if [ ! -f /etc/crontabs/root ] || [ "$(cat /etc/crontabs/root | grep bypass)" = "" ]; then
|
||||||
echo "0 2 * * * /etc/init.d/omr-bypass bypass_asn" >> /etc/crontabs/root
|
echo "0 2 * * * /etc/init.d/omr-bypass bypass_asn" >> /etc/crontabs/root
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue