This should return `null` if a proxy is not available:

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/net/spi/DefaultProxySelector.java#234