rename -dhcp flag to -no-dhcp for cleaner UX

DHCP is on by default; use -no-dhcp to disable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Git Sagar 2026-06-06 17:53:01 +05:30
parent e33ce4c8ad
commit a9b8e639bb
3 changed files with 7 additions and 7 deletions

View file

@ -30,7 +30,7 @@ func main() {
tapName := flag.String("tap", "", "TAP interface name (empty = kernel-assigned)")
macAddr := flag.String("mac", "", "TAP interface MAC address (e.g. 5E:3B:6F:63:A8:3E)")
insecure := flag.Bool("insecure", false, "Skip TLS certificate verification")
dhcpEnabled := flag.Bool("dhcp", true, "Run built-in DHCP client after connecting")
noDHCP := flag.Bool("no-dhcp", false, "Disable built-in DHCP client")
reconnectDelay := flag.Duration("reconnect-delay", 5*time.Second, "Delay between reconnection attempts")
acceptDefaultGW := flag.Bool("accept-default-gateway", false, "Install DHCP-provided gateway as default route")
acceptStaticRoutes := flag.Bool("accept-static-routes", false, "Install DHCP classless static routes (option 121/249)")
@ -89,7 +89,7 @@ func main() {
signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM)
netOpts := netcfg.Options{
DHCP: *dhcpEnabled,
DHCP: !*noDHCP,
AcceptDefaultGW: *acceptDefaultGW,
AcceptStaticRoutes: *acceptStaticRoutes,
AcceptDNS: *acceptDNS,