help.go 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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: 2025-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 [-global 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. Common Operations:
  29. help Show this help
  30. version Print version
  31. status Show node status and configuration
  32. join [-options] <network> Join a virtual network
  33. -a <token> Token to submit to controller
  34. -c <identity | fingerprint> Controller identity or fingerprint
  35. leave <network> Leave a virtual network
  36. networks List VL2 virtual networks
  37. network <network> [command] [option] - Network management commands
  38. show Show network details (default)
  39. set [option] [value] - Get or set network options
  40. manageips <boolean> Is IP management allowed?
  41. manageroutes <boolean> Is route management allowed?
  42. globalips <boolean> Allow assignment of global IPs?
  43. globalroutes <boolean> Can global IP space routes be set?
  44. defaultroute <boolean> Can default route be overridden?
  45. peers List VL1 peers
  46. peer <address> [command] [option] - Peer management commands
  47. show Show peer details (default)
  48. try <endpoint> [...] Try peer at explicit endpoint
  49. set [option] [value] - Get or set node configuration
  50. port <port> Primary P2P port
  51. secondaryport <port/0> Secondary P2P port (0 to disable)
  52. blacklist cidr <IP/bits> <boolean> Toggle physical path blacklisting
  53. blacklist if <prefix> <boolean> Toggle interface prefix blacklisting
  54. portmap <boolean> Toggle use of uPnP or NAT-PMP
  55. Advanced Operations:
  56. service Start node (seldom used from CLI)
  57. controller <command> [option] - Local controller management commands
  58. networks List networks run by local controller
  59. new Create a new network
  60. set <network> [setting] [value] Show or modify network settings
  61. members <network> List members of a network
  62. member <network> [setting] [value] Show or modify member level settings
  63. auth <address> Authorize a peer
  64. deauth <address> Deauthorize a peer
  65. identity <command> [args] - Identity management
  66. new [c25519 | p384] Create identity (default: c25519)
  67. getpublic <identity> Extract only public part of identity
  68. fingerprint <identity> Get an identity's fingerprint
  69. validate <identity> Locally validate an identity
  70. sign <identity> <file> Sign a file with an identity's key
  71. verify <identity> <file> <sig> Verify a signature
  72. locator <command> [args] - Locator management
  73. new <identity> <endpoint> [...] Create new signed locator
  74. verify <identity> <locator> Verify locator signature
  75. show <locator> Show contents of a locator
  76. certs List certificates
  77. cert <command> [args] - Certificate management
  78. show [serial] List or show details of a certificate
  79. newsid <secret out> Create a new subject unique ID
  80. newcsr <subject> <secret> <csr out> Create a subject CSR
  81. sign <csr> <identity> <cert out> Sign a CSR to create a certificate
  82. verify <cert> Verify a certificate
  83. import <cert> [trust,[trust]] Import certificate into this node
  84. rootca Certificate is a root CA (trust flag)
  85. ztrootset ZeroTier root node set (trust flag)
  86. restore Re-import default certificates
  87. export <serial> [path] Export a certificate from this node
  88. delete <serial|ALL> Delete certificate from this node
  89. An <address> may be specified as a 10-digit short ZeroTier address, a
  90. fingerprint containing both an address and a SHA384 hash, or an identity.
  91. The latter two options are equivalent in terms of specificity and may be
  92. used if stronger security guarantees are desired than those provided by
  93. the basic ZeroTier addressing system. Fields of type <identity> must be
  94. full identities and may be specified either verbatim or as a path to a file.
  95. An <endpoint> is a place where a peer may be reached. Currently these are
  96. just 'IP/port' format addresses but other types may be added in the future.
  97. The 'service' command starts a node. It will run until the node receives
  98. an exit signal and is normally not used directly.
  99. `,zerotier.CoreVersionMajor, zerotier.CoreVersionMinor, zerotier.CoreVersionRevision)
  100. }