2
0

help.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. · set [option] [value] List all settings (with no args)
  33. · port <port> Primary P2P port
  34. · secondaryport <port/0> Secondary P2P port (0 to disable)
  35. · blacklist cidr <IP/bits> <boolean> Toggle physical path blacklisting
  36. · blacklist if <prefix> <boolean> Toggle interface prefix blacklisting
  37. · portmap <boolean> Toggle use of uPnP or NAT-PMP
  38. · peer [address] [command] [option] Peer management commands
  39. · list List peers
  40. · listroots List root peers
  41. · show Show peer details
  42. · try <endpoint> [...] Try peer at explicit endpoint
  43. · network list List VL2 networks
  44. · network <network> [command] [option]
  45. · show Show network details (default)
  46. · set [option] [value] Get or set network options
  47. · manageips <boolean> Is IP management allowed?
  48. · manageroutes <boolean> Is route management allowed?
  49. · managedns <boolean> Allow network to push DNS config
  50. · globalips <boolean> Allow assignment of global IPs?
  51. · globalroutes <boolean> Can global IP space routes be set?
  52. · defaultroute <boolean> Can default route be overridden?
  53. · join [-options] <network> Join a virtual network
  54. -a <token> Token to submit to controller
  55. -c <identity | fingerprint> Controller identity or fingerprint
  56. · leave <network> Leave a virtual network
  57. Advanced Operations:
  58. service Start this node (runs until stopped)
  59. now [duration] Print current time [-]#[ms|s|m|h]
  60. controller <command> [option]
  61. · list List networks on 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]
  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. locator <command> [args]
  76. new <identity> <endpoint> [...] Create new signed locator
  77. verify <identity> <locator> Verify locator signature
  78. show <locator> Show contents of a locator
  79. cert <command> [args]
  80. · list List certificates at local node
  81. · show <serial> Show certificate details
  82. newsid <secret out> Create a new subject unique ID
  83. newcsr <subject|-> <secret> <csr out> Create a subject CSR
  84. sign <csr> <identity> <cert out> Sign a CSR to create a certificate
  85. verify <cert> Verify certificate (not chain)
  86. dump <cert> Verify and print certificate
  87. · import <cert> [trust,[trust]] Import certificate into this node
  88. trust flag: rootca Certificate is a root CA
  89. trust flag: ztrootset ZeroTier root node set
  90. · restore Re-import default certificates
  91. · export <serial> [path] Export a certificate from this node
  92. · delete <serial|ALL> Delete certificate from this node
  93. · Command requires a running node and access to a local API token.
  94. An <address> may be specified as a 10-digit short ZeroTier address, a
  95. fingerprint containing both an address and a SHA384 hash, or an identity.
  96. The latter two options are equivalent in terms of specificity and may be
  97. used if stronger security guarantees are desired than those provided by
  98. the basic ZeroTier addressing system. Fields of type <identity> must be
  99. full identities and may be specified either verbatim or as a path to a file.
  100. An <endpoint> is a place where a peer may be reached. Currently these are
  101. just 'IP/port' format addresses but other types may be added in the future.
  102. The 'service' command starts a node. It will run until the node receives
  103. an exit signal and is normally not used directly.
  104. `,zerotier.CoreVersionMajor, zerotier.CoreVersionMinor, zerotier.CoreVersionRevision)
  105. }