mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Support note for omr-bypass and various fix
This commit is contained in:
parent
f942713b98
commit
0b87cb7b76
3 changed files with 25 additions and 2 deletions
|
@ -21,6 +21,8 @@ hn.rmempty = true
|
||||||
ifd = s:option(ListValue, "interface", translate("Interface"))
|
ifd = s:option(ListValue, "interface", translate("Interface"))
|
||||||
ifd.rmempty = true
|
ifd.rmempty = true
|
||||||
|
|
||||||
|
dn = s:option(Value,"note",translate("Note"))
|
||||||
|
|
||||||
s = m:section(TypedSection, "ips", translate("IPs and Networks"))
|
s = m:section(TypedSection, "ips", translate("IPs and Networks"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -34,6 +36,9 @@ ip.optional = false
|
||||||
ifi = s:option(ListValue, "interface", translate("Interface"))
|
ifi = s:option(ListValue, "interface", translate("Interface"))
|
||||||
ifi.rmempty = true
|
ifi.rmempty = true
|
||||||
|
|
||||||
|
inn = s:option(Value,"note",translate("Note"))
|
||||||
|
|
||||||
|
|
||||||
s = m:section(TypedSection, "dest_port", translate("Ports destination"))
|
s = m:section(TypedSection, "dest_port", translate("Ports destination"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -54,6 +59,8 @@ proto.optional = false
|
||||||
ifdp = s:option(ListValue, "interface", translate("Interface"))
|
ifdp = s:option(ListValue, "interface", translate("Interface"))
|
||||||
ifdp.rmempty = true
|
ifdp.rmempty = true
|
||||||
|
|
||||||
|
dpn = s:option(Value,"note",translate("Note"))
|
||||||
|
|
||||||
s = m:section(TypedSection, "macs", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
|
s = m:section(TypedSection, "macs", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -73,6 +80,8 @@ end)
|
||||||
ifm = s:option(ListValue, "interface", translate("Interface"))
|
ifm = s:option(ListValue, "interface", translate("Interface"))
|
||||||
ifm.rmempty = true
|
ifm.rmempty = true
|
||||||
|
|
||||||
|
macn = s:option(Value,"note",translate("Note"))
|
||||||
|
|
||||||
s = m:section(TypedSection, "lan_ip", translate("Source lan IP address or network"))
|
s = m:section(TypedSection, "lan_ip", translate("Source lan IP address or network"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -86,6 +95,8 @@ ip.optional = false
|
||||||
ifl = s:option(ListValue, "interface", translate("Interface"))
|
ifl = s:option(ListValue, "interface", translate("Interface"))
|
||||||
ifl.rmempty = true
|
ifl.rmempty = true
|
||||||
|
|
||||||
|
lanipn = s:option(Value,"note",translate("Note"))
|
||||||
|
|
||||||
s = m:section(TypedSection, "asns", translate("<abbr tittle=\"Autonomous System Number\">ASN</abbr>"))
|
s = m:section(TypedSection, "asns", translate("<abbr tittle=\"Autonomous System Number\">ASN</abbr>"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -98,6 +109,8 @@ asn.optional = false
|
||||||
ifa = s:option(ListValue, "interface", translate("Interface"))
|
ifa = s:option(ListValue, "interface", translate("Interface"))
|
||||||
ifa.rmempty = true
|
ifa.rmempty = true
|
||||||
|
|
||||||
|
asnn = s:option(Value,"note",translate("Note"))
|
||||||
|
|
||||||
s = m:section(TypedSection, "dpis", translate("Protocols and services"))
|
s = m:section(TypedSection, "dpis", translate("Protocols and services"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -124,6 +137,9 @@ end
|
||||||
ifp = s:option(ListValue, "interface", translate("Interface"))
|
ifp = s:option(ListValue, "interface", translate("Interface"))
|
||||||
ifp.rmempty = true
|
ifp.rmempty = true
|
||||||
|
|
||||||
|
psn = s:option(Value,"note",translate("Note"))
|
||||||
|
|
||||||
|
|
||||||
ifd.default = "all"
|
ifd.default = "all"
|
||||||
ifi.default = "all"
|
ifi.default = "all"
|
||||||
ifp.default = "all"
|
ifp.default = "all"
|
||||||
|
|
|
@ -6,7 +6,7 @@ START=99
|
||||||
|
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
EXTRA_COMMANDS="set_pihole backup_send backup_get set_vps_firewall"
|
EXTRA_COMMANDS="set_pihole backup_send backup_get backup_list set_vps_firewall"
|
||||||
|
|
||||||
_parse_result() {
|
_parse_result() {
|
||||||
result=$("echo $1 | jsonfilter -q -e '@.result'")
|
result=$("echo $1 | jsonfilter -q -e '@.result'")
|
||||||
|
@ -299,6 +299,7 @@ _get_vps_config() {
|
||||||
fi
|
fi
|
||||||
if [ "$(uci -q get mlvpn.general.host)" != "127.0.0.1" ] && [ "$(uci -q get mlvpn.general.host)" != "$vpsip" ]; then
|
if [ "$(uci -q get mlvpn.general.host)" != "127.0.0.1" ] && [ "$(uci -q get mlvpn.general.host)" != "$vpsip" ]; then
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set mlvpn.general="mlvpn"
|
||||||
set mlvpn.general.host="$vpsip"
|
set mlvpn.general.host="$vpsip"
|
||||||
commit mlvpn
|
commit mlvpn
|
||||||
EOF
|
EOF
|
||||||
|
@ -848,6 +849,9 @@ _backup_send() {
|
||||||
backup_send() {
|
backup_send() {
|
||||||
config_load openmptcprouter
|
config_load openmptcprouter
|
||||||
config_foreach _backup_send server
|
config_foreach _backup_send server
|
||||||
|
sleep 2
|
||||||
|
config_foreach _backup_list server
|
||||||
|
uci -q commit openmptcprouter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -871,6 +875,7 @@ _backup_get() {
|
||||||
backup_data="$(echo "$vps_backup" | jsonfilter -q -e '@.data')"
|
backup_data="$(echo "$vps_backup" | jsonfilter -q -e '@.data')"
|
||||||
backup_sha256sum="$(echo "$vps_backup" | jsonfilter -q -e '@.sha256sum')"
|
backup_sha256sum="$(echo "$vps_backup" | jsonfilter -q -e '@.sha256sum')"
|
||||||
[ -n "$backup_data" ] && {
|
[ -n "$backup_data" ] && {
|
||||||
|
logger -t "OMR-VPS" "Restore backup"
|
||||||
echo $backup_data | base64 -d > /tmp/backup.tar.gz
|
echo $backup_data | base64 -d > /tmp/backup.tar.gz
|
||||||
sysupgrade -t /tmp/backup.tar.gz
|
sysupgrade -t /tmp/backup.tar.gz
|
||||||
}
|
}
|
||||||
|
@ -879,6 +884,7 @@ _backup_get() {
|
||||||
backup_get() {
|
backup_get() {
|
||||||
config_load openmptcprouter
|
config_load openmptcprouter
|
||||||
config_foreach _backup_get server
|
config_foreach _backup_get server
|
||||||
|
uci -q commit openmptcprouter
|
||||||
}
|
}
|
||||||
|
|
||||||
_backup_list() {
|
_backup_list() {
|
||||||
|
@ -909,6 +915,7 @@ _backup_list() {
|
||||||
backup_list() {
|
backup_list() {
|
||||||
config_load openmptcprouter
|
config_load openmptcprouter
|
||||||
config_foreach _backup_list server
|
config_foreach _backup_list server
|
||||||
|
uci -q commit openmptcprouter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set luci.diag=external
|
set luci.diag=internal
|
||||||
set luci.diag.ping="openmptcprouter.com"
|
set luci.diag.ping="openmptcprouter.com"
|
||||||
set luci.diag.dns="openmptcprouter.com"
|
set luci.diag.dns="openmptcprouter.com"
|
||||||
set luci.diag.route="openmptcprouter.com"
|
set luci.diag.route="openmptcprouter.com"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue