Proxy with Gatling doesn't consider localhost traffic

Hello,

I have a small problem with the use of proxy.
I want to test my project that I am developing, locally. Unfortunately, when I record the logs with the proxy as Gatling allows me to do, the logs of the localhost are not displayed… (clearly, it does not detect the localhost). I have unchecked the box ‘Don’t use the proxy server for local (intranet) addresses’ in my proxy settings, but it’s the same result.

If you know how to help me, I’m interested !

I hope to hear from you,

AG

Do you get any error?
You using Gatling Recorder? What version of Gatling?

Maybe you have similar issue:

If you want you can use in this case some workaround:
In Gatling Recorder you can convert HAR file to Simulation so you can make all steps on page with selected “Preserve logs” and “Disable cache” and after them “Save all as HAR with content”:

Then in Gatling Recorder:

And wua la:

My2cents: you’ve left localhost in the « ignore proxy for hosts » box in your browser configuration.

Yes, I know this solution but I think it’s easier to use the proxy :slight_smile:

Thank you for you answer !

AG

Yes I did but it’s the same result !

Did you try with 127.0.0.1? Or did you try to use your external IP?

Usually, browsers bypass localhost as it is a very specific entry (not only “the ignore proxy for host” configuration).

Cheers!

Could you please share which browser you’re using and a screen shot of your proxy configuration?

If you’re using Firefox, the “No proxy for” box should be empty like in the documentation: Gatling - Recorder

This is my proxy configuration.

But I think proxy bypass localhost (like said @sbrevet ). Look:
" Les connexions à localhost, 127.0.0.1/8 ou ::1 ne passent jamais par un proxy."

I will find an other solution !
Thank you.

AG

Did you try with the external ip address of your computer? (192.168.0.x I guess, but it depends on your network).

Note that your application will have to listen to external endpoint as well.

" Les connexions à localhost, 127.0.0.1/8 ou ::1 ne passent jamais par un proxy."

Oh right, I failed noticed this change in FireFox settings :frowning:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.