Proper way to connect to FileZilla Server with Kodi

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
Twister
504 Command not implemented
Posts: 9
Joined: 2022-05-04 18:48

Proper way to connect to FileZilla Server with Kodi

#1 Post by Twister » 2023-10-25 18:43

I am trying to connect to my FileZilla Server with Kodi (installed on a Fire TV). So far I only got it to work with plain FTP, which is so-so at best.
To get an explicit FTP over TLS connection, the Kodi forum suggests to connect like this:

ftp://user:pass@ftp.example.com:21/|auth=TLS&verifypeer=false

When I try to connect with my user it sure does establish the connection but instantly disconnects.
Am I doing something wrong here? I know, the verifypeer=false doesn't help security much.

Thank you for any thoughts.
Attachments
Capture.JPG
Capture.JPG (33.66 KiB) Viewed 4773 times

User avatar
boco
Contributor
Posts: 26940
Joined: 2006-05-01 03:28
Location: Germany

Re: Proper way to connect to FileZilla Server with Kodi

#2 Post by boco » 2023-10-26 00:42

Code: Select all

ftp://user:pass@ftp.example.com:21/
That syntax is, so far, valid. The rest of the URL you posted (|auth=TLS&verifypeer=false) is not understood by FTP servers, I guess that is part of the instructions, not part of the actual URL.

Also, does your Kodi FTP client understand the modern algorithms, cipher suites and key exchanges? Does it support at least TLS 1.2, does it support session resuming? All things the FileZilla FTP Server requires.
In the server settings, under Logging, set the verbosity to 5-Debug and check again. It should now show if there's an error during handshake. Don't forget to set the logging back to 1 after you're done.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

Twister
504 Command not implemented
Posts: 9
Joined: 2022-05-04 18:48

Re: Proper way to connect to FileZilla Server with Kodi

#3 Post by Twister » 2023-10-26 18:30

Are you sure, the rest is not needed? I got the URL from here (https://forum.kodi.tv/showthread.php?ti ... pid3121387) and played around with it a little. I set the log level to "Debug" and checked the connection again.

This is what the it looks like, when the listener is set to "Require explicit FTP ..."

Connecting with ftp://user:pass@ftp.example.com:21/ obviously doesn't work here.

Capture1.JPG
Capture1.JPG (45.17 KiB) Viewed 4711 times

However, connecting with ftp://user:pass@ftp.example.com:21/|aut ... peer=false, produces the following entries in the log.

Capture2.JPG
Capture2.JPG (183.53 KiB) Viewed 4711 times

Once I set the listener to "... insecure plain FTP" and connect with ftp://user:pass@ftp.example.com:21/, everything works just as expected.

Capture3.JPG
Capture3.JPG (156.8 KiB) Viewed 4711 times

So I can connect successfully, only when using plain FTP, which I would like to avoid. Also, I switched to FTP for streaming UHD-files to my Fire TV, because it works way better than SMB.

Thank you for looking into this.

User avatar
boco
Contributor
Posts: 26940
Joined: 2006-05-01 03:28
Location: Germany

Re: Proper way to connect to FileZilla Server with Kodi

#4 Post by boco » 2023-10-26 19:28

I see. Kodi uses the URL to internally adjust itself to use FTP over TLS, and removes the last part before sending it. That makes sense, as FileZilla does not understand the Kodi syntax at all.

As for FTP over TLS, Kodi negotiates FTP over TLS v1.3 to be used. Does Kodi even support FTP over TLS 1.3?
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

Twister
504 Command not implemented
Posts: 9
Joined: 2022-05-04 18:48

Re: Proper way to connect to FileZilla Server with Kodi

#5 Post by Twister » 2023-10-26 20:28

Ok, now that explains why the TLS option sort of works.

I honestly don't know, which TLS version is supported in Kodi. I could ask in the their forum to shed some more light on this.

So what exactly does the "Sesssion ended gracefully" entry in my second screenshot mean? I made the connection using FTP over TLS but do not see any folders in Kodi's FTP client.


I found this (https://discourse.coreelec.org/t/coreel ... -tls/19491). He was struggling with the same problem and seemed to have solved it with creating a new certificate. Don't know ...

User avatar
boco
Contributor
Posts: 26940
Joined: 2006-05-01 03:28
Location: Germany

Re: Proper way to connect to FileZilla Server with Kodi

#6 Post by boco » 2023-10-26 22:09

So what exactly does the "Sesssion ended gracefully" entry in my second screenshot mean?
Connection closed orderly. Non-graceful closure would be an outright crash.
I made the connection using FTP over TLS but do not see any folders in Kodi's FTP client.
Because the connection was closed before any data could even be send. My suspicion is that Kodi simply doesn't understand TLS 1.3 and closes the connection.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

Twister
504 Command not implemented
Posts: 9
Joined: 2022-05-04 18:48

Re: Proper way to connect to FileZilla Server with Kodi

#7 Post by Twister » 2023-10-28 17:48

I think I found the problem. The Kodi logs indicated, it wasn't too happy with the SSL peer certificate. Another forum mentioned something about the CN in the certificate and the URL you are connecting to, having to match.
So I did just that. I replaced the CN in my certificate with the local IP I use, when making the connection, and that did the trick.
Not sure if this is by design or if libCurl/CCurl is doing something strange here. The certificate was never a problem with any other client connecting.

Post Reply