Compare commits

...

5 Commits

@ -18,6 +18,13 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### [Acantholipan](https://en.wikipedia.org/wiki/Acantholipan)
### 1.2208 - 2024-06-22
* Changed copy signature button into edit signature button
* Small improvements and minor bug fixes
* Updated [Public Suffix List](https://github.com/publicsuffix/list)
* Updated [translations](https://crowdin.com/project/open-source-email)
### 1.2207 - 2024-06-20
* Fixed DANE with SHA-384 and CNAME TLSA

@ -3,7 +3,7 @@ apply plugin: 'com.bugsnag.android.gradle'
apply plugin: 'kotlin-android'
apply plugin: 'de.undercouch.download'
def getVersionCode = { -> return 2207 }
def getVersionCode = { -> return 2208 }
def getRevision = { -> return "b" }
def getReleaseName = { -> return "Acantholipan" }
// https://en.wikipedia.org/wiki/List_of_dinosaur_genera
@ -24,9 +24,9 @@ android {
// https://apilevels.com/
defaultConfig {
applicationId "eu.faircode.email"
compileSdk 34
compileSdk 35
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
//targetSdkPreview "VanillaIceCream"
versionCode getVersionCode()
versionName "1." + getVersionCode()

@ -18,6 +18,13 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### [Acantholipan](https://en.wikipedia.org/wiki/Acantholipan)
### 1.2208 - 2024-06-22
* Changed copy signature button into edit signature button
* Small improvements and minor bug fixes
* Updated [Public Suffix List](https://github.com/publicsuffix/list)
* Updated [translations](https://crowdin.com/project/open-source-email)
### 1.2207 - 2024-06-20
* Fixed DANE with SHA-384 and CNAME TLSA

@ -1168,6 +1168,10 @@ public class DebugHelper {
size += write(os, "cert_transparency=" + cert_transparency + (cert_transparency ? " !!!" : "") + "\r\n");
size += write(os, "open_safe=" + open_safe + "\r\n");
for (String key : prefs.getAll().keySet())
if (key.startsWith("dns_"))
size += write(os, key + "=" + prefs.getAll().get(key)+"\r\n");
size += write(os, "\r\n");
size += write(os, Log.getCiphers().toString());

@ -33,7 +33,9 @@ import androidx.annotation.NonNull;
import androidx.preference.PreferenceManager;
import org.minidns.AbstractDnsClient;
import org.minidns.DnsCache;
import org.minidns.DnsClient;
import org.minidns.cache.LruCache;
import org.minidns.dane.DaneVerifier;
import org.minidns.dnsmessage.DnsMessage;
import org.minidns.dnsqueryresult.DnsQueryResult;
@ -465,6 +467,26 @@ public class DnsHelper {
return result;
}
static void clear(Context context) {
try {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = prefs.edit();
for (String key : prefs.getAll().keySet())
if (key != null && key.startsWith("dns."))
editor.remove(key);
editor.apply();
for (ResolverApi resolver : new ResolverApi[]{DnssecResolverApi.INSTANCE, ResolverApi.INSTANCE}) {
AbstractDnsClient client = resolver.getClient();
DnsCache cache = client.getCache();
if (cache instanceof LruCache)
((LruCache) cache).clear();
}
} catch (Throwable ex) {
Log.e(ex);
}
}
static boolean hasDnsSec() {
if (BuildConfig.PLAY_STORE_RELEASE)
return false;

@ -637,8 +637,20 @@ public class EmailService implements AutoCloseable {
// throw new MailConnectException(
// new SocketConnectException("Debug", new IOException("Test"), host, port, 0));
main = DnsHelper.getByName(context, host, dnssec);
EntityLog.log(context, EntityLog.Type.Network, "Main address=" + main);
String key = "dns." + host;
try {
main = DnsHelper.getByName(context, host, dnssec);
EntityLog.log(context, EntityLog.Type.Network, "Main address=" + main);
prefs.edit().putString(key, main.getHostAddress()).apply();
} catch (UnknownHostException ex) {
String last = prefs.getString(key, null);
if (TextUtils.isEmpty(last))
throw ex;
else {
EntityLog.log(context, EntityLog.Type.Network, "Using " + key + "=" + last);
main = DnsHelper.getByName(context, last, dnssec);
}
}
boolean prefer_ip4 = prefs.getBoolean("prefer_ip4", true);
if (prefer_ip4 && main instanceof Inet6Address) {

@ -99,6 +99,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
private SwitchCompat swDnsCustom;
private TextView tvDnsExtra;
private EditText etDnsExtra;
private SwitchCompat swDnsClear;
private SwitchCompat swTcpKeepAlive;
private SwitchCompat swSslUpdate;
private SwitchCompat swSslHarden;
@ -133,7 +134,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
"download_headers", "download_eml", "download_plain",
"require_validated", "require_validated_captive", "vpn_only",
"timeout", "prefer_ip4", "bind_socket", "standalone_vpn",
"dns_extra", "dns_custom",
"dns_extra", "dns_custom", "dns_clear",
"tcp_keep_alive",
"ssl_update", "ssl_harden", "ssl_harden_strict", "cert_strict", "cert_transparency", "check_names",
"open_safe", "http_redirect",
@ -169,6 +170,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
swDnsCustom = view.findViewById(R.id.swDnsCustom);
tvDnsExtra = view.findViewById(R.id.tvDnsExtra);
etDnsExtra = view.findViewById(R.id.etDnsExtra);
swDnsClear = view.findViewById(R.id.swDnsClear);
swTcpKeepAlive = view.findViewById(R.id.swTcpKeepAlive);
swSslUpdate = view.findViewById(R.id.swSslUpdate);
swSslHarden = view.findViewById(R.id.swSslHarden);
@ -352,6 +354,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
swDnsCustom.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
DnsHelper.clear(buttonView.getContext());
prefs.edit().putBoolean("dns_custom", checked).apply();
tvDnsExtra.setEnabled(checked || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q);
etDnsExtra.setEnabled(checked || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q);
@ -375,6 +378,14 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
}
});
swDnsClear.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
DnsHelper.clear(buttonView.getContext());
prefs.edit().putBoolean("dns_clear", checked).apply();
}
});
swTcpKeepAlive.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@ -764,6 +775,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
etDnsExtra.setText(prefs.getString("dns_extra", null));
tvDnsExtra.setEnabled(swDnsCustom.isChecked() || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q);
etDnsExtra.setEnabled(swDnsCustom.isChecked() || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q);
swDnsClear.setChecked(prefs.getBoolean("dns_clear", false));
swTcpKeepAlive.setChecked(prefs.getBoolean("tcp_keep_alive", false));
swSslUpdate.setChecked(prefs.getBoolean("ssl_update", true));
swSslHarden.setChecked(prefs.getBoolean("ssl_harden", false));

@ -3092,6 +3092,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (ConnectionHelper.isConnected(ServiceSynchronize.this, active)) {
lastActive = active;
lastAcquired = new Date().getTime();
DnsHelper.clear(ServiceSynchronize.this);
EntityLog.log(ServiceSynchronize.this, EntityLog.Type.Network,
reason + ": new active network=" + active + "/" + lastActive);
}

@ -475,6 +475,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDnsExtra" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swDnsClear"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_dns_clear"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etDnsExtra"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swTcpKeepAlive"
android:layout_width="0dp"
@ -484,7 +495,7 @@
android:text="@string/title_advanced_tcp_keep_alive"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etDnsExtra"
app:layout_constraintTop_toBottomOf="@id/swDnsClear"
app:switchPadding="12dp" />
<TextView

@ -996,9 +996,12 @@
<string name="title_primary_identity">Основна (по подразбиране идентичност)</string>
<string name="title_self_identity">Премахване на имейл адреса при отговор</string>
<string name="title_leave_on_server">Оставяне съобщения на сървъра</string>
<string name="title_leave_on_server_hint" comment="title_leave_on_server_hint&#10;Remark text for the POP3 option &quot;Leave messages on the server&quot;">Изтегляйки съобщения от сървъра, съобщенията остават на сървъра</string>
<string name="title_client_delete">Дейно изтриване на съобщенията след изтегляне</string>
<string name="title_leave_deleted">Оставяне на изтритите съобщения на сървъра</string>
<string name="title_leave_deleted_hint" comment="title_leave_deleted_hint&#10;Remark text for the POP3 option &quot;Leave deleted messages on the server&quot;">След изтриването на съобщенията от устройството, съобщенията ще останат на сървъра</string>
<string name="title_leave_on_device">Запази съобщенията на устройството</string>
<string name="title_leave_on_device_hint" comment="title_leave_on_device_hint&#10;Remark text for the POP3 option &quot;Leave messages on the device&quot;">Когато съобщенията са изтрити от сървъра, съобщенията ще останат на устройството</string>
<string name="title_max_messages">Максимален брой съобщения за изтегляне (празно за всички)</string>
<string name="title_max_messages_keep">Това е най-големият възможен брой съобщения, които ще се съхраняват в устройството</string>
<string name="title_max_messages_remark"> Въведете положително число за изтегляне на съобщенията в края (най-често)

@ -200,7 +200,7 @@
<string name="title_setup_gmail_password">Ich möchte ein Gmail-Konto mit einem eigenen App-Passwort anstatt über das geräteinterne Google-Konto autorisieren</string>
<string name="title_setup_office_auth">Der Fehler »AUTHENTICATE failed« kann dadurch verursacht werden, dass IMAP/SMTP vom Systemverwalter deaktiviert wurde</string>
<string name="title_setup_office_auth_5_7_3">Bitte probieren Sie den Assistenten »Anderer Anbieter« für die Schnelleinrichtung.</string>
<string name="title_setup_office_auth_5_7_139">Please try the \'Outlook/Hotmail/Live\' quick setup wizard.</string>
<string name="title_setup_office_auth_5_7_139">Bitte probieren Sie den Assistenten »Outlook/Hotmail/Live« für die Schnelleinrichtung.</string>
<string name="title_setup_oauth_rationale">Zugriff auf Ihr %1$s -Konto autorisieren</string>
<string name="title_setup_oauth_update">Ein bestehendes Konto erneut autorisieren (oder ein neues Konto erstellen)</string>
<string name="title_setup_oauth_updated">Kontoautorisierung wurde aktualisiert</string>

@ -1025,9 +1025,12 @@
<string name="title_primary_identity">עיקרי (זהות בררת המחדל)</string>
<string name="title_self_identity">הסרת כתובת הדוא״ל בעת מענה</string>
<string name="title_leave_on_server">להשאיר הודעות על השרת</string>
<string name="title_leave_on_server_hint" comment="title_leave_on_server_hint&#10;Remark text for the POP3 option &quot;Leave messages on the server&quot;">לאחר הורדת הודעות מהשרת, ההודעות נשארות בשרת</string>
<string name="title_client_delete">למחוק הודעות באופן פעיל לאחר ההורדה</string>
<string name="title_leave_deleted">להשאיר הודעות שנמחקו על השרת</string>
<string name="title_leave_deleted_hint" comment="title_leave_deleted_hint&#10;Remark text for the POP3 option &quot;Leave deleted messages on the server&quot;">לאחר מחיקת הודעות מהמכשיר, ההודעות תישארנה בשרת</string>
<string name="title_leave_on_device">להשאיר הודעות במכשיר</string>
<string name="title_leave_on_device_hint" comment="title_leave_on_device_hint&#10;Remark text for the POP3 option &quot;Leave messages on the device&quot;">כשהודעות נמחקות מהשרת, ההודעות תישארנה במכשיר</string>
<string name="title_max_messages">מספר ההודעות המרבי להורדה (ריק בשביל כולן)</string>
<string name="title_max_messages_keep">זה מספר ההודעות המרבי שיישמר במכשיר</string>
<string name="title_max_messages_remark"> נא למלא מספר חיובי כדי להוריד את ההודעות בסוף (יותר נפוץ)

@ -541,6 +541,7 @@
<string name="title_advanced_standalone_vpn" translatable="false">Standalone VPN</string>
<string name="title_advanced_dns">Preferred DNS server addresses (comma separated)</string>
<string name="title_advanced_dns_custom">Use custom DNS resolver</string>
<string name="title_advanced_dns_clear">Clear DNS cache on connectivity changes</string>
<string name="title_advanced_tcp_keep_alive" translatable="false">TCP keep alive</string>
<string name="title_advanced_ssl_update">Use updated SSL provider</string>
<string name="title_advanced_ssl_harden">Harden SSL connections</string>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save