-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Configure the server to listen on a unix socket #237
Comments
Do you have a specific use-case for this? This would be a breaking change which would require manual intervention of the user. |
I am currently running many different applications behind an nginx reverse proxy. By having the applications listen on a unix socket, I do not have to deal with a ton of different ports (aswell as there is a tiny performance gain). Therefore using the same structure for Gotify makes sense to me. Maybe the |
I would also like that for cleaner connection with nginx |
I also have this situation. I use nginx to handle ssh stuff and reverse proxy gotify. |
I'd also be happy if this was implemented. When running multiple applications behind a reverse proxy it is often much nicer to be able to proxy to a unix socket instead of having to pick a random port and hope some other service doesn't try to start listening on the same port. Using a socket like |
Hey all 👋🏻 I thought I just drop my use case in here if it helps as I know the issue been open a long time. I am Gotify within a Docker container and want to make sure that the networks are separated on the Host. So currently I am attaching the a gotify container to all networks to allow container within the network to push messages. However, an easier way could be to create a unix socket and then mount that as a volume within each container than the TCP overhead will be removed. Thanks for reading the general idea, I am wiling to look into implementing this, however, cause the issue age I would like to know if the maintainer would want it 👍🏻 |
@LaurenceJJones Yes, contributions for this are welcome. I'd say we make this configurable via server:
keepaliveperiodseconds: 0 # 0 = use Go default (15s); -1 = disable keepalive; set the interval in which keepalive packets will be sent. Only change this value if you know what you are doing.
listenaddr: "unix:/var/run/gotify-server.sock"
# ... |
Thank you for responding fast and with the idea of the implementation you would like to see. Since implementing this I would like to know if #554 is also on the cards, as using a unix socket without this option your logs have empty remote IP
Gin has a way to set trusted IPs and which headers and I believe this modifies it already for the logger. Lets me know and I can work on this whilst you PR the former? |
Yeah, you can work on it. A setting with trusted ips sounds fine. |
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
A way of configuring the server to listen on a unix socket.
For example you could join the
listenaddr
and theport
into asingle option called
listen
. Then thelisten
option could eitherget passed
localhost:1234
orunix:/tmp/gotify.sock
.Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: