如果你想使用 -verify-clients
选项,你必须挂载 /var/run/tailscale/tailscaled.sock
目录以向derp
提供tailscaled.sock
。
根据你的需要编辑 docker-compose.yml
文件,然后运行
docker-compose up -d
注意:
手动指定证书,会自动搜索
<certdir>/<hostname>.crt
和<certdir>/<hostname>.key
文件 复制并重命名对应的文件,或者将Let's Encrypt
的pem
文件使用ln -P
命令链接为crt
和key
文件。
https://tailscale.com/kb/1118/custom-derp-servers/#monitoring-custom-derps
wget https://raw.githubusercontent.com/1itt1eB0y/MyCollection/master/docker/derper/derpprobe
chmod 755 derpprobe
./derpprobe -derp-map http://127.0.0.1/testDERP.json -listen :1000
testDERP.json
你可以将这个 json 复制并粘贴到官方的 ACL 的 derpMap 部分。
{
"Regions": {
"999": {
"RegionID": 999,
"RegionCode": "custom",
"RegionName": "My Custom Derp",
"Nodes": [{
"Name": "1",
"RegionID": 999,
"HostName":"derp.example.com",
"IPv4":"1.1.1.1",
"DERPPort": 443,
"STUNPort": 3478
}]
}
}
}
ACL示例文件 https://tailscale.com/kb/1118/custom-derp-servers/#step-2-adding-derp-servers-to-your-tailnet
{
// ... other parts of ACL/Policy JSON
"derpMap": {
"Regions": {
"999": {
"RegionID": 999,
"RegionCode": "custom",
"RegionName": "My Custom Derp",
"Nodes": [{
"Name": "1",
"RegionID": 999,
"HostName":"derp.example.com",
"IPv4":"1.1.1.1",
"DERPPort": 443,
"STUNPort": 3478
}]
}
}
}
}
If you want to run with -verify-clients
option, you must volume /var/run/tailscale/tailscaled.sock
.
Edit docker-compose.yml
as you need, then run
docker-compose up -d
Notice:
Manual cert will search
<certdir>/<hostname>.crt
and<certdir>/<hostname>.key
automaticlly, copy a renamed copy, orln -P
your Let's Encryptpem
files tocrt
andkey
https://tailscale.com/kb/1118/custom-derp-servers/#monitoring-custom-derps
wget https://raw.githubusercontent.com/1itt1eB0y/MyCollection/master/docker/derper/derpprobe
chmod 755 derpprobe
./derpprobe -derp-map http://127.0.0.1/testDERP.json -listen :1000
testDERP.json
You can copy and paste this json to Official ACL's derpMap section.
{
"Regions": {
"999": {
"RegionID": 999,
"RegionCode": "custom",
"RegionName": "My Custom Derp",
"Nodes": [{
"Name": "1",
"RegionID": 999,
"HostName":"derp.example.com",
"IPv4":"1.1.1.1",
"DERPPort": 443,
"STUNPort": 3478
}]
}
}
}
ACL EXAMPLE https://tailscale.com/kb/1118/custom-derp-servers/#step-2-adding-derp-servers-to-your-tailnet
{
// ... other parts of ACL/Policy JSON
"derpMap": {
"Regions": {
"999": {
"RegionID": 999,
"RegionCode": "custom",
"RegionName": "My Custom Derp",
"Nodes": [{
"Name": "1",
"RegionID": 999,
"HostName":"derp.example.com",
"IPv4":"1.1.1.1",
"DERPPort": 443,
"STUNPort": 3478
}]
}
}
}
}