derper -c=derper/derper.conf -hostname derp.mydomain.com -a :4443 -certmode manual -certdir /home/admin/certs
此时用浏览器访问 https://derp.mydomain.com,会得到一个这样的网页:
1 2 3 4 5 6 7 8
<html><body> <h1>DERP</h1> <p> This is a <ahref="https://tailscale.com/">Tailscale</a> <ahref="https://pkg.go.dev/tailscale.com/derp">DERP</a> server. </p>
# 检查状态 $ sudo systemctl status derper ● derper.service - Tailscale DERP Server Loaded: loaded (/etc/systemd/system/derper.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2023-02-08 14:27:13 CST; 2s ago Main PID: 4944 (derper) Tasks: 6 (limit: 1006) Memory: 2.6M CPU: 16ms CGroup: /system.slice/derper.service └─4944 /home/admin/go/bin/derper -c=/home/admin/derper/derper.conf -hostname derp.mydomain.com
Feb 08 14:27:13 iZj6caykwpo11gr659a9avZ systemd[1]: Started Tailscale DERP Server. Feb 08 14:27:13 iZj6caykwpo11gr659a9avZ derper[4944]: 2023/02/08 14:27:13 derper: serving on :443 with TLS Feb 08 14:27:13 iZj6caykwpo11gr659a9avZ derper[4944]: 2023/02/08 14:27:13 running STUN server on [::]:3478
# 开机自启动 $ sudo systemctl enable derper Created symlink /etc/systemd/system/multiuser.target.wants/derper.service → /etc/systemd/system/derper.service. Unit /etc/systemd/system/derper.service is added as a dependency to a non-existent unit multiuser.target.