carsonyl / pypac

Find and use proxy auto-config (PAC) files with Python and Requests.
https://pypac.readthedocs.io
Apache License 2.0
71 stars 19 forks source link

Allow setting the client ip address #47

Closed aslafy-z closed 5 years ago

aslafy-z commented 5 years ago

In order to test our proxy pac, we would like to be able to set the ip address that myIpAddress returns.

Would it be possible to have a config key that overwrites this value?

Thanks!

SeyfSV commented 5 years ago

Hi, I am right, that you want to change source IP? If yes, than you can achieve this by using this way. PACSession is a child of requests.Session class, all described for Session is true for PACSession.

aslafy-z commented 5 years ago

You are right. Thank you for the details!

kaushik853 commented 4 years ago

You are right. Thank you for the details!

Did you guys able to run this for multiple source ip address?