mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 19:31:30 +00:00
Update default HTTP configurations to use HTTPS
This commit is contained in:
parent
5e0029e208
commit
bcbec555cd
2 changed files with 10 additions and 6 deletions
|
@ -142,6 +142,16 @@ public class ConfigXml {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enforce TLS.
|
||||||
|
Element gui = (Element) mConfig.getDocumentElement()
|
||||||
|
.getElementsByTagName("gui").item(0);
|
||||||
|
boolean tls = Boolean.parseBoolean(gui.getAttribute("tls"));
|
||||||
|
if (!tls) {
|
||||||
|
Log.i(TAG, "Enforce TLS");
|
||||||
|
gui.setAttribute("tls", Boolean.toString(true));
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Update deprecated 8080 port to 8384
|
// Update deprecated 8080 port to 8384
|
||||||
NodeList addressList = gui.getElementsByTagName("address");
|
NodeList addressList = gui.getElementsByTagName("address");
|
||||||
for (int i = 0; i < addressList.getLength(); i++) {
|
for (int i = 0; i < addressList.getLength(); i++) {
|
||||||
|
|
|
@ -100,12 +100,6 @@
|
||||||
android:key="gui_password"
|
android:key="gui_password"
|
||||||
android:title="@string/gui_password" />
|
android:title="@string/gui_password" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="UseTLS"
|
|
||||||
android:title="@string/gui_https_enabled"
|
|
||||||
android:enabled="false"
|
|
||||||
android:persistent="false" />
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
|
Loading…
Reference in a new issue