help.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright (c)2013-2020 ZeroTier, Inc.
  3. *
  4. * Use of this software is governed by the Business Source License included
  5. * in the LICENSE.TXT file in the project's root directory.
  6. *
  7. * Change Date: 2024-01-01
  8. *
  9. * On the date above, in accordance with the Business Source License, use
  10. * of this software will be governed by version 2.0 of the Apache License.
  11. */
  12. /****/
  13. package cli
  14. import (
  15. "fmt"
  16. "zerotier/pkg/zerotier"
  17. )
  18. func Help() {
  19. fmt.Printf(`ZeroTier Network Hypervisor Service Version %d.%d.%d
  20. (c)2013-2020 ZeroTier, Inc.
  21. Licensed under the ZeroTier BSL (see LICENSE.txt)
  22. Usage: zerotier [-options] <command> [command args]
  23. Global Options:
  24. -j Output raw JSON where applicable
  25. -p <path> Use alternate base path
  26. -t <path> Load secret auth token from a file
  27. -T <token> Set secret auth token on command line
  28. Commands:
  29. help Show this help
  30. version Print version
  31. service Start as service
  32. status Show node status, identity, and config
  33. peers List all VL1 peers
  34. join <network> [fingerprint] Join a virtual network
  35. leave <network> Leave a virtual network
  36. networks List VL2 virtual networks
  37. network <network> Show verbose network info
  38. set <network> [option] [value] Get or set a network config option
  39. manageips <boolean> Is IP management allowed?
  40. manageroutes <boolean> Is route management allowed?
  41. globalips <boolean> Allow assignment of global IPs?
  42. globalroutes <boolean> Can global IP space routes be set?
  43. defaultroute <boolean> Can default route be overridden?
  44. set [option] [value] Get or set a service config option
  45. port <port> Primary P2P port
  46. secondaryport <port/0> Secondary P2P port (0 to disable)
  47. blacklist cidr <IP/bits> <boolean> Toggle physical path blacklisting
  48. blacklist if <prefix> <boolean> Toggle interface prefix blacklisting
  49. portmap <boolean> Toggle use of uPnP or NAT-PMP
  50. identity <command> [args] Identity management commands
  51. new [c25519|p384] Create identity pair (default: c25519)
  52. getpublic <identity> Extract only public part of identity
  53. validate <identity> Locally validate an identity
  54. sign <identity> <file> Sign a file with an identity's key
  55. verify <identity> <file> <sig> Verify a signature
  56. locator <command> [args] Locator management commands
  57. new <identity> <address> [...] Create and sign a new locator
  58. show <locator> [identity] Show locator information
  59. root [command] Root management commands
  60. list List root peers (same as no command)
  61. add <identity> <locator> Add or manually update a root
  62. add <url> Add or update root(s) from a URL
  63. remove <address> Un-designate a peer as a root
  64. controller <command> [option] Local controller management commands
  65. networks List networks run by local controller
  66. new Create a new network
  67. set <network> [setting] [value] Show or modify network settings
  68. members <network> List members of a network
  69. member <network> [setting] [value] Show or modify member level settings
  70. auth <address|fingerprint> Authorize a peer
  71. deauth <address|fingerprint> Deauthorize a peer
  72. The 'service' command does not exit until the service receives a signal.
  73. This is typically run from launchd (Mac), systemd or init (Linux), a Windows
  74. service harness (Windows), etc.
  75. If 'set' is followed by a 16-digit hex number it will get/set network config
  76. options. Otherwise it will get/set local options that pertain to the entire
  77. node.
  78. Identities can be specified verbatim on the command line or as a path to
  79. a file. This is detected automatically.
  80. `,zerotier.CoreVersionMajor, zerotier.CoreVersionMinor, zerotier.CoreVersionRevision)
  81. }