help.go 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. set [option] [value] - Get or set a core config option
  52. port <port> Primary P2P port
  53. secondaryport <port/0> Secondary P2P port (0 to disable)
  54. blacklist cidr <IP/bits> <boolean> Toggle physical path blacklisting
  55. blacklist if <prefix> <boolean> Toggle interface prefix blacklisting
  56. portmap <boolean> Toggle use of uPnP or NAT-PMP
  57. roots List root peers
  58. root [command] - Root management commands
  59. trust <identity | url> [endpoint] Add a root or a set of roots
  60. remove <address | url | serial> Remove a root or set of roots
  61. controller <command> [option] - Local controller management commands
  62. networks List networks run by local controller
  63. new Create a new network
  64. set <network> [setting] [value] Show or modify network settings
  65. members <network> List members of a network
  66. member <network> [setting] [value] Show or modify member level settings
  67. auth <address> Authorize a peer
  68. deauth <address> Deauthorize a peer
  69. identity <command> [args] - Identity management commands
  70. new [c25519 | p384] Create identity (default: c25519)
  71. getpublic <identity> Extract only public part of identity
  72. fingerprint <identity> Get an identity's fingerprint
  73. validate <identity> Locally validate an identity
  74. sign <identity> <file> Sign a file with an identity's key
  75. verify <identity> <file> <sig> Verify a signature
  76. cert <command> [args] - Certificate commands
  77. newid Create a new unique subject ID
  78. newcsr <subject json path> Create a new CSR (signing request)
  79. sign <csr path> <identity path> Sign a CSR to create a certificate
  80. verify <certificate> Verify a certificate
  81. show List certificate for current node
  82. import <certificate> [<trust>] Import certificate into this node
  83. export <serial> Export a certificate from this node
  84. delete <serial> Delete certificate from this node
  85. An <address> may be specified as a 10-digit short ZeroTier address, a
  86. fingerprint containing both an address and a SHA384 hash, or an identity.
  87. The latter two options are equivalent in terms of specificity and may be
  88. used if stronger security guarantees are desired than those provided by
  89. the basic ZeroTier addressing system. Fields of type <identity> must be
  90. full identities and may be specified either verbatim or as a path to a file.
  91. An <endpoint> is a place where a peer may be reached. Currently these are
  92. just 'IP/port' format addresses but other types may be added in the future.
  93. The 'service' command starts a node. It will run until the node receives
  94. an exit signal and is normally not used directly.
  95. `,zerotier.CoreVersionMajor, zerotier.CoreVersionMinor, zerotier.CoreVersionRevision)
  96. }