
Winsock & INet control through Proxy server
To do what you want to do, it depends what the proxy server allows.
Personally, I have only had experience retrieving html documents and
graphics/binary files through a proxy using the HTTP protocol.. It is
possible however, to wrap your application in the http protocol, so by
sending a request to the proxy for "GET http://yourip:yourport/whatever
HTTP/1.1" , your application would receive that data on whatever port
specified and you can handle the response however you want. If you want to
ensure compatability with most proxy servers out there, encapsulate it with
a mime type before sending it back, and make it look like a response to a
real http request. The proxy server isn't concerned as much with html
specifically as the HTTP protocol in general.
Usually, I have an OpenBSD computer in the middle of my internet connection,
so I just sniff the inbound and outbound traffic to see how it is
communicating when I set a proxy server.
Hope this helps,
-matt
Quote:
> Thanks Mat,
> But I don't want to use Winsock to get internet data (pages/html). The
> Winsock is for the direct binary communication with the remote
application.
> Here is what I have to do .
> Step 1) using INet control, read a web page
> Step 2) Using Winsock, connect with a remote program whose IP address I
know
> and who is in the listening mode (using its own Winsock control).
> step 3) Send and receive the binary data (non html) to & from the remote
> application.
> step 4) [Close communication]
> Ok let me ask one question. What exactly does the proxy server check. I
mean
> does the proxy server bother about all kinda traffic, or does it check
only
> the html data.
> If the proxy server will keep a check on all traffic then my Winsock
should
> know how to talk to the remote application through the proxy server.
> Any help appreciated.
> Manish M
> > I have dealt with this before. In your program, have the user setup
their
> > proxy. For this example, I am assuming the proxy runs on port 8080, and
> > it's name is proxy-server. Just do something like this:
> > winsock1.remotehost = proxy-server
> > winsock1.remoteport = 8080
> > winsock1.senddata "GET http://whateveryouwant.com/blah.html HTTP/1.1" &
> > vbcrlf & vbcrlf
> > -matt
> > -------------------------------------------------------
> > Matt Breedlove
> > Systems Engineer
> > Associated Computer Systems, Inc.
> > 1-800-ACS-6803
> > http://www.acsfla.com
> > > Hello all,
> > > I have an application which communicates with another application over
> the
> > > internet.
> > > First it has to use the INet control to retrieve a web page. Then it
> must
> > > connect to the remote application using Winsock to exchange some data.
> > > The problem is that it doesn't work through networks with proxy
server.
> I
> > > know the INet control has the proxy server setting.
> > > ** But where is the proxy server setting for the Winsock control. How
> does
> > > one use the Winsock control to communicate with another application
> > located
> > > outside the network which is guarded with a proxy server ??
> > > Thanks in advance.
> > > Manish M