Explorar el Código

Use AS number instead of ISP name in server replay cache

- The AS number is more stable and accurate
Rod Hynes hace 3 años
padre
commit
948cc97fa9
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      psiphon/server/replay.go

+ 2 - 2
psiphon/server/replay.go

@@ -141,7 +141,7 @@ func (r *ReplayCache) GetReplayTargetDuration(
 
 	if !p.Bool(parameters.ServerReplayUnknownGeoIP) &&
 		geoIPData.Country == GEOIP_UNKNOWN_VALUE &&
-		geoIPData.ISP == GEOIP_UNKNOWN_VALUE {
+		geoIPData.ASN == GEOIP_UNKNOWN_VALUE {
 		// Unless configured otherwise, skip replay for unknown GeoIP, since clients
 		// may not have equivilent network conditions.
 		return false, 0, 0
@@ -369,5 +369,5 @@ func (r *ReplayCache) makeKey(
 	tunnelProtocol string, geoIPData GeoIPData) string {
 	return fmt.Sprintf(
 		"%s-%s-%s",
-		tunnelProtocol, geoIPData.Country, geoIPData.ISP)
+		tunnelProtocol, geoIPData.Country, geoIPData.ASN)
 }