Files
netcli/README.md

1.0 KiB
Raw Blame History

netctl

netctl 是一个 Windows 下的网络管理 CLI 工具。
支持设置静态 IP、切换 DHCP并管理教室配置文件。

功能特点

  • 为网卡设置静态 IP
  • 切换网卡为 DHCP 自动获取 IP
  • yamltomljson 加载教室配置
  • 导出默认教室配置(支持 yamltomljson
  • 自动检测管理员权限并尝试自提升
  • 支持通过 make 构建,可选 UPX 压缩和 Zig 外链优化

安装方法

从源码编译

make build 编译完成后可执行文件输出到 ./bin/netctl.exe。

使用方法

# 查看帮助
netctl --help

# 设置静态 IP
netctl static

# 切换网卡为 DHCP
netctl dhcp

# 导出默认配置
netctl export --file ./config.yaml --format yaml

配置文件

  • 默认配置文件路径:./config.yaml若不存在则使用内置默认配置
  • 支持文件格式yaml、yml、toml、json

编译信息

版本号、Git 提交 ID 和编译时间会在编译时通过 make 自动嵌入可执行文件。