Winsock & INet control through Proxy server 
Author Message
 Winsock & INet control through Proxy server

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



Sat, 22 Jan 2005 06:06:56 GMT  
 Winsock & INet control through Proxy server
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


Quote:
> 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



Wed, 26 Jan 2005 12:06:59 GMT  
 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



Fri, 28 Jan 2005 21:13:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Winsock & INet control through Proxy server

2. Proxy Server & Winsock Control

3. Using WINSOCK control to access server through PROXY SERVER

4. Inet Control & Proxy

5. Inet control and proxy server

6. iNet control: FTP PUT through a wingate proxy server

7. INET control through WINGate Proxy Server

8. Connect to web site via proxy server using Inet control

9. Winsock Control/Proxy Server

10. Newbie Q: How to fetch a web page thru proxy server?(use winsock control)

11. Using the Winsock Control with a Proxy Server

12. Newbie Q: How to fetch a web page thru proxy server?(use winsock control)

 

 
Powered by phpBB® Forum Software