fiber
fiber copied to clipboard
🐛 [Bug]: v3 Client ignores proxy settings
Bug Description
I used fiber v3 client and used the SetProxyURL method. But the agent didn't actually work. I checked the source code of fiber. SetProxyUrl sets the proxyURL for the Client, but this attribute is not used in the actual request.
How to Reproduce
Steps to reproduce the behavior:
- just create a client , and SetProxyURL.
- request
- No proxy used
Expected Behavior
The set proxy should be used when making requests
Fiber Version
v3.0.0-beta.3
Code Snippet (optional)
No response
Checklist:
- [X] I agree to follow Fiber's Code of Conduct.
- [X] I have checked for existing issues that describe my problem prior to opening this one.
- [X] I understand that improperly formatted bug reports may be closed without explanation.
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
I looked at the unit test for Test_Client_SetProxyURL and this unit test doesn't seem to verify that the request goes through the proxy.
Maybe this unit test needs some modifications
I saw that fasthttp has a proxy implementation. Maybe we can set c.fasthttp.Dial in SetProxyURL without c.proxyURL field.
@efectn Thoughts?