veeso / suppaftp

a super FTP/FTPS client library for Rust with support for both passive and active mode
Apache License 2.0
112 stars 28 forks source link

[QUESTION] - Can't connect, no TLS #80

Closed sergeda closed 6 months ago

sergeda commented 6 months ago

I can't make connection. I use FTP server in Docker. Here is the code:

        let host_addr = SocketAddr::V4(SocketAddrV4::new(host, port));
        println!("host_addr: {}", host_addr);
        TcpStream::connect(host_addr).unwrap();
        println!("Tcp stream connected");
        let mut ftp_stream = AsyncFtpStream::connect_timeout(host_addr, Duration::from_secs(5)).await.unwrap();

This produces something like:

host_addr: 127.0.0.1:32793 Tcp stream connected thread 'test_upload' panicked: called Result::unwrap() on an Err value: BadResponse

I tried to connect to the server using desktop client - worked without issue. What can I do to debug the issue and fix it?