matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.13k forks source link

Unix support for connecting to appservice #16425

Open realtyem opened 1 year ago

realtyem commented 1 year ago

Nothing to fancy, shouldn't need any configuration changes on either end(I think).

I think the only thing of note is that for forming a request URI with a unix:// scheme, a : is appended to the end of the filename of the socket, to allow parsing out where the filename ends and the URL path begins(very similar to how Nginx does it). So:

internally as it's passed into the request function will look like:

Additionally, as a sanity check, the scheme can have multiple / between the unix: and the path to the socket file, as I've encountered multiple variants over the years(and there seems to be no real standard). So that means that if any of these will be stripped to a single / and look like the first item below:

Pull Request Checklist

Signed-off-by: Jason Little realtyem@gmail.com