Click to See Complete Forum and Search --> : HTTP Proxy


gvirdi
April 25th, 1999, 01:07 AM
I am writing a client server application. I would like the client and server to be able to communicate over a firewall. To ensure compatibility with all firewalls, I would like the following:

- The server is running on port 80 of a remote machine

- The client should be able to connect to the server via the http port on the proxy.

I believe that http goes over a TCP connection, so theoretically I should be able to fool the proxy into thinking that my client server connection is a normal http link.

My question is what commands (protocol) do I use to access the proxy. For example do I simply make a connection to my proxy using 127.0.0.1:80 Specifically:

- How do I tell the proxy the address (and port) of the remote machine?

- Will it allow me to establish a TCP link to the machine or will the link be via the proxy?

Thanks!!!

April 29th, 1999, 03:52 AM
For a HTTP Proxy, the protocol you must use is HTTP !
Many proxies (Squid or Apache server or..) includes other protocols. They are called multiprotocols proxies.
When you access the Internet from your desktop through the server of your firm, the allowed proxies are HTTP and POP3, SMTP. FTP isnt supported
directly, but througth the HTTP protocol. This is why you can download files with you navigator, but you can with some other toosl like
WS_FTP.. Only tools devoted to downloading files (like NetVampire) that allow to use a HTTP proxy (.. configure your tool..) can work.
FOR YOU, you can do the followin.
To transfer files: use HTTP protocol.
Example.
Application 1 (say Machine SERVER)want to notify to others yhat theres some data. So use SMTP to notify clients.
The message can include the file. You can also specify in the message the url of the file.
Clients (say Machine CLIENT) (with a simple SMTP client) get the message. If data are attached, get them directly. Else
you use a HTTP client to get the file.
The SERVER must have a HTTP server to send the file.
On codeguru you can get some SMTP/POP3/MIME classes. For HTTP clien, its very very simple. For a HTTP server
this is more complicated, even a simple is needed.
Good links for sourcecode about HTTP, proxies
www.sockaddr.com
www.research.digital.com
www.W3C.com

I hope this helps you

gvirdi
April 29th, 1999, 06:30 AM
Hi!!

Thanks a lot for your help! I have 2 more questions...

- Can a server initiate a connection to a client behind a firewall using HTTP? If neccessary, I will implement an HTTP server at the client side also, but can a remote machine initiate a connection to a computer behind a firewall, or does the computer behind the firewall always have to initiate?

- Some proxies require users to login. Do you know the protocol for this?

Thanks again!!

April 30th, 1999, 01:03 AM
Hi,
If your machines are on a LAN, you donot need communicate through the proxy.Even, you can't : because proxies are used as gateways
between your internal network , and the outside.

Please verify the following: passwords, username.. are part of the HTTP protocol, and are sent in the HTTP protocol.
If you what is read/send by HTTP protocol.
Links on RFCs:
www.rfc-editor.org RFC
http://www.iana.org/ RFC

RFCs for HTTP and HTTP proxies
rfc1920
rfc1945
rfc2068
rfc2069
rfc2109
rfc2145

RFCs for POP3/SMTP/MIME
RFC1225
RFC1341
RFC821
RFC822