Consider a case that there is a Proxy in my Organization, I need to enter the Proxy details in my IE. If I remove these details from the browser, I am no longer able to access the Internet. So I assume that all the Internet traffic goes through the Proxy that has been set for the Organization. Correct??

Now my real problem is that when I programmatically try to access the Internet(using Java), I have the option to specify Proxy=Yes or No. If I choose Proxy=Yes, I need to give the username and password, if I choose Proxy=No, it establishes a direct connection and still lets me access the Internet. Please refer the below Java API doc

http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html and search for the string "which represents a direct connection, or absence of proxy".

I want to know what is this DIRECT connection ? How is it established ? Does not all the external world(Internet) traffic route through the Proxy in an Organization ?


It depends on your organisation.

If your browser (Internet Explorer, in your case) does work with a proxy, and does not work without a proxy, it's possible that

  • all direct outgoing connections are blocked (safest)
  • only certain direct outgoing connections are blocked (more flexible, less safe)

You can test this by trying to establish different connections to servers on the web. Try HTTP to google.com:80; try FTP to an open FTP server; try IRC to an IRC server, try setting your own nameservers (Google has nice DNS-servers); try connecting to your home machine.

If your Java application is able to make a direct connection, then probably not all traffic is blocked. Maybe only traffic to servers on certain ports (80, HTTP ; 21, FTP; ...) is blocked.

Edit: reading list

You want to learn more about connections, internet and proxies?

  • Learn about the OSI Model and look at the TCP/IP Model.
  • Checkout the RFC's for HTTP/1.1; HTTP/1.0; FTP; IRC and SMTP.
  • Try using TELNET to make a connection to a HTTP/FTP/IRC/SMTP server.
  • Write small programs to make connections to those servers.
  • Install a packet monitor such as Wireshark to see what traffic passes. Inspect HTTP/FTP/IRC traffic and see how it works.
  • Install Linux/BSD and setup a webserver and/or proxy server or install a LAMP/WAMP.
  • Thanks Konerak, the answer was very useful. Can you please post me a link or two from where I can learn more about DIRECT connections ? – Geek Aug 9 '11 at 6:43
  • Hmm, that's not an easy question because this is a pretty broad topic and I don't know what you know already. I'll add some reading material in the answer. – Konerak Aug 9 '11 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.