help.go 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 and configuration
  33. join <network> [fingerprint] Join a virtual network
  34. leave <network> Leave a virtual network
  35. networks List VL2 virtual networks
  36. network <network> [command] [option] - Network management commands
  37. show Show network details (default)
  38. set [option] [value] - Get or set network options
  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. peers List VL1 peers
  45. peer <address> [command] [option] - Peer management commands
  46. show Show peer details (default)
  47. try <endpoint> [...] Try peer at explicit endpoint
  48. locator <locator> Explicitly update peer locator
  49. roots List root peers
  50. root [command] - Root management commands
  51. add <identity> [endpoint] Designate a peer as a root
  52. remove <address> Un-designate a peer as a root
  53. subscribe <url> Subscribe to a root set
  54. set [option] [value] - Get or set a core config option
  55. port <port> Primary P2P port
  56. secondaryport <port/0> Secondary P2P port (0 to disable)
  57. blacklist cidr <IP/bits> <boolean> Toggle physical path blacklisting
  58. blacklist if <prefix> <boolean> Toggle interface prefix blacklisting
  59. portmap <boolean> Toggle use of uPnP or NAT-PMP
  60. controller <command> [option] - Local controller management commands
  61. networks List networks run by local controller
  62. new Create a new network
  63. set <network> [setting] [value] Show or modify network settings
  64. members <network> List members of a network
  65. member <network> [setting] [value] Show or modify member level settings
  66. auth <address> Authorize a peer
  67. deauth <address> Deauthorize a peer
  68. identity <command> [args] - Identity management commands
  69. new [c25519|p384] Create identity (default: c25519)
  70. getpublic <identity> Extract only public part of identity
  71. fingerprint <identity> Get an identity's fingerprint
  72. validate <identity> Locally validate an identity
  73. sign <identity> <file> Sign a file with an identity's key
  74. verify <identity> <file> <sig> Verify a signature
  75. The 'service' command does not exit until the service receives a signal.
  76. An <address> may be specified as a 10-digit short ZeroTier address, a
  77. fingerprint containing both an address and a SHA384 hash, or an identity.
  78. The latter two options are equivalent in terms of specificity and may be
  79. used if stronger security guarantees are desired than those provided by
  80. the basic ZeroTier addressing system. Fields of type <identity> must be
  81. full identities and may be specified either verbatim or as a path to a file.
  82. An <endpoint> is a place where a peer may be reached. Currently these are
  83. just 'IP/port' format addresses but other types may be added in the future.
  84. `,zerotier.CoreVersionMajor, zerotier.CoreVersionMinor, zerotier.CoreVersionRevision)
  85. }