Add FR Proxy + small script (#1525)

This commit is contained in:
Shuchang Zheng
2025-01-09 07:52:48 -08:00
committed by GitHub
parent f4031fc4f7
commit d1bbaa4c7a
3 changed files with 12 additions and 0 deletions

View File

@@ -35,6 +35,8 @@ export const ProxyLocation = {
ResidentialES: "RESIDENTIAL_ES", ResidentialES: "RESIDENTIAL_ES",
ResidentialIN: "RESIDENTIAL_IN", ResidentialIN: "RESIDENTIAL_IN",
ResidentialJP: "RESIDENTIAL_JP", ResidentialJP: "RESIDENTIAL_JP",
ResidentialGB: "RESIDENTIAL_GB",
ResidentialFR: "RESIDENTIAL_FR",
None: "NONE", None: "NONE",
} as const; } as const;

View File

@@ -33,6 +33,12 @@ function ProxySelector({ value, onChange, className }: Props) {
<SelectItem value={ProxyLocation.ResidentialJP}> <SelectItem value={ProxyLocation.ResidentialJP}>
Residential (Japan) Residential (Japan)
</SelectItem> </SelectItem>
<SelectItem value={ProxyLocation.ResidentialGB}>
Residential (United Kingdom)
</SelectItem>
<SelectItem value={ProxyLocation.ResidentialFR}>
Residential (France)
</SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>
); );

View File

@@ -24,6 +24,7 @@ class ProxyLocation(StrEnum):
RESIDENTIAL_GB = "RESIDENTIAL_GB" RESIDENTIAL_GB = "RESIDENTIAL_GB"
RESIDENTIAL_IN = "RESIDENTIAL_IN" RESIDENTIAL_IN = "RESIDENTIAL_IN"
RESIDENTIAL_JP = "RESIDENTIAL_JP" RESIDENTIAL_JP = "RESIDENTIAL_JP"
RESIDENTIAL_FR = "RESIDENTIAL_FR"
NONE = "NONE" NONE = "NONE"
@@ -64,6 +65,9 @@ def get_tzinfo_from_proxy(proxy_location: ProxyLocation) -> ZoneInfo | None:
if proxy_location == ProxyLocation.RESIDENTIAL_JP: if proxy_location == ProxyLocation.RESIDENTIAL_JP:
return ZoneInfo("Asia/Kolkata") return ZoneInfo("Asia/Kolkata")
if proxy_location == ProxyLocation.RESIDENTIAL_FR:
return ZoneInfo("Europe/Paris")
return None return None