Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Conversation

RealOrangeOne
Copy link

Many reverse proxies and alike don't support forwarding to sockets (eg Traefik). This adds the ability to specify a $PORT to have it listen on that instead.

Note that by default the previous behaviour is maintained, for backwards compatibility.

@FireMasterK
Copy link
Member

I feel like this be simplified by checking whether the environment variable is set, and not having multiple nested if else / complex control flow.

I'll create a separate PR for this.

@FireMasterK
Copy link
Member

See #3 for my solution

@RealOrangeOne
Copy link
Author

I'm not really a Go person, hence it's a bit thrown together. Although IMO #3 is more complex and harder to read.

@FireMasterK
Copy link
Member

IMO #3 is more complex and harder to read.

It's all because I handle the socket/ folder not existing better there, instead of expecting the net.Listen("unix", socket) to fail to go back to TCP/IP, I just check if the folder exists.

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.

2 participants