cjdroute.conf.5 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. .\" Manpage for cjdroute.conf
  2. .\"
  3. .TH cjdroute.conf 5 "2014-03-16" "" "Cjdns Reference"
  4. .SH "NAME"
  5. cjdroute.conf \- Cjdns configuration file
  6. .SH "DESCRIPTION"
  7. The
  8. .I cjdroute\&.conf
  9. file configures the cjdns routing engine,
  10. .BR cjdns (8),
  11. generally through
  12. .BR cjdroute (1)\&.
  13. .PP
  14. The configuration is written in a variation of the JSON format that also
  15. accepts traditional C-like comments such as single line comments (//) and
  16. multiline comments (/* and */)\&. Additionally, unused JSON values found in
  17. .I cjdroute\&.conf
  18. are ignored by cjdns and can be used as a form of JSON-compliant comments.
  19. .SH "CONFIGURATION"
  20. \fB"privateKey":\fR "\&.\&.\&."
  21. .RS 4
  22. Your node's private key\&. It should be kept secret because your
  23. confidentiality and data integrity depend on it.
  24. .RE
  25. .PP
  26. \fB"publicKey":\fR "\&.\&.\&."
  27. .RS 4
  28. Your node's public key\&. Based on your private key It is fine for anyone
  29. to know this\&.
  30. .RE
  31. .PP
  32. \fB"ipv6":\fR "\&.\&.\&."
  33. .RS 4
  34. Your node's IPv6 address when it is on the network\&. It is generated
  35. by using the first 16 bytes of a double SHA-512 of your public key\&. All
  36. cjdns IPv6 addresses must begin with "fc" or else they are invalid\&.
  37. .RE
  38. .PP
  39. \fB"authorizedPasswords":\fR [\&.\&.\&.]
  40. .RS 4
  41. An array of passwords that may be used to connect (peer) to your node\&.
  42. .PP
  43. \fI"password":\fR "..."
  44. .RS 4
  45. A password which can be used to peer with your node\&.
  46. .RE
  47. .PP
  48. \fI"user":\fR "..."
  49. .RS 4
  50. A human-readable string that identifies what password a peer is using
  51. on the admin interface\&. If omitted, the password will be identified by its
  52. position within the array (starting from 0)
  53. .RE
  54. .PP
  55. Example:
  56. .br
  57. "authorizedPasswords":
  58. .br
  59. [
  60. { "password": "AnExamplePassword", "user": "Bob" },
  61. { "password": "YetAnotherExample", "user": "Alice" },
  62. { "password": "j3fus4r3gkhv80xdz1yqc0qvn1p91hr", "user": "Eve" }
  63. .br
  64. ]
  65. .RE
  66. .PP
  67. \fB"admin":\fR {\&.\&.\&.}
  68. .RS 4
  69. An object which defines where to bind to the admin RPC server as well as the
  70. password for the admin RPC server\&. The two required strings are "bind", which
  71. should be in the format "IP:PORT", and "password", which should preferably be a
  72. long random string of characters.
  73. .RE
  74. .PP
  75. \fB"interfaces":\fR {\&.\&.\&.}
  76. .RS 4
  77. An object that defines which interfaces cjdns will bind to and what peers to
  78. connect to\&. There are two different interfaces, UDPInterface and
  79. ETHInterface, both of which are arrays\&. Within each array there are a variety
  80. of different options
  81. .PP
  82. \fI"bind":\fR "\&.\&.\&."
  83. .RS 4
  84. Defines what the interface should bind to\&. In UDPInterface, the bind is
  85. an IP:PORT string, such as "0\&.0\&.0\&.0:12345", while in ETHInterface the bind
  86. is a network interface, such as "eth0"\&.
  87. .RE
  88. .PP
  89. \fI"beacon":\fR Integer
  90. .RS 4
  91. This option is only found in ETHInterface and defines whether auto-connecting
  92. beacons should be sent or listened to\&. This is useful for a zeroconf local
  93. network\&.
  94. .PP
  95. .RS 4
  96. 0 \-\- Disabled\&.
  97. .br
  98. 1 \-\- Accept incoming beacons and try connecting to the sender\&.
  99. .br
  100. 2 \-\- Accept incoming beacons and broadcast beacons to the local network\&.
  101. .RE
  102. .RE
  103. .PP
  104. \fI"connectTo":\fR {\&.\&.\&.}
  105. .RS 4
  106. Defines which nodes cjdns should connect to with the specified interface\&.
  107. Multiple nodes may be placed in a single "connectTo" as long as each are
  108. seperated by commas\&. If a node happens to be offline or become offline during
  109. runtime, cjdns will attempt to reconnect at regular intervals\&. The one
  110. difference in this option between UDPInterface and ETHInterface is that
  111. UDPInterface connects to an "IP:PORT" while ETHInterface connects to a MAC
  112. address\&.
  113. .PP
  114. UDPInterface Example:
  115. .br
  116. "connectTo":
  117. .br
  118. {
  119. .RS 4
  120. "1\&.2\&.3\&.4:54321":
  121. .br
  122. {
  123. "login": "login From Your Peer's authorizedPasswords",
  124. "password": "password From Your Peer's authorizedPasswords",
  125. "publicKey": "Your Peer's publicKey\&.k"
  126. .br
  127. },
  128. .br
  129. "5\&.6\&.7\&.8:46321":
  130. .br
  131. {
  132. "login": "cueball",
  133. "password": "Correct Horse Battery Staple",
  134. "publicKey": "Other Peer's publicKey\&.k"
  135. .br
  136. }
  137. .RE
  138. }
  139. .RE
  140. .RE
  141. .PP
  142. \fB"router":\fR {\&.\&.\&.}
  143. .RS 4
  144. An object that holds configuration information on the router
  145. .PP
  146. \fI"interface":\fR {\&.\&.\&.}
  147. .RS 4
  148. Defines the type of interface used for connecting to the cjdns network\&.
  149. It requires a "type" string, and optionally a "tunDevice" string\&. The "type"
  150. string defines the type of interface used, however only "TUNInterface" is
  151. supported at the moment\&. The "tunDevice" string defines the name of a
  152. persistent TUN device to use, which is helpful for starting cjdroute as its own
  153. user instead of root\&.
  154. .RE
  155. .PP
  156. \fI"ipTunnel":\fR {\&.\&.\&.}
  157. .RS 4
  158. A system for tunneling ICANN IPv4 and ICANN IPv6 through cjdns\&. This is using
  159. the cjdns switch layer as a VPN carrier\&.
  160. .PP
  161. \fBNOTE:\fR Simply editing your configuration file is not sufficient to
  162. setting up an ipTunnel gateway\&. Please read through tunnel/README.md in the
  163. cjdns git tree for more information
  164. .PP
  165. \fI"allowedConnections":\fR [\&.\&.\&.]
  166. .RS 4
  167. Nodes allowed to connect to us, specified by their public key, and what IP
  168. address(es) to give them\&. It is fine to only specify one address\&.
  169. .PP
  170. Example:
  171. .PP
  172. "allowedConnections":
  173. .br
  174. [
  175. .br
  176. {
  177. "publicKey": "f64hfl7c4uxt6krmhPutTheRealAddressOfANodeHere7kfm5m0.k",
  178. "ip4Address": "192.168.1.24",
  179. "ip4Prefix": 24,
  180. "ip6Address": "2001:123:ab::10",
  181. "ip6Prefix": 0
  182. .br
  183. },
  184. .br
  185. {
  186. "publicKey": "ydq8csdk8p8ThisIsJustAnExampleAddresstxuyqdf27hvn2z0.k",
  187. "ip4Address": "192.168.1.25",
  188. "ip4Prefix": 24
  189. .br
  190. }
  191. .br
  192. ]
  193. .RE
  194. .PP
  195. \fI"outgoingConnections":\fR [\&.\&.\&.]
  196. .RS 4
  197. An array of nodes to connect and ask for IP addresses.
  198. .PP
  199. Example:
  200. .PP
  201. "outgoingConnections":
  202. .br
  203. [
  204. "6743gf5tw80ExampleExampleExampleExamplevlyb23zfnuzv0.k",
  205. "pw9tfmr8pcrExampleExampleExampleExample8rhg1pgwpwf80.k",
  206. "g91lxyxhq0kExampleExampleExampleExample6t0mknuhw75l0.k"
  207. .br
  208. ]
  209. .RE
  210. .RE
  211. .RE
  212. .PP
  213. \fB"security":\fR [\&.\&.\&.]
  214. .RS 4
  215. An array that defines what user to change to after startup and whether to
  216. exempt the Angel process from this user change\&.
  217. .PP
  218. \fI"setuser":\fR "username"
  219. .RS 4
  220. User to switch to after startup, for security purposes\&. Default value is
  221. "nobody"\&.
  222. .PP
  223. .RE
  224. \fI"exemptAngel":\fR Integer
  225. .RS 4
  226. Whether or not to exempt the Angel process from the user change\&. The Angel is
  227. a small isolated piece of code which exists outside of the core's strict
  228. sandbox but does not handle network traffic\&. This option must be enabled for
  229. ipTunnel to automatically set IP addresses for the TUN device\&.
  230. .PP
  231. 0 \-\- False
  232. .br
  233. 1 \-\- True
  234. .RE
  235. .RE
  236. .PP
  237. \fB"logging":\fR {\&.\&.\&.}
  238. .RS 4
  239. Add or uncomment "logTo":"stdout" to have cjdns log to stdout rather than
  240. making logs available via the admin socket
  241. .RE
  242. .PP
  243. \fB"noBackground":\fR Integer
  244. .RS 4
  245. If set to a non-zero value, cjdns will not fork to the background\&.
  246. Recommended for use in conjunction with "logTo":"stdout"\&.
  247. .RE
  248. .PP
  249. \fB"dns":\fR {\&.\&.\&.}
  250. .RS 4
  251. This section is used to configure the dns capabilities being added to cjdns\&.
  252. Unfortunetly, there is no documentation for this DNS section at this time\&.
  253. .PP
  254. \fI"keys":\fR [\&.\&.\&.]
  255. .RS 4
  256. .RE
  257. .PP
  258. \fI"servers":\fR [\&.\&.\&.]
  259. .RS 4
  260. .RE
  261. .PP
  262. \fI"MinSignatures":\fR Integer
  263. .RS 4
  264. .RE
  265. .RE
  266. .SH "FILES"
  267. .BI /etc/cjdroute.conf
  268. .RS 4
  269. A common location for the configuration file\&.
  270. .RE
  271. .SH "SEE ALSO"
  272. .BR cjdroute (1),
  273. .BR cjdns (8)