Send mail with a proxy

Send mail with a proxy

Postby Silvio.Falconi » Wed May 27, 2015 9:34 am

Some tried to send a mail (cd0) into a proxy ?
Emg send me this info https://support.microsoft.com/it-it/kb/310233
Some on ecan help me to implement a function to run with proxy on fwh
thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6832
Joined: Thu Oct 18, 2012 7:17 pm

Re: Send mail with a proxy

Postby James Bott » Wed May 27, 2015 3:08 pm

Maybe this info from my notes will help.

James

From: "Jeff Davis" <jeff@crednet.com>
Subject: Re: Proxy Client in Fivewin
Date: Monday, November 26, 2001 10:49 AM

I found the solution to my problem.

If you are using TSOCKET to connect to a Port that is not allowed out of the firewall all you have to do is connect to a Proxy server IP with a PORT that is allowed (80 or 8080) and then in the Connect event do the following

nHostPort = 5950
cHostIP = "10.10.10.1"
nProxyPort = 8080
cProxyAddress = "202.89.128.85"

oSocket := CNCSocket():New(nProxyPort)
oSocket:bConnect := { | oSocket | OnConnect(oSocket,oGet)}
oSocket:cDestAddr := cProxyAddress
oSocket:connect()

Function OnConnect(oSocket)
oSocket:SendData("CONNECT "+cHostIP+":"+ltrim(str(nHostPort)+"
HTTP/1.1"+CRLF+ CRLF)
return nil


The proxy server will create a "HTTP tunnel" to cHostIP on nHostPort. You will recieve the following response from the Proxy server.

"HTTP/1.1 200 Connection established
Proxy-agent: CacheFlow-Proxy/1.0"

The 200 means the connection was successfull. All data sent or recieved on the socket connection is now with the new host.

If there is not a proxy to connect to there are MANY "Public Proxy's" on the internet that can be used ( 202.89.128.85:8080 is one).

This works GREAT and was easy to implement in our application. You just need to configure a proxy server IP and Port and if needed, use it to open your socket and then use your hosts IP and port in the "CONNECT " string.

For more info see..
http://www.codeproject.com/internet/httptunneling.asp

--
Jeff Davis
CreditNet Communications
(503) 977-7578
jeff@crednet.com
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 28 guests