Jump to content
Mark-

THttpServer, THttpCli and proxies...

Recommended Posts

Hello,

 

I will control both ends of the data pipe and payload. A customer has informed me a proxy is used. Never used a proxy so scoping out what requires attention for success.

 

From the server end it appears nothing to do. Perhaps that is wrong.

 

For the client end I see:
ProxyAuth, select one of the options.
ProxyPassword, a password if ProxyAuth is other than httpAuthNone.
ProxyUername, a username if ProxyAuth is other than httpAuthNone.
ProxyPort, the port of the proxy server.

 

Proxy, seems to be the IP address or host name.
ProxyConnection, seems to be a keep-alive setting, not sure
ProxyURL, not sure perhaps can specify all needed properties in one url string.

 

The last three, not sure what to do with them.

Any documents I can read or anyone shed some light?

 

Thanks,

 

Mark

 

Edited by Mark-

Share this post


Link to post

ICS includes an HTTP proxy component and sample project which you can build and run locally for testing, OverbyteIcsProxySslServer.dpr. 

 

Assuming you are using V8.62 or later, there is a new property ProxyURL property which combines four proxy properties as a URL for simplicity, ie http://[user[:password]@]host:port.  You still need to set ProxyAuth if that is needed.  A proxy listens on a specific IP address and port, and then forwards traffic to the original URL.  For testing, you can set 127.0.0.1 and port 81, and set-up the proxy to listen on the same, so ProxyURL would be http://127.0.0.1:81. 

 

Angus

Share this post


Link to post

Thanks.

No SSL for this project.

I was planning on updating the Wiki with data.

Proxy is the IP address or host name.

ProxyConnection is 'Keep-Alive' or blank

ProxyURL is as you say.

 

I updated the Wiki. Let me know if any of the above is incorrect.

Edited by Mark-

Share this post


Link to post

The proxy sample handles non-SSL as well.  the four properties Proxy, ProxyPort, ProxyUsername and ProxyPassword are all set by ProxyURL, so don't use them together.  Never used ProxyConnection.  

 

Angus

 

Share this post


Link to post
38 minutes ago, Angus Robertson said:

...are all set by ProxyURL, so don't use them together.

Right but you can set the properties individually, right? (not referring to the sample)

Share this post


Link to post

If you set the properties separately, don't use ProxyURL, that override them all.  It was add added to avoid needing to save four or five different properties, and pass them up from derived components.

 

Angus

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×