Solved

tcp client  connecting trough proxy server

Posted on 2003-11-18
9
571 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
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 135
Convert GUI app into console app for Win32 Env 5 99
When i run adoquery my application freezes 26 165
Tvertscrollbox like a whatsapp layout 5 26
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

786 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