Dify Integration
Dify Integration
Section titled “Dify Integration”Add proxy-protected web access to your Dify workflows.
HTTP Request Node
Section titled “HTTP Request Node”In Dify’s HTTP Request node, configure the proxy:
- Add an HTTP Request node to your workflow
- Set the URL to your target
- In Advanced Settings, add proxy configuration:
Proxy URL: http://session_id:[email protected]:8080Code Node
Section titled “Code Node”For more control, use a Code node:
import requestsimport hashlibimport time
API_KEY = "sk-your-key"TARGET = "amazon.com"
# Get proxy from HydraSkill APIproxy_resp = requests.get( "https://api.hydraskill.ai/v1/proxy", params={"target": TARGET, "session_lock": "true"}, headers={"Authorization": f"Bearer {API_KEY}"}).json()
# Use the proxyproxy_url = f"http://{proxy_resp['username']}:{proxy_resp['password']}@{proxy_resp['host']}:{proxy_resp['port']}"result = requests.get( f"https://{TARGET}/product-page", proxies={"http": proxy_url, "https": proxy_url})
return {"content": result.text, "status": result.status_code}Benefits in Dify
Section titled “Benefits in Dify”- Workflow nodes that access external URLs won’t fail due to IP blocks
- Consistent sessions across multi-step workflows
- No need to handle proxy errors in your workflow logic