在老旧的asus设备(ac68u)上 安装 tailscale 客户端

题外话

我这台ac68u确实太老了,已经快10个年头了。
即便刷了梅林系统,386版本,软件中心也没有tailscale的app。
这个老旧的软件中心,已经很多年没更新维护过了,因此要安装tailscale只能自己想办法了。

前置要求

  • 一台华硕的路由器,这里用的armhf的ac68U,官方固件、梅林固件都可以。
  • 有足够的jffs剩余空间,armhf版本的版本的tailscale+tailscaled要吃掉40M的空间。不够的可以上usb。当然,可以随意存在哪,不是非得jffs,脚本的绝对路径能找到就行。
  • 一个tailscale.sh脚本,用来启动tailscaled和tailscale。

开始操作

  1. 下载tailscale.sh文件到jffs:
    curl -fsSL "https://mirror.ghproxy.com/https://raw.githubusercontent.com/scjtqs2/asuswrt-scripts/master/scripts/tailscale.sh" -o /jffs/scripts/tailscale.sh
    curl -fsSL "https://mirror.ghproxy.com/https://raw.githubusercontent.com/scjtqs2/asuswrt-scripts/master/scripts/service-event.sh" -o /jffs/scripts/service-event.sh
    chmod +x /jffs/scripts/tailscale.sh
    chmod +x /jffs/scripts/service-event.sh
    
  2. 下载 tailscale的二进制文件,这里是armhf的包:
    1. https://pkgs.tailscale.com/stable/tailscale_latest_arm.tgz下载压缩包
    2. 解压得到tailscaletaildcaled两个二进制文件,用winscp将其上传放入到/jffs/tailscale下,当然,你可以用自己喜欢的路径。如果需要指定版本,可以下载例如https://pkgs.tailscale.com/stable/tailscale_1.52.1_arm.tgz这样的包
    3. ssh登录ac68u,赋予上面两个二进制文件可执行权限:
      chmod +x /jffs/tailscale/tailscale
      chmod +x /jffs/tailscale/tailscaled
      
  3. 修改tailscale.sh脚本:vi /jffs/scripts/tailscale.sh,然后英文状态下输入i开始编辑
    1. 找到TAILSCALED_PATH,将其改成 /jffs/tailscale/tailscaled
    2. 找到TAILSCALE_PATH,将其改成/jffs/tailscale/tailscale
    3. 找到TAILSCALE_ARGUMENTS,将其改成你的启动参数。例如我这里改成了--accept-dns=false --accept-routes=true --advertise-routes=192.168.0.0/24 --authkey xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx。如果你是headscale的私有化部署,这里可以使用--login-server https://headscale.mydomain.com --accept-dns=false --accept-routes=true --advertise-routes=192.168.0.0/24 --authkey xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxauthkey需要自己去生成一个。
    4. 按一下esc键,再输入:wq进行保存。
  4. 启动脚本/jffs/scripts/tailscale.sh start,没报错的话,就去控制台看看是否有这台设备了。

路由器上执行tailscale命令:

/jffs/tailscale/tailscale --state=/jffs/tailscaled.state -h

开机自启动

/jffs/scripts/services-start中添加一行/jffs/scripts/tailscale.sh start

打赏
Bookmark the permalink.
0 0 投票数
文章评分
订阅评论
提醒
guest

8 评论
内联反馈
查看所有评论
山卡拉
山卡拉
2 月 前

请问能分享你的tailscale.sh脚本吗

ye wuqiu
ye wuqiu
28 天 前

帮忙看看
谢谢
1)启动脚本运行后,没有报错,但控制台里没有出现华硕路由器
2)路由器上执行tailscale命令:

/jffs/tailscale/tailscale --state=/jffs/tailscaled.state -h
执行后报错
flag provided but not defined: -state
USAGE
  tailscale [flags]  [command flags]


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


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


SUBCOMMANDS
  up         Connect to Tailscale, logging in if needed
  down       Disconnect from Tailscale
  set        Change specified preferences
  login      Log in to a Tailscale account
  logout     Disconnect from Tailscale and expire current node key
  switch     Switches to a different Tailscale account
  configure  [ALPHA] Configure the host to enable more Tailscale features
  netcheck   Print an analysis of local network conditions
  ip         Show Tailscale IP addresses
  status     Show state of tailscaled and its connections
  ping       Ping a host at the Tailscale layer, see how it routed
  nc         Connect to a port on a host, connected to stdin/stdout
  ssh        SSH to a Tailscale machine
  funnel     Serve content and local servers on the internet
  serve      Serve content and local servers on your tailnet
  version    Print Tailscale version
  web        Run a web server for controlling Tailscale
  file       Send or receive files
  bugreport  Print a shareable identifier to help diagnose issues
  cert       Get TLS certs
  lock       Manage tailnet lock
  licenses   Get open source license information
  exit-node  Show machines on your tailnet configured as exit nodes
  update     [BETA] Update Tailscale to the latest/different version
  whois      Show the machine and user associated with a Tailscale IP (v4 or v6)


FLAGS
  --socket string
        path to tailscaled socket (default /var/run/tailscale/tailscaled.sock)


Semon
Semon
17 天 前

謝謝教程。
請問ac68u能跑多少帶寬,?

Semson
Semson
15 天 前
回复给  scjtqs

谢谢。这个速度已經快过ovpn 了。