34 lines
801 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# zerotierApi
## 概述
使用python调用zerotier的api获取整个网络的节点信息。进而生成smartdns需要的配置文件。
## 快速开始
### 一、配置环境
```bash
python3 -m venv env
source ./env/bin/activate
pip install -r requirements.txt
```
### 二、运行程序
```bash
python main.py
```
打印当前网络的节点信息,并在当前目录下产生文件`smartdns.conf`
### 三、一键更新
```bash
./up_nas_conf.sh
```
可以自动生成`smartdns.conf`的配置文件上传到群晖NAS然后重启容器。
- 需要提前设置ssh密钥登陆否则要手动输入密码
- 确保登录用户具有执行docker的权限sudo需要添加`fengbohan ALL=(ALL) NOPASSWD: ALL` 到文件`/etc/sudoers.d/main`