From 2d6c26a99984e28ac59396c8a9528576c048fb14 Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Sat, 29 Nov 2014 00:42:51 -0500 Subject: [PATCH] show exit node info in log --- src/org/torproject/android/service/TorService.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java index c3d19f77..d6fa4e01 100644 --- a/src/org/torproject/android/service/TorService.java +++ b/src/org/torproject/android/service/TorService.java @@ -1737,6 +1737,17 @@ public class TorService extends Service implements TorServiceConstants, TorConst mNode.country = jsonRelays.getJSONObject(0).getString("country_name"); mNode.organization = jsonRelays.getJSONObject(0).getString("as_name"); + StringBuffer sbInfo = new StringBuffer(); + sbInfo.append(mNode.ipAddress); + + if (mNode.country != null) + sbInfo.append(' ').append(mNode.country); + + if (mNode.organization != null) + sbInfo.append(" (").append(mNode.organization).append(')'); + + logNotice(sbInfo.toString()); + } reader.close();