Repository navigation
Update ssrf_proxy.py - #8564
Closed
kong3916 wants to merge 1 commit into
Closed
Update ssrf_proxy.py#8564kong3916 wants to merge 1 commit into
kong3916 wants to merge 1 commit into
Conversation
In the original code, it only attempts a request using either SSRF_PROXY_ALL_URL or proxies once, without any proxy-switching logic. If one proxy fails, it doesn't automatically switch to another proxy. The retry logic is based on the same proxy configuration. If a request fails, it keeps retrying the same proxy until the maximum retry count is reached. This applies to cases where you need to attempt multiple proxies or in an unstable network. When the network environment may fluctuate, or the proxy servers might be unavailable, the second version of the code can automatically attempt other proxies, increasing the likelihood of successful requests.
Author
|
fix:#6244 |
Contributor
|
Thanks so much for your works, but I'm sorry for that you should configure upstream proxies of SSRF_PROXY outside of Dify, such as squid, as it's a security policy, allowing custom proxies will cause security issues like intranet sniffing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the original code, it only attempts a request using either SSRF_PROXY_ALL_URL or proxies once, without any proxy-switching logic. If one proxy fails, it doesn't automatically switch to another proxy. The retry logic is based on the same proxy configuration. If a request fails, it keeps retrying the same proxy until the maximum retry count is reached.
This applies to cases where you need to attempt multiple proxies or in an unstable network. When the network environment may fluctuate, or the proxy servers might be unavailable, the second version of the code can automatically attempt other proxies, increasing the likelihood of successful requests.
Checklist:
Important
Please review the checklist below before submitting your pull request.
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint godsDescription
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. Close issue syntax:
Fixes #<issue number>, see documentation for more details.Fixes
Type of Change
Testing Instructions
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration