[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-user
Subject: [net] FTPClient should connect with hostname instead of IP
From: "Holthof, Lukas" <lukas.holthof () sap ! com>
Date: 2020-03-23 22:23:50
Message-ID: AM0PR02MB4370B780AE763F3787EC83F3E7F00 () AM0PR02MB4370 ! eurprd02 ! prod ! outlook ! com
[Download RAW message or body]
Hello,
I want to connect to a FTP/FTPS server which resides in a different network=
and it not reachable directly from my client. The FTP server's local hostn=
ame (e.g. ftp.server.corp) is not known to the client. Instead the client s=
hould use a virtual hostname which gets resolved to the actual local hostna=
me by a Reverse Invoke Proxy (e.g. ftp.virtual:ftp.server.corp).
High level scenario:
FTPClient -> SOCKS5 PROXY -> REVERSE INVOKE PROXY -> FTP SERVER
The SocketClient always tries to determine the IP address of the hostname p=
rovided: e.g. InetAddress.getByName(hostname)<https://github.com/apache/com=
mons-net/blob/master/src/main/java/org/apache/commons/net/SocketClient.java=
#L243>.
I would like to prevent this and use instead: _socket_.connect(InetSocketAd=
dress.createUnresolved(host, port), connectTimeout);
InetAdresses are used in various places in FTPClient, so similar changes ar=
e required a couple of times.
Is there a better way preventing the IP resolution on client side? In case =
not, would this be something which could become a switchable feature in Apa=
che Commons Net FTPClient/SocketClient?
Regards,
Lukas
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic