this is an experiment to use GnuTlsStream (the ftpcredentials.xml have some hardcoded credentials for a public FTP server for testing). Unfortunately, the app restarts when loading the native libraries for GnuTLS.
This commit is contained in:
@@ -8,6 +8,7 @@ using Android.Content;
|
|||||||
using Android.OS;
|
using Android.OS;
|
||||||
using FluentFTP;
|
using FluentFTP;
|
||||||
using FluentFTP.Exceptions;
|
using FluentFTP.Exceptions;
|
||||||
|
using FluentFTP.GnuTLS;
|
||||||
using KeePassLib;
|
using KeePassLib;
|
||||||
using KeePassLib.Serialization;
|
using KeePassLib.Serialization;
|
||||||
using KeePassLib.Utility;
|
using KeePassLib.Utility;
|
||||||
@@ -139,6 +140,7 @@ namespace keepass2android.Io
|
|||||||
var settings = ConnectionSettings.FromIoc(ioc);
|
var settings = ConnectionSettings.FromIoc(ioc);
|
||||||
|
|
||||||
FtpClient client = new FtpClient();
|
FtpClient client = new FtpClient();
|
||||||
|
client.Config.CustomStream = typeof(GnuTlsStream);
|
||||||
client.Config.RetryAttempts = 3;
|
client.Config.RetryAttempts = 3;
|
||||||
if ((settings.Username.Length > 0) || (settings.Password.Length > 0))
|
if ((settings.Username.Length > 0) || (settings.Password.Length > 0))
|
||||||
client.Credentials = new NetworkCredential(settings.Username, settings.Password);
|
client.Credentials = new NetworkCredential(settings.Username, settings.Password);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FluentFTP" Version="51.1.0" />
|
<PackageReference Include="FluentFTP" Version="51.1.0" />
|
||||||
|
<PackageReference Include="FluentFTP.GnuTLS" Version="1.0.37" />
|
||||||
<PackageReference Include="MegaApiClient" Version="1.10.4" />
|
<PackageReference Include="MegaApiClient" Version="1.10.4" />
|
||||||
<PackageReference Include="Microsoft.Graph" Version="5.68.0" />
|
<PackageReference Include="Microsoft.Graph" Version="5.68.0" />
|
||||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.67.1" />
|
<PackageReference Include="Microsoft.Identity.Client" Version="4.67.1" />
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text=""
|
android:text="ftp.dlptest.com"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:inputType="textWebEmailAddress"
|
android:inputType="textWebEmailAddress"
|
||||||
android:hint="@string/hint_sftp_host" />
|
android:hint="@string/hint_sftp_host" />
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:inputType="textWebEmailAddress"
|
android:inputType="textWebEmailAddress"
|
||||||
android:text=""
|
android:text="dlpuser"
|
||||||
android:hint="@string/hint_username" />
|
android:hint="@string/hint_username" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:text=""
|
android:text="rNrKYTX9g7z3RgJRmxWuGHbeu"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:hint="@string/hint_pass"
|
android:hint="@string/hint_pass"
|
||||||
android:importantForAccessibility="no"/>
|
android:importantForAccessibility="no"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user