Tailscale - 搭建属于自己的虚拟局域网
The quickest way to get started is using docker-compose.
mkdir -p /usr/local/dockerized/tailscale ; cd $_
git svn clone https://github.com/y0ngb1n/dockerized/trunk/tailscale .
docker-compose up -d
🌐 加入网络前 | 🛰 加入网络后 |
---|---|
version: '3.3'
services:
tailscale:
image: "y0ngb1n/tailscale:latest"
container_name: "tailscale"
restart: "unless-stopped"
privileged: true
network_mode: "host"
hostname: "homelab"
cap_add:
- NET_ADMIN
- SYS_ADMIN
volumes:
- "/dev/net/tun:/dev/net/tun"
- "/var/lib/tailscale:/var/lib/tailscale"
logging:
driver: "json-file"
options:
max-size: "1m"
1️⃣ 启动 tailscale
服务
$ docker-compose up -d
2️⃣ 授权,须将下面提示的链接粘贴到浏览器中进行登录授权
$ docker exec -it tailscale tailscale up
To authenticate, visit:
https://login.tailscale.com/a/u50138fcc586
Success. # 组网成功
3️⃣ 打开 Tailscale 的管理台 查看组网明细