Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-3845

New FTP component working with PROXY

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.7.0
    • 2.8.0
    • camel-ftp
    • None
    • Patch Available

    Description

      FTP the component works well. He isn't able to go through proxy server.
      Library FTP4J is able to go through different proxy servers.
      Squid Server is used FTP over HTTP proxy.

      I have developed component FTP of the client constructed on library FTP4J.
      FTP4J Version 1.6 - 2011/01/07. http://www.sauronsoftware.it/projects/ftp4j/
      Has added storage of the last FTPReply.
      Has added transfer of parameters connectTimeout and soTimeout.
      Libraries FTP4J aren't present in central maven repository. The library no OSGi.

      In camel the component has added parameter "proxy".
      It is a line url authorizations for proxy server.
      If the scheme http is specified, we put HTTPTunnelConnector.
      If the scheme ftp is specified, we put FTPProxyConnector.
      If the scheme socks5 is specified, we put SOCKS5Connector.
      If the scheme socks or socks4 is specified, we put SOCKS4Connector.

      If the parameter "proxy" isn't specified, there is a direct connection to FTP server.

      Route example

      <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
      xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      default-activation="lazy">

      <cm:property-placeholder persistent-id="com.mycompany.route.bundle">
      <cm:default-properties>
      <cm:property name="ftp.url" value="ftp4j://ftp.mycompany.com/"/>
      <cm:property name="ftp.delay" value="100000"/>
      <cm:property name="ftp.proxy" value="&proxy=http://user:pwd@cache.mycompany.lan:3128/"/>
      </cm:default-properties>
      </cm:property-placeholder>

      <camelContext xmlns="http://camel.apache.org/schema/blueprint">
      <route>
      <from uri="ftp.url?delay=ftp.delay&noop=true&binary=true{{ftp.proxy}}"/>
      <to uri="file://data/dict/inbox"/>
      <to uri="mock:log"/>
      </route>
      </camelContext>

      </blueprint>

      Attachments

        1. camel-ftp4j.tar.gz
          50 kB
          Aleksey Sushko

        Activity

          People

            davsclaus Claus Ibsen
            alexey-s Aleksey Sushko
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: