help.go 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. 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 commands
  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. cert <command> [args] - Certificate commands
  73. newsubject <subject> <secret> Create a new subject and secret
  74. newcsr <subject> <secret> Create a subject CSR
  75. sign <csr> <identity> <certificate> Sign a CSR to create a certificate
  76. verify <certificate> Verify a certificate
  77. show List certificate for current node
  78. import <certificate> [<trust>] Import certificate into this node
  79. export <serial> Export a certificate from this node
  80. delete <serial> Delete certificate from this node
  81. An <address> may be specified as a 10-digit short ZeroTier address, a
  82. fingerprint containing both an address and a SHA384 hash, or an identity.
  83. The latter two options are equivalent in terms of specificity and may be
  84. used if stronger security guarantees are desired than those provided by
  85. the basic ZeroTier addressing system. Fields of type <identity> must be
  86. full identities and may be specified either verbatim or as a path to a file.
  87. An <endpoint> is a place where a peer may be reached. Currently these are
  88. just 'IP/port' format addresses but other types may be added in the future.
  89. The 'service' command starts a node. It will run until the node receives
  90. an exit signal and is normally not used directly.
  91. `,zerotier.CoreVersionMajor, zerotier.CoreVersionMinor, zerotier.CoreVersionRevision)
  92. }