Changeset 6971 in josm for trunk


Ignore:
Timestamp:
2014-04-12T09:45:42+02:00 (11 years ago)
Author:
akks
Message:

Add proxy.exceptions advanced parameter (localhost and 127.0.0.1 by default)

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java

    r6890 r6971  
    9797    /** Property key for proxy password */
    9898    public static final String PROXY_PASS = "proxy.pass";
     99    /** Property key for proxy exceptions list */
     100    public static final String PROXY_EXCEPTIONS = "proxy.exceptions";
    99101
    100102    private Map<ProxyPolicy, JRadioButton> rbProxyPolicy;
  • trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java

    r6890 r6971  
    1111import java.net.SocketAddress;
    1212import java.net.URI;
     13import java.util.Arrays;
    1314import java.util.Collections;
    1415import java.util.HashSet;
     
    6566    private final Set<String> errorResources = new HashSet<String>();
    6667    private final Set<String> errorMessages = new HashSet<String>();
     68    private Set<String> proxyExceptions;
    6769
    6870    /**
     
    138140            }
    139141        }
     142        proxyExceptions = new HashSet<String>(
     143            Main.pref.getCollection(ProxyPreferencesPanel.PROXY_EXCEPTIONS,
     144                    Arrays.asList(new String[]{"localhost", "127.0.0.1"}))
     145        );
    140146    }
    141147
     
    187193    @Override
    188194    public List<Proxy> select(URI uri) {
    189         if (uri != null && "localhost".equals(uri.getHost())) {
     195        if (uri != null && proxyExceptions.contains(uri.getHost())) {
    190196            return NO_PROXY_LIST;
    191197        }
Note: See TracChangeset for help on using the changeset viewer.