mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 12:51:16 +00:00
Support TOR connectivity (fixes #589).
This commit is contained in:
parent
77c2d4bd55
commit
dff3e052af
3 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -304,6 +304,10 @@ Please report any problems you encounter via Github.</string>
|
|||
|
||||
<string name="run_as_foreground_service_summary">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.</string>
|
||||
|
||||
<string name="use_tor_title">Use TOR</string>
|
||||
|
||||
<string name="use_tor_summary">Force all traffic through TOR for increased privacy</string>
|
||||
|
||||
<!-- Toast shown after config was successfully exported -->
|
||||
<string name="config_export_successful">Config was exported to %1$s</string>
|
||||
|
||||
|
|
|
@ -168,6 +168,11 @@
|
|||
android:summary="@string/run_as_foreground_service_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="use_tor"
|
||||
android:title="@string/use_tor_title"
|
||||
android:summary="@string/use_tor_summary" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
|
Loading…
Reference in a new issue