1
0

cjdroute.conf.5 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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. An optional 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. "password": "password From Your Peer's authorizedPasswords",
  124. "publicKey": "Your Peer's publicKey\&.k"
  125. .br
  126. },
  127. .br
  128. "5\&.6\&.7\&.8:46321":
  129. .br
  130. {
  131. "password": "Correct Horse Battery Staple",
  132. "publicKey": "Other Peer's publicKey\&.k"
  133. .br
  134. }
  135. .RE
  136. }
  137. .RE
  138. .RE
  139. .PP
  140. \fB"router":\fR {\&.\&.\&.}
  141. .RS 4
  142. An object that holds configuration information on the router
  143. .PP
  144. \fI"interface":\fR {\&.\&.\&.}
  145. .RS 4
  146. Defines the type of interface used for connecting to the cjdns network\&.
  147. It requires a "type" string, and optionally a "tunDevice" string\&. The "type"
  148. string defines the type of interface used, however only "TUNInterface" is
  149. supported at the moment\&. The "tunDevice" string defines the name of a
  150. persistent TUN device to use, which is helpful for starting cjdroute as its own
  151. user instead of root\&.
  152. .RE
  153. .PP
  154. \fI"ipTunnel":\fR {\&.\&.\&.}
  155. .RS 4
  156. A system for tunneling ICANN IPv4 and ICANN IPv6 through cjdns\&. This is using
  157. the cjdns switch layer as a VPN carrier\&.
  158. .PP
  159. \fBNOTE:\fR Simply editing your configuration file is not sufficient to
  160. setting up an ipTunnel gateway\&. Please read through tunnel/README.md in the
  161. cjdns git tree for more information
  162. .PP
  163. \fI"allowedConnections":\fR [\&.\&.\&.]
  164. .RS 4
  165. Nodes allowed to connect to us, specified by their public key, and what IP
  166. address(es) to give them\&. It is fine to only specify one address\&.
  167. .PP
  168. Example:
  169. .PP
  170. "allowedConnections":
  171. .br
  172. [
  173. .br
  174. {
  175. "publicKey": "f64hfl7c4uxt6krmhPutTheRealAddressOfANodeHere7kfm5m0.k",
  176. "ip4Address": "192.168.1.24",
  177. "ip4Prefix": 24,
  178. "ip6Address": "2001:123:ab::10",
  179. "ip6Prefix": 0
  180. .br
  181. },
  182. .br
  183. {
  184. "publicKey": "ydq8csdk8p8ThisIsJustAnExampleAddresstxuyqdf27hvn2z0.k",
  185. "ip4Address": "192.168.1.25",
  186. "ip4Prefix": 24
  187. .br
  188. }
  189. .br
  190. ]
  191. .RE
  192. .PP
  193. \fI"outgoingConnections":\fR [\&.\&.\&.]
  194. .RS 4
  195. An array of nodes to connect and ask for IP addresses.
  196. .PP
  197. Example:
  198. .PP
  199. "outgoingConnections":
  200. .br
  201. [
  202. "6743gf5tw80ExampleExampleExampleExamplevlyb23zfnuzv0.k",
  203. "pw9tfmr8pcrExampleExampleExampleExample8rhg1pgwpwf80.k",
  204. "g91lxyxhq0kExampleExampleExampleExample6t0mknuhw75l0.k"
  205. .br
  206. ]
  207. .RE
  208. .RE
  209. .RE
  210. .PP
  211. \fB"security":\fR [\&.\&.\&.]
  212. .RS 4
  213. An array that defines what user to change to after startup and whether to
  214. exempt the Angel process from this user change\&.
  215. .PP
  216. \fI"setuser":\fR "username"
  217. .RS 4
  218. User to switch to after startup, for security purposes\&. Default value is
  219. "nobody"\&.
  220. .PP
  221. .RE
  222. \fI"exemptAngel":\fR Integer
  223. .RS 4
  224. Whether or not to exempt the Angel process from the user change\&. The Angel is
  225. a small isolated piece of code which exists outside of the core's strict
  226. sandbox but does not handle network traffic\&. This option must be enabled for
  227. ipTunnel to automatically set IP addresses for the TUN device\&.
  228. .PP
  229. 0 \-\- False
  230. .br
  231. 1 \-\- True
  232. .RE
  233. .RE
  234. .PP
  235. \fB"logging":\fR {\&.\&.\&.}
  236. .RS 4
  237. Add or uncomment "logTo":"stdout" to have cjdns log to stdout rather than
  238. making logs available via the admin socket
  239. .RE
  240. .PP
  241. \fB"noBackground":\fR Integer
  242. .RS 4
  243. If set to a non-zero value, cjdns will not fork to the background\&.
  244. Recommended for use in conjunction with "logTo":"stdout"\&.
  245. .RE
  246. .PP
  247. \fB"dns":\fR {\&.\&.\&.}
  248. .RS 4
  249. This section is used to configure the dns capabilities being added to cjdns\&.
  250. Unfortunetly, there is no documentation for this DNS section at this time\&.
  251. .PP
  252. \fI"keys":\fR [\&.\&.\&.]
  253. .RS 4
  254. .RE
  255. .PP
  256. \fI"servers":\fR [\&.\&.\&.]
  257. .RS 4
  258. .RE
  259. .PP
  260. \fI"MinSignatures":\fR Integer
  261. .RS 4
  262. .RE
  263. .RE
  264. .SH "FILES"
  265. .BI /etc/cjdroute.conf
  266. .RS 4
  267. A common location for the configuration file\&.
  268. .RE
  269. .SH "SEE ALSO"
  270. .BR cjdroute (1),
  271. .BR cjdns (8)