Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Unix support for connecting to appservice #16425

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

realtyem
Copy link
Contributor

@realtyem realtyem commented Oct 4, 2023

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:

  • 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

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

@realtyem realtyem force-pushed the unix-for-appservice branch 2 times, most recently from c6b3210 to 1106390 Compare October 5, 2023 01:39
@realtyem realtyem marked this pull request as ready for review October 5, 2023 08:52
@realtyem realtyem requested a review from a team as a code owner October 5, 2023 08:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable connecting to appservices through unix sockets
1 participant