easypost-csharp icon indicating copy to clipboard operation
easypost-csharp copied to clipboard

Add support to proxy servers

Open Godd67 opened this issue 7 years ago • 7 comments

We have a few customers that do not have direct Internet connection from their shipping machines because of company polices and instead are using local network proxy servers to communicate with outside world. For instance a customer’s PC can’t access https://onlinetools.ups.com/webservices (UPS API endpoint) directly , instead we let them to enter their proxy server URL and credentials in our software and set underlying connection’s (either SoapHttpClientProtocol or HttpWebRequest) Proxy property. If it is set, all outbound requests goes through this proxy URL. We would like to see similar proxy support in Easypost client.

Thanks.

Godd67 avatar Sep 01 '17 13:09 Godd67

You can change the underlying url to make requests to by setting it on ClientConfiguration.

https://github.com/EasyPost/easypost-csharp#configuration

Does this solve your issues?

att14 avatar Sep 01 '17 18:09 att14

In our case proxy server needs additional credentials that we need to pass. System.Net.Webproxy handles it .

Godd67 avatar Sep 01 '17 18:09 Godd67

What kind of authentication are you using? Basic Auth?

att14 avatar Sep 01 '17 18:09 att14

Honestly, not sure. We are setting this property - https://msdn.microsoft.com/en-us/library/system.net.webproxy.credentials(v=vs.110).aspx

Godd67 avatar Sep 01 '17 18:09 Godd67

This could be a pretty major change to how the client and request work. I have been wanting to make a change that would support something like this. I'll take a look and see how complicated it would be.

att14 avatar Sep 01 '17 20:09 att14

This items isn't on our immediate roadmap; however, we are open to pull requests if someone wants to take a stab at it.

Justintime50 avatar Aug 12 '21 17:08 Justintime50

@Godd67 I am exploring the scope of the work for this. It seems fairly trivial. Is this still a requirement?

nwithan8 avatar Aug 17 '22 22:08 nwithan8