Closed Kobaxidze256 closed 2 years ago
What do you mean? You want to access the website through a Unix domain socket?
yeah, it's easier to pick a file than a port.
The website can't be just a file, it's not static.
Sure, but I want to be able to connect to it over a unix domain socket. I can just give a user read/write permissions to it or make a root service filter requests to it, instead of having a random port open that anything can connect to.
Ah, I get it. I didn't even know HTTP over Unix domain sockets was a thing. I tried to make the code support it, and I was able to connect to gimmeasearx through curl using --unix-socket
option.
However, I can't access the socket with neither Firefox nor Chromium:
That seems like a very weird issue, why don't you just use a firewall? Gimmeasearx binds to 127.0.0.1 by default anyway, not even 0.0.0.0.
I was thinking about hosting it on my vps on a subdomain through nginx and possibly protecting it with a password similar to other services i have running.
Isn't that doable with TCP..?
Probably, but I'd prefer a unix socket.
Feel free to fork the code and make the adequate changes.
Go standard function net.Listen supports unix domain sockets. Shouldn't be too hard, right? I'm not comfortable with using port 8080 or picking another port. Can systemd unit file be updated as well.