Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. connection through proxy server

connection through proxy server

Scheduled Pinned Locked Moved C#
questionsysadminannouncementlounge
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kamran Zafar
    wrote on last edited by
    #1

    Hi, my chat client is easily connecting to the Server program using Sockets (in c-sharp). But now i want to provide the functionality in my chat client program to be able to connect through proxy. How can I do this. Besides, I see in MSN, that there are 3 types of Proxy setting in it i.e. - SOCKS VERSION 4 - SOCKS VERSION 5 - HTTP Proxy would it make a major difference in the client side coding if i have to support all the above types? A prompt reply will be appreciated. Regards, Kamran

    H 1 Reply Last reply
    0
    • K Kamran Zafar

      Hi, my chat client is easily connecting to the Server program using Sockets (in c-sharp). But now i want to provide the functionality in my chat client program to be able to connect through proxy. How can I do this. Besides, I see in MSN, that there are 3 types of Proxy setting in it i.e. - SOCKS VERSION 4 - SOCKS VERSION 5 - HTTP Proxy would it make a major difference in the client side coding if i have to support all the above types? A prompt reply will be appreciated. Regards, Kamran

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Your protocol has to be defined to work with proxies - it isn't automatic. The only advice anyone can really give you is to read the RFCs from http://www.ietf.com/rfc[^] for those proxy types to determine how you could include them along with your protocol definition. HTTP, for example, allows for proxies. This is why the HTTP-related classes (like HttpWebRequest) support proxies (a la the WebProxy) in the .NET BCL. It's common enough to warrant inclusion in the .NET BCL. How other protocols work with proxies is up to the protocol authors. Many typically work the same (there's a lot of HTTP-like protocols, like SMTP, DICT, etc.) so I'd imagine the proxy support works the same, making it easy to use the same proxies. What I'd recommend is using a good OO design to encapsulate your Socket client in a class and actually make use of the WebProxy for consistency (so people can reuse the same proxy; WebProxy also defaults to using the Internet Explorer settings for proxies, making it easy for your users to default to settings they might've already configured). You still need to work out how it'll work with your chat protocol, though. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups