source: code/trunk/doc/suika-config.5@ 820

Last change on this file since 820 was 817, checked in by yakumo.izuru, 2 years ago

See you in Hell, scdoc!

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 3.7 KB
Line 
1.Dd $Mdocdate$
2.Dt SUIKA-CONFIG 5
3.Os
4.Sh NAME
5.Nm suika-config
6.Nd Configuration file for suika IRC bouncer
7.Sh DESCRIPTION
8The config file has one directive per line
9
10Example:
11
12listen ircs://
13.Pp
14tls cert.pem key.pem
15.Pp
16hostname example.org
17
18The following directives are supported:
19
20.Bl -tag -width 7n -compact
21.It listen <uri>
22Listening URI (default: ":6697")
23
24The following URIs are supported:
25.Bl -tag -width 11n -compact
26.It ircs://[host]:[port]
27listens with TLS over TCP
28.It irc+insecure://[host]:[port]
29listens with plain-text over TCP
30.It unix:///<path>
31listens on a Unix domain socket
32.It wss://[host]:[port]
33listens for WebSocket connections over
34TLS
35.It ws+insecure://[host]:[port]
36listens for plain-text WebSocket
37connections
38.It ident://[host]:[port]
39listens for plain-text ident
40connections
41.It http+prometheus://[host]:[port]
42listens for plain-text HTTP
43connections and serves Prometheus
44metrics (host must be "localhost")
45.It http+pprof://[host]:[port]
46listens for plain-text HTTP
47connections and serves pprof
48runtime profiling data
49(host must be "localhost").
50For more information, see:
51<https://pkg.go.dev/net/http/pprof>.
52.El
53
54If the scheme is omitted, "ircs" is assumed.
55If multiple "listen" directives are specified,
56suika will listen on each of them.
57
58.It hostname <name>
59Server hostname
60
61.It title <title>
62Server title. This will be sent as
63the ISUPPORT NETWORK value when
64clients don't select a specific
65network.
66
67.It tls <cert> <key>
68Enable TLS support. The certificate
69and key files must be PEM-encoded.
70
71.It db <driver> <source>
72Set the database location for user,
73network and channel storage. By
74default, a sqlite3 database is
75opened in ./suika.db.
76
77Supported drivers:
78
79.Bl tag -width 7n -compact
80.It sqlite3
81expects source to be a path to
82the SQLite file
83.It postgres
84expects source to be a space-
85separated list of key=value
86parameters, e.g. db postgres
87host=/run/postgresql
88dbname=suika. Note that
89sslmode defaults to require.
90For more information on
91connection strings, see:
92<https://pkg.go.dev/github.com/lib/pq#hdr-Connection_String_Parameters>
93.El
94
95.It log fs <path>
96Path to the bouncer logs directory, or empty to
97disable logging. By default, logging is disabled.
98
99.It http-origin <patterns>
100List of allowed HTTP origins for WebSocket listeners.
101The parameters are interpreted as shell patterns, see *glob*(7).
102
103By default, only the request host is authorized.
104Use this directive to enable cross-origin WebSockets.
105
106.It accept-proxy-ip <cidr..>
107Allow the specified IPs to act as a proxy. Proxys have the ability to
108overwrite the remote and local connection addresses (via the PROXY protocol,
109the Forwarded HTTP header field defined in RFC 7239 or the X-Forwarded-\*
110HTTP header fields). The special name "localhost" accepts the loopback
111addresses 127.0.0.0/8 and ::1/128.
112
113By default, all IPs are rejected.
114
115.It max-user-networks <limit>
116Maximum number of networks per user. By default, there is no limit.
117
118.It motd <path>
119Path to the MOTD file. The bouncer MOTD is sent to clients which aren't
120bound to a specific network. By default, no MOTD is sent.
121
122.It multi-upstream-mode <true|false>
123Globally enable or disable multi-upstream mode.
124By default, multi-upstream mode is enabled.
125
126.It upstream-user-ip <cidr...>
127Enable per-user IP addresses.
128One IPv4 range and/or one IPv6 range can be
129specified in CIDR notation.
130One IP address per range will be assigned to
131each user and will be used as the source address when connecting to an
132upstream network.
133
134This can be useful to avoid having the whole bouncer banned from an upstream
135network because of one malicious user.
136.El
137.Sh SEE ALSO
138.Xr suika 1
139.Xr suika-bouncerserv 7
140.Sh AUTHORS
141.An Simon Ser and contributors Aq https://emersion.fr
142.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja
Note: See TracBrowser for help on using the repository browser.