forked from matrix-org/matrix-bifrost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sample.yaml
137 lines (125 loc) · 5 KB
/
config.sample.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
bridge:
# Your homeserver server_name.
domain: "localhost"
# A internally reachable endpoint for the CS api of the homeserver.
homeserverUrl: "http://localhost:8008"
# Prefix of all users of the bridge.
userPrefix: "_bifrost_"
# If homeserverUrl is not reachable publically, the public address that media can be reached on.
# mediaserverUrl: "http://example.com:8008"
# Set this to the port you want the bridge to listen on.
appservicePort: 9555
datastore:
# The datastore engine to use, either "nedb" or "postgres"
# engine: "nedb"
# For NeDB:
# Location of the user and room database files, by default will be stored in the working directory.
# For Postgres:
# A postgres style connection string, e.g. "postgres://postgres:pass@localhost/bifrost"
# connectionString: "nedb://."
purple:
# For selecting a specific backend. One of "node-purple", "xmpp.js". Defaults to "node-purple"
backend: "xmpp.js"
# -- For xmpp.js - You need an existing xmpp server for this to work.
backendOpts:
# endpoint to reach the component on. The default port is 5347
service: "xmpp://localhost:5347"
# domin assigned to the component.
domain: "matrix.localhost"
# password needed by the component.
password: "jam"
# Matrix forwards room aliases join requests matching a regex in the
# registration file to the owner's bridge, if the room doesn't exist.
# The following options allow you to configure how the purple bridge may
# match those aliases to remote rooms.
portals:
# Enable gateway support for protocols that support them, e.g. xmpp.js
enableGateway: false
# List of regexes to match a alias that can be turned into a bridge.
aliases:
# This matches _purple_ followed by anything
"/^_purple_(.+)$/":
# Use the prpl-jabber protocol.
protocol: "prpl-jabber"
properties:
# Set room to the first regex match
room: "regex:1"
# Set the server to be conf.localhost
server: "conf.localhost"
# For xmpp.js, please use:
# Automatically register users with accounts if they join/get invited
# a room with a protocol they are not bound to.
# This is REQUIRED for xmpp.js to work.
autoRegistration:
enabled: true
protocolSteps:
# For xmpp.js, please use:
xmpp-js:
type: "implicit"
parameters:
username: "<T_LOCALPART>@matrix.localhost"
# Set up access controls for the bridge
# access:
# accountCreation:
# whitelist:
# - "^@.*:yourdomain$"
# Available subsitution variables for parameters:
# <T_MXID> - The users mxid.
# <T_MXID_SANE> - The users mxid, with an : replaced with _ and the @ discarded.
# <T_DOMAIN> - The users domain.
# <T_LOCALPART> - The users localpart.
# <T_DISPLAYNAME> - The users displayname, or localpart if not set.
# <T_GENERATEPWD> - Generates a 32 char password
# <T_AVATAR> - The MXC url of the users avatar, if available.
## This is how to autoregister folks with prosody (xmpp)
## with the included lua script in extras. This applies to node-purple (NOT xmpp.js)
# protocolSteps:
# prpl-jabber:
# type: "http"
# path: "http://localhost:5280/register_account/"
# opts:
# method: "post"
# usernameResult: null
# parameters:
# username: "m_<T_LOCALPART>"
# nick: "<T_DISPLAYNAME>"
# password: "<T_GENERATEPWD>"
# auth_token: "bridge-token"
# ip: "127.0.0.1"
# paramsToStore:
# - password
# Enable prometheus metrics reporting.
# This will report metrics on /metrics on the same port as the bridge.
metrics:
enabled: true
provisioning:
# Can users use ""!purple" in a room to bridge it to a group.
enablePlumbing: false
# Required power level to bridge a room into a group.
requiredUserPL: 100
logging:
# Set the logging level for stdout.
# Lower levels are inclusive of higher levels e.g. info will contain warn and error logging.
console: "info" # "debug", "info", "warn", "error", "off"
# A list of files and their associated logging levels.
files:
"./info.log": "info"
# "./error.log": "error"
# "./warn.log": "warn"
# "./debug.log": "debug"
# These are specific flags or values to tune the bridge to different setups.
# The defaults are usually fine, but adjust as needed.
tuning:
# Do not send a message or join a room before setting a users profile for
# the first time. This should help clients hide ugly mxids better behind
# displaynames.
waitOnProfileBeforeSend: true
# A nasty hack to check the domain for conf* to see if the PM is coming from a MUC.
# This is only really needed for legacy clients that don't implement xmlns.
# This is specific to the XMPP.js bridge.
# conferencePMFallbackCheck: false
# Don't send messages from the remote protocol until we have seen them join.
# A list of prefixes to check for a userId.
# This is useful for talking to remote IRC users who might not see a message
# until after they have joined.
# waitOnJoinBeforePM: string[];