The boolean usingProxy() method returns true if web connections are being funneled through a proxy server, false if they're not.
usingProxy()