From 9faa6b09a4e95f44cfe4e9753eb1ee7edcbe302a Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 29 Jul 2004 18:46:57 +0000 Subject: [PATCH] Look for already configured proxy settings and use those first. --- src/java/com/threerings/getdown/util/ProxyUtil.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/getdown/util/ProxyUtil.java b/src/java/com/threerings/getdown/util/ProxyUtil.java index c9f55fa..dc55610 100644 --- a/src/java/com/threerings/getdown/util/ProxyUtil.java +++ b/src/java/com/threerings/getdown/util/ProxyUtil.java @@ -1,5 +1,5 @@ // -// $Id: ProxyUtil.java,v 1.1 2004/07/29 17:57:45 mdb Exp $ +// $Id: ProxyUtil.java,v 1.2 2004/07/29 18:46:57 mdb Exp $ package com.threerings.getdown.util; @@ -20,6 +20,16 @@ public class ProxyUtil */ public static boolean detectProxy (URL sampleURL) { + // first look for a proxy that's already set + if ((_proxyIP = System.getProperty("proxyHost")) != null) { + _proxyPort = System.getProperty("proxyPort"); + return true; + } + if ((_proxyIP = System.getProperty("http.proxyHost")) != null) { + _proxyPort = System.getProperty("http.proxyPort"); + return true; + } + try { // Look around for the 1.4.X plugin proxy detection // class... Without it, cannot autodetect...