运行在headscale服务器上,通过headscale node list -o json命令获取节点信息,运行本程序前请确认该命令有输出节点信息。
将headscale上的各个node与子域名绑定,格式为 机器名Name + 用户名User + 域名Domain,如机器名为abc,用户名为zhangsan,域名为example.com,则对应的node的子域名为abc.zhangsan.example.com
本仓库使用poetry做包管理,poetry安装命令如下:
curl -sSL https://install.python-poetry.org | python3 -
详情见: Poetry
cp config.yml.example config.yml
目前仅支持腾讯云
domain:域名
user_id:腾讯云域名解析的user_id
user_token:腾讯云域名解析的user_token
cp domains.json.example domain.json
初始时为空即可,后续会自动更新
poetry install
poetry run python main.py