Files
netcli/README.md

42 lines
1.0 KiB
Markdown
Raw Permalink 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.
# netctl
`netctl` 是一个 Windows 下的网络管理 CLI 工具。
支持设置静态 IP、切换 DHCP并管理教室配置文件。
## 功能特点
- 为网卡设置静态 IP
- 切换网卡为 DHCP 自动获取 IP
-`yaml``toml``json` 加载教室配置
- 导出默认教室配置(支持 `yaml``toml``json`
- 自动检测管理员权限并尝试自提升
- 支持通过 `make` 构建,可选 UPX 压缩和 Zig 外链优化
## 安装方法
# 从源码编译
make build
编译完成后可执行文件输出到 ./bin/netctl.exe。
### 使用方法
```bash
# 查看帮助
netctl --help
# 设置静态 IP
netctl static
# 切换网卡为 DHCP
netctl dhcp
# 导出默认配置
netctl export --file ./config.yaml --format yaml
```
### 配置文件
- 默认配置文件路径:./config.yaml若不存在则使用内置默认配置
- 支持文件格式yaml、yml、toml、json
### 编译信息
版本号、Git 提交 ID 和编译时间会在编译时通过 make 自动嵌入可执行文件。