Solved

tcp client  connecting trough proxy server

Posted on 2003-11-18
9
553 Views
Last Modified: 2010-04-05
hi,

can annyone tel me how to use proxy servers in the tcpclient of indy,
I know http and other indy components have proxy settings.

never worked with proxy servers so please can someone give me a hint
0
Comment
Question by:henk29
  • 4
  • 3
9 Comments
 
LVL 8

Accepted Solution

by:
gmayo earned 125 total points
Comment Utility
I'm not sure you need to explicitly state that you are using a proxy server. For example, my PC is set up to use a proxy at work, and I do not need to give the address of the proxy server, just the target address (this is using TClientSocket rather than Indy). If the Windows internet connection is set up properly, then presumably something in the routing table means it knows how to get to the target address.

Geoff M.
0
 

Author Comment

by:henk29
Comment Utility
Well the problem is at some networks it needs to have to proxy set and a username and password, otherwise it returns the message unknow host or unable to connect, i know you have to do something with the tcp header to make it work but the question is how?
0
 
LVL 8

Expert Comment

by:gmayo
Comment Utility
TCP is a low level comms channel, just a pipe literally. The HTTP and other components sit on top of TCP and actually form a high level protocol using that pipe. You will probably only be able to communicate directly with the proxy server at TCP level, not anything beyond the proxy. The proxy acts as a kind of agent, getting stuff for you. HTTP makes this seamless so it appears as if you are talking to the outside world when, in fact, you are only talking to the proxy which itself does the talking with the outside world.

I'm not sure how I can explain it any better.

Geoff M.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:henk29
Comment Utility
Ok it makes sense,

but still doesn;t awnser my question
im using these components for a client server solution and i need to communicate trough a proxy
so i just need to get it working so is there a way to code that the client is able to go trough the proxy
i read something about using socks and thats prob what messenger and other programs use
so im looking for some code or example to connect to a fix ip on the web over tcp
0
 
LVL 8

Expert Comment

by:gmayo
Comment Utility
Okay, you need to know which protocol you are using. For example, if you were to connect to a standard web page, you'd need to implement the HTTP protocol. If you were to connect to a RealAudio site you'd need RMS. For mail you need SMTP or POP3. It all depends on what you are connecting to. Basically, you send a message to the proxy saying "get me this" but in a language that the proxy can forward to the host server. The format of that message will be different depending on the protocol.

There are too many unknowns in your question to be able to answer it. What you are trying to do is low level and you'd probably be re-inventing the wheel. Why not use a component which probably already exists (HTTP, POP3, etc)?

Geoff M.
0
 

Author Comment

by:henk29
Comment Utility
ok damm

well the server and client are made by me so i have control over both
what i basicly use is tcp client and tcpserver from indy
what happens is that the client loges in to the server and they communicate with each other
the client will be used with home users and ofcourse at businisses..
i'm sending xml data packeges over to communicate,
so what would you advice then

0
 
LVL 8

Expert Comment

by:gmayo
Comment Utility
Sorry, I'm not familiar with XML. If you do a google search for XML and Delphi you should find something which meets your needs. Sorry I can't help further.

Geoff M.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now