mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.26k stars 172 forks source link

Support for unix sockets #652

Closed Sir-Photch closed 1 year ago

Sir-Photch commented 1 year ago

For a self-hosted scenario, it is quite likely that both homeserver and bridge are operated on the same server. For this, it would be quite handy if both the bridge could connect through the unix-socket of the homeserver via the address-parameter in the configuration and the homeserver could make use of a socket opened up by the bridge to connect to the appservice.

What do you think?

tulir commented 1 year ago

Unix sockets are already supported

Sir-Photch commented 1 year ago

And how do you specify them?

setting homeserver:address: to unix:/path/to/the.sock returns

FTL /whoami request failed with unknown error error="failed to GET /_matrix/client/v3/account/whoami: M_UNKNOWN (HTTP 500): Internal server error"

using synapse 1.92.1 (maybe a homeserver issue https://github.com/matrix-org/synapse/issues/16396)

and apparently, the spec doesnt specify to be able to connect to an appservice through an unix socket.