1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge branch 'test' into ipq60xx

This commit is contained in:
suyuan 2023-07-03 23:34:47 +08:00
commit ab32ce3f57
15 changed files with 18 additions and 20644 deletions

View file

@ -6,7 +6,7 @@ if [ -f /usr/sbin/iptables-legacy ]; then
IPTABLESRESTORE="/usr/sbin/iptables-legacy-restore"
else
IPTABLESSAVE="/usr/sbin/iptables-save"
IPTABLESRESTORE="/usr/sbin/iptables-restore"
IPTABLESRESTORE="/usr/sbin/iptables-restore --noflush"
fi
_setup_rules() {
@ -39,7 +39,7 @@ _setup_fw() {
[ -n "$ifnames" ] && rule="$rule -i $(echo "${ifnames}" | sed 's/ /-i /g')"
if [ -n "$rule" ] && [ -n "$lookup" ]; then
$IPTABLESAVE --counters | grep -v "0x${lookup}" | $IPTABLERESTORE -w --counters
$IPTABLERESTORE --noflush <<-EOF
$IPTABLERESTORE <<-EOF
*mangle
-A omr-gre-tunnel ${rule} -j MARK --set-mark 0x${lookup}
COMMIT
@ -48,7 +48,7 @@ _setup_fw() {
}
if [ -z "$($IPTABLESAVE | grep omr-gre-tunnel)" ]; then
$IPTABLERESTORE --noflush <<-EOF
$IPTABLERESTORE <<-EOF
*mangle
:omr-gre-tunnel -
-I PREROUTING 1 -m addrtype ! --dst-type LOCAL -j omr-gre-tunnel

View file

@ -241,9 +241,7 @@ done
uci -q batch <<-EOF >/dev/null
set firewall.zone_lan.mtu_fix='1'
set firewall.zone_vpn.mtu_fix='1'
EOF
uci -q batch <<-EOF >/dev/null
set firewall.zone_vpn.mtu_fix='0'
set firewall.@include[0].reload='1'
commit firewall
EOF

View file

@ -12,7 +12,7 @@ if [ "$(uci -q get network.omrvpn)" = "" ]; then
set network.omrvpn.leasetime=12h
set network.omrvpn.type=tunnel
set network.omrvpn.txqueuelen=100
set network.omrvpn.metric=1200
set network.omrvpn.metric=9000
commit network
EOF
fi
@ -146,7 +146,12 @@ if [ "$(uci -q get glorytun-udp.vpn.key)" = "" ] && [ "$(uci -q get glorytun.vpn
uci -q commit glorytun-udp
fi
if [ "$(uci -q get network.omrvpn.metric)" = "1200" ]; then
uci -q batch <<-EOF >/dev/null
set network.omrvpn.metric=9000
commit network
EOF
fi
rm -f /tmp/luci-indexcache
exit 0