help.go 5.0 KB

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