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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.