Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for listening on AF_UNIX #73

Closed
jrb0001 opened this issue Jul 20, 2020 · 2 comments · Fixed by #77
Closed

Add support for listening on AF_UNIX #73

jrb0001 opened this issue Jul 20, 2020 · 2 comments · Fixed by #77
Assignees
Labels
C-enhancement Category: Enhancement M-deployment Module: Deployment P-medium Priority: Medium

Comments

@jrb0001
Copy link

jrb0001 commented Jul 20, 2020

AF_UNIX uses filesystem paths instead of address+port pairs for socket addresses which makes it much easier to avoid conflicts if you run multiple services on the same machine.

tide 0.12.0 seems to support it with the http+unix:///path scheme: https://docs.rs/tide/0.12.0/tide/listener/trait.ToListener.html#strings-supported-only-on-cfgunix-platforms

I am planning to run alexandrie behind a reverse-proxy (which also does TLS termination) so this would be a useful feature for me.

@Hirevo Hirevo added C-enhancement Category: Enhancement M-deployment Module: Deployment P-medium Priority: Medium labels Jul 23, 2020
@Hirevo
Copy link
Owner

Hirevo commented Jul 23, 2020

Hello, thanks for filing this issue.

I agree that the configuration file right now is not flexible enough to permit this.
I think I'll be fixing this, right after making the upgrade to Tide 0.12 (it is currently sitting on 0.10).

And I think I'll be changing the configuration to go from this:

[general]
addr = "0.0.0.0"
port = 3000

to this:

[general]
bind_address = "0.0.0.0:3000"
# or
bind_address = "http+unix:///path"
# or any other address that Tide knows how to turn into a `Listener`

Would that correctly fit your use-case ?

@Hirevo Hirevo self-assigned this Jul 23, 2020
@jrb0001
Copy link
Author

jrb0001 commented Jul 23, 2020

Yes, that's exactly what I need and I don't think there is really another way to do it. This should also fix listening on link-local IPv6 addresses, assuming tide handles them correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement M-deployment Module: Deployment P-medium Priority: Medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants