Support ISP Proxies in Skyvern (#1823)

This commit is contained in:
Shuchang Zheng
2025-02-24 06:29:12 -08:00
committed by GitHub
parent 2a2c6f1cb4
commit 23744b3039
3 changed files with 8 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ export const ProxyLocation = {
ResidentialGB: "RESIDENTIAL_GB", ResidentialGB: "RESIDENTIAL_GB",
ResidentialFR: "RESIDENTIAL_FR", ResidentialFR: "RESIDENTIAL_FR",
ResidentialDE: "RESIDENTIAL_DE", ResidentialDE: "RESIDENTIAL_DE",
ResidentialISP: "RESIDENTIAL_ISP",
None: "NONE", None: "NONE",
} as const; } as const;

View File

@@ -21,6 +21,9 @@ function ProxySelector({ value, onChange, className }: Props) {
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
<SelectItem value={ProxyLocation.Residential}>Residential</SelectItem> <SelectItem value={ProxyLocation.Residential}>Residential</SelectItem>
<SelectItem value={ProxyLocation.ResidentialISP}>
Residential ISP (US)
</SelectItem>
<SelectItem value={ProxyLocation.ResidentialES}> <SelectItem value={ProxyLocation.ResidentialES}>
Residential (Spain) Residential (Spain)
</SelectItem> </SelectItem>

View File

@@ -26,6 +26,7 @@ class ProxyLocation(StrEnum):
RESIDENTIAL_JP = "RESIDENTIAL_JP" RESIDENTIAL_JP = "RESIDENTIAL_JP"
RESIDENTIAL_FR = "RESIDENTIAL_FR" RESIDENTIAL_FR = "RESIDENTIAL_FR"
RESIDENTIAL_DE = "RESIDENTIAL_DE" RESIDENTIAL_DE = "RESIDENTIAL_DE"
RESIDENTIAL_ISP = "RESIDENTIAL_ISP"
NONE = "NONE" NONE = "NONE"
@@ -72,6 +73,9 @@ def get_tzinfo_from_proxy(proxy_location: ProxyLocation) -> ZoneInfo | None:
if proxy_location == ProxyLocation.RESIDENTIAL_DE: if proxy_location == ProxyLocation.RESIDENTIAL_DE:
return ZoneInfo("Europe/Berlin") return ZoneInfo("Europe/Berlin")
if proxy_location == ProxyLocation.RESIDENTIAL_ISP:
return ZoneInfo("America/New_York")
return None return None