Recent

Author Topic: synapse THTTPSend socks5 problem?  (Read 2450 times)

awaked2

  • Newbie
  • Posts: 4
synapse THTTPSend socks5 problem?
« on: June 14, 2021, 05:57:24 am »
hello i'm newbie! i have a question.

Code: Pascal  [Select][+][-]
  1.  
  2.   response := TStringStream.Create('');
  3.   http := THTTPSend.Create;
  4.   http.UserAgent := 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/7.0';
  5.   http.MimeType := 'application/x-www-form-urlencoded; charset=UTF-8';
  6.   http.Sock.SocksIP := 'IP'; //
  7.   http.Sock.SocksPort := '1080';
  8.   http.Sock.SocksType := ST_Socks5;
  9.   http.Sock.SocksUsername := 'UserName'; //
  10.   http.Sock.SocksPassword := 'Password'; //
  11.   http.Sock.ConnectionTimeout := 6000;
  12.   jsontext := EncodeURL('Some JSON Data');
  13.  
  14.   WriteStrToStream(HTTP.Document, jsontext);
  15.   http.HTTPMethod('POST', 'http://.....'); // HTTP site
  16.   reulstcode := http.resultcode;                                  
  17.  

windows10 => resultcode 200 (work)
raspberry pi4 raspbian 32bit => resultcode 500 (not work)

Same code, but only works on Windows.
If I remove the socks5 proxy option it works on Raspbian too.
But why doesn't socks5 work on Raspbian?

BeniBela

  • Hero Member
  • *****
  • Posts: 803
    • homepage
Re: synapse THTTPSend socks5 problem?
« Reply #1 on: June 14, 2021, 04:23:00 pm »
Probably this bug: https://sourceforge.net/p/synalist/bugs/48/

It is been fixed in SVN trunk

awaked2

  • Newbie
  • Posts: 4
Re: synapse THTTPSend socks5 problem?
« Reply #2 on: June 14, 2021, 05:38:10 pm »
//Port := IntToStr(ResolvePort(Port));

Thank you for answer. I removed that line, but it doesn't work......

sstvmaster

  • Sr. Member
  • ****
  • Posts: 254
Re: synapse THTTPSend socks5 problem?
« Reply #3 on: June 14, 2021, 08:28:58 pm »
Windows 10 (64 bit)
Lazarus: 2.0.12 / Trunk x32

awaked2

  • Newbie
  • Posts: 4
Re: synapse THTTPSend socks5 problem?
« Reply #4 on: June 14, 2021, 10:19:59 pm »
I tried installing with the r222 version and it still doesn't work.

awaked2

  • Newbie
  • Posts: 4
Re: synapse THTTPSend socks5 problem?
« Reply #5 on: June 14, 2021, 11:13:53 pm »
Socks5 does not work even with Indy. I don't know why. Maybe this is the problem?
SocksIP := 'proxy-nl.service.com' // domain not work?

 

TinyPortal © 2005-2018