Add support for more proxies (#1859)
This commit is contained in:
@@ -38,6 +38,9 @@ export const ProxyLocation = {
|
||||
ResidentialGB: "RESIDENTIAL_GB",
|
||||
ResidentialFR: "RESIDENTIAL_FR",
|
||||
ResidentialDE: "RESIDENTIAL_DE",
|
||||
ResidentialNZ: "RESIDENTIAL_NZ",
|
||||
ResidentialZA: "RESIDENTIAL_ZA",
|
||||
ResidentialAR: "RESIDENTIAL_AR",
|
||||
ResidentialISP: "RESIDENTIAL_ISP",
|
||||
None: "NONE",
|
||||
} as const;
|
||||
|
||||
@@ -45,6 +45,15 @@ function ProxySelector({ value, onChange, className }: Props) {
|
||||
<SelectItem value={ProxyLocation.ResidentialDE}>
|
||||
Residential (Germany)
|
||||
</SelectItem>
|
||||
<SelectItem value={ProxyLocation.ResidentialNZ}>
|
||||
Residential (New Zealand)
|
||||
</SelectItem>
|
||||
<SelectItem value={ProxyLocation.ResidentialZA}>
|
||||
Residential (South Africa)
|
||||
</SelectItem>
|
||||
<SelectItem value={ProxyLocation.ResidentialAR}>
|
||||
Residential (Argentina)
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
);
|
||||
|
||||
@@ -27,6 +27,9 @@ class ProxyLocation(StrEnum):
|
||||
RESIDENTIAL_JP = "RESIDENTIAL_JP"
|
||||
RESIDENTIAL_FR = "RESIDENTIAL_FR"
|
||||
RESIDENTIAL_DE = "RESIDENTIAL_DE"
|
||||
RESIDENTIAL_NZ = "RESIDENTIAL_NZ"
|
||||
RESIDENTIAL_ZA = "RESIDENTIAL_ZA"
|
||||
RESIDENTIAL_AR = "RESIDENTIAL_AR"
|
||||
RESIDENTIAL_ISP = "RESIDENTIAL_ISP"
|
||||
NONE = "NONE"
|
||||
|
||||
@@ -74,6 +77,15 @@ def get_tzinfo_from_proxy(proxy_location: ProxyLocation) -> ZoneInfo | None:
|
||||
if proxy_location == ProxyLocation.RESIDENTIAL_DE:
|
||||
return ZoneInfo("Europe/Berlin")
|
||||
|
||||
if proxy_location == ProxyLocation.RESIDENTIAL_NZ:
|
||||
return ZoneInfo("Pacific/Auckland")
|
||||
|
||||
if proxy_location == ProxyLocation.RESIDENTIAL_ZA:
|
||||
return ZoneInfo("Africa/Johannesburg")
|
||||
|
||||
if proxy_location == ProxyLocation.RESIDENTIAL_AR:
|
||||
return ZoneInfo("America/Argentina/Buenos_Aires")
|
||||
|
||||
if proxy_location == ProxyLocation.RESIDENTIAL_ISP:
|
||||
return ZoneInfo("America/New_York")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user