Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

266 righe
14 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. # Homeserver details.
  3. homeserver:
  4. # The address that this appservice can use to connect to the homeserver.
  5. address: {{ matrix_wechat_homeserver_address | to_json }}
  6. # The domain of the homeserver (for MXIDs, etc).
  7. domain: {{ matrix_wechat_homeserver_domain | to_json }}
  8. # What software is the homeserver running?
  9. # Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
  10. software: standard
  11. # The URL to push real-time bridge status to.
  12. # If set, the bridge will make POST requests to this URL whenever a user's connection state changes.
  13. # The bridge will use the appservice as_token to authorize requests.
  14. status_endpoint: null
  15. # Endpoint for reporting per-message status.
  16. message_send_checkpoint_endpoint: null
  17. # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
  18. async_media: false
  19. # Should the bridge use a websocket for connecting to the homeserver?
  20. # The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
  21. # mautrix-asmux (deprecated), and hungryserv (proprietary).
  22. websocket: false
  23. # How often should the websocket be pinged? Pinging will be disabled if this is zero.
  24. ping_interval_seconds: 0
  25. # Application service host/registration related details.
  26. # Changing these values requires regeneration of the registration.
  27. appservice:
  28. # The address that the homeserver can use to connect to this appservice.
  29. address: {{ matrix_wechat_appservice_address | to_json }}
  30. # The hostname and port where this appservice should listen.
  31. hostname: 0.0.0.0
  32. port: 8080
  33. # Database config.
  34. database:
  35. # The database type. "sqlite3" and "postgres" are supported.
  36. type: postgres
  37. # The database URI.
  38. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  39. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  40. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  41. uri: {{ matrix_wechat_database_connection_string | to_json }}
  42. # Maximum number of connections. Mostly relevant for Postgres.
  43. max_open_conns: 20
  44. max_idle_conns: 2
  45. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  46. # Parsed with https://pkg.go.dev/time#ParseDuration
  47. max_conn_idle_time: null
  48. max_conn_lifetime: null
  49. # The unique ID of this appservice.
  50. id: wechat
  51. # Appservice bot details.
  52. bot:
  53. # Username of the appservice bot.
  54. username: {{ matrix_wechat_appservice_bot_username | to_json }}
  55. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  56. # to leave display name/avatar as-is.
  57. displayname: WeChat bridge bot
  58. avatar: mxc://matrix.org/rddVQBTjOOmNkNLXWfYJNfPW
  59. # Whether or not to receive ephemeral events via appservice transactions.
  60. # Requires MSC2409 support (i.e. Synapse 1.22+).
  61. ephemeral_events: true
  62. # Should incoming events be handled asynchronously?
  63. # This may be necessary for large public instances with lots of messages going through.
  64. # However, messages will not be guaranteed to be bridged in the same order they were sent in.
  65. async_transactions: false
  66. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  67. as_token: {{ matrix_wechat_appservice_token | to_json }}
  68. hs_token: {{ matrix_wechat_homeserver_token | to_json }}
  69. # Bridge config
  70. bridge:
  71. # Localpart template of MXIDs for WeChat users.
  72. # {% raw %}{{.}}{% endraw %} is replaced with the uin of the WeChat user.
  73. username_template: {% raw %}_wechat_{{.}}{% endraw %}
  74. # Displayname template for WeChat users.
  75. displayname_template: "{% raw %}{{if .Name}}{{.Name}}{{else}}{{.Uin}}{{end}} (WeChat){% endraw %}"
  76. # WeChat listen address (for agent connection)
  77. listen_address: "0.0.0.0:20002"
  78. listen_secret: {{ matrix_wechat_bridge_listen_secret | to_json }}
  79. # Should the bridge create a space for each logged-in user and add bridged rooms to it?
  80. # Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time.
  81. personal_filtering_spaces: false
  82. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  83. message_status_events: false
  84. # Whether the bridge should send error notices via m.notice events when a message fails to bridge.
  85. message_error_notices: true
  86. portal_message_buffer: 128
  87. # Enable redaction
  88. allow_redaction: false
  89. # Should puppet avatars be fetched from the server even if an avatar is already set?
  90. user_avatar_sync: true
  91. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  92. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  93. # and is therefore prone to race conditions.
  94. sync_direct_chat_list: false
  95. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  96. # presence is bridged. These settings set the default values.
  97. # Existing users won't be affected when these are changed.
  98. default_bridge_presence: false
  99. # Send the presence as "available" to WeChat when users start typing on a portal.
  100. # This works as a workaround for homeservers that do not support presence, and allows
  101. # users to see when the WeChat user on the other side is typing during a conversation.
  102. send_presence_on_typing: false
  103. # Servers to always allow double puppeting from
  104. double_puppet_server_map:
  105. "{{ matrix_wechat_homeserver_domain }}": {{ matrix_wechat_homeserver_address }}
  106. # Allow using double puppeting from any server with a valid client .well-known file.
  107. double_puppet_allow_discovery: false
  108. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  109. #
  110. # If set, double puppeting will be enabled automatically for local users
  111. # instead of users having to find an access token and run `login-matrix`
  112. # manually.
  113. login_shared_secret_map: {{ matrix_wechat_login_shared_secret_map | to_json }}
  114. # Whether to explicitly set the avatar and room name for private chat portal rooms.
  115. # If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
  116. # If set to `always`, all DM rooms will have explicit names and avatars set.
  117. # If set to `never`, DM rooms will never have names and avatars set.
  118. private_chat_portal_meta: default
  119. # Should group members be synced in parallel? This makes member sync faster
  120. parallel_member_sync: false
  121. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  122. # This field will automatically be changed back to false after it, except if the config file is not writable.
  123. resend_bridge_info: false
  124. # When using double puppeting, should muted chats be muted in Matrix?
  125. mute_bridging: false
  126. # Allow invite permission for user. User can invite any bots to room with WeChat
  127. # users (private chat and groups)
  128. allow_user_invite: false
  129. # Whether or not created rooms should have federation enabled.
  130. # If false, created portal rooms will never be federated.
  131. federate_rooms: true
  132. # Should the bridge never send alerts to the bridge management room?
  133. # These are mostly things like the user being logged out.
  134. disable_bridge_alerts: false
  135. # Maximum time for handling Matrix events. Duration strings formatted for https://pkg.go.dev/time#ParseDuration
  136. # Null means there's no enforced timeout.
  137. message_handling_timeout:
  138. # Send an error message after this timeout, but keep waiting for the response until the deadline.
  139. # This is counted from the origin_server_ts, so the warning time is consistent regardless of the source of delay.
  140. # If the message is older than this when it reaches the bridge, the message won't be handled at all.
  141. error_after: null
  142. # Drop messages after this timeout. They may still go through if the message got sent to the servers.
  143. # This is counted from the time the bridge starts handling the message.
  144. deadline: 120s
  145. # The prefix for commands. Only required in non-management rooms.
  146. command_prefix: {{ matrix_wechat_command_prefix | to_json }}
  147. # Messages sent upon joining a management room.
  148. # Markdown is supported. The defaults are listed below.
  149. management_room_text:
  150. # Sent when joining a room.
  151. welcome: "Hello, I'm a WeChat bridge bot."
  152. # Sent when joining a management room and the user is already logged in.
  153. welcome_connected: "Use `help` for help."
  154. # Sent when joining a management room and the user is not logged in.
  155. welcome_unconnected: "Use `help` for help or `login` to log in."
  156. # Optional extra text sent when joining a management room.
  157. additional_help: ""
  158. # End-to-bridge encryption support options.
  159. #
  160. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  161. encryption:
  162. # Allow encryption, work in group chat rooms with e2ee enabled
  163. allow: {{ matrix_wechat_encryption_allow | to_json }}
  164. # Default to encryption, force-enable encryption in all portals the bridge creates
  165. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  166. default: {{ matrix_wechat_encryption_default | to_json }}
  167. # Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
  168. appservice: false
  169. # Require encryption, drop any unencrypted messages.
  170. require: false
  171. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  172. # You must use a client that supports requesting keys from other users to use this feature.
  173. allow_key_sharing: false
  174. # Should users mentions be in the event wire content to enable the server to send push notifications?
  175. plaintext_mentions: false
  176. # Options for deleting megolm sessions from the bridge.
  177. delete_keys:
  178. # Beeper-specific: delete outbound sessions when hungryserv confirms
  179. # that the user has uploaded the key to key backup.
  180. delete_outbound_on_ack: false
  181. # Don't store outbound sessions in the inbound table.
  182. dont_store_outbound: false
  183. # Ratchet megolm sessions forward after decrypting messages.
  184. ratchet_on_decrypt: false
  185. # Delete fully used keys (index >= max_messages) after decrypting messages.
  186. delete_fully_used_on_decrypt: false
  187. # Delete previous megolm sessions from same device when receiving a new one.
  188. delete_prev_on_new_session: false
  189. # Delete megolm sessions received from a device when the device is deleted.
  190. delete_on_device_delete: false
  191. # Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
  192. periodically_delete_expired: false
  193. # Delete inbound megolm sessions that don't have the received_at field used for
  194. # automatic ratcheting and expired session deletion. This is meant as a migration
  195. # to delete old keys prior to the bridge update.
  196. delete_outdated_inbound: false
  197. # What level of device verification should be required from users?
  198. #
  199. # Valid levels:
  200. # unverified - Send keys to all device in the room.
  201. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  202. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  203. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  204. # Note that creating user signatures from the bridge bot is not currently possible.
  205. # verified - Require manual per-device verification
  206. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  207. verification_levels:
  208. # Minimum level for which the bridge should send keys to when bridging messages from WeChat to Matrix.
  209. receive: unverified
  210. # Minimum level that the bridge should accept for incoming Matrix messages.
  211. send: unverified
  212. # Minimum level that the bridge should require for accepting key requests.
  213. share: cross-signed-tofu
  214. # Options for Megolm room key rotation. These options allow you to
  215. # configure the m.room.encryption event content. See:
  216. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  217. # more information about that event.
  218. rotation:
  219. # Enable custom Megolm room key rotation settings. Note that these
  220. # settings will only apply to rooms created after this option is
  221. # set.
  222. enable_custom: false
  223. # The maximum number of milliseconds a session should be used
  224. # before changing it. The Matrix spec recommends 604800000 (a week)
  225. # as the default.
  226. milliseconds: 604800000
  227. # The maximum number of messages that should be sent with a given a
  228. # session before changing it. The Matrix spec recommends 100 as the
  229. # default.
  230. messages: 100
  231. # Disable rotating keys when a user's devices change?
  232. # You should not enable this option unless you understand all the implications.
  233. disable_device_change_key_rotation: false
  234. # Permissions for using the bridge.
  235. # Permitted values:
  236. # user - Access to use the bridge to chat with a WeChat account.
  237. # admin - User level and some additional administration tools
  238. # Permitted keys:
  239. # * - All Matrix users
  240. # domain - All users on that homeserver
  241. # mxid - Specific user
  242. permissions: {{ matrix_wechat_permissions | to_json }}
  243. # Logging config. See https://github.com/tulir/zeroconfig for details.
  244. logging:
  245. min_level: {{ matrix_wechat_log_level }}
  246. writers:
  247. - type: stdout
  248. format: pretty-colored