help.go 5.0 KB

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