1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
Ycarus (Yannick Chabanois) 2020-05-25 14:04:17 +02:00
parent 34f21576ce
commit 4aee443da6
3 changed files with 6 additions and 6 deletions

View file

@ -39,8 +39,8 @@ while true; do
ipv6_addr=$(ubus call network.interface.omr6in4 status | jsonfilter -q -l 1 -e '@["ipv6-address"][0].address' | tr -d "\n")
ip -6 addr add $ipv6_addr dev 6in4-omr6in4 > /dev/null 2>&1
ipv6_gw=$(ubus call network.interface.omr6in4 status | jsonfilter -q -l 1 -e '@.route[@.target="::"].nexthop' | tr -d "\n")
[ "$ipv6_gw" = "::" ] && ipv6_gw='fd80::a00:1'
[ -z "$ipv6_gw" ] && ipv6_gw='fd80::a00:1'
[ "$ipv6_gw" = "::" ] && ipv6_gw='fe80::a00:1'
[ -z "$ipv6_gw" ] && ipv6_gw='fe80::a00:1'
#[ -z "$ipv6_gw" ] && ipv6_gw='fe80::aff:ff01'
ip -6 route add ${ipv6_gw} dev 6in4-omr6in4
ip -6 route replace default via ${ipv6_gw} dev 6in4-omr6in4 > /dev/null 2>&1

View file

@ -11,7 +11,7 @@
}
set_shadowsocks_address() {
config_set "$1" local_address "$2"
uci -q set shadowsocks-libev.$1.local_address="$2"
}
set_ipv6_state() {

View file

@ -10,8 +10,8 @@ if [ "$(uci -q show network | grep omr6in4)" = "" ]; then
set network.omr6in4.multipath=off
set network.omr6in4.ipaddr=10.255.255.2
set network.omr6in4.peeraddr=10.255.255.1
set network.omr6in4.gateway=fd80::a00:1
set network.omr6in4.ip6addr='fd80::a00:2/128'
set network.omr6in4.gateway=fe80::a00:1
set network.omr6in4.ip6addr='fe80::a00:2/128'
set network.omr6in4.auto='0'
commit network
EOF
@ -27,7 +27,7 @@ fi
if [ "$(uci -q get network.omr6in4.ip6addr)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set network.omr6in4.ip6addr=fd80::a00:2
set network.omr6in4.ip6addr=fe80::a00:2
commit network
EOF
fi