TCP Socket though proxy - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

TCP Socket though proxy

Hallo,
I have to modify a C client/server program that opens a TCP socket from the client to the server. Recently my company installed a firewall between the various (physical) sites we run and now. So, every outgoing connection passes though a proxy server. That of course is a huge problem for the program. Unfortunately, the original programmer is not among us anymore and I have to fulfill the management's request and modify the program in order to use the proxy.
I searched on the internet but I did not find very useful information on the matter. So, is it possible to open a socket via an HTTP proxy? If yes, how on earth can I do that?
Note: The program uses libneon for some HTTP requests, namely, an HTTP authentication. That part is OK since libneon supports proxies. But the rest of the program uses plain old sockets...
Thank you in advance

Comments

  • tpetpe Posts: 2Member
    Nobody?
    Please?
  • Josh CodeJosh Code Posts: 675Member
    Why do you need everything to go through HTTP?

    What about making another TCP/IP server program to run on that proxy machine and let it handle relaying the messages to and from the internet-based TCP/IP server?
  • mikemolmikemol Posts: 2Member
    I don't know anything about libneon, but perhaps you can write a wrapper around those socket calls and route them through libneon?
  • mikemolmikemol Posts: 2Member
    Blanket reason not to create a new TCP/IP server program: IANA port assignments, and the sheer number of custom applications that are likely to be out there.
  • a_poostchia_poostchi Posts: 6Member
    Hi
    I was wondering if you could find any solution for your problem?
    Since I'm facing with the very same problem!

    I'm inside of a well protected network, and I want to connect to an external IP with "Socket" object. Previously I've used "HTTPRequest" and "WebProxy", like this:
    [code]IWebProxy wp = HttpWebRequest.GetSystemWebProxy();
    wp.Credentials = CredentialCache.DefaultCredentials;
    MyWebService.Proxy = wp; [/code]
    and it worked well. But I can't connect with "Socket".
  • a_poostchia_poostchi Posts: 6Member
    This post has been deleted.
  • a_poostchia_poostchi Posts: 6Member
    This post has been deleted.
Sign In or Register to comment.