integrate ftp over SSL in XBMC as source
#1
Hi,

I have a problem with my ftp server.
I get this error for my ftp server if I try it to integrate it in XBMC:

13:08:32 T:5200 ERROR: XFILE::CDirectory::GetDirectory - Error getting ftp://test:test%24@ip:10815/?auth=ssl/
13:08:32 T:5200 ERROR: CGUIMediaWindow::GetDirectory(ftp://test:test%24@ip:10815/?auth=ssl/) failed

config:
<music>
<default>Main Music Collection</default>
<source>
<name>Main Music Collection</name>
<path>ftp://test:test$@ip:10815?auth=ssl/</path>
</source>
</music>

Over flashfxp and all other programm the ftp server the connection works fine. Do I need an extra addon for ftp over ssl? Or can XBMC not handle secure ftp connections?

Please help me Smile

Thanks
Reply
#2
afaik this is not supported (and imo uncommon too). Most people use ssh for secure file sources...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
Can you not use https?
http(s)://username:[email protected]:443//folder/subfolder/file.mp4

Or maybe make it a webdav network drive?
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#4
Its a drftpd servercluster. Files reside on many servers.
Reply
#5
It seems like there has been some progress.
I can successfully connect to my home-ftp running Gene6 FTP Server - even when I restrict it to "secure connection only" by using "?auth=tls" as remote path.
But it still doesn't work for drftpd.

Code:
14:42:14 T:140365162170432   DEBUG: Keyboard: scancode: 0x24, sym: 0x000d, unicode: 0x000d, modifier: 0x0
14:42:14 T:140365162170432   DEBUG: OnKey: return (0xf00d) pressed, action is Select
14:42:14 T:140364266374912 WARNING: ParseAndCorrectUrl: ftp url option is deprecated, please switch to use protocol option (change '?' to '|'), url: [ftp://USERNAME:[email protected]:51337/?auth=tls]
14:42:14 T:140364266374912   DEBUG: CurlFile::Open(0x7fa91a3c67a0) ftp://USERNAME:[email protected]:51337/
14:42:14 T:140364266374912    INFO: easy_aquire - Created session to ftp://homeftp.it
14:42:15 T:140365162170432   DEBUG: ------ Window Init (DialogBusy.xml) ------
14:42:16 T:140365162170432   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
14:42:16 T:140365162170432   DEBUG: Keyboard: scancode: 0x16, sym: 0x0008, unicode: 0x0008, modifier: 0x0
14:42:17 T:140365162170432   DEBUG: OnKey: backspace (0xf008) pressed, action is Back

Code:
14:42:19 T:140365162170432   DEBUG: Keyboard: scancode: 0x24, sym: 0x000d, unicode: 0x000d, modifier: 0x0
14:42:19 T:140365162170432   DEBUG: OnKey: return (0xf00d) pressed, action is Select
14:42:19 T:140364266374912 WARNING: ParseAndCorrectUrl: ftp url option is deprecated, please switch to use protocol option (change '?' to '|'), url: [ftp://USERNAME:[email protected]:31313/?auth=tls]
14:42:19 T:140364266374912   DEBUG: CurlFile::Open(0x7fa91a3c67a0) ftp://USERNAME:[email protected]:31313/
14:42:19 T:140364266374912    INFO: easy_aquire - Created session to ftp://drftpd.org
14:42:19 T:140365162170432   DEBUG: ------ Window Init (DialogBusy.xml) ------
14:42:19 T:140364266374912   ERROR: CCurlFile::FillBuffer - Failed: FTP: unknown PASV reply(13)
14:42:19 T:140364266374912   ERROR: CCurlFile::Open failed with code 500 for ftp://USERNAME:[email protected]:31313/?auth=tls
14:42:19 T:140365162170432   ERROR: GetDirectory - Error getting ftp://USERNAME:[email protected]:31313/?auth=tls
14:42:19 T:140365162170432   ERROR: CGUIDialogFileBrowser::GetDirectory(ftp://USERNAME:[email protected]:31313/?auth=tls) failed
14:42:20 T:140365162170432   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
14:42:22 T:140365162170432   DEBUG: Keyboard: scancode: 0x24, sym: 0x000d, unicode: 0x000d, modifier: 0x0
14:42:22 T:140365162170432   DEBUG: OnKey: return (0xf00d) pressed, action is Select

Due tu the GetDirectory failed in the lower log, I suspect Kodi to use a listing command drftpd/these servers no longer use and accept.
They use "MLSD" or "STAT -al" and simply no longer answere on "LIST -al".

*tested with current versions: kodi 16.0 on kubuntu 14.04
*adresses have been changed

==================================================
EDIT: By taking a closer look I've also noticed "unknown PASV reply(13)"

This is a comparison of how listing log looks like in ftprush for my homeftp and the drftpd site:

Code:
(15:09:34) [_ZBOX] PWD
(15:09:34) [_ZBOX] 257 "/" is current directory.
(15:09:34) [_ZBOX] PASV
(15:09:34) [_ZBOX] 227 Entering Passive Mode (127,0,0,1,200,194)
(15:09:34) [_ZBOX] Opening data connection IP: 127.0.0.1 PORT: 51394
(15:09:34) [_ZBOX] MLSD
(15:09:34) [_ZBOX] 150 Data connection accepted from 127.0.0.1:3479; transfer starting.
(15:09:34) [_ZBOX] Encryption algorithm: TLSv1 AES256-SHA-256
(15:09:34) [_ZBOX] 226 Transfer ok.
(15:09:34) [_ZBOX] List Complete: 289 bytes in 0,02 seconds (18,06KB/s)

Code:
(15:12:23) [BT2(2)] PWD
(15:12:23) [BT2(2)] 257 "/" is current directory
(15:12:23) [BT2(2)] PRET LIST
(15:12:23) [BT2(2)] 200 OK, planning to use master for upcoming LIST transfer
(15:12:23) [BT2(2)] PASV
(15:12:23) [BT2(2)] 227- Using master for upcoming transfer
(15:12:23) [BT2(2)] 227 Entering Passive Mode (hiddenip,224,59).
(15:12:23) [BT2(2)] Opening data connection IP: hiddenip PORT: 57403
(15:12:23) [BT2(2)] MLSD
(15:12:23) [BT2(2)] 150 File status okay; about to open data connection.
(15:12:23) [BT2(2)] Encryption algorithm: TLSv1.2 ECDHE-RSA-AES256-SHA384-256
(15:12:23) [BT2(2)] 226- [Ul: 5.7TB] [Dl: 10.9TB] [Average speed: 0B]
(15:12:23) [BT2(2)] 226-      [Credits: 3.1TB] [Ratio: 1:3.0]
(15:12:23) [BT2(2)] 226 Closing data connection
(15:12:23) [BT2(2)] List Complete: 2.305 bytes in 0,02 seconds (144,06KB/s)
(15:12:23) [BT2(2)] SITE XDUPE 3
(15:12:23) [BT2(2)] 200 Activated extended dupe mode 3.

I don't know how to access the raw ftp command log from drftpd-server-side or kodi-client-side, so I cannot go further in debugging without setting up my own drftpd server cluster or starting things like wireshark.
Reply
#6
I've been asked about my progress in trying to embed a DrFtpD Site-Ring as Video-Source in Kodi via PM.

After my failed direct try to embed it in Kodi, I've tried to use CurlFtpFS on a freshly setup Kubuntu 14.04 LTS machine.

Again it worked for my G6 HomeFTP, but was much slower than the direct way in Kodi descripted above.
Also I had a timeout problem: My FTP autokicks after ~10 minutes of idle (which is hardcoded, I found out by reading through the G6 forums) and then I had to re-mount the remote-dir.
Due to most Dr-Sites strictly disallow idling, this might be a problem in general in future attempts to embed DrFtpD in Kodi.
But I really had some trouble in alloweing selfmade certificates (for ssl/tls encryption) in curlftpfs and finally needed a mate to hack a published fix for the no longer fully working "AllowInvalidCertificates" switch.

When I tried to mount a DrFtpD Site it again failed because of the listing command.
(It is some weeks ago, but I think) There was a switch to change list command, but it wasn't able to understand the answere format!

I think another problem that might occur in future attempts (after """fixing""" certificates and listing) could be the PRET command.
DrFtpD as said is usually a Site-Ring, means one master and a few slaves. You connect to the master, the files are on the slaves, the master manages the file-data-connecton between you and the slaves; usual clients that support it are FlashFXP, FTPRush and SmartFTP. They also support FXP (site to site transfer).
Reply

Logout Mark Read Team Forum Stats Members Help
integrate ftp over SSL in XBMC as source0