1
votes

I am currently trying to set up a vfs proxy which works fine on a local ftp server. The problem is that our company internet access is blocked by a proxy so I am searching for how to specify this proxy information. As far as I know JSCH is used underneath but I haven't found a way to pass the proxy parameter.

Here is my current proxy xml:

<proxy xmlns="http://ws.apache.org/ns/synapse"
name="ftpCollection" statistics="disable" trace="disable" transports="vfs">
<target>
    <inSequence>
        <clone>
            <target sequence="processSeq"/>
        </clone>
    </inSequence>
    <outSequence/>
    <faultSequence/>
</target>
<parameter name="transport.vfs.ReplyFileURI">vfs:sftp://user:[email protected]:22/reply</parameter>
<parameter name="transport.PollInterval">15</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.FileProcessInterval">100</parameter>
<parameter name="transport.vfs.FileURI">vfs:sftp://user:[email protected]:22/process/</parameter>
<parameter name="transport.vfs.MoveAfterProcess">vfs:sftp://user:[email protected]:22/success/</parameter>
<parameter name="transport.vfs.MoveAfterFailure">vfs:sftp://user:[email protected]:22/failure/</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.xml</parameter>
<parameter name="transport.vfs.Locking">disable</parameter>
<parameter name="transport.vfs.ContentType">application/xml</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.MoveTimestampFormat">yyyy-MM-dd'T'HH:mm:ss.SSS</parameter>
</proxy>

Thanks

1

1 Answers

0
votes

SFTP (SSH) through a proxy does work over a HTTP tunnel. You can do that with JSch described on this page.

Now already the VFS transport in WSO2 (which finally uses JSch) does not have an implementation of the HTTP tunneling. So you cannot use a simple VFS WSO2 ProxyService to do that.

You can solve it by implementing your own wso2esb transport listener. Have a look at the code of VFSTransportListener.java (or just copy/paste) and code the JSch access over http yourself. You can then add the transport in the axis2.xml configuration of your wso2esb.