fiber icon indicating copy to clipboard operation
fiber copied to clipboard

🐛 [Bug]: v3 Client ignores proxy settings

Open timerzz opened this issue 1 year ago • 4 comments

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:

  1. just create a client , and SetProxyURL.
  2. request
  3. 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.

timerzz avatar Jul 23 '24 10:07 timerzz

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

welcome[bot] avatar Jul 23 '24 10:07 welcome[bot]

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

timerzz avatar Jul 24 '24 02:07 timerzz

I saw that fasthttp has a proxy implementation. Maybe we can set c.fasthttp.Dial in SetProxyURL without c.proxyURL field.

timerzz avatar Jul 24 '24 02:07 timerzz

@efectn Thoughts?

gaby avatar Aug 13 '24 12:08 gaby