Lines Matching refs:Proxy
28 import java.net.Proxy;
29 import java.net.Proxy.Type;
43 private static final String PROXY = "PROXY ";
46 private final List<Proxy> mDefaultList;
53 Log.e(TAG, "PacManager: no proxy service");
55 mDefaultList = Lists.newArrayList(java.net.Proxy.NO_PROXY);
59 public List<Proxy> select(URI uri) {
65 Log.e(TAG, "select: no proxy service return NO_PROXY");
66 return Lists.newArrayList(java.net.Proxy.NO_PROXY);
95 private static List<Proxy> parseResponse(String response) {
97 List<Proxy> ret = Lists.newArrayList();
101 ret.add(java.net.Proxy.NO_PROXY);
102 } else if (trimmed.startsWith(PROXY)) {
103 Proxy proxy = proxyFromHostPort(Type.HTTP, trimmed.substring(PROXY.length()));
104 if (proxy != null) {
105 ret.add(proxy);
108 Proxy proxy = proxyFromHostPort(Type.SOCKS, trimmed.substring(SOCKS.length()));
109 if (proxy != null) {
110 ret.add(proxy);
115 ret.add(java.net.Proxy.NO_PROXY);
120 private static Proxy proxyFromHostPort(Proxy.Type type, String hostPortString) {
125 return new Proxy(type, InetSocketAddress.createUnresolved(host, port));
127 Log.d(TAG, "Unable to parse proxy " + hostPortString + " " + e);