Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Add support for more proxies (#3591)
Suchintan91b67f500c10
diff --git a/skyvern-frontend/src/api/types.ts b/skyvern-frontend/src/api/types.tsindex b007f9f39..452675af8 100644--- a/skyvern-frontend/src/api/types.ts+++ b/skyvern-frontend/src/api/types.ts@@ -43,6 +43,12 @@ export const ProxyLocation = {ResidentialZA: "RESIDENTIAL_ZA",ResidentialAR: "RESIDENTIAL_AR",ResidentialAU: "RESIDENTIAL_AU",+ ResidentialBR: "RESIDENTIAL_BR",+ ResidentialTR: "RESIDENTIAL_TR",+ ResidentialCA: "RESIDENTIAL_CA",+ ResidentialMX: "RESIDENTIAL_MX",+ ResidentialIT: "RESIDENTIAL_IT",+ ResidentialNL: "RESIDENTIAL_NL",ResidentialISP: "RESIDENTIAL_ISP",None: "NONE",} as const;diff --git a/skyvern-frontend/src/components/ProxySelector.tsx b/skyvern-frontend/src/components/ProxySelector.tsxindex 2a1590061..37c403729 100644--- a/skyvern-frontend/src/components/ProxySelector.tsx+++ b/skyvern-frontend/src/components/ProxySelector.tsx@@ -30,6 +30,12 @@ function ProxySelector({ value, onChange, className }: Props) {<SelectItem value={ProxyLocation.ResidentialAU}>Residential (Australia)</SelectItem>+ <SelectItem value={ProxyLocation.ResidentialBR}>+ Residential (Brazil)+ </SelectItem>+ <SelectItem value={ProxyLocation.ResidentialCA}>+ Residential (Canada)+ </SelectItem><SelectItem value={ProxyLocation.ResidentialFR}>Residential (France)</SelectItem>@@ -42,9 +48,18 @@ function ProxySelector({ value, onChange, className }: Props) {<SelectItem value={ProxyLocation.ResidentialIE}>Residential (Ireland)</SelectItem>+ <SelectItem value={ProxyLocation.ResidentialIT}>+ Residential (Italy)+ </SelectItem><SelectItem value={ProxyLocation.ResidentialJP}>Residential (Japan)</SelectItem>+ <SelectItem value={ProxyLocation.ResidentialMX}>+ Residential (Mexico)+ </SelectItem>+ <SelectItem value={ProxyLocation.ResidentialNL}>+ Residential (Netherlands)+ </SelectItem><SelectItem value={ProxyLocation.ResidentialNZ}>Residential (New Zealand)</SelectItem>@@ -54,6 +69,9 @@ function ProxySelector({ value, onChange, className }: Props) {<SelectItem value={ProxyLocation.ResidentialES}>Residential (Spain)</SelectItem>+ <SelectItem value={ProxyLocation.ResidentialTR}>+ Residential (Turkey)+ </SelectItem><SelectItem value={ProxyLocation.ResidentialGB}>Residential (United Kingdom)</SelectItem>diff --git a/skyvern/client/types/proxy_location.py b/skyvern/client/types/proxy_location.pyindex b58077029..bd5e04e3d 100644--- a/skyvern/client/types/proxy_location.py+++ b/skyvern/client/types/proxy_location.py@@ -21,6 +21,12 @@ ProxyLocation = typing.Union["RESIDENTIAL_ZA","RESIDENTIAL_AR","RESIDENTIAL_AU",+ "RESIDENTIAL_BR",+ "RESIDENTIAL_TR",+ "RESIDENTIAL_CA",+ "RESIDENTIAL_MX",+ "RESIDENTIAL_IT",+ "RESIDENTIAL_NL","RESIDENTIAL_ISP","NONE",],diff --git a/skyvern/forge/sdk/routes/agent_protocol.py b/skyvern/forge/sdk/routes/agent_protocol.pyindex dcc7887cb..411fef0dc 100644--- a/skyvern/forge/sdk/routes/agent_protocol.py+++ b/skyvern/forge/sdk/routes/agent_protocol.py@@ -2367,7 +2367,7 @@ async def new_debug_session(new_browser_session = await app.PERSISTENT_SESSIONS_MANAGER.create_session(organization_id=current_org.organization_id,timeout_minutes=settings.DEBUG_SESSION_TIMEOUT_MINUTES,- proxy_location=ProxyLocation.RESIDENTIAL_ISP,+ proxy_location=ProxyLocation.RESIDENTIAL,)debug_session = await app.DATABASE.create_debug_session(diff --git a/skyvern/schemas/runs.py b/skyvern/schemas/runs.pyindex 759880865..2bb5dc8c4 100644--- a/skyvern/schemas/runs.py+++ b/skyvern/schemas/runs.py@@ -51,6 +51,12 @@ class ProxyLocation(StrEnum):RESIDENTIAL_ZA = "RESIDENTIAL_ZA"RESIDENTIAL_AR = "RESIDENTIAL_AR"RESIDENTIAL_AU = "RESIDENTIAL_AU"+ RESIDENTIAL_BR = "RESIDENTIAL_BR"+ RESIDENTIAL_TR = "RESIDENTIAL_TR"+ RESIDENTIAL_CA = "RESIDENTIAL_CA"+ RESIDENTIAL_MX = "RESIDENTIAL_MX"+ RESIDENTIAL_IT = "RESIDENTIAL_IT"+ RESIDENTIAL_NL = "RESIDENTIAL_NL"RESIDENTIAL_ISP = "RESIDENTIAL_ISP"NONE = "NONE"@@ -83,6 +89,12 @@ class ProxyLocation(StrEnum):cls.RESIDENTIAL_ZA,cls.RESIDENTIAL_AR,cls.RESIDENTIAL_AU,+ cls.RESIDENTIAL_BR,+ cls.RESIDENTIAL_TR,+ cls.RESIDENTIAL_CA,+ cls.RESIDENTIAL_MX,+ cls.RESIDENTIAL_IT,+ cls.RESIDENTIAL_NL,}@staticmethod@@ -100,6 +112,12 @@ class ProxyLocation(StrEnum):ProxyLocation.RESIDENTIAL_ZA: 2000,ProxyLocation.RESIDENTIAL_AR: 2000,ProxyLocation.RESIDENTIAL_AU: 2000,+ ProxyLocation.RESIDENTIAL_BR: 2000,+ ProxyLocation.RESIDENTIAL_TR: 2000,+ ProxyLocation.RESIDENTIAL_CA: 2000,+ ProxyLocation.RESIDENTIAL_MX: 2000,+ ProxyLocation.RESIDENTIAL_IT: 2000,+ ProxyLocation.RESIDENTIAL_NL: 2000,}return counts.get(proxy_location, 10000)@@ -118,6 +136,12 @@ class ProxyLocation(StrEnum):ProxyLocation.RESIDENTIAL_ZA: "ZA",ProxyLocation.RESIDENTIAL_AR: "AR",ProxyLocation.RESIDENTIAL_AU: "AU",+ ProxyLocation.RESIDENTIAL_BR: "BR",+ ProxyLocation.RESIDENTIAL_TR: "TR",+ ProxyLocation.RESIDENTIAL_CA: "CA",+ ProxyLocation.RESIDENTIAL_MX: "MX",+ ProxyLocation.RESIDENTIAL_IT: "IT",+ ProxyLocation.RESIDENTIAL_NL: "NL",}return mapping.get(proxy_location, "US")@@ -177,6 +201,24 @@ def get_tzinfo_from_proxy(proxy_location: ProxyLocation) -> ZoneInfo | None:if proxy_location == ProxyLocation.RESIDENTIAL_AU:return ZoneInfo("Australia/Sydney")+ if proxy_location == ProxyLocation.RESIDENTIAL_BR:+ return ZoneInfo("America/Sao_Paulo")++ if proxy_location == ProxyLocation.RESIDENTIAL_TR:+ return ZoneInfo("Europe/Istanbul")++ if proxy_location == ProxyLocation.RESIDENTIAL_CA:+ return ZoneInfo("America/Toronto")++ if proxy_location == ProxyLocation.RESIDENTIAL_MX:+ return ZoneInfo("America/Mexico_City")++ if proxy_location == ProxyLocation.RESIDENTIAL_IT:+ return ZoneInfo("Europe/Rome")++ if proxy_location == ProxyLocation.RESIDENTIAL_NL:+ return ZoneInfo("Europe/Amsterdam")+if proxy_location == ProxyLocation.RESIDENTIAL_ISP:return ZoneInfo("America/New_York")