help.go 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. // Help dumps help to stdout
  19. func Help() {
  20. fmt.Printf(`ZeroTier Network Hypervisor Service Version %d.%d.%d
  21. (c)2013-2020 ZeroTier, Inc.
  22. Licensed under the ZeroTier BSL (see LICENSE.txt)
  23. Usage: zerotier [-options] <command> [command args]
  24. Global Options:
  25. -j Output raw JSON where applicable
  26. -p <path> Use alternate base path
  27. -t <path> Use secret auth token from this file
  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. roots List root peers
  35. addroot <path/URL to spec> Add root
  36. removeroot <address> Remove a peer from the root list
  37. join <network ID> [fingerprint] Join a virtual network
  38. leave <network ID> Leave a virtual network
  39. networks List VL2 virtual networks
  40. network <network ID> Show verbose network info
  41. set <network ID> [option] [value] Get or set a network config option
  42. manageips <boolean> Is IP management allowed?
  43. manageroutes <boolean> Is route management allowed?
  44. globalips <boolean> Allow assignment of global IPs?
  45. globalroutes <boolean> Can global IP space routes be set?
  46. defaultroute <boolean> Can default route be overridden?
  47. set [option] [value] Get or set a service config option
  48. port <port> Primary P2P port
  49. secondaryport <port/0> Secondary P2P port (0 to disable)
  50. blacklist cidr <IP/bits> <boolean> Toggle physical path blacklisting
  51. blacklist if <prefix> <boolean> Toggle interface prefix blacklisting
  52. portmap <boolean> Toggle use of uPnP or NAT-PMP
  53. identity <command> [args] Identity management commands
  54. new [c25519|p384] Create identity pair (default: c25519)
  55. getpublic <identity> Extract only public part of identity
  56. validate <identity> Locally validate an identity
  57. sign <identity> <file> Sign a file with an identity's key
  58. verify <identity> <file> <sig> Verify a signature
  59. makeroot <identity> <address> ... Make a root spec (see docs)
  60. The 'service' command does not exit until the service receives a signal.
  61. This is typically run from launchd (Mac), systemd or init (Linux), a Windows
  62. service harness (Windows), etc.
  63. If 'set' is followed by a 16-digit hex number it will get/set network config
  64. options. Otherwise it will get/set local options that pertain to the entire
  65. node.
  66. Identities can be specified verbatim on the command line or as a path to
  67. a file. This is detected automatically.
  68. `,zerotier.CoreVersionMajor, zerotier.CoreVersionMinor, zerotier.CoreVersionRevision)
  69. }