diff --git a/doc.go b/doc.go
index 47cd03dace2d6c8c491320687aa5909d39594244..22dfc4a007620c286b9d9b76d1dead912bb6937a 100644
--- a/doc.go
+++ b/doc.go
@@ -24,7 +24,7 @@ import (
 )
 
 var (
-	release = "v2.0.4"
+	release = "v2.0.7"
 	gitsha  = "no gitsha provided"
 	version = release + " (git+sha: " + gitsha + ")"
 )
diff --git a/server.go b/server.go
index 309bd9e71f42d52e6c3a89b52b529399de22ebb0..4aea1f7638a61a6001be0019e73be972fae257bd 100644
--- a/server.go
+++ b/server.go
@@ -379,6 +379,12 @@ func createHTTPListener(config listenerConfig) (net.Listener, error) {
 		}
 	}
 
+	// step: does it require proxy protocol?
+	if config.proxyProtocol {
+		log.Infof("enabling the proxy protocol on listener: %s", config.listen)
+		listener = &proxyproto.Listener{Listener: listener}
+	}
+
 	// step: does the socket require TLS?
 	if config.certificate != "" && config.privateKey != "" {
 		log.Infof("tls enabled, certificate: %s, key: %s", config.certificate, config.privateKey)
@@ -410,12 +416,6 @@ func createHTTPListener(config listenerConfig) (net.Listener, error) {
 		}
 	}
 
-	// step: does it require proxy protocol?
-	if config.proxyProtocol {
-		log.Infof("enabling the proxy protocol on listener: %s", config.listen)
-		listener = &proxyproto.Listener{Listener: listener}
-	}
-
 	return listener, nil
 }