ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:50057] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
@ 2017-03-29  8:36 ` hhelibebcnofnenamg
  2017-03-29  9:24 ` [ruby-dev:50058] " shugo
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: hhelibebcnofnenamg @ 2017-03-29  8:36 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been reported by osa (Shunsuke OSA).

----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382

* Author: osa (Shunsuke OSA)
* Status: Open
* Priority: Normal
* Assignee: 
* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50058] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [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 ` shugo
  2017-03-29 14:44 ` [ruby-dev:50060] " hhelibebcnofnenamg
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: shugo @ 2017-03-29  9:24 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been updated by shugo (Shugo Maeda).

Assignee set to shugo (Shugo Maeda)

osa (Shunsuke OSA) wrote:
> # 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)

The default mode of Net::FTP is now passive, but do you really need the active mode?

Do you know any FTP client implementation which provides similar options?
Python's ftplib doesn't seem to have such options.

> # Pull request
> 
> - https://github.com/ruby/ruby/pull/1561

Your patch doesn't seem to change Net::FTP#makeport.  Does it work?


----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-63959

* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50060] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [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
  2017-03-30  4:47 ` [ruby-dev:50061] " shugo
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: hhelibebcnofnenamg @ 2017-03-29 14:44 UTC (permalink / raw)
  To: ruby-dev

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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50061] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2017-03-29 14:44 ` [ruby-dev:50060] " hhelibebcnofnenamg
@ 2017-03-30  4:47 ` shugo
  2017-03-30  5:10 ` [ruby-dev:50062] " shugo
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: shugo @ 2017-03-30  4:47 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been updated by shugo (Shugo Maeda).


osa (Shunsuke OSA) wrote:
> > 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.

Understood.

> > 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.

FTPClient of Apache Commons seems to have setActivePortRange() and setActiveExternalIPAddress().

https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html#setActiveExternalIPAddress(java.lang.String)

However, setActiveExternalIPAddress() seems to be for specifying the address to bind.


----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-63999

* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50062] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2017-03-30  4:47 ` [ruby-dev:50061] " shugo
@ 2017-03-30  5:10 ` shugo
  2017-04-15  7:21 ` [ruby-dev:50079] " hhelibebcnofnenamg
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: shugo @ 2017-03-30  5:10 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been updated by shugo (Shugo Maeda).


shugo (Shugo Maeda) wrote:
> FTPClient of Apache Commons seems to have setActivePortRange() and setActiveExternalIPAddress().
> 
> https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html#setActiveExternalIPAddress(java.lang.String)
> 
> However, setActiveExternalIPAddress() seems to be for specifying the address to bind.

I found setReportActiveExternalIPAddress().

https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html#setReportActiveExternalIPAddress(java.lang.String)


----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-64000

* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50079] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2017-03-30  5:10 ` [ruby-dev:50062] " shugo
@ 2017-04-15  7:21 ` hhelibebcnofnenamg
  2017-04-17  5:09 ` [ruby-dev:50083] " shugo
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: hhelibebcnofnenamg @ 2017-04-15  7:21 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been updated by osa (Shunsuke OSA).


Thank you so much for your survey.

If we translate java's `setReportActiveExternalIPAddress()` into Ruby method literally,  it seems to be `report_active_external_ip_address=`.
But this name is difficult to understand for me.
("report" looks like verb and "active external IP address" doesn't mean "external IP address for active *mode*".)

So, how about `data_listening_address=` and `data_listening_port=`.

These names involve below.

- Address (or port) for data connection
- Address (or port) for active mode 
  - Only active mode listens data connection.

I don't cling to my suggestion.
Other expressive names are very welcome.

----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-64238

* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50083] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2017-04-15  7:21 ` [ruby-dev:50079] " hhelibebcnofnenamg
@ 2017-04-17  5:09 ` shugo
  2017-04-18  8:58 ` [ruby-dev:50086] " hhelibebcnofnenamg
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: shugo @ 2017-04-17  5:09 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been updated by shugo (Shugo Maeda).


osa (Shunsuke OSA) wrote:
> Thank you so much for your survey.
> 
> If we translate java's `setReportActiveExternalIPAddress()` into Ruby method literally,  it seems to be `report_active_external_ip_address=`.
> But this name is difficult to understand for me.
> ("report" looks like verb and "active external IP address" doesn't mean "external IP address for active *mode*".)
> 
> So, how about `data_listening_address=` and `data_listening_port=`.
> 
> These names involve below.
> 
> - Address (or port) for data connection
> - Address (or port) for active mode 
>   - Only active mode listens data connection.
> 
> I don't cling to my suggestion.
> Other expressive names are very welcome.

The name data_listening_address= seems misleading because it doesn't
change the address to be bound.
And data_listening_port= is less flexible than setActivePortRange()
because it doesn't allow multiple port numbers.

So I prefer the following APIs:

* data_port_address = addr
* data_port_range = min .. max


----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-64257

* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50086] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2017-04-17  5:09 ` [ruby-dev:50083] " shugo
@ 2017-04-18  8:58 ` hhelibebcnofnenamg
  2017-12-04  6:40 ` [ruby-dev:50334] " hhelibebcnofnenamg
  2017-12-04  8:15 ` [ruby-dev:50335] [Ruby trunk Feature#13382][Rejected] " shugo
  9 siblings, 0 replies; 10+ messages in thread
From: hhelibebcnofnenamg @ 2017-04-18  8:58 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been updated by osa (Shunsuke OSA).


shugo (Shugo Maeda) wrote:
> The name data_listening_address= seems misleading because it doesn't
> change the address to be bound.

I see. It is reasonable.

> And data_listening_port= is less flexible than setActivePortRange()
> because it doesn't allow multiple port numbers.

This is reasonable too.
But as you know, PORT command can send only one port number.
I will implement that Net::FTP choose one of the port number in the range randomly.
(FTPClient of Apache Commons does so)


----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-64349

* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50334] [Ruby trunk Feature#13382] [PATCH] Options for FTP PORT command
       [not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2017-04-18  8:58 ` [ruby-dev:50086] " hhelibebcnofnenamg
@ 2017-12-04  6:40 ` hhelibebcnofnenamg
  2017-12-04  8:15 ` [ruby-dev:50335] [Ruby trunk Feature#13382][Rejected] " shugo
  9 siblings, 0 replies; 10+ messages in thread
From: hhelibebcnofnenamg @ 2017-12-04  6:40 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been updated by osa (Shunsuke OSA).


I used to use FTP and need this feature.
But now, I don't use it and lose motivation to implement this feature.
I'm so sorry.

Please close this issue.
(I guess I can't close this issue.)

----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-68165

* Author: osa (Shunsuke OSA)
* Status: Assigned
* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50335] [Ruby trunk Feature#13382][Rejected] [PATCH] Options for FTP PORT command
       [not found] <redmine.issue-13382.20170329083629@ruby-lang.org>
                   ` (8 preceding siblings ...)
  2017-12-04  6:40 ` [ruby-dev:50334] " hhelibebcnofnenamg
@ 2017-12-04  8:15 ` shugo
  9 siblings, 0 replies; 10+ messages in thread
From: shugo @ 2017-12-04  8:15 UTC (permalink / raw)
  To: ruby-dev

Issue #13382 has been updated by shugo (Shugo Maeda).

Status changed from Assigned to Rejected

osa (Shunsuke OSA) wrote:
> I used to use FTP and need this feature.
> But now, I don't use it and lose motivation to implement this feature.
> I'm so sorry.
> 
> Please close this issue.
> (I guess I can't close this issue.)

I don't have any use case of this feature either, so I close this issue.


----------------------------------------
Feature #13382: [PATCH] Options for FTP PORT command
https://bugs.ruby-lang.org/issues/13382#change-68171

* Author: osa (Shunsuke OSA)
* Status: Rejected
* 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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-12-04  8:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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 ` [ruby-dev:50060] " hhelibebcnofnenamg
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

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).