Solved

sending tcp packets through a proxy

Posted on 2002-03-22
5
247 Views
Last Modified: 2010-04-02
Hi, I have an app which uses CSocket to connect to a server and send data. it now turns out we need the app to be able to connect through a proxy server.

can anyone tell me what format of message I need to send to the proxy server to tell it the destination of my data?
I was assuming it would be the first data you send upon connection, and would be a standard somewhere? Or am I misguided?!

thanks,
Ian

0
Comment
Question by:ianwhite
  • 2
  • 2
5 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6888437
It depends on the type of the data you are sending and what the proxy itself supports.  Many proxy devices or servers are setup to only pass certain types of data.  It not uncommon to see ports and protocols limited to only things like HTTP, FTP, POP3, and SMTP.

Few proxy server permit passing RAW data (can I assume that this is your meaning when you say "tcpip packets" in the question??)  So you'll need to use some alternate method.

A different type of firewall (sometimes called a proxy) does what is called NAT for Network Address Translation.  These are not really proxies in that they are transparent to the application and all the stuff needed for this to operate is on the server itself.  Most NAT firewalls ("proxys") are capable of passing any type of data but often that can be configured by the administrator.

Bottom line is that there is no general purpose answer to your question.  What you'll be able to do depends on what you are trying to do, the capabilities of the proxy, and the wishes of the people who control/configure it.
0
 

Author Comment

by:ianwhite
ID: 6888990
hmm, that could cause us problems!

we're actually using port 80, as we figured most firewalls would be open for that, but yes I'm sending RAW data (a sinple class as it happens). Does that help me (using port 80)? is there a way to send a proper http header first (to set up the redirection, then send my data, or would I have to send it everytime? I *could* change my code to talk HTTP I guess, in which case how would I configure the headers to tell the proxy which way to go?
hope you can help some more, your first comment is excellent!
0
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 6889134
An HTTP proxy will generally only pass validly formed HTTP requests and also must adhere to the HTTP proxy protocol format.  (there is an RFC on this...)
0
 
LVL 11

Expert Comment

by:griessh
ID: 6955462
Dear ianwhite

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "jhance"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 

Author Comment

by:ianwhite
ID: 6958894
sorry mate, got totally caught up in other stuff and forgot all about this.

turns out I had to change my comms to HTTP and pass all the proxy info as you said. seems to work great, so thanks a million!


sorry again for the slackness in replying.

Ian
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Converting to C# also VS2015 5 110
C Language combined operators 28 102
How to gracefully close the c++ 11 thread? 3 66
C++ question 3 46
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

758 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

21 Experts available now in Live!

Get 1:1 Help Now