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

Add proxy protocol #2004

Merged
merged 4 commits into from
Aug 25, 2017
Merged

Add proxy protocol #2004

merged 4 commits into from
Aug 25, 2017

Conversation

emilevauge
Copy link
Member

Description

This PR supersedes #1145 to add Proxy Protocol support. It is based on the initial work made by jrb.
it also bumps Golang to 1.9 (needed to add Proxy Protocol).

Fixes #384

@@ -1,11 +1,8 @@
FROM golang:1.8
FROM golang:1.9-alpine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we plan to merge this even when Go 1.9 is still beta? I'd be concerned about that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We think the go 1.9 final will be out way before the trafik 1.4 final is ready, and this feature is the most wanted feature ;) So all in all, we think it's a reasonable risk.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What gives you confidence the next Go release will be out way before Traefik 1.4? Go 1.9 is only at the first release candidate, and Traefik is going to ship its first within the next few days presumably.

Copy link
Member Author

@emilevauge emilevauge Aug 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timoreimann the rc2 was released weeks ago, and the final release date was theoretically weeks ago, and also https://github.com/golang/go/milestone/49 ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, missed that it's actually rc2 already.

I'm still not sure it's a good idea to merge this before Go 1.9 final is actually released. I have seen things break in subtle ways over at least the last two Go releases. I'd prefer to take the time after the code freeze to iron out potential problems.

@emilevauge emilevauge force-pushed the add-proxy-protocol branch 3 times, most recently from 4abd4cf to f0ceca2 Compare August 24, 2017 14:43
@@ -247,12 +247,18 @@ func (ep *EntryPoints) Set(value string) error {
whiteListSourceRange = strings.Split(result["WhiteListSourceRange"], ",")
}

proxyprotocol := false
if len(result["ProxyProtocol"]) > 0 {
proxyprotocol = strings.EqualFold(result["ProxyProtocol"], "enable") || strings.EqualFold(result["ProxyProtocol"], "on")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You check to see if proxyprotocol is enable or on, but not true based on your example in the toml?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I just copied what was already done for Compress flag. Added `true for both :)

Copy link
Collaborator

@SantoDE SantoDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👼 Much ❤️ @emilevauge (squash)

Copy link
Contributor

@nmengin nmengin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏 🎉

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
:shipit:

Signed-off-by: Emile Vauge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement a new or improved feature. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants