Kaynağa Gözat

Don't use MeekProxyForwardedForHeaders when value doesn't resolve

Rod Hynes 9 yıl önce
ebeveyn
işleme
b582682e77
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      psiphon/server/meek.go

+ 3 - 1
psiphon/server/meek.go

@@ -329,7 +329,9 @@ func (server *MeekServer) getSession(
 				// list of IPs (each proxy in a chain). The first IP should be
 				// the client IP.
 				proxyClientIP := strings.Split(value, ",")[0]
-				if net.ParseIP(proxyClientIP) != nil {
+				if net.ParseIP(proxyClientIP) != nil &&
+					server.support.GeoIPService.Lookup(proxyClientIP).Country != GEOIP_UNKNOWN_VALUE {
+
 					clientIP = proxyClientIP
 					break
 				}