// DEFAULT_RELAY is the default relay used (can be set using --relay)
var (
DEFAULT_RELAY = "croc.schollz.com" DEFAULT_RELAY6 = "croc6.schollz.com" DEFAULT_PORT = "9009" DEFAULT_PASSPHRASE = "pass123")
假設你想要自己架設 relay server 呢?很簡單,這工具也讓開發者很快架設一台 relay server,只要執行底下
$ croc relay
[info] 2021/02/16 11:38:59 starting croc relay version v8.6.7-05640cd
[info] 2021/02/16 11:38:59 starting TCP server on 9010[info] 2021/02/16 11:38:59 starting TCP server on 9012[info] 2021/02/16 11:38:59 starting TCP server on 9009[info] 2021/02/16 11:38:59 starting TCP server on 9013[info] 2021/02/16 11:38:59 starting TCP server on 9011
$ croc --relay 127.0.0.1:3001 send ~/Downloads/data.csv
Sending 'data.csv' (632.9 kB)
Code is: saddle-origin-horizon
On the other computer run
croc --relay 127.0.0.1:3001 saddle-origin-horizon
可以看到需要加上 --relay 127.0.0.1:3001 就可以完成了,所以很簡單的架設 relay server,這樣官方服務掛了,你也可以在任意一台電腦裝上 relay server 了。