diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java index 177a595d..56849f56 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java @@ -122,6 +122,10 @@ public class SyncthingRunnable implements Runnable { env.put("STNOUPGRADE", "1"); env.put("STGUIAUTH", sp.getString("gui_user", "") + ":" + sp.getString("gui_password", "")); + if (sp.getBoolean("use_tor", false)) { + env.put("all_proxy", "socks5://localhost:9050"); + env.put("ALL_PROXY_NO_FALLBACK", "1"); + } process = pb.start(); mSyncthing.set(process); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index a745fbe4..713c0ccc 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -304,6 +304,10 @@ Please report any problems you encounter via Github. If enabled, Syncthing will run with foreground priority and is less likely to be stopped by Android. This might cause other services to be stopped if available memory is low. A low-priority notification needs to be shown due to Android requirements, regardless of the \"Notification\" setting. + Use TOR + + Force all traffic through TOR for increased privacy + Config was exported to %1$s diff --git a/src/main/res/xml/app_settings.xml b/src/main/res/xml/app_settings.xml index ae4e22e4..e23914a0 100644 --- a/src/main/res/xml/app_settings.xml +++ b/src/main/res/xml/app_settings.xml @@ -168,6 +168,11 @@ android:summary="@string/run_as_foreground_service_summary" android:defaultValue="false" /> + +