* * *

Author Topic: TFPHTTClient and Socks proxy?  (Read 3449 times)

Renat.Su

  • Jr. Member
  • **
  • Posts: 70
    • Renat.Su
TFPHTTClient and Socks proxy?
« on: April 24, 2018, 09:09:03 am »
Sorry, but I do not understand the simple question of work TFPHTTPClient. I was forced to work synapse through socks and HTTP proxies. In the case of the standard TFPHTTPClient I did not understand how to use socks proxy. In wiki, too, not found the big info. How to work through socks proxy???  %)  :-[

Thaddy

  • Hero Member
  • *****
  • Posts: 6734
Re: TFPHTTClient and Socks proxy?
« Reply #1 on: April 24, 2018, 09:39:51 am »
You need trunk for that I believe. AllowRedirect property, Property Proxy
« Last Edit: April 24, 2018, 09:41:44 am by Thaddy »
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

Renat.Su

  • Jr. Member
  • **
  • Posts: 70
    • Renat.Su
Re: TFPHTTClient and Socks proxy?
« Reply #2 on: April 24, 2018, 10:15:21 am »
The stable version has a proxy property of TProxyData. But as I understood this a HTTP proxy. I'll see what changes in the trunk version, thank you!

Thaddy

  • Hero Member
  • *****
  • Posts: 6734
Re: TFPHTTClient and Socks proxy?
« Reply #3 on: April 24, 2018, 01:08:21 pm »
The stable version has a proxy property of TProxyData. But as I understood this a HTTP proxy. I'll see what changes in the trunk version, thank you!
In this case http proxies are basically a specialization of socks proxies to limit the protocol to http. And that is what you are using: a http client so you *should* / *must* limit to the http protocol.
See it like this.
« Last Edit: April 24, 2018, 01:10:47 pm by Thaddy »
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 448
    • Lebeau Software
Re: TFPHTTClient and Socks proxy?
« Reply #4 on: April 26, 2018, 11:24:52 pm »
In this case http proxies are basically a specialization of socks proxies to limit the protocol to http.

That is not what an HTTP proxy is or does.  An HTTP proxy simply uses the HTTP protocol to communicate with the client, but with special semantics, like requiring absolute URLs in the request line of GET/POST requests, or using the CONNECT verb to establish a raw byte tunnel.  HTTP proxies work with HTTP and non-HTTP clients alike.

And that is what you are using: a http client so you *should* / *must* limit to the http protocol.

That is simply not true.  The HTTP protocol has no such limitation.  There is no requirement that an HTTP client must use an HTTP proxy.  Most commonly used web browsers can quite happily use SOCKS proxies for HTTP connections.  And many non-HTTP clients support HTTP proxies for non-HTTP traffic.

In the case of the standard TFPHTTPClient I did not understand how to use socks proxy. In wiki, too, not found the big info. How to work through socks proxy???  %)  :-[

I don't know if TFPHTTPClient supports SOCKS proxies or not.  You already found a solution in Synapse.  Indy's TIdHTTP component also supports HTTP and SOCKS proxies (HTTP via the TIdHTTP.ProxyParams property, and SOCKS via a separate TIdSocksInfo component assigned to the TIdHTTP.Socket.TransparentProxy property).
« Last Edit: April 26, 2018, 11:29:53 pm by Remy Lebeau »
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

BeniBela

  • Hero Member
  • *****
  • Posts: 625
    • homepage
Re: TFPHTTClient and Socks proxy?
« Reply #5 on: April 27, 2018, 12:55:42 am »
A SOCKS proxy is when you need to be especially sneaky and take of your shoes to only walk on your sock quietly

Renat.Su

  • Jr. Member
  • **
  • Posts: 70
    • Renat.Su
Re: TFPHTTClient and Socks proxy?
« Reply #6 on: April 27, 2018, 12:59:36 pm »
In this case http proxies are basically a specialization of socks proxies to limit the protocol to http.

That is not what an HTTP proxy is or does.  An HTTP proxy simply uses the HTTP protocol to communicate with the client, but with special semantics, like requiring absolute URLs in the request line of GET/POST requests, or using the CONNECT verb to establish a raw byte tunnel.  HTTP proxies work with HTTP and non-HTTP clients alike.

And that is what you are using: a http client so you *should* / *must* limit to the http protocol.

That is simply not true.  The HTTP protocol has no such limitation.  There is no requirement that an HTTP client must use an HTTP proxy.  Most commonly used web browsers can quite happily use SOCKS proxies for HTTP connections.  And many non-HTTP clients support HTTP proxies for non-HTTP traffic.

In the case of the standard TFPHTTPClient I did not understand how to use socks proxy. In wiki, too, not found the big info. How to work through socks proxy???  %)  :-[

I don't know if TFPHTTPClient supports SOCKS proxies or not.  You already found a solution in Synapse.  Indy's TIdHTTP component also supports HTTP and SOCKS proxies (HTTP via the TIdHTTP.ProxyParams property, and SOCKS via a separate TIdSocksInfo component assigned to the TIdHTTP.Socket.TransparentProxy property).
Thanks for the reply. As I understood support of socks there is no.

Renat.Su

  • Jr. Member
  • **
  • Posts: 70
    • Renat.Su
Re: TFPHTTClient and Socks proxy?
« Reply #7 on: April 27, 2018, 01:01:53 pm »
A SOCKS proxy is when you need to be especially sneaky and take of your shoes to only walk on your sock quietly
I do not quite understand You. socks can be used to connect to a site where it is not locally accessible. For example, for the operation of telegram bots, if it is not available in a particular country.
« Last Edit: April 27, 2018, 02:16:41 pm by Renat.Su »

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 448
    • Lebeau Software
Re: TFPHTTClient and Socks proxy?
« Reply #8 on: May 04, 2018, 03:09:20 am »
I do not quite understand You.

BeniBela was just making a joke, ignore it...
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus