From: hhelibebcnofnenamg@gmail•com
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50060] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
Date: Wed, 29 Mar 2017 14:44:23 +0000 [thread overview]
Message-ID: <redmine.journal-63984.20170329144423.4e6f077f3470ea97@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-13382.20170329083629@ruby-lang.org
Issue #13382 has been updated by osa (Shunsuke OSA).
> The default mode of Net::FTP is now passive, but do you really need the active mode?
In the real world, sometimes we have to connect FTP servers without passive mode support. But modern server environment such as clouds like AWS EC2, inbound port is strictly restricted. To connect to the server from such environment with active mode, we need a support of explicit incoming data port.
> Do you know any FTP client implementation which provides similar options?
Net::FTP of Perl has `port` method. (And it resembles to FTP PORT command)
http://perldoc.perl.org/Net/FTP.html#port-(-[-PORT-]-)
I've considered an interface like `port(host, port)` but I think passing host to `port` method will confuse and `port` method is looks like getter method.
> Your patch doesn't seem to change Net::FTP#makeport. Does it work?
I'm sorry. It is a bug. I'll fix and test it.
----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-63984
* Author: osa (Shunsuke OSA)
* Status: Open
* Priority: Normal
* Assignee: shugo (Shugo Maeda)
* Target version:
----------------------------------------
# Abstract
Add options to Net::FTP to set data listening host and port.
# Background
Net::FTP sends local address and default port to remote FTP server.
In FTP active mode, remote server will connect to client to establish data connection, but it will fail if there is NAT in network.
(NAT doesn't rewrite address and port in PORT command because they are not in packet header but payload)
So, it's necessary to set host and port for FTP PORT command explicitly.
# Real use cases
Active FTP is not working in AWS EC2.
- https://forums.aws.amazon.com/thread.jspa?messageID=75667 (Login required)
- http://osa.hatenablog.com/entry/2015/02/24/134826 (Japanese)
# Pull request
- https://github.com/ruby/ruby/pull/1561
--
https://bugs.ruby-lang.org/
next prev parent reply other threads:[~2017-03-29 14:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
2017-03-29 8:36 ` [ruby-dev:50057] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command hhelibebcnofnenamg
2017-03-29 9:24 ` [ruby-dev:50058] " shugo
2017-03-29 14:44 ` hhelibebcnofnenamg [this message]
2017-03-30 4:47 ` [ruby-dev:50061] " shugo
2017-03-30 5:10 ` [ruby-dev:50062] " shugo
2017-04-15 7:21 ` [ruby-dev:50079] " hhelibebcnofnenamg
2017-04-17 5:09 ` [ruby-dev:50083] " shugo
2017-04-18 8:58 ` [ruby-dev:50086] " hhelibebcnofnenamg
2017-12-04 6:40 ` [ruby-dev:50334] " hhelibebcnofnenamg
2017-12-04 8:15 ` [ruby-dev:50335] [Ruby trunk Feature#13382][Rejected] " shugo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-63984.20170329144423.4e6f077f3470ea97@ruby-lang.org \
--to=ruby-dev@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).