wget --output-document=/usr/local/bin/headscale https://github.com/juanfont/headscale/releases/download/v0.18.0/headscale_0.18.0_linux_amd64


headscale -n default nodes register --key nodekey:3ca629092b519ec8a61db80726af03736b293d9ffc5947cb79a7724b417f0922

acme.sh --issue --alpn -d derp.xorbit.link

acme.sh  --register-account  -m tigeren@live.com --server zerossl


docker run --restart always   --name derper -p 12345:12345 -p 3478:3478/udp -v /root/.certs/:/app/certs -e DERP_CERT_MODE=manual -e DERP_ADDR=:12345 -e DERP_DOMAIN=47.94.142.190  -d ghcr.nju.edu.cn/yangchuansheng/derper:latest

docker run --restart always   --name derper -p 443:443 -p 3478:3478/udp -v /root/.certs/:/app/certs -e DERP_CERT_MODE=manual -e DERP_ADDR=:443 -e DERP_DOMAIN=47.94.142.190  -d ghcr.nju.edu.cn/yangchuansheng/derper:latest


# /etc/headscale/derp.yaml
regions:
  900:
    regionid: 900
    regioncode: kr
    regionname: Lightsail Korea
    nodes:
      - name: 900a
        regionid: 900
        hostname: derp.xorbit.link
        # ipv4: xxxx
        stunport: 3478
        stunonly: false
        derpport: 12345
  901:
    regionid: 901
    regioncode: cn
    regionname: Aliyun BJ
    nodes:
      - name: 901a
        regionid: 901
        hostname: 47.94.142.190
        # ipv4: xxxx
        stunport: 3478
        stunonly: false
        derpport: 12345