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

Support Unix sockets #237

Closed
moll opened this issue Apr 15, 2015 · 4 comments
Closed

Support Unix sockets #237

moll opened this issue Apr 15, 2015 · 4 comments

Comments

@moll
Copy link

moll commented Apr 15, 2015

Hey,

Unix sockets are a little more versatile and easier to lock down than TCP for reverse proxying. Node usually, where it takes a port number, allows a file path to be given for listening as a Unix socket. Sinopia does something clever with the port, however, and forbids this:

$ sinopia --listen sinopia.sock
 warn  --- invalid address - null, we expect a port (e.g. "4873"), host:port (e.g. "localhost:4873") or full url (e.g. "http://localhost:4873/")

It'd be nice to be able to use Unix sockets, too.

@ppalladino
Copy link

Moll, I also put in a request to extend port configuration. #236 I think we are kinda, sorta, looking for a similar thing.....

@rlidwka
Copy link
Owner

rlidwka commented Apr 21, 2015

Node usually, where it takes a port number, allows a file path to be given for listening as a Unix socket.

Node doesn't allow something like 0.0.0.0:1234 as a listening address, it requires host and port to be separate.

I tried to squeeze host and port together. Other people requested protocol as well. So we ended up with an ability to do any of these.

I think unix:sinopia.sock would be appropriate to add.

@rlidwka
Copy link
Owner

rlidwka commented Apr 22, 2015

Fixed in 9738639 and published as sinopia@1.2.2.

Now you should be able to do sinopia -l unix:sinopia.sock, and it would work as expected.

@rlidwka rlidwka closed this as completed Apr 22, 2015
@moll
Copy link
Author

moll commented Jun 22, 2015

Thank you! Will give it a shot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants