update 2025-05-09 20:43:07
This commit is contained in:
parent
d05b7f2d5a
commit
0b2f93662a
|
@ -8,7 +8,7 @@ LUCI_TITLE:=LuCI for Tailscale
|
||||||
LUCI_DEPENDS:=+tailscale
|
LUCI_DEPENDS:=+tailscale
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
|
|
||||||
PKG_VERSION:=1.2.5
|
PKG_VERSION:=1.2.6
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,9 @@ return view.extend({
|
||||||
|
|
||||||
const addr_info = iface.addr_info || [];
|
const addr_info = iface.addr_info || [];
|
||||||
addr_info.forEach(addr => {
|
addr_info.forEach(addr => {
|
||||||
if (addr.family === 'inet') {
|
if (addr.family === 'inet' && !parsedInfo.ipv4) {
|
||||||
parsedInfo.ipv4 = addr.local;
|
parsedInfo.ipv4 = addr.local;
|
||||||
} else if (addr.family === 'inet6') {
|
} else if (addr.family === 'inet6' && !parsedInfo.ipv6) {
|
||||||
parsedInfo.ipv6 = addr.local;
|
parsedInfo.ipv6 = addr.local;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -57,10 +57,10 @@ if [ -z "$(uci -q get network.tailscale)" ]; then
|
||||||
uci add_list network.ts_lan.ports=$port || revert_exit "Failed to add port $port."
|
uci add_list network.ts_lan.ports=$port || revert_exit "Failed to add port $port."
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
ts_ip=$(tailscale ip -4)
|
|
||||||
[ -n "$(uci batch <<-EOF 2>&1
|
[ -n "$(uci batch <<-EOF 2>&1
|
||||||
set network.tailscale.proto='static'
|
set network.tailscale.proto='static'
|
||||||
set network.tailscale.ipaddr=$ts_ip
|
set network.tailscale.ipaddr=$(tailscale ip -4)
|
||||||
|
add_list network.tailscale.ip6addr=$(tailscale ip -6)
|
||||||
set network.tailscale.netmask='255.0.0.0'
|
set network.tailscale.netmask='255.0.0.0'
|
||||||
set network.tailscale.device=$ts0
|
set network.tailscale.device=$ts0
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue