You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

oragono.yaml 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. # oragono IRCd config
  2. # network configuration
  3. network:
  4. # name of the network
  5. name: OragonoTest
  6. # server configuration
  7. server:
  8. # server name
  9. name: oragono.test
  10. # addresses to listen on
  11. listeners:
  12. # The standard plaintext port for IRC is 6667. This will listen on all interfaces:
  13. ":6667":
  14. # Allowing plaintext over the public Internet poses security and privacy issues,
  15. # so if possible, we recommend that you comment out the above line and replace
  16. # it with these two, which listen only on local interfaces:
  17. # "127.0.0.1:6667": # (loopback ipv4, localhost-only)
  18. # "[::1]:6667": # (loopback ipv6, localhost-only)
  19. # Alternately, if you have a TLS certificate issued by a recognized CA,
  20. # you can configure port 6667 as an STS-only listener that only serves
  21. # "redirects" to the TLS port, but doesn't allow chat. See the manual
  22. # for details.
  23. # The standard SSL/TLS port for IRC is 6697. This will listen on all interfaces:
  24. ":6697":
  25. tls:
  26. key: tls.key
  27. cert: tls.crt
  28. # 'proxy' should typically be false. It's only for Kubernetes-style load
  29. # balancing that does not terminate TLS, but sends an initial PROXY line
  30. # in plaintext.
  31. proxy: false
  32. # Example of a Unix domain socket for proxying:
  33. # "/tmp/oragono_sock":
  34. # Example of a Tor listener: any connection that comes in on this listener will
  35. # be considered a Tor connection. It is strongly recommended that this listener
  36. # *not* be on a public interface --- it should be on 127.0.0.0/8 or unix domain:
  37. # "/hidden_service_sockets/oragono_tor_sock":
  38. # tor: true
  39. # sets the permissions for Unix listen sockets. on a typical Linux system,
  40. # the default is 0775 or 0755, which prevents other users/groups from connecting
  41. # to the socket. With 0777, it behaves like a normal TCP socket
  42. # where anyone can connect.
  43. unix-bind-mode: 0777
  44. # configure the behavior of Tor listeners (ignored if you didn't enable any):
  45. tor-listeners:
  46. # if this is true, connections from Tor must authenticate with SASL
  47. require-sasl: false
  48. # what hostname should be displayed for Tor connections?
  49. vhost: "tor-network.onion"
  50. # allow at most this many connections at once (0 for no limit):
  51. max-connections: 64
  52. # connection throttling (limit how many connection attempts are allowed at once):
  53. throttle-duration: 10m
  54. # set to 0 to disable throttling:
  55. max-connections-per-duration: 64
  56. # strict transport security, to get clients to automagically use TLS
  57. sts:
  58. # whether to advertise STS
  59. #
  60. # to stop advertising STS, leave this enabled and set 'duration' below to "0". this will
  61. # advertise to connecting users that the STS policy they have saved is no longer valid
  62. enabled: false
  63. # how long clients should be forced to use TLS for.
  64. # setting this to a too-long time will mean bad things if you later remove your TLS.
  65. # the default duration below is 1 month, 2 days and 5 minutes.
  66. duration: 1mo2d5m
  67. # tls port - you should be listening on this port above
  68. port: 6697
  69. # should clients include this STS policy when they ship their inbuilt preload lists?
  70. preload: false
  71. # use ident protocol to get usernames
  72. check-ident: false
  73. # password to login to the server
  74. # generated using "oragono genpasswd"
  75. #password: ""
  76. # motd filename
  77. # if you change the motd, you should move it to ircd.motd
  78. motd: oragono.motd
  79. # motd formatting codes
  80. # if this is true, the motd is escaped using formatting codes like $c, $b, and $i
  81. motd-formatting: true
  82. # addresses/CIDRs the PROXY command can be used from
  83. # this should be restricted to 127.0.0.1/8 and ::1/128 (unless you have a good reason)
  84. # you should also add these addresses to the connection limits and throttling exemption lists
  85. proxy-allowed-from:
  86. # - localhost
  87. # - "192.168.1.1"
  88. # - "192.168.10.1/24"
  89. # controls the use of the WEBIRC command (by IRC<->web interfaces, bouncers and similar)
  90. webirc:
  91. # one webirc block -- should correspond to one set of gateways
  92. -
  93. # tls fingerprint the gateway must connect with to use this webirc block
  94. fingerprint: 938dd33f4b76dcaf7ce5eb25c852369cb4b8fb47ba22fc235aa29c6623a5f182
  95. # password the gateway uses to connect, made with oragono genpasswd
  96. password: "$2a$04$sLEFDpIOyUp55e6gTMKbOeroT6tMXTjPFvA0eGvwvImVR9pkwv7ee"
  97. # addresses/CIDRs that can use this webirc command
  98. # you should also add these addresses to the connection limits and throttling exemption lists
  99. hosts:
  100. # - localhost
  101. # - "192.168.1.1"
  102. # - "192.168.10.1/24"
  103. # allow use of the RESUME extension over plaintext connections:
  104. # do not enable this unless the ircd is only accessible over internal networks
  105. allow-plaintext-resume: false
  106. # maximum length of clients' sendQ in bytes
  107. # this should be big enough to hold bursts of channel/direct messages
  108. max-sendq: 16k
  109. # compatibility with legacy clients
  110. compatibility:
  111. # many clients require that the final parameter of certain messages be an
  112. # RFC1459 trailing parameter, i.e., prefixed with :, whether or not this is
  113. # actually required. this forces Oragono to send those parameters
  114. # as trailings. this is recommended unless you're testing clients for conformance;
  115. # defaults to true when unset for that reason.
  116. force-trailing: true
  117. # some clients (ZNC 1.6.x and lower, Pidgin 2.12 and lower) do not
  118. # respond correctly to SASL messages with the server name as a prefix:
  119. # https://github.com/znc/znc/issues/1212
  120. # this works around that bug, allowing them to use SASL.
  121. send-unprefixed-sasl: true
  122. # maximum number of connections per subnet
  123. connection-limits:
  124. # whether to enforce connection limits or not
  125. enabled: true
  126. # how wide the cidr should be for IPv4
  127. cidr-len-ipv4: 32
  128. # how wide the cidr should be for IPv6
  129. cidr-len-ipv6: 64
  130. # maximum concurrent connections per subnet (defined above by the cidr length)
  131. connections-per-subnet: 16
  132. # IPs/networks which are exempted from connection limits
  133. exempted:
  134. - "localhost"
  135. # - "192.168.1.1"
  136. # - "2001:0db8::/32"
  137. # automated connection throttling
  138. connection-throttling:
  139. # whether to throttle connections or not
  140. enabled: true
  141. # how wide the cidr should be for IPv4
  142. cidr-len-ipv4: 32
  143. # how wide the cidr should be for IPv6
  144. cidr-len-ipv6: 64
  145. # how long to keep track of connections for
  146. duration: 10m
  147. # maximum number of connections, per subnet, within the given duration
  148. max-connections: 32
  149. # how long to ban offenders for, and the message to use
  150. # after banning them, the number of connections is reset (which lets you use UNDLINE to unban people)
  151. ban-duration: 10m
  152. ban-message: You have attempted to connect too many times within a short duration. Wait a while, and you will be able to connect.
  153. # IPs/networks which are exempted from connection throttling
  154. exempted:
  155. - "localhost"
  156. # - "192.168.1.1"
  157. # - "2001:0db8::/32"
  158. # IP cloaking hides users' IP addresses from other users and from channel admins
  159. # (but not from server admins), while still allowing channel admins to ban
  160. # offending IP addresses or networks. In place of hostnames derived from reverse
  161. # DNS, users see fake domain names like pwbs2ui4377257x8.oragono. These names are
  162. # generated deterministically from the underlying IP address, but if the underlying
  163. # IP is not already known, it is infeasible to recover it from the cloaked name.
  164. ip-cloaking:
  165. # whether to enable IP cloaking
  166. enabled: false
  167. # fake TLD at the end of the hostname, e.g., pwbs2ui4377257x8.oragono
  168. netname: "oragono"
  169. # secret key to prevent dictionary attacks against cloaked IPs
  170. # any high-entropy secret is valid for this purpose:
  171. # you MUST generate a new one for your installation.
  172. # suggestion: use the output of `oragono mksecret`
  173. # note that rotating this key will invalidate all existing ban masks.
  174. secret: "siaELnk6Kaeo65K3RCrwJjlWaZ-Bt3WuZ2L8MXLbNb4"
  175. # the cloaked hostname is derived only from the CIDR (most significant bits
  176. # of the IP address), up to a configurable number of bits. this is the
  177. # granularity at which bans will take effect for ipv4 (a /32 is a fully
  178. # specified IP address). note that changing this value will invalidate
  179. # any stored bans.
  180. cidr-len-ipv4: 32
  181. # analogous value for ipv6 (an ipv6 /64 is the typical prefix assigned
  182. # by an ISP to an individual customer for their LAN)
  183. cidr-len-ipv6: 64
  184. # number of bits of hash output to include in the cloaked hostname.
  185. # more bits means less likelihood of distinct IPs colliding,
  186. # at the cost of a longer cloaked hostname. if this value is set to 0,
  187. # all users will receive simply `netname` as their cloaked hostname.
  188. num-bits: 80
  189. # account options
  190. accounts:
  191. # account registration
  192. registration:
  193. # can users register new accounts?
  194. enabled: true
  195. # this is the bcrypt cost we'll use for account passwords
  196. bcrypt-cost: 12
  197. # length of time a user has to verify their account before it can be re-registered
  198. verify-timeout: "32h"
  199. # callbacks to allow
  200. enabled-callbacks:
  201. - none # no verification needed, will instantly register successfully
  202. # example configuration for sending verification emails via a local mail relay
  203. # callbacks:
  204. # mailto:
  205. # server: localhost
  206. # port: 25
  207. # tls:
  208. # enabled: false
  209. # username: ""
  210. # password: ""
  211. # sender: "admin@my.network"
  212. # is account authentication enabled?
  213. authentication-enabled: true
  214. # throttle account login attempts (to prevent either password guessing, or DoS
  215. # attacks on the server aimed at forcing repeated expensive bcrypt computations)
  216. login-throttling:
  217. enabled: true
  218. # window
  219. duration: 1m
  220. # number of attempts allowed within the window
  221. max-attempts: 3
  222. # some clients (notably Pidgin and Hexchat) offer only a single password field,
  223. # which makes it impossible to specify a separate server password (for the PASS
  224. # command) and SASL password. if this option is set to true, a client that
  225. # successfully authenticates with SASL will not be required to send
  226. # PASS as well, so it can be configured to authenticate with SASL only.
  227. skip-server-password: false
  228. # require-sasl controls whether clients are required to have accounts
  229. # (and sign into them using SASL) to connect to the server
  230. require-sasl:
  231. # if this is enabled, all clients must authenticate with SASL while connecting
  232. enabled: false
  233. # IPs/CIDRs which are exempted from the account requirement
  234. exempted:
  235. - "localhost"
  236. # - '10.10.0.0/16'
  237. # nick-reservation controls how, and whether, nicknames are linked to accounts
  238. nick-reservation:
  239. # is there any enforcement of reserved nicknames?
  240. enabled: false
  241. # how many nicknames, in addition to the account name, can be reserved?
  242. additional-nick-limit: 2
  243. # method describes how nickname reservation is handled
  244. # already logged-in using SASL or NickServ
  245. # timeout: let the user change to the registered nickname, give them X seconds
  246. # to login and then rename them if they haven't done so
  247. # strict: don't let the user change to the registered nickname unless they're
  248. # already logged-in using SASL or NickServ
  249. # optional: no enforcement by default, but allow users to opt in to
  250. # the enforcement level of their choice
  251. method: strict
  252. # allow users to set their own nickname enforcement status, e.g.,
  253. # to opt in to strict enforcement
  254. allow-custom-enforcement: true
  255. # rename-timeout - this is how long users have 'til they're renamed
  256. rename-timeout: 30s
  257. # rename-prefix - this is the prefix to use when renaming clients (e.g. Guest-AB54U31)
  258. rename-prefix: Guest-
  259. # bouncer controls whether oragono can act as a bouncer, i.e., allowing
  260. # multiple connections to attach to the same client/nickname identity
  261. bouncer:
  262. # when disabled, each connection must use a separate nickname (as is the
  263. # typical behavior of IRC servers). when enabled, a new connection that
  264. # has authenticated with SASL can associate itself with an existing
  265. # client
  266. enabled: true
  267. # clients can opt in to bouncer functionality using the cap system, or
  268. # via nickserv. if this is enabled, then they have to opt out instead
  269. allowed-by-default: false
  270. # vhosts controls the assignment of vhosts (strings displayed in place of the user's
  271. # hostname/IP) by the HostServ service
  272. vhosts:
  273. # are vhosts enabled at all?
  274. enabled: true
  275. # maximum length of a vhost
  276. max-length: 64
  277. # regexp for testing the validity of a vhost
  278. # (make sure any changes you make here are RFC-compliant)
  279. valid-regexp: '^[0-9A-Za-z.\-_/]+$'
  280. # options controlling users requesting vhosts:
  281. user-requests:
  282. # can users request vhosts at all? if this is false, operators with the
  283. # 'vhosts' capability can still assign vhosts manually
  284. enabled: false
  285. # if uncommented, all new vhost requests will be dumped into the given
  286. # channel, so opers can review them as they are sent in. ensure that you
  287. # have registered and restricted the channel appropriately before you
  288. # uncomment this.
  289. #channel: "#vhosts"
  290. # after a user's vhost has been approved or rejected, they need to wait
  291. # this long (starting from the time of their original request)
  292. # before they can request a new one.
  293. cooldown: 168h
  294. # channel options
  295. channels:
  296. # modes that are set when new channels are created
  297. # +n is no-external-messages and +t is op-only-topic
  298. # see /QUOTE HELP cmodes for more channel modes
  299. default-modes: +nt
  300. # how many channels can a client be in at once?
  301. max-channels-per-client: 100
  302. # if this is true, new channels can only be created by operators with the
  303. # `chanreg` operator capability
  304. operator-only-creation: false
  305. # channel registration - requires an account
  306. registration:
  307. # can users register new channels?
  308. enabled: true
  309. # how many channels can each account register?
  310. max-channels-per-account: 15
  311. # operator classes
  312. oper-classes:
  313. # local operator
  314. "local-oper":
  315. # title shown in WHOIS
  316. title: Local Operator
  317. # capability names
  318. capabilities:
  319. - "oper:local_kill"
  320. - "oper:local_ban"
  321. - "oper:local_unban"
  322. - "nofakelag"
  323. # network operator
  324. "network-oper":
  325. # title shown in WHOIS
  326. title: Network Operator
  327. # oper class this extends from
  328. extends: "local-oper"
  329. # capability names
  330. capabilities:
  331. - "oper:remote_kill"
  332. - "oper:remote_ban"
  333. - "oper:remote_unban"
  334. # server admin
  335. "server-admin":
  336. # title shown in WHOIS
  337. title: Server Admin
  338. # oper class this extends from
  339. extends: "local-oper"
  340. # capability names
  341. capabilities:
  342. - "oper:rehash"
  343. - "oper:die"
  344. - "accreg"
  345. - "sajoin"
  346. - "samode"
  347. - "vhosts"
  348. - "chanreg"
  349. # ircd operators
  350. opers:
  351. # operator named 'dan'
  352. dan:
  353. # which capabilities this oper has access to
  354. class: "server-admin"
  355. # custom whois line
  356. whois-line: is a cool dude
  357. # custom hostname
  358. vhost: "n"
  359. # modes are the modes to auto-set upon opering-up
  360. modes: +is acjknoqtux
  361. # password to login with /OPER command
  362. # generated using "oragono genpasswd"
  363. password: "$2a$04$LiytCxaY0lI.guDj2pBN4eLRD5cdM2OLDwqmGAgB6M2OPirbF5Jcu"
  364. # logging, takes inspiration from Insp
  365. logging:
  366. -
  367. # how to log these messages
  368. #
  369. # file log to given target filename
  370. # stdout log to stdout
  371. # stderr log to stderr
  372. # (you can specify multiple methods, e.g., to log to both stderr and a file)
  373. method: stderr
  374. # filename to log to, if file method is selected
  375. # filename: ircd.log
  376. # type(s) of logs to keep here. you can use - to exclude those types
  377. #
  378. # exclusions take precedent over inclusions, so if you exclude a type it will NEVER
  379. # be logged, even if you explicitly include it
  380. #
  381. # useful types include:
  382. # * everything (usually used with exclusing some types below)
  383. # server server startup, rehash, and shutdown events
  384. # accounts account registration and authentication
  385. # channels channel creation and operations
  386. # commands command calling and operations
  387. # opers oper actions, authentication, etc
  388. # services actions related to NickServ, ChanServ, etc.
  389. # internal unexpected runtime behavior, including potential bugs
  390. # userinput raw lines sent by users
  391. # useroutput raw lines sent to users
  392. type: "* -userinput -useroutput"
  393. # one of: debug info warn error
  394. level: info
  395. #-
  396. # # example of a file log that avoids logging IP addresses
  397. # method: file
  398. # filename: ircd.log
  399. # type: "* -userinput -useroutput -localconnect -localconnect-ip"
  400. # level: debug
  401. # debug options
  402. debug:
  403. # when enabled, oragono will attempt to recover from certain kinds of
  404. # client-triggered runtime errors that would normally crash the server.
  405. # this makes the server more resilient to DoS, but could result in incorrect
  406. # behavior. deployments that would prefer to "start from scratch", e.g., by
  407. # letting the process crash and auto-restarting it with systemd, can set
  408. # this to false.
  409. recover-from-errors: true
  410. # optionally expose a pprof http endpoint: https://golang.org/pkg/net/http/pprof/
  411. # it is strongly recommended that you don't expose this on a public interface;
  412. # if you need to access it remotely, you can use an SSH tunnel.
  413. # set to `null`, "", leave blank, or omit to disable
  414. # pprof-listener: "localhost:6060"
  415. # datastore configuration
  416. datastore:
  417. # path to the datastore
  418. path: ircd.db
  419. # if the database schema requires an upgrade, `autoupgrade` will attempt to
  420. # perform it automatically on startup. the database will be backed
  421. # up, and if the upgrade fails, the original database will be restored.
  422. autoupgrade: true
  423. # languages config
  424. languages:
  425. # whether to load languages
  426. enabled: true
  427. # default language to use for new clients
  428. # 'en' is the default English language in the code
  429. default: en
  430. # which directory contains our language files
  431. path: languages
  432. # limits - these need to be the same across the network
  433. limits:
  434. # nicklen is the max nick length allowed
  435. nicklen: 32
  436. # identlen is the max ident length allowed
  437. identlen: 20
  438. # channellen is the max channel length allowed
  439. channellen: 64
  440. # awaylen is the maximum length of an away message
  441. awaylen: 500
  442. # kicklen is the maximum length of a kick message
  443. kicklen: 1000
  444. # topiclen is the maximum length of a channel topic
  445. topiclen: 1000
  446. # maximum number of monitor entries a client can have
  447. monitor-entries: 100
  448. # whowas entries to store
  449. whowas-entries: 100
  450. # maximum length of channel lists (beI modes)
  451. chan-list-modes: 60
  452. # maximum length of IRC lines
  453. # this should generally be 1024-2048, and will only apply when negotiated by clients
  454. linelen:
  455. # ratified version of the message-tags cap fixes the max tag length at 8191 bytes
  456. # configurable length for the rest of the message:
  457. rest: 2048
  458. # maximum number of messages to accept during registration (prevents
  459. # DoS / resource exhaustion attacks):
  460. registration-messages: 1024
  461. # fakelag: prevents clients from spamming commands too rapidly
  462. fakelag:
  463. # whether to enforce fakelag
  464. enabled: true
  465. # time unit for counting command rates
  466. window: 1s
  467. # clients can send this many commands without fakelag being imposed
  468. burst-limit: 5
  469. # once clients have exceeded their burst allowance, they can send only
  470. # this many commands per `window`:
  471. messages-per-window: 2
  472. # client status resets to the default state if they go this long without
  473. # sending any commands:
  474. cooldown: 2s
  475. # message history tracking, for the RESUME extension and possibly other uses in future
  476. history:
  477. # should we store messages for later playback?
  478. # the current implementation stores messages in RAM only; they do not persist
  479. # across server restarts. however, you should not enable this unless you understand
  480. # how it interacts with the GDPR and/or any data privacy laws that apply
  481. # in your country and the countries of your users.
  482. enabled: false
  483. # how many channel-specific events (messages, joins, parts) should be tracked per channel?
  484. channel-length: 1024
  485. # how many direct messages and notices should be tracked per user?
  486. client-length: 256
  487. # how long should we try to preserve messages?
  488. # if `autoresize-window` is 0, the in-memory message buffers are preallocated to
  489. # their maximum length. if it is nonzero, the buffers are initially small and
  490. # are dynamically expanded up to the maximum length. if the buffer is full
  491. # and the oldest message is older than `autoresize-window`, then it will overwrite
  492. # the oldest message rather than resize; otherwise, it will expand if possible.
  493. autoresize-window: 1h
  494. # number of messages to automatically play back on channel join (0 to disable):
  495. autoreplay-on-join: 0
  496. # maximum number of CHATHISTORY messages that can be
  497. # requested at once (0 disables support for CHATHISTORY)
  498. chathistory-maxmessages: 100