Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] - Implement EPSV (Extended Passive Mode) #28

Closed
Brueggus opened this issue Feb 1, 2023 · 4 comments · Fixed by #29
Closed

[Feature Request] - Implement EPSV (Extended Passive Mode) #28

Brueggus opened this issue Feb 1, 2023 · 4 comments · Fixed by #29
Assignees
Labels
new feature A new feature request

Comments

@Brueggus
Copy link

Brueggus commented Feb 1, 2023

Description

I'm trying to upload a file to an FTP server over a TLS-encrypted IPv6 connection. The upload fails with the following error message:

Error: Invalid response: [425] 425 You cannot use PASV on IPv6 connections. Use EPSV instead.

The server is powered by Pure-FTPd.

PASV works for IPv4 only, therefore it's not possible to use passive mode over IPv6 at the moment.

More info: https://www.jscape.com/blog/what-is-the-ftp/s-epsv-command-and-when-do-you-use-it

Changes

Suppaftp should use EPSV instead of PASV if required or requested by the server.

Implementation

EPSV is defined in RFC2428: https://www.rfc-editor.org/rfc/rfc2428#section-3

@Brueggus Brueggus added the new feature A new feature request label Feb 1, 2023
@veeso
Copy link
Owner

veeso commented Feb 1, 2023

That's definitely something that should be implemented. I'm in, but it will take some time 😅

@veeso veeso linked a pull request Feb 1, 2023 that will close this issue
20 tasks
@veeso
Copy link
Owner

veeso commented Feb 1, 2023

Hi @Brueggus,
Have you the possibility to test the feature importing suppaftp as a commit from this PR #29?

It should be enough to configure the client with

client.set_mode(Mode::ExtendedPassive);

@Brueggus
Copy link
Author

Brueggus commented Feb 1, 2023

Hey,
didn't you say it would take some time? ;)

I just tested your changes and the upload works fine now when Mode::ExtendedPassive is set.

Thanks a bunch! :)

@veeso
Copy link
Owner

veeso commented Feb 1, 2023

Hahaha, I thought it would have been harder.

Before release though, I'm going to implement the entire RFC 2428 first

@veeso veeso closed this as completed in #29 Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants