element-hq / element-hq/synapse
Unix support for connecting to appservice
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#16425](https://github.com/matrix-org/synapse/pull/16425).
---
Nothing to fancy, shouldn't need any configuration changes on either end(I think).
* Fixes #16399
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:
* `unix:/path/to.socket` with a request to `/_matrix/app/v1/ping`
internally as it's passed into the request function will look like:
* `unix:/path/to.socket:/_matrix/app/v1/ping`.
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:
* `unix:/path/to.socket`
* `unix://path/to.socket`
* `unix:///path/to.socket`
### Pull Request Checklist
* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog file](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#changelog).
* [x] Pull request includes a [sign off](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#sign-off)
* [x] [Code style](https://matrix-org.github.io/synapse/latest/code_style.html) is correct
(run the [linters](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
Signed-off-by: Jason Little
Contributor guide
Assessment
This issue has not been assessed yet.