[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] reduce the onionoo lookup to just the required fields
commit 11d3f5954377fd5df250106868a9c45c8f57c67f
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date: Thu Aug 7 15:54:12 2014 -0400
reduce the onionoo lookup to just the required fields
---
src/org/torproject/android/service/TorService.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index 963d52d..acdb134 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -1430,6 +1430,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
private Node mNode;
private int MAX_ATTEMPTS = 3;
+ private final static String ONIONOO_BASE_URL = "https://onionoo.torproject.org/details?fields=country_name,as_name,or_addresses&lookup=";
public ExternalIPFetcher (Node node)
{
@@ -1450,7 +1451,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
//String nodeDetails = conn.getInfo("ns/id/"+nodes[0].id);
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8118));
- URLConnection conn = new URL("https://onionoo.torproject.org/details?lookup=" + mNode.id).openConnection(proxy);
+ URLConnection conn = new URL(ONIONOO_BASE_URL + mNode.id).openConnection(proxy);
conn.setRequestProperty("Connection","Close");
conn.setConnectTimeout(60000);
conn.setReadTimeout(60000);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits