diff --git a/res/raw/geoip.mp3 b/res/raw/geoip.mp3 index 4b5ce6d9..3db9c63d 100644 Binary files a/res/raw/geoip.mp3 and b/res/raw/geoip.mp3 differ diff --git a/res/raw/geoip6.mp3 b/res/raw/geoip6.mp3 new file mode 100644 index 00000000..e5e59108 Binary files /dev/null and b/res/raw/geoip6.mp3 differ diff --git a/src/org/torproject/android/service/TorBinaryInstaller.java b/src/org/torproject/android/service/TorBinaryInstaller.java index 45705ae5..3ff0a38d 100644 --- a/src/org/torproject/android/service/TorBinaryInstaller.java +++ b/src/org/torproject/android/service/TorBinaryInstaller.java @@ -76,6 +76,10 @@ public class TorBinaryInstaller implements TorServiceConstants { is = context.getResources().openRawResource(R.raw.geoip); outFile = new File(installFolder, GEOIP_ASSET_KEY); streamToFile(is, outFile, false, true); + + is = context.getResources().openRawResource(R.raw.geoip6); + outFile = new File(installFolder, GEOIP6_ASSET_KEY); + streamToFile(is, outFile, false, true); return true; } diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java index ff5da45e..d26ca035 100644 --- a/src/org/torproject/android/service/TorService.java +++ b/src/org/torproject/android/service/TorService.java @@ -1645,9 +1645,10 @@ public class TorService extends Service implements TorServiceConstants, TorConst if (entranceNodes.length() > 0 || exitNodes.length() > 0 || excludeNodes.length() > 0) { - //only apple GeoIP if you need it + //only apply GeoIP if you need it File fileGeoIP = new File(appBinHome,GEOIP_ASSET_KEY); - + File fileGeoIP6 = new File(appBinHome,GEOIP6_ASSET_KEY); + try { if ((!fileGeoIP.exists())) @@ -1658,6 +1659,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst } mBinder.updateConfiguration("GeoIPFile", fileGeoIP.getAbsolutePath(), false); + mBinder.updateConfiguration("GeoIPv6File", fileGeoIP6.getAbsolutePath(), false); } catch (Exception e) diff --git a/src/org/torproject/android/service/TorServiceConstants.java b/src/org/torproject/android/service/TorServiceConstants.java index ce16be2a..469427bd 100644 --- a/src/org/torproject/android/service/TorServiceConstants.java +++ b/src/org/torproject/android/service/TorServiceConstants.java @@ -31,6 +31,8 @@ public interface TorServiceConstants { //geoip data file asset key public final static String GEOIP_ASSET_KEY = "geoip"; + public final static String GEOIP6_ASSET_KEY = "geoip6"; + //various console cmds public final static String SHELL_CMD_CHMOD = "chmod";