Ver Fonte

Merge pull request #425 from mirokuratczyk/master

Always add custom header names to dial stats
Rod Hynes há 8 anos atrás
pai
commit
746f0142e8
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      psiphon/tunnel.go

+ 3 - 0
psiphon/tunnel.go

@@ -831,6 +831,9 @@ func dialSsh(
 
 
 	if upstreamProxyType != "" {
 	if upstreamProxyType != "" {
 		dialStats.UpstreamProxyType = upstreamProxyType
 		dialStats.UpstreamProxyType = upstreamProxyType
+	}
+
+	if len(dialConfig.CustomHeaders) > 0 {
 		dialStats.UpstreamProxyCustomHeaderNames = make([]string, 0)
 		dialStats.UpstreamProxyCustomHeaderNames = make([]string, 0)
 		for name := range dialConfig.CustomHeaders {
 		for name := range dialConfig.CustomHeaders {
 			if selectedUserAgent && name == "User-Agent" {
 			if selectedUserAgent && name == "User-Agent" {