set the static ip to tailscale assigned ip
This commit is contained in:
2
Makefile
2
Makefile
@@ -8,7 +8,7 @@ LUCI_TITLE:=LuCI for Tailscale
|
||||
LUCI_DEPENDS:=+tailscale +jsonfilter +ucode
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_VERSION:=1.0.2
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Tailscale is a zero config VPN for building secure networks.
|
||||
|
||||
```shell
|
||||
opkg update
|
||||
opkg install --force-overwrite luci-app-tailscale_*_all.ipk
|
||||
opkg install --force-overwrite /tmp/luci-app-tailscale_*_all.ipk
|
||||
```
|
||||
|
||||
--------------
|
||||
|
||||
@@ -62,8 +62,11 @@ custom_instance() {
|
||||
do
|
||||
echo "tailscale interface $i is started!"
|
||||
if [ -z "$(uci -q get network.$i)" ]; then
|
||||
ts_ip=$(tailscale ip -4)
|
||||
uci set network.$i=interface
|
||||
uci set network.$i.proto='static'
|
||||
uci set network.$i.ipaddr=$ts_ip
|
||||
uci set network.$i.netmask='255.0.0.0'
|
||||
uci set network.$i.device=$i
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user