Board logo

標題: Tailscale for everyone [打印本頁]

作者: 张无忌    時間: 2025-12-2 09:31     標題: Tailscale for everyone

本帖最後由 张无忌 於 2026-3-1 03:09 編輯

Tailscale 可以安装在 devices,如 macOS,Windows,Linux,iOS,Android,路由器(OpenWrt,pfSence,GL.iNet) 等等,安装后有每个 device 都有自己的 internal IP=100.x.x.x,公网 / 非公网 IP 都能安装,然后用 browser 100.x.x.x 可以看到 device,有些用 PuTTY 连 100.x.x.x 就可以连到 login,每一个 device 都可以连到对方。

香港与大陆的 devices 都可以连,香港或大陆家里非公网 IP 都可以用;Tailscale 其中有一个 feature 就是 exit note,大陆就是通过 exit note 在香港可以看到 CCTV5;而香港 Tailscale exit node 可以让大陆的 Tailscale 看到香港的 YouTube。

Reference:
[1] https://tailscale.com/
作者: 张无忌    時間: 2025-12-2 09:31

本帖最後由 张无忌 於 2026-5-2 00:47 編輯

Table of contents

Tailscale 的发展
零成本,香港和大陆电脑都装 Tailscale,能看到对方的网台
Tailscale peer relays
tailscale -h
大陆 SSH 到美国 IP 被 blocked 怎样办?

GL.iNet:
大陆非公网 GL.iNet Tailscale 可以让香港亲友看 CCTV5,CCTV5+ 和 CCTV16
Tailscale subnets and exit node on GL.iNet

OpenWrt:
非公网/公网 Tailscale on OpenWrt with subnets and exit node

Linux VPS:
Vultr 安装 Tailscale with exit node
腾讯云 Tailscale exit node
大陆用 Tailscale 需要用大陆自建 DERP 中转服务器

MikroTik container
HK Tailscale works on MikroTik hAP ac3 container
大陆 MikroTik RB5009UG+S+ container with Tailscale exit node

Others:
香港怎样看 CCTV5?
大陆非公网 IP 怎样看 YouTube?
开 Tailscale,看不到 home OpenWrt


目录 Tailscale for everyone


How I Guarantee a Direct Connection with Tailscale https://www.youtube.com/watch?v=wkBSjT1hO6k
作者: 张无忌    時間: 2025-12-2 09:32

本帖最後由 张无忌 於 2026-2-20 10:23 編輯

香港怎样看 CCTV5?

香港有电脑 Windows / macOS,可以安装 Tailscale,便有第一 device IP=100.x.x.1。大陆可以订购阿里云或腾讯云,然后安装 Tailscale。

在大陆如果没有其他 exit node,就要租用阿里云或腾讯云 Linux VPS,安装了 Tailscale + exit node。现在香港和大陆都有 Tailscale devices,在香港利用大陆的 exit node,就把香港 IP 变成 大陆 IP,你就可以看 CCTV5。

大家看看 腾讯云 Tailscale exit node大陆非公网 GL.iNet Tailscale 可以让香港亲友看 CCTV5,CCTV5+ 和 CCTV16


目录 Tailscale for everyone
作者: 张无忌    時間: 2025-12-2 09:33

本帖最後由 张无忌 於 2025-12-18 11:00 編輯

大陆非公网 IP 怎样看 YouTube?

一般大陆都用机场看 YouTube,如果不会搞机场,电脑可以安装 Tailscale,在香港家里(电脑 或 路由器)也安装 Tailscale + exit node,那么在大陆的 Tailscale,启动 exit note 去香港,那么大陆电脑 IP 转为香港 IP,这样就可以看到 YouTube。

可以看看 Vultr 安装 Tailscale with exit node

Reference:
[1] 【vpn】永久免费vpn,用tailscale搭建一个速度超快的节点,ip不会封,tailscale组网教程

Others:
【14】Tailscale搭建VPN翻墙教程,Exit node 使用与安装,支持 Win/Mac/Linux/iOS/安卓。



目录 Tailscale for everyone
作者: jackwong717    時間: 2025-12-2 10:13

回復 1 #张无忌

nas度玩左幾年了,
上大陸玩1,2日,酒店wifi無問題,
我手機差唔多在香港都長期連住,
用公司wifi同過慮廣告。

poco x6pro
作者: 口o口    時間: 2025-12-2 10:23

Tailscale 有一個缺點....就係慢.....
如在香港本地用又用 OpenWrt,pfSence ,opnsense, istoreos ...
直接用WG比較好...
作者: normalyan    時間: 2025-12-2 10:32

Tailscale 有一個缺點....就係慢.....
如在香港本地用又用 OpenWrt,pfSence ,opnsense, istoreos ...
直接 ...
口o口 發表於 2025-12-2 10:23

Tailscale主要係畀冇ip嘅人士使用, 好似5G上網, 大陸小區等等啲人...
作者: jackwong717    時間: 2025-12-2 11:26

回復 1 #张无忌
打通埋subnet就直接用內網ip,中記佢100.xxxxxxx個ip做咩呀!



poco x6pro
作者: 张无忌    時間: 2025-12-2 12:13

回覆 5#8# jackwong717

谢谢 @jackwong717 的意见。

在大陆可以用大陆卡,安装了 Tailscale + exit node [1],可以连香港家里的 NAS,还有可以上 YouTube,WhatsApp,还有 subnet 我还没有用,不过谢谢记的意见。

你说的 subset 是不是
  1. tailscale up --advertise-routes=192.168.1.0/24 --accept-routes --advertise-exit-node
複製代碼
..

Reference:
[1] 【🔨 VPN不求人#1】【聊一聊Tailscale ! 】 | 如何在OpenWRT上配置Tailscale並管理設置
作者: jackwong717    時間: 2025-12-2 14:26

回復 9 #张无忌



poco x6pro
作者: jackwong717    時間: 2025-12-2 14:58

本帖最後由 jackwong717 於 2025-12-2 07:35 編輯

我剛測完公司無VPN下479Mb/s上351Mb/s
Tailscale Vpn上下有200Mb/s
都唔算慢啦    (手機測試)
作者: naclts    時間: 2025-12-2 15:10

Tailscale 有一個缺點....就係慢.....
如在香港本地用又用 OpenWrt,pfSence ,opnsense, istoreos ...
直接 ...
口o口 發表於 2025-12-2 10:23



Tailscale 慢可能係因為你個 environment 做唔到直連
只能 relay
咁只能話係唔好彩
我自己用 Tailscale 行到 direct
上到 700 Mbps
作者: 口o口    時間: 2025-12-2 16:38

咁多數係我唔好彩
作者: javacomhk    時間: 2025-12-2 16:46

你響大陸用咗 TailScale 幾耐呀?裝過的乜機呀? 仲話 For Everyone???
作者: 张无忌    時間: 2025-12-3 11:18

本帖最後由 张无忌 於 2025-12-3 03:41 編輯
你響大陸用咗 TailScale 幾耐呀?裝過的乜機呀? 仲話 For Everyone???
javacomhk 發表於 2025-12-2 08:46


我在大陆用了 Tailscale 一个星期,之前用 ZeroTier,但是也不多。现在安装了 10 台 devices,美国、大陆,正常工作,不过有些机 off lines。我认为 Tailscale 不错,还可以用 exit nodes (VPN),我朋友可以看到 CCTV5。

图1:
[attach]2507145[/attach]
作者: javacomhk    時間: 2025-12-3 11:36

咁你繼續用哇,睇吓幾時瓜啦!
作者: normalyan    時間: 2025-12-3 12:51

師兄可以試下玩cf argo tunnel workers, 好似穩定好多  同快好多的
作者: Eric j    時間: 2025-12-3 14:39

師兄可以試下玩cf argo tunnel workers, 好似穩定好多  同快好多的
normalyan 發表於 2025-12-3 12:51

Ching請問tailscale 怎樣行argo tunnel ?

via HKEPC IR 5.1.14 - Android(5.1.2F)
作者: stephenwong    時間: 2025-12-3 15:26

Ching請問tailscale 怎樣行argo tunnel ?

via HKEPC IR 5.1.14 - Android(5.1.2F)
Eric j 發表於 2025-12-3 14:39


佢係話 CloudFlare 呀!
作者: Eric j    時間: 2025-12-3 17:44

哦哦原來咁明白啦!

via HKEPC IR 5.1.14 - Android(5.1.2F)
作者: 张无忌    時間: 2025-12-3 19:54

本帖最後由 张无忌 於 2025-12-3 12:25 編輯

开 Tailscale,看不到 home OpenWrt

以前没有用 Tailscale,看 OpenWrt LuCI or SSH 都可以,但是开了 Tailscale,它们全看不到,要关了就可以。


目录 Tailscale for everyone
作者: fakeman    時間: 2025-12-4 01:21

咁你繼續用哇,睇吓幾時瓜啦!
javacomhk 發表於 2025-12-3 11:36



    其實即係變返好似以前一開始佢狂推嘅 wireguard 一樣......
作者: javacomhk    時間: 2025-12-4 08:36

其實即係變返好似以前一開始佢狂推嘅 wireguard 一樣......
fakeman 發表於 2025-12-3 17:21



    我嘅經驗係響大陸用任何 VPN 都要用 流動數據網絡,雖然比 fixed line 貴或慢的,但一定穩陣好多。
香港呢邊如果用 TailScale 就可以用 家居寛頻或 Fixed line。
作者: 张无忌    時間: 2025-12-9 22:49

本帖最後由 张无忌 於 2025-12-11 04:13 編輯

Vultr 安装 Tailscale with exit node

在大陆到美国安装 Tailscale with exit node on Vultr,可以在美国数据出口(美国 IP)。

我用 Debian 13,先 update
  1. apt update -y
複製代碼
然后下载 Tailscale link
  1. curl -fsSL https://tailscale.com/install.sh | sh
複製代碼
再 tailscale up
  1. tailscale up

  2. To authenticate, visit:

  3.         https://login.tailscale.com/a/1824988d01d3ed
複製代碼
我用 Google account
  1. Success.
複製代碼
Enable IP forwarding
  1. echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
  2. echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
  3. sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
複製代碼
输入 tailscale up --accept-routes --advertise-exit-node
  1. root@vultr:~# tailscale up --accept-routes --advertise-exit-node
  2. Warning: IP forwarding is disabled, subnet routing/exit nodes will not work.
  3. See https://tailscale.com/s/ip-forwarding
  4. Warning: UDP GRO forwarding is suboptimally configured on enp1s0, UDP forwarding throughput capability will increase with a configuration change.
  5. See https://tailscale.com/s/ethtool-config-udp-gro
複製代碼
在 Tailscale dashboard,enable exit node
图1:
[attach]2508205[/attach]

图2:Tailscale dashboard,看到 exit node enabled
[attach]2508056[/attach]


目录 Tailscale for everyone
作者: 张无忌    時間: 2025-12-16 09:23

本帖最後由 张无忌 於 2025-12-16 08:23 編輯

在大陆我用 Tailscale 都把我的非公网路由器 GL.iNet and OpenWrt 弄好,有 subnets and exit done,我香港几个朋友在晚间高峰期,都能很流畅看到 CCTV5!!!!!

估计有部分香港人经常去大陆和香港两地,对大陆非公网路由器能在香港看到 CCTV5,会加紧把大陆的路由器加 Tailscale exit node。
作者: freshtomato    時間: 2025-12-16 10:46

在大陆我用 Tailscale 都把我的非公网路由器 GL.iNet and OpenWrt 弄好,有 subnets and exit done,我香港 ...
张无忌 發表於 2025-12-16 01:23


想問吓你在大陸用 www.natchecker.com
你的NAT 是 NAT1/2/3/4?

在大陸你是光猫拿IP 或 自己Router pppoe?

Thanks!
作者: mlyu    時間: 2025-12-16 13:07

[youtube]cmm8zjQ8HBc[/youtube]

之前見有人咁搭 VPN, 唔知有冇差唔多方法搭 VPN 入大陸?
佢連 hosting 都唔使, 用 cloudflare 搞掂
但大陸唔知有冇相關配置
作者: rabbit36591    時間: 2025-12-16 13:44

Tailscale 似乎唔易用呢
作者: 张无忌    時間: 2025-12-16 16:20

想問吓你在大陸用
你的NAT 是 NAT1/2/3/4?

在大陸你是光猫拿IP 或 自己Router pppoe?

Thanks! ...
freshtomato 發表於 2025-12-16 02:46


依据测试,我现在大陆公网是 NAT3,公网 IP 是通过自己路由器 PPPoE 获得。
作者: 张无忌    時間: 2025-12-16 16:31

Tailscale 似乎唔易用呢
rabbit36591 發表於 2025-12-16 05:44


很容易用的,你用香港手机先注册 Tailscale,然后登入大陆的 exit node,就可以看到 CCTV5 了。现在香港HKEPC member 想测试,就 PM 给我,然后我把 link 发给你,你就可以看大陆 CCTV5。
作者: kennylam777    時間: 2025-12-16 16:48

本帖最後由 kennylam777 於 2025-12-16 16:51 編輯

雖然TailScale響中國用得, 但始終都係WireGuard UDP底, 用一陣就會斷流, 當然TailScale會自己搵過另一個port, 但都仲係斷, 我試過, 北京或廣東聯通, 駁Wireguard都係要食33% Packet loss, IPv6如是。

係開就唔好淨係用IPv4 NAT, 開埋IPv6啦, 多一粒IP多少少機會。
作者: 张无忌    時間: 2025-12-16 19:31

雖然TailScale響中國用得, 但始終都係WireGuard UDP底, 用一陣就會斷流, 當然TailScale會自己搵過另一個por ...
kennylam777 發表於 2025-12-16 08:48


Tailscale 正常用 WireGuard UDP,是最快,如果被 blocked,它就自动改用 TCP 443(DERP),速度比较慢,但是看 CCTV5 还可以的。
作者: 张无忌    時間: 2025-12-17 14:04

本帖最後由 张无忌 於 2026-2-14 04:01 編輯

Tailscale 的发展

感谢 @fakeman 从 2025 年初从 MikroTik 再次进入 OpenWrt,第一个大陆路由器 GL.iNet GL-MT6000,最初用 Admin Panel,就用 OpenWrt*,用过 ZeroTier and Tailscale,最初感觉 Tailscale 挺难用就停下来,改用 ZeroTier,能把广东非公网与华东的路由器连起来。

最近发现 GL.iNet Admin Panel 有 ZeroTier 和 Tailscale,GL.iNet ZeroTier 也能用,但是 Tailscale 也没有用;但互联网也说能把非公网路由器连起来,基于 WireGuard UDP,还有一个 exit node,那个什么 exit node 都不懂。

ZeroTier 大约 2011 年开始运营;WireGuard 协议从 2015 年左右开发,2016 年首次公开代码,2020 年进入 Linux 内核;Tailscale 在 2019 年成立,然后基于 WireGuard 推出了自己的 Mesh VPN 服务。

Tailscale 早于 2021 年中期 就已经有 exit node 这个功能,在 2022 年 10月 HKEPC @fakeman 提及过 tailscale [1],而 Apple 2023 年用在 Apple TV (tvOS 17+),GL.iNet 在同年也有 Tailscale (custom  exit node),OpenWrt 可能比 Apple and GL.iNet 更加早。

现在一般用家,在香港就用 Apple TV (有 exit node) 和 GL.iNet,在大陆用 GL.iNet (半 exit node) (GL-MT6000,GL-MT5000,GL-MT3600BE,GL-MT3000,GL-BE6500,GL-BE3600 等),用 GL.iNet 要用 PuTTY 进入 OpenWrt* Linux shell,输入 "tailscale up --advertise-routes=192.168.8.0/24,192.168.55.0/24 --snat-subnet-routes=false --advertise-exit-node --reset", 而 "192.168.8.0/24,192.168.55.0/24" 要根据实际改动 [2],就可以全 exit node;而用 OpenWrt* 就用我的帖子,一样可以做到全 exit node [3]。

在大陆非公网的 GL.iNet 路由器都能做出大陆 exit node (大陆 IP),在香港就能看 CCTV5 和其他!!!!!

Tailscale
都可以下载和运行,假如大陆家里或办公室有一台 macOS,Windows 或 Linux (Ubuntu / Debian)都可以安装 Tailscale,里面有 exit node,你可以把 desktop exit node shared your friend with his/her email. 对方收到 Tailscale 邀请,你香港的朋友,选 exit node 就可以看到看到 CCTV5 或其他。

我在 Tailscale exit node on OpenWrt 更懂和做好,把 GL.iNet 一起弄好,非常感谢日本作者 [4]。


References:
[1] Asus AX82U router 上使用 Tailscale Mesh VPN 分享
[2] GL.iNet GL-MT6000 with Tailscale subnets and exit node
[3] 非公网/公网 Tailscale on OpenWrt with subnets and exit node
[4] openwrtにtailscaleを追加する



目录 Tailscale for everyone
作者: rabbit36591    時間: 2025-12-17 17:40

回覆 30# 张无忌

師兄,先謝過.
作者: 张无忌    時間: 2025-12-18 19:53

本帖最後由 张无忌 於 2025-12-25 05:00 編輯

零成本,香港和大陆电脑都装 Tailscale,能看到对方的网台

香港电脑和大陆电脑都安装 Tailscale,不关是公网 IP 或非公网 IP 都可以。

香港可以看到 CCTV5,CCTV5+,QQ Music
大陆可以看到 YouTube,WhatsApp

打开 Tailscale 下载网页
图1:https://tailscale.com/download
[attach]2509098[/attach]

图2:香港或大陆其中一方电脑 Desktop run exit node
[attach]2509073[/attach]

假如大陆的电脑打开 run exit node,那么香港就选用大陆的 exit node 为出口(取得大陆 IP),那么在香港的电脑就打开 CCTV5 的网页,如下:
图3:https://tv.cctv.com/live/cctv5/ 大陆 IP 才能看到,香港 IP 看不到。
[attach]2509099[/attach]


目录 Tailscale for everyone
作者: 张无忌    時間: 2025-12-25 12:37

本帖最後由 张无忌 於 2025-12-31 13:00 編輯

HK Tailscale works on MikroTik hAP ac3 container

在香港 MikroTik hAP ac3 container,安装 Tailscale 在 USB drive (container) [1],还启动 exit node,但是速度比较慢,听 YouTube 听歌还可以,但是 subnets 在 hAP ac2 依然有问题,可以 ping 到,要找原因。

Registry URL
  1. /container/config/set registry-url=https://registry-1.docker.io tmpdir=/disk1/pull
複製代碼
..

The basic network of the container
  1. /interface/veth add name=veth3 address=172.16.77.4/24 gateway=172.16.77.1

  2. /interface/bridge add name=dockers
  3. /ip/address add address=172.16.77.1 interface=dockers
  4. /interface/bridge/port add bridge=dockers interface=veth3

  5. /ip/firewall/nat add chain=scrnat action=masquerade src-address=172.16.77.0/24
複製代碼
..

Envlists
  1. /container/envs/add list=tailscale key=TS_HOSTNAME value="ac3"
  2. /container/envs/add list=tailscale key=TS_STATE_DIR value="/var/lib/tailscale"
  3. /container/envs/add list=tailscale key=CAP_ADD value="NET_ADMIN"
  4. /container/envs/add list=tailscale key=TS_USERSPACE value="true"
  5. /container/envs/add list=tailscale key=TS_EXTRA_ARGS value="--accept-routes --advertise-exit-node"
  6. /container/envs/add list=tailscale key=TS_ROUTES value="172.16.77.0/24"
複製代碼
..

Pull image
  1. /container/add remote-image="tailscale/tailscale:latest" check-certificate=no name="tailscale" interface=veth3 root-dir=disk1/tailscale envlists=tailscale logging=yes start-on-boot=yes
複製代碼
..

Status
  1. /container print
  2. 2 ... status=extracting

  3. /container print
  4. 2 ... status=stopped
複製代碼
..

图1:Status 在运行中
[attach]2509833[/attach]

图2:成功,import done
[attach]2509834[/attach]

图3:Status stop again, 点击 "Start"
[attach]2509835[/attach]

图4:出现 https://login ...,点击 https://login ...
[attach]2509836[/attach]

图5:Copy message to a browser
[attach]2509837[/attach]

图6:Tailscale 可以 exit node
[attach]2509840[/attach]

Container reference
  1. 2 R file="" remote-image="tailscale/tailscale:latest" check-certificate=no
  2.      name="tailscale" tag="registry-1.docker.io/tailscale/tailscale:latest"
  3.      os="linux" arch="arm" interface=veth3 envlists=tailscale cmd="" entrypoint=""
  4.      stop-signal=15-SIGTERM root-dir=/disk1/tailscale mounts="" dns="" hostname=""
  5.      domain-name="" workdir="" logging=yes start-on-boot=no
  6.      auto-restart-interval=none memory-high=unlimited memory-current=54.3MiB
  7.      devices="" passed-devs="" config-json=
複製代碼
..

New USB drive
  1. /disk format usb1 file-system=ext4 mbr-partition-table=no
複製代碼
..

Reference:
[1] https://hub.docker.com/r/tailscale/tailscale


目录 Tailscale for everyone
作者: 张无忌    時間: 2025-12-26 19:13

本帖最後由 张无忌 於 2026-3-28 06:03 編輯

大陆 MikroTik RB5009UG+S+ container with Tailscale exit node

RouterOS 7.22.1

大陆安装 MikroTik RB5009UG+S+ container 一般是装不到,需要主路由要有
1)科学上网(PassWall / OpenClash / HomeProxy)或
2)HK(LAN / Wi-Fi),用 另外一个 MikroTik 做 HK LAN and HK Wi-Fi。

Registry URL
  1. /container/config/set registry-url=https://registry-1.docker.io tmpdir=/usb1/pull
複製代碼
..

The basic network of the container
  1. /interface/veth add name=veth1 address=172.17.0.2/24 gateway=172.17.0.1

  2. /interface/bridge add name=dockers
  3. /ip/address add address=172.17.0.1/24 interface=dockers
  4. /interface/bridge/port add bridge=dockers interface=veth1

  5. /ip/firewall/nat
  6. add chain=scrnat action=masquerade src-address=172.17.0.0/24
複製代碼
..

Pull image
  1. /container/add remote-image="tailscale/tailscale:latest" check-certificate=no name="tailscale" interface=veth1 root-dir=usb1/tailscale envlists=tailscale logging=yes
複製代碼
..

Envlists
  1. /container/envs/add list=tailscale key=TS_HOSTNAME value="RB5009"
  2. /container/envs/add list=tailscale key=TS_STATE_DIR value="/var/lib/tailscale"
  3. /container/envs/add list=tailscale key=CAP_ADD value="NET_ADMIN"
  4. /container/envs/add list=tailscale key=TS_USERSPACE value="true"
  5. /container/envs/add list=tailscale key=TS_EXTRA_ARGS value="--accept-routes --advertise-exit-node"
  6. /container/envs/add list=tailscale key=TS_ROUTES value="192.168.88.0/24,172.17.0.0/24"
複製代碼
..

Pull image
  1. /container/add remote-image="tailscale/tailscale:latest" check-certificate=no name="tailscale" interface=veth1 root-dir=usb1/tailscale envlists=tailscale logging=yes start-on-boot=yes
複製代碼
..

之前经常失败,主要没有 "check-certificate=no",default "yes",自从改了 yes-> no 就没事。

其他与上一条帖一样。

图1:Tailscale
[attach]2509887[/attach]


目录 Tailscale for everyone
作者: nexstar    時間: 2025-12-26 21:21

深圳聯通/電信
個 5G  MBIM modem 唔係成日connect 到
有咩APN 一定得? 3gnet/ wonet/ctnet
定要轉移動?
駁到就好快

** 出左廣東省
作者: 张无忌    時間: 2025-12-27 10:27

本帖最後由 张无忌 於 2025-12-27 02:29 編輯

回覆 38# nexstar

你说到 5G modem,如果在大陆用应该没有问题(连 CCTV 都没问题),是否连香港是否出问题?
作者: 张无忌    時間: 2026-2-3 17:52

本帖最後由 张无忌 於 2026-2-4 11:18 編輯

大陆用 Tailscale 需要用大陆自建 DERP 中转服务器

如果大陆用 Tailscale,就算在外面接 Tailscale 都要用 DERP (Designated Encrypted Relay for Packets) 中转服务器,一般的官方的 DERP 大陆是没有的,在香港、日本、新加坡、欧美有官方的 DERP,那么大陆就需要自己建立的 DERP。在香港使用 Tailscale,速度非常块,只有不去大陆网就非常好!!!如果香港 Tailscale 连大陆 Tailscale exit exit 的话,就速度不稳定,主要(中国)香港与(中国)大陆中有 GFW。

大陆家里的 GL.iNet GL-MT6000 (或者同类的 GL.iNet 路由器)或 OpenWrt 安装 Tailscale subnets and exit node,手机或电脑安装 Tailscale,最好能大陆建立自己 DERP 服务器,在大陆家里有科学上网功能,那么在大陆外面要连接大陆家里的 Tailscale subnets,可以看到家里的 NAS,再连上 Tailscale exit node,就可以在家里科学上网。

大陆要安装一个自己的 DERP 服务器是非常重要,不需要大陆以外的官方 DERP。

现在我参考大陆的 Tailscale [1],

图1:要 Tailscale 官方 DERP
[attach]2513967[/attach]

图2:用大陆自建 DERP,不需要官方 DERP
[attach]2513968[/attach]

A. 自建 DERP [2]

A1. 更新包管理工具,获取最新软件列表
  1. apt update
複製代碼
..

A2. 进入 root 用户目录
  1. apt install wget git openssl curl -y
複製代碼
..

B. 搭建 Go 语言环境

B1. 下载 Go 语言压缩包(大陆地区)
  1. wget https://golang.google.cn/dl/go1.25.0.linux-amd64.tar.gz
複製代碼
..

B2. 解压 Go 压缩包到 /usr/local/ 路径下
  1. tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gz
複製代碼
..

B3. 将 Go 语言持久化加入系统环境变量,并立即生效
  1. echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile
  2. source /etc/profile
複製代碼
..

B4. *大陆地区切换使用内地下载源 (Go 1.13 及以上)
  1. go env -w GO111MODULE=on
  2. go env -w GOPROXY=https://goproxy.cn,direct
複製代碼
..

C. 搭建 DERP 服务

C1. 编译并安装 tailscale derper 模块
  1. go install tailscale.com/cmd/derper@latest
複製代碼
..

C2. 创建文件夹并移动 derper 到合适位置
  1. mkdir /usr/local/derp
  2. mkdir /usr/local/derp/bin

  3. mv /root/go/bin/derper /usr/local/derp/bin
複製代碼
..

C3. 创建系统服务配置文件(务必完整复制粘贴这串多行指令,并替换自己服务器的 IPv4 地址)
  1. cat > /etc/systemd/system/derper.service << EOF
  2. [Unit]
  3. Description=Tailscale DERP Server
  4. After=network.target
  5. Wants=network.target

  6. [Service]
  7. User=root
  8. Group=root
  9. ExecStart=/usr/local/derp/bin/derper -certmode=manual -certdir=/usr/local/derp -hostname=你的服务器公网IPv4地址 -a :33331 -http-port=33332 --verify-clients
  10. Restart=on-failure
  11. RestartSec=5s

  12. [Install]
  13. WantedBy=multi-user.target
  14. EOF
複製代碼
..

C4. 启用并立即启动 DERP 服务
  1. systemctl enable derper
  2. systemctl start derper
複製代碼
..

C5. 检查 DERP 服务运行状态,并点击键盘 q 键退回命令行
  1. systemctl status derper
複製代碼
..

C5. 进入 DERP 目录检查生成的 HTTPS 证书密钥
  1. cd /usr/local/derp

  2. ls
複製代碼
..

D. 配置 Linux 防火墙

D1. 安装 ufw 防火墙
  1. apt install ufw
複製代碼
..

D2. 开放必要端口,如果你的云服务器上还自定义了其他服务,请开放对应的端口
  1. ufw allow 22
  2. ufw allow 33331
  3. ufw allow 33332
  4. ufw allow 3478
複製代碼
..

D3. 启用 ufw 防火墙
  1. ufw enable
複製代碼
..

E. 测试 DERP 服务是否上线

E1. 在浏览器访问以下网址,忽略不安全提示,点击继续访问,若出现 DERP 页面,说明服务已上线
  1. https://你的服务器公网IPv4地址:33331
複製代碼
..

F. 将服务器加入 Tailscale 局域网

F1. 安装 Tailscale
  1. curl -fsSL https://tailscale.com/install.sh | sh
複製代碼
..

F2. 开启 Tailscale
  1. tailscale up
複製代碼
复制命令行中出现的https://login.tailscale.com/x/xxxxxxxx网址,粘贴到浏览器中,登录后即可将服务器加入 Tailscale 网络

G. 使用自建 DERP 替代官方 DERP

G1. 进入 Tailscale 控制台,点击顶部菜单栏的“Access controls”,点击“JSON editor”,在第一层大括号内粘贴以下内容,之后点击底部“Save”保存更改
  1. "derpMap": {
  2.                 "OmitDefaultRegions": false,
  3.                 "Regions": {
  4.                         "900": {
  5.                                 "RegionID":   900,
  6.                                 "RegionCode": "mcn",
  7.                                 "RegionName": "Mainland China",
  8.                                 "Nodes": [
  9.                                         {
  10.                                                 "Name":             "900",
  11.                                                 "RegionID":         900,
  12.                                                 "DERPPort":         33331,
  13.                                                 "IPv4":             "你的服务器公网IPv4地址",
  14.                                                 "InsecureForTests": true,
  15.                                         },
  16.                                 ],
  17.                         },
  18.                 },
  19.         },
複製代碼
..

大陆 Tailscale Mainland China (mcn) 测试

Listing 1:Exit node=none,console=大陆家里,mcn 有 18.8ms
  1. C:\Users\Nancy>tailscale netcheck
  2. 2026/02/01 16:11:19 portmap: monitor: gateway and self IP changed: gw=192.168.55.1 self=192.168.55.181

  3. Report:
  4.         * Time: 2026-02-01T08:11:21.262181Z
  5.         * UDP: true
  6.         * IPv4: yes, 36.56.xx.yy:53433
  7.         * IPv6: yes, [240e:361:422d:600:f15a:6b50:36eb:6451]:53434
  8.         * MappingVariesByDestIP: false
  9.         * PortMapping:
  10.         * CaptivePortal: false
  11.         * Nearest DERP: Mainland China
  12.         * DERP latency:
  13.                 - mcn: 18.8ms  (Mainland China)
  14.                 - sfo: 148.1ms (San Francisco)
  15.                 - hkg: 153.6ms (Hong Kong)
  16.                 - nue: 163.1ms (Nuremberg)
  17.                 - lax: 166.4ms (Los Angeles)
  18.                 - hel: 185.3ms (Helsinki)
  19.                 - dfw: 185.8ms (Dallas)
  20.                 - tor: 190.9ms (Toronto)
  21.                 - ord: 192.9ms (Chicago)
  22.                 - hnl: 195.6ms (Honolulu)
  23.                 - mia: 205.2ms (Miami)
  24.                 - nyc: 205.2ms (New York City)
  25.                 - sea: 209.9ms (Seattle)
  26.                 - iad: 210.2ms (Ashburn)
  27.                 - tok: 219.3ms (Tokyo)
  28.                 - fra: 220.1ms (Frankfurt)
  29.                 - lhr: 220.4ms (London)
  30.                 - par: 223.4ms (Paris)
  31.                 - den: 223.7ms (Denver)
  32.                 - ams: 230.9ms (Amsterdam)
  33.                 - waw: 239.1ms (Warsaw)
  34.                 - mad: 240.6ms (Madrid)
  35.                 - sin: 245.5ms (Singapore)
  36.                 - syd: 288.4ms (Sydney)
  37.                 - dbi: 311.9ms (Dubai)
  38.                 - sao: 345ms   (São Paulo)
  39.                 - nai: 362.9ms (Nairobi)
  40.                 - blr: 375.8ms (Bengaluru)
  41.                 - jnb: 391.7ms (Johannesburg)

  42. C:\Users\Nancy>
複製代碼
..

Listing 2: Exit node=none,console=手机中国移动
  1. C:\Users\Nancy>tailscale netcheck
  2. 2026/02/04 19:10:16 portmap: monitor: gateway and self IP changed: gw=172.20.10.1 self=172.20.10.6

  3. Report:
  4.         * Time: 2026-02-04T11:10:21.7652217Z
  5.         * UDP: true
  6.         * IPv4: yes, 39.144.xx.xx:51150
  7.         * IPv6: yes, [2409:8931:4240:49d1:f965:9d57:39a1:96f]:55179
  8.         * MappingVariesByDestIP: true
  9.         * PortMapping:
  10.         * CaptivePortal: false
  11.         * Nearest DERP: Mainland China
  12.         * DERP latency:
  13.                 - mcn: 50.1ms  (Mainland China)
  14.                 - hkg: 80.9ms  (Hong Kong)
  15.                 - sin: 102.1ms (Singapore)
  16.                 - tok: 110.1ms (Tokyo)
  17.                 - blr: 148.3ms (Bengaluru)
  18.                 - lax: 221.9ms (Los Angeles)
  19.                 - sfo: 234.7ms (San Francisco)
  20.                 - hel: 234.8ms (Helsinki)
  21.                 - sea: 236.9ms (Seattle)
  22.                 - nue: 237.1ms (Nuremberg)
  23.                 - syd: 249.8ms (Sydney)
  24.                 - dfw: 262.6ms (Dallas)
  25.                 - den: 273.9ms (Denver)
  26.                 - nyc: 276.6ms (New York City)
  27.                 - ord: 277.8ms (Chicago)
  28.                 - iad: 288ms   (Ashburn)
  29.                 - hnl: 289.1ms (Honolulu)
  30.                 - tor: 294.2ms (Toronto)
  31.                 - mia: 300.5ms (Miami)
  32.                 - ams: 301.3ms (Amsterdam)
  33.                 - par: 301.9ms (Paris)
  34.                 - fra: 319.6ms (Frankfurt)
  35.                 - waw: 322.9ms (Warsaw)
  36.                 - nai: 334.2ms (Nairobi)
  37.                 - dbi: 341.8ms (Dubai)
  38.                 - lhr: 352.9ms (London)
  39.                 - mad: 368.3ms (Madrid)
  40.                 - sao: 423.4ms (São Paulo)
  41.                 - jnb: 442.2ms (Johannesburg)

  42. C:\Users\Nancy>
複製代碼
..

Listing 3: Exit node=vultr (美国),console=大陆家里
  1. C:\Users\Nancy>tailscale netcheck

  2. Report:
  3.         * Time: 2026-01-29T06:05:44.1478685Z
  4.         * UDP: false
  5.         * IPv4: (no addr found)
  6.         * IPv6: no, but OS has support
  7.         * MappingVariesByDestIP:
  8.         * PortMapping:
  9.         * CaptivePortal: false
  10.         * Nearest DERP: Los Angeles
  11.         * DERP latency:
  12.                 - lax: 148.1ms (Los Angeles)
  13.                 - sfo: 159.6ms (San Francisco)
  14.                 - sea: 176.3ms (Seattle)
  15.                 - dfw: 180ms   (Dallas)
  16.                 - tor: 196.1ms (Toronto)
  17.                 - iad: 201.9ms (Ashburn)
  18.                 - hnl: 203.6ms (Honolulu)
  19.                 - mia: 203.6ms (Miami)
  20.                 - nyc: 204.9ms (New York City)
  21.                 - tok: 257.4ms (Tokyo)
  22.                 - lhr: 276.4ms (London)
  23.                 - par: 280.3ms (Paris)
  24.                 - ams: 283.6ms (Amsterdam)
  25.                 - fra: 287.2ms (Frankfurt)
  26.                 - mad: 291.5ms (Madrid)
  27.                 - waw: 299.5ms (Warsaw)
  28.                 - nue: 307ms   (Nuremberg)
  29.                 - sin: 317.4ms (Singapore)
  30.                 - mcn: 318.2ms (Mainland China)
  31.                 - hel: 322.4ms (Helsinki)
  32.                 - sao: 340.2ms (São Paulo)
  33.                 - blr: 356.5ms (Bengaluru)
  34.                 - dbi: 370.6ms (Dubai)
  35.                 - nai: 411.1ms (Nairobi)
  36.                 - jnb: 444.3ms (Johannesburg)
  37.                 - hkg: 471.1ms (Hong Kong)
  38.                 - syd:         (Sydney)
  39.                 - ord:         (Chicago)
  40.                 - den:         (Denver)

  41. C:\Users\Nancy>
複製代碼
..

Listing 4: Exit node=Vultr (美国),console=Vultr
  1. root@vultr:~# tailscale netcheck

  2. Report:
  3.         * Time: 2026-01-29T06:18:58.542369334Z
  4.         * UDP: true
  5.         * IPv4: yes, 207.246.101.103:48426
  6.         * IPv6: no, but OS has support
  7.         * MappingVariesByDestIP: false
  8.         * PortMapping:
  9.         * Nearest DERP: Los Angeles
  10.         * DERP latency:
  11.                 - lax: 700µs   (Los Angeles)
  12.                 - sfo: 7.8ms   (San Francisco)
  13.                 - sea: 27.1ms  (Seattle)
  14.                 - den: 28.6ms  (Denver)
  15.                 - dfw: 33.2ms  (Dallas)
  16.                 - tor: 48.3ms  (Toronto)
  17.                 - iad: 52.5ms  (Ashburn)
  18.                 - hnl: 54.4ms  (Honolulu)
  19.                 - ord: 55ms    (Chicago)
  20.                 - mia: 56.1ms  (Miami)
  21.                 - nyc: 59.2ms  (New York City)
  22.                 - sin:         (Singapore)
  23.                 - fra:         (Frankfurt)
  24.                 - syd:         (Sydney)
  25.                 - blr:         (Bengaluru)
  26.                 - tok:         (Tokyo)
  27.                 - lhr:         (London)
  28.                 - sao:         (São Paulo)
  29.                 - ams:         (Amsterdam)
  30.                 - jnb:         (Johannesburg)
  31.                 - par:         (Paris)
  32.                 - mad:         (Madrid)
  33.                 - hkg:         (Hong Kong)
  34.                 - waw:         (Warsaw)
  35.                 - dbi:         (Dubai)
  36.                 - nai:         (Nairobi)
  37.                 - nue:         (Nuremberg)
  38.                 - hel:         (Helsinki)
  39.                 - mcn:         (Mainland China)
  40. root@vultr:~#
複製代碼
..

References:
[1] [Tutorial] Access Your Home LAN from the Internet! | Tailscale + Self-Hosted DERP Server | D1 Tech
[2] https://d1tech.org/tailscale-derp-tutorial/

Others:
[3] 自建免备案防偷 Tailscale 国内中继(DERP)教程
[4] 不使用域名搭建自己的tailscale derp服务
[5] DERP servers
[6] Custom DERP servers
[7] 自建免备案防偷 Tailscale 国内中继(DERP)教程
[8] Tailscale 替代 DERP:Peer Relays 更加简单的中继方法(支持分流)


目录 Tailscale for everyone
作者: mcjin2001    時間: 2026-2-3 18:43

大陆用 Tailscale 需要用大陆自建 DERP 中转服务器

如果大陆用 Tailscale,就算在外面接 Tailscale 都要用 ...
张无忌 發表於 2026-2-3 09:52

畀幾廿蚊人賺好過自己搞咁複雜啦  

via HKEPC IR 5.1.14 - Android(5.1.2F)
作者: normalyan    時間: 2026-2-3 19:11

畀幾廿蚊人賺好過自己搞咁複雜啦   

via HKEPC IR 5.1.14 - Android(5.1.2F)
mcjin2001 發表於 2026-2-3 18:43

學下科學上網仲免費添
作者: mcjin2001    時間: 2026-2-3 20:03

學下科學上網仲免費添
normalyan 發表於 2026-2-3 11:11

要畀機場費...  

via HKEPC IR 5.1.14 - Android(5.1.2F)
作者: normalyan    時間: 2026-2-3 22:51

要畀機場費...   

via HKEPC IR 5.1.14 - Android(5.1.2F)
mcjin2001 發表於 2026-2-3 20:03

No la... 免費CF workers & pages ECH snippets等等快過d機場la
作者: xo_ox    時間: 2026-2-4 08:50

No la... 免費CF workers & pages ECH snippets等等快過d機場la
normalyan 發表於 2026-2-3 14:51


how? I follow some page but not work ... : (
作者: mcjin2001    時間: 2026-2-4 09:51

No la... 免費CF workers & pages ECH snippets等等快過d機場la
normalyan 發表於 2026-2-3 14:51

彈條youtube教學片上嚟畀大家欣賞下啦!得個齋talking...  

via HKEPC IR 5.1.14 - Android(5.1.2F)
作者: 张无忌    時間: 2026-2-15 19:07

大陆用 Tailscale 需要用大陆自建 DERP 中转服务器,只是自己用,没有问题,但是 share machine 就出问题(share 给大陆或香港 members),如果你是到怎样解决,请你告知,谢谢。
作者: 张无忌    時間: 2026-2-28 21:29

本帖最後由 张无忌 於 2026-3-1 02:18 編輯

Tailscale peer relays

针对大陆 Tailscale 对大陆 tailscale 连接,一般要通过美国,为了解决之个问题,我自己在大陆可以建 DERP 中转服务器,大陆与大陆之间不用美国,而用了大陆 DERP 中转服务器,连接速度很多,由于在前面说过对 share machine,自己用是没有问题,但是 share 给大陆或香港 members 就有问题。

最近 2026 年 2 月份 Tailscale 又出了 peer relays,直接与自建 DERP 一样,不知道之前 share members 问题解决?下面有 [1] 至 [4] 个文章可以参考。

References:
[1] Tailscale Peer Relays
[2] How I Guarantee a Direct Connection with Tailscale
[3] How NAT traversal works
[4] Tailscale Peer‑Relay 全面示範|Azure Ubuntu 實戰設定、UDP 封鎖 Failover、DERP 與 Peer‑Relay 完整教學


目录 Tailscale for everyone
作者: normalyan    時間: 2026-3-1 17:11

彈條youtube教學片上嚟畀大家欣賞下啦!得個齋talking...   

via HKEPC IR 5.1.14 - Android(5. ...
mcjin2001 發表於 2026-2-4 09:51

畀曬keywords你自己去youtube search大把啦!
作者: 张无忌    時間: 2026-3-10 16:48

本帖最後由 张无忌 於 2026-3-10 08:54 編輯

tailscale -h

Tailscale help
  1. C:\Users\Nancy>tailscale -h
  2. The easiest, most secure way to use WireGuard.

  3. USAGE
  4.   tailscale [flags] <subcommand> [command flags]

  5. For help on subcommands, add --help after: "tailscale status --help".

  6. This CLI is still under active development. Commands and flags will
  7. change in the future.

  8. SUBCOMMANDS
  9.   up           Connect to Tailscale, logging in if needed
  10.   down         Disconnect from Tailscale
  11.   set          Change specified preferences
  12.   login        Log in to a Tailscale account
  13.   logout       Disconnect from Tailscale and expire current node key
  14.   switch       Switch to a different Tailscale account
  15.   configure    Configure the host to enable more Tailscale features
  16.   syspolicy    Diagnose the MDM and system policy configuration
  17.   netcheck     Print an analysis of local network conditions
  18.   ip           Show Tailscale IP addresses
  19.   dns          Diagnose the internal DNS forwarder
  20.   status       Show state of tailscaled and its connections
  21.   metrics      Show Tailscale metrics
  22.   ping         Ping a host at the Tailscale layer, see how it routed
  23.   nc           Connect to a port on a host, connected to stdin/stdout
  24.   ssh          SSH to a Tailscale machine
  25.   funnel       Serve content and local servers on the internet
  26.   serve        Serve content and local servers on your tailnet
  27.   version      Print Tailscale version
  28.   web          Run a web server for controlling Tailscale
  29.   file         Send or receive files
  30.   bugreport    Print a shareable identifier to help diagnose issues
  31.   cert         Get TLS certs
  32.   lock         Manage tailnet lock
  33.   licenses     Get open source license information
  34.   exit-node    Show machines on your tailnet configured as exit nodes
  35.   update       Update Tailscale to the latest/different version
  36.   whois        Show the machine and user associated with a Tailscale IP (v4 or v6)
  37.   drive        Share a directory with your tailnet
  38.   appc-routes  Print the current app connector routes
  39.   completion   Shell tab-completion scripts

  40. FLAGS
  41.   --socket value
  42.         path to tailscaled socket
複製代碼
..

用的比较多
  1. netcheck     Print an analysis of local network conditions
  2. status       Show state of tailscaled and its connections
  3. ping         Ping a host at the Tailscale layer, see how it routed
複製代碼
..


目录 Tailscale for everyone
作者: 张无忌    時間: 2026-3-17 21:54

本帖最後由 张无忌 於 2026-3-21 15:33 編輯

大陆 SSH 到美国 IP 被 blocked 怎样办?

本来要在美国 Vultr set up tailscale,但是用 PuTTY connect 美国 IP 就 refused,说明 GFW 知道去美国 Vultr VPS 就不允许,之前都没有事,但是今次就连接不上。在大陆不给我连,就改用日本或香港 Tailscale exit node(100.x.x.x),例如我用日本 Tailscale exit node,之后我在日本用 PuTTY 到美国 Vultr VPS IP。

在日本 console
  1. ssh <Vultr IP>
複製代碼
..

在美国 Vultr VPS set 好后 Tailscale exit node,然后又有一个 100.x.x.x,在大陆用 Tailscale exit node 100.x.x.x 到美国。


目录 Tailscale for everyone





歡迎光臨 電腦領域 HKEPC Hardware (https://www.hkepc.com/forum/) Powered by Discuz! 7.2