Support PROXY Protocol #33

Open
opened 2020-02-26 22:02:03 +00:00 by Ghost · 4 comments

Is it possible to support PROXY protocol out of the box? Or have an option to pass in a custom http / https module. The latter would allow us to use a wrapper like https://github.com/cusspvz/proxywrap

Is it possible to support PROXY protocol out of the box? Or have an option to pass in a custom http / https module. The latter would allow us to use a wrapper like https://github.com/cusspvz/proxywrap
Owner

Hmm... I don't currently have a good way to hijack the underlying net server to do that.

Unfortunately the networking stack is one of its most poorly thought out and implemented parts of node - due to being implemented so early and maintaining backwards compatibility for so long.

It's definitely a feature that I could add, and I do think it's a great idea, but it's not something I'm available to work on in my free time right now.

I'd be happy to accept a PR or to do it as a contract job.

Also, since you're doing something with proxying, you may find Telebit to be of use.

Hmm... I don't currently have a good way to hijack the underlying `net` server to do that. Unfortunately the networking stack is one of its most poorly thought out and implemented parts of node - due to being implemented so early and maintaining backwards compatibility for so long. It's definitely a feature that I could add, and I do think it's a great idea, but it's not something I'm available to work on in my free time right now. I'd be happy to accept a PR or to do it as a contract job. Also, since you're doing something with proxying, you may find [Telebit](https://telebit.io) to be of use.
Owner

Another good option would be to expose the Greenlock Express helpers for use with other servers aside from the http module.

What's your level of expertise with node?

Another good option would be to expose the Greenlock Express helpers for use with other servers aside from the `http` module. What's your level of expertise with node?
Author

This is what I have working in our production env for now - hengwoon/greenlock-express.js#1

It would be better if it was an option on require('@root/greenlock-express').init() but not sure if that's the best place for it.

It's pretty tailored to our use case hence it's only changed in a few tactical places

This is what I have working in our production env for now - https://git.rootprojects.org/hengwoon/greenlock-express.js/pulls/1 It would be better if it was an option on require('@root/greenlock-express').init() but not sure if that's the best place for it. It's pretty tailored to our use case hence it's only changed in a few tactical places
Owner

What I'd like to do is turn it inside out so that there's an example of using the components of Greenlock Express with an net server of your choosing.

I don't think that passing in an option is generally bad, but my experience has been that the more that lives inside of Greenlock, the more difficult it is to manage.

Since that's a niche use case and not something that is generally "convenient" for someone to do, I'd rather have an example file to copy/paste than move the config for that use case into the code.

What I'd like to do is turn it inside out so that there's an example of using the components of Greenlock Express with an `net` server of your choosing. I don't think that passing in an option is generally bad, but my experience has been that the more that lives inside of Greenlock, the more difficult it is to manage. Since that's a niche use case and not something that is generally "convenient" for someone to do, I'd rather have an example file to copy/paste than move the config for that use case into the code.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: root/greenlock-express.js#33
No description provided.