[
https://issues.apache.org/jira/browse/VFS-167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13987126#comment-13987126
]
Bernd Eckenfels edited comment on VFS-167 at 5/1/14 11:05 PM:
--------------------------------------------------------------
Just for the redords, the following test code worked (but failed silently with
active mode?):
{code}
FileSystemManager manager = VFS.getManager();
FileSystemOptions opts = new FileSystemOptions();
FtpFileSystemConfigBuilder config = FtpFileSystemConfigBuilder.getInstance();
Proxy proxy = new Proxy(Type.SOCKS, new InetSocketAddress("127.0.0.1", 1078));
config.setProxy(opts, proxy);
config.setPassiveMode(opts, true);
FileObject fo = manager.resolveFile("ftp://ftp:[email protected]/", opts);
System.out.println("fo=" + fo + " " + fo.getType());
for(FileObject o : fo.getChildren())
{
System.out.println(" " + o);
}
{code}
I am a bit unsure about the Proxy type, as it does not fit very well with
string-based properties. Having a setProxyHost,setProxyPort,setProxyType (like
[VFS.SFTP] would be an alternative solution?)
was (Author: b.eckenfels):
Just for the redords, the following test code worked (but failed silently with
active mode?):
{code}
FileSystemManager manager = VFS.getManager();
FileSystemOptions opts = new FileSystemOptions();
FtpFileSystemConfigBuilder config = FtpFileSystemConfigBuilder.getInstance();
Proxy proxy = new Proxy(Type.SOCKS, new InetSocketAddress("127.0.0.1", 1078));
config.setProxy(opts, proxy);
config.setPassiveMode(opts, true);
FileObject fo = manager.resolveFile("ftp://ftp:[email protected]/", opts);
System.out.println("fo=" + fo + " " + fo.getType());
for(FileObject o : fo.getChildren())
{
System.out.println(" " + o);
}
{code}
> [FTP] Proxy Support (similiar to VFS-84 for SFTP)
> -------------------------------------------------
>
> Key: VFS-167
> URL: https://issues.apache.org/jira/browse/VFS-167
> Project: Commons VFS
> Issue Type: Improvement
> Affects Versions: Nightly Builds
> Environment: Window 2000 and java
> Reporter: vikas
> Assignee: Bernd Eckenfels
> Priority: Minor
> Fix For: 2.1
>
>
> I am given proxy support for SFTP by using bug 84 code.
> What is the way to give proxy support in FTP?
> Please help asap
> if possible then we me the way?
--
This message was sent by Atlassian JIRA
(v6.2#6252)