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:
parent
e33ce4c8ad
commit
a9b8e639bb
3 changed files with 7 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue