Skip to content

Commit a474a24

Browse files
committed
Update server config sample
1 parent 582e1a3 commit a474a24

File tree

1 file changed

+111
-38
lines changed
  • roles/custom/matrix-bridge-appservice-irc/defaults

1 file changed

+111
-38
lines changed

roles/custom/matrix-bridge-appservice-irc/defaults/main.yml

Lines changed: 111 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,25 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
8686
# # It is also used in the Third Party Lookup API as the instance `desc`
8787
# # property, where each server is an instance.
8888
# name: "ExampleNet"
89-
89+
# # Additional addresses to connect to, used for load balancing between IRCDs.
9090
# additionalAddresses: [ "irc2.example.com" ]
91+
# # Typically additionalAddresses would be in addition to the address key given above,
92+
# # but some configurations wish to exclusively use additional addresses while reserving
93+
# # the top key for identification purposes. Set this to true to exclusively use the
94+
# # additionalAddresses array when connecting to servers.
95+
# onlyAdditionalAddresses: false
9196
# #
9297
# # [DEPRECATED] Use `name`, above, instead.
9398
# # A human-readable description string
9499
# # description: "Example.com IRC network"
95-
100+
#
96101
# # An ID for uniquely identifying this server amongst other servers being bridged.
97102
# # networkId: "example"
98-
99-
# # URL to an icon used as the network icon whenever this network appear in
100-
# # a network list. (Like in the Riot room directory, for instance.)
101-
# # icon: https://example.com/images/hash.png
102-
103+
#
104+
# # MXC URL to an icon used as the network icon whenever this network appear in
105+
# # a network list. (Like in the Element room directory, for instance.)
106+
# # icon: mxc://matrix.org/LpsSLrbANVrEIEOgEaVteItf
107+
#
103108
# # The port to connect to. Optional.
104109
# port: 6697
105110
# # Whether to use SSL or not. Default: false.
@@ -112,19 +117,26 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
112117
# # Whether to allow expired certs when connecting to the IRC server.
113118
# # Usually this should be off. Default: false.
114119
# allowExpiredCerts: false
115-
# # A specific CA to trust instead of the default CAs. Optional.
116-
# #ca: |
117-
# # -----BEGIN CERTIFICATE-----
118-
# # …
119-
# # -----END CERTIFICATE-----
120-
120+
#
121+
# # Set additional TLS options for the connections to the IRC server.
122+
# #tlsOptions:
123+
# # A specific CA to trust instead of the default CAs. Optional.
124+
# #ca: |
125+
# # -----BEGIN CERTIFICATE-----
126+
# # ...
127+
# # -----END CERTIFICATE-----
128+
# # Server name for the SNI (Server Name Indication) TLS extension. If the address you
129+
# # are using does not report the correct certificate name, you can override it here.
130+
# # servername: real.server.name
131+
# # ...or any options in https://nodejs.org/api/tls.html#tls_tls_connect_options_callback
132+
#
121133
# #
122134
# # The connection password to send for all clients as a PASS (or SASL, if enabled above) command. Optional.
123135
# # password: 'pa$$w0rd'
124136
# #
125137
# # Whether or not to send connection/error notices to real Matrix users. Default: true.
126138
# sendConnectionMessages: true
127-
139+
#
128140
# quitDebounce:
129141
# # Whether parts due to net-splits are debounced for delayMs, to allow
130142
# # time for the netsplit to resolve itself. A netsplit is detected as being
@@ -144,13 +156,13 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
144156
# delayMinMs: 3600000 # 1h
145157
# # Default: 7200000, = 2h
146158
# delayMaxMs: 7200000 # 2h
147-
159+
#
148160
# # A map for conversion of IRC user modes to Matrix power levels. This enables bridging
149161
# # of IRC ops to Matrix power levels only, it does not enable the reverse. If a user has
150162
# # been given multiple modes, the one that maps to the highest power level will be used.
151163
# modePowerMap:
152164
# o: 50
153-
165+
# v: 1
154166
# botConfig:
155167
# # Enable the presence of the bot in IRC channels. The bot serves as the entity
156168
# # which maps from IRC -> Matrix. You can disable the bot entirely which
@@ -173,6 +185,8 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
173185
# enabled: true
174186
# # The nickname to give the AS bot.
175187
# nick: "MatrixBot"
188+
# # The username to give to the AS bot. Defaults to "matrixbot"
189+
# username: "matrixbot"
176190
# # The password to give to NickServ or IRC Server for this nick. Optional.
177191
# # password: "helloworld"
178192
# #
@@ -181,7 +195,7 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
181195
# # real Matrix users in them, even if there is a mapping for the channel.
182196
# # Default: true
183197
# joinChannelsIfNoUsers: true
184-
198+
#
185199
# # Configuration for PMs / private 1:1 communications between users.
186200
# privateMessages:
187201
# # Enable the ability for PMs to be sent to/from IRC/Matrix.
@@ -190,12 +204,12 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
190204
# # Prevent Matrix users from sending PMs to the following IRC nicks.
191205
# # Optional. Default: [].
192206
# # exclude: ["Alice", "Bob"] # NOT YET IMPLEMENTED
193-
207+
#
194208
# # Should created Matrix PM rooms be federated? If false, only users on the
195209
# # HS attached to this AS will be able to interact with this room.
196210
# # Optional. Default: true.
197211
# federate: true
198-
212+
#
199213
# # Configuration for mappings not explicitly listed in the 'mappings'
200214
# # section.
201215
# dynamicChannels:
@@ -209,27 +223,34 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
209223
# # Should the AS publish the new Matrix room to the public room list so
210224
# # anyone can see it? Default: true.
211225
# published: true
226+
# # Publish the rooms to the homeserver directory, as oppose to the appservice
227+
# # room directory. Only used if `published` is on.
228+
# # Default: false
229+
# useHomeserverDirectory: true
212230
# # What should the join_rule be for the new Matrix room? If 'public',
213231
# # anyone can join the room. If 'invite', only users with an invite can
214232
# # join the room. Note that if an IRC channel has +k or +i set on it,
215233
# # join_rules will be set to 'invite' until these modes are removed.
216234
# # Default: "public".
217235
# joinRule: public
218-
# # This will set the m.room.related_groups state event in newly created rooms
219-
# # with the given groupId. This means flares will show up on IRC users in those rooms.
220-
# # This should be set to the same thing as namespaces.users.group_id in irc_registration.
221-
# # This does not alter existing rooms.
222-
# # Leaving this option empty will not set the event.
223-
# groupId: +myircnetwork:localhost
224236
# # Should created Matrix rooms be federated? If false, only users on the
225237
# # HS attached to this AS will be able to interact with this room.
226238
# # Default: true.
227239
# federate: true
240+
# # Force this room version when creating IRC channels. Beware if the homeserver doesn't
241+
# # support the room version then the request will fail. By default, no version is requested.
242+
# # roomVersion: "1"
228243
# # The room alias template to apply when creating new aliases. This only
229244
# # applies if createAlias is 'true'. The following variables are exposed:
230245
# # $SERVER => The IRC server address (e.g. "irc.example.com")
231246
# # $CHANNEL => The IRC channel (e.g. "#python")
232247
# # This MUST have $CHANNEL somewhere in it.
248+
# #
249+
# # In certain circumstances you might want to bridge your whole IRC network as a
250+
# # homeserver (e.g. #matrix:libera.chat). For these use cases, you can set the
251+
# # template to just be $CHANNEL. Doing so will preclude you from supporting
252+
# # other prefix characters though.
253+
# #
233254
# # Default: '#irc_$SERVER_$CHANNEL'
234255
# aliasTemplate: "#irc_$CHANNEL"
235256
# # A list of user IDs which the AS bot will send invites to in response
@@ -241,7 +262,11 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
241262
# # Prevent the given list of channels from being mapped under any
242263
# # circumstances.
243264
# # exclude: ["#foo", "#bar"]
244-
265+
#
266+
# # excludedUsers:
267+
# # - regex: "@.*:evilcorp.com"
268+
# # kickReason: "We don't like Evilcorp"
269+
#
245270
# # Configuration for controlling how Matrix and IRC membership lists are
246271
# # synced.
247272
# membershipLists:
@@ -250,12 +275,12 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
250275
# # synced. This must be enabled for anything else in this section to take
251276
# # effect. Default: false.
252277
# enabled: false
253-
278+
#
254279
# # Syncing membership lists at startup can result in hundreds of members to
255280
# # process all at once. This timer drip feeds membership entries at the
256281
# # specified rate. Default: 10000. (10s)
257282
# floodDelayMs: 10000
258-
283+
#
259284
# global:
260285
# ircToMatrix:
261286
# # Get a snapshot of all real IRC users on a channel (via NAMES) and
@@ -264,7 +289,14 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
264289
# # Make virtual Matrix clients join and leave rooms as their real IRC
265290
# # counterparts join/part channels. Default: false.
266291
# incremental: false
267-
292+
# # Should the bridge check if all Matrix users are connected to IRC and
293+
# # joined to the channel before relaying messages into the room.
294+
# #
295+
# # This is considered a safety net to avoid any leakages by the bridge to
296+
# # unconnected users, but given it ignores all IRC messages while users
297+
# # are still connecting it may be overkill.
298+
# requireMatrixJoined: false
299+
#
268300
# matrixToIrc:
269301
# # Get a snapshot of all real Matrix users in the room and join all of
270302
# # them to the mapped IRC channel on startup. Default: false.
@@ -273,21 +305,32 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
273305
# # counterparts join/leave rooms. Make sure your 'maxClients' value is
274306
# # high enough! Default: false.
275307
# incremental: false
276-
308+
#
277309
# # Apply specific rules to Matrix rooms. Only matrix-to-IRC takes effect.
278310
# rooms:
279311
# - room: "!qporfwt:localhost"
280312
# matrixToIrc:
281313
# initial: false
282314
# incremental: false
283-
315+
#
284316
# # Apply specific rules to IRC channels. Only IRC-to-matrix takes effect.
285317
# channels:
286318
# - channel: "#foo"
287319
# ircToMatrix:
288320
# initial: false
289321
# incremental: false
290-
322+
# requireMatrixJoined: false
323+
#
324+
# # Should the bridge ignore users which are not considered active on the bridge
325+
# # during startup
326+
# ignoreIdleUsersOnStartup:
327+
# enabled: true
328+
# # How many hours can a user be considered idle for before they are considered
329+
# # ignoreable
330+
# idleForHours: 720
331+
# # A regex which will exclude matching MXIDs from this check.
332+
# exclude: "foobar"
333+
#
291334
# mappings:
292335
# # 1:many mappings from IRC channels to room IDs on this IRC server.
293336
# # The Matrix room must already exist. Your Matrix client should expose
@@ -297,27 +340,27 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
297340
# # Channel key/password to use. Optional. If provided, Matrix users do
298341
# # not need to know the channel key in order to join the channel.
299342
# # key: "secret"
300-
343+
#
301344
# # Configuration for virtual Matrix users. The following variables are
302345
# # exposed:
303346
# # $NICK => The IRC nick
304347
# # $SERVER => The IRC server address (e.g. "irc.example.com")
305348
# matrixClients:
306349
# # The user ID template to use when creating virtual Matrix users. This
307-
# # MUST have $NICK somewhere in it.
350+
# # MUST start with an @ and have $NICK somewhere in it.
308351
# # Optional. Default: "@$SERVER_$NICK".
309352
# # Example: "@irc.example.com_Alice:example.com"
310353
# userTemplate: "@irc_$NICK"
311354
# # The display name to use for created Matrix clients. This should have
312355
# # $NICK somewhere in it if it is specified. Can also use $SERVER to
313356
# # insert the IRC domain.
314-
# # Optional. Default: "$NICK (IRC)". Example: "Alice (IRC)"
315-
# displayName: "$NICK (IRC)"
357+
# # Optional. Default: "$NICK". Example: "Alice"
358+
# displayName: "$NICK"
316359
# # Number of tries a client can attempt to join a room before the request
317360
# # is discarded. You can also use -1 to never retry or 0 to never give up.
318361
# # Optional. Default: -1
319362
# joinAttempts: -1
320-
363+
#
321364
# # Configuration for virtual IRC users. The following variables are exposed:
322365
# # $LOCALPART => The user ID localpart ("alice" in @alice:localhost)
323366
# # $USERID => The user ID
@@ -346,9 +389,20 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
346389
# # connected user. If not specified, all users will connect from the same
347390
# # (default) address. This may require additional OS-specific work to allow
348391
# # for the node process to bind to multiple different source addresses
349-
# # e.g IP_FREEBIND on Linux, which requires an LD_PRELOAD with the library
392+
# # Linux kernels 4.3+ support sysctl net.ipv6.ip_nonlocal_bind=1
393+
# # Older kernels will need IP_FREEBIND, which requires an LD_PRELOAD with the library
350394
# # https://github.com/matrix-org/freebindfree as Node does not expose setsockopt.
351395
# # prefix: "2001:0db8:85a3::" # modify appropriately
396+
#
397+
# # Optional. Define blocks of IPv6 addresses for different homeservers
398+
# # which can be used to restrict users of those homeservers to a given
399+
# # IP. These blocks should be considered immutable once set, as changing
400+
# # the startFrom value will NOT adjust existing IP addresses.
401+
# # Changing the startFrom value to a lower value may conflict with existing clients.
402+
# # Multiple homeservers may NOT share blocks.
403+
# blocks:
404+
# - homeserver: another-server.org
405+
# startFrom: '10:0000'
352406
# #
353407
# # The maximum amount of time in seconds that the client can exist
354408
# # without sending another message before being disconnected. Use 0 to
@@ -385,6 +439,25 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
385439
# # through the bridge e.g. caller ID as there is no way to /ACCEPT.
386440
# # Default: "" (no user modes)
387441
# # userModes: "R"
442+
# # The format of the realname defined for users, either mxid or reverse-mxid
443+
# realnameFormat: "mxid"
444+
# # The minimum time to wait between connection attempts if we were disconnected
445+
# # due to throttling.
446+
# # pingTimeoutMs: 600000
447+
# # The rate at which to send pings to the IRCd if the client is being quiet for a while.
448+
# # Whilst the IRCd *should* be sending pings to us to keep the connection alive, it appears
449+
# # that sometimes they don't get around to it and end up ping timing us out.
450+
# # pingRateMs: 60000
451+
# # Choose which conditions the IRC bridge should kick Matrix users for. Decisions to this from
452+
# # defaults should be taken with care as it may dishonestly repesent Matrix users on the IRC
453+
# # network, and cause your bridge to be banned.
454+
# kickOn:
455+
# # Kick a Matrix user from a bridged room if they fail to join the IRC channel.
456+
# channelJoinFailure: true
457+
# # Kick a Matrix user from ALL rooms if they are unable to get connected to IRC.
458+
# ircConnectionFailure: true
459+
# # Kick a Matrix user from ALL rooms if they choose to QUIT the IRC network.
460+
# userQuit: true
388461

389462
# Controls whether the matrix-appservice-discord container exposes its HTTP port (tcp/9999 in the container).
390463
#

0 commit comments

Comments
 (0)