Using proxy inside plugin #7

Open
opened 2026-02-16 00:19:00 -05:00 by yindo · 0 comments
Owner

Originally created by @actcwlf on GitHub (Feb 13, 2025).

While trying to use a proxy inside the plugin _invoke method,

 response = requests.get(url, proxies=proxy)

I found that it doesn't work properly, and the error message is

HTTPConnectionPool(host='docker-proxy-1', port=7890): Max retries exceeded with url: http://www.baidu.com/ (Caused by ProxyError('Unable to connect to proxy', NameResolutionError("<urllib3.connection.HTTPConnection object at 0x000001B4C28FBEF0>: Failed to resolve 'docker-proxy-1' ([Errno 11001] getaddrinfo failed)")))

I can use curl within the plugin_daemon container to access web pages through the proxy normally. Could you tell me what the reason for the aforementioned error might be? Is it related to the SSRF configuration?

Originally created by @actcwlf on GitHub (Feb 13, 2025). While trying to use a proxy inside the plugin `_invoke` method, ```python response = requests.get(url, proxies=proxy) ``` I found that it doesn't work properly, and the error message is ``` HTTPConnectionPool(host='docker-proxy-1', port=7890): Max retries exceeded with url: http://www.baidu.com/ (Caused by ProxyError('Unable to connect to proxy', NameResolutionError("<urllib3.connection.HTTPConnection object at 0x000001B4C28FBEF0>: Failed to resolve 'docker-proxy-1' ([Errno 11001] getaddrinfo failed)"))) ``` I can use curl within the plugin_daemon container to access web pages through the proxy normally. Could you tell me what the reason for the aforementioned error might be? Is it related to the SSRF configuration?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#7