Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

tcp client  connecting trough proxy server

Posted on 2003-11-18
9
Medium Priority
?
624 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 500 total points
ID: 9777286
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
ID: 9783081
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
ID: 9785855
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:henk29
ID: 9786289
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
ID: 9786432
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
ID: 9786490
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
ID: 9786577
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Integration Management Part 2
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

927 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