cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: cURL custom proxy configuration

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 5 Apr 2011 10:28:16 -0700

On Tue, Apr 05, 2011 at 04:23:59PM +0200, Guschtl_at_alpenjodel.de wrote:
> I'm trying to upload files via FTP through a Blue Coat proxy. My problem is the
> complicated Blue Coat proxy authentication, which looks like this:
>
> (from FileZilla)
> USER %u@%h %s
> PASS %p
> ACCT %w
>
> which is
>
> USER FTP-Username_at_FTP-Server Proxy-User
> PASS FTP-Password
> ACCT Proxy-Password

FTP proxies are nonstandardized and therefore there is no special support for
FTP proxies in curl, so it's not too surprising this is tricky for you
to set up. But this appears like Blue Coat is trying to make this look
like a normal FTP transaction to the proxy server from the client's
perspective, so you should be able to do it.

> Linebreaks for better readability:
> curl -v
> -x myftp.proxy.server:21
> -U "FTP-Username_at_FTP-Server Proxy-User"
> --ftp-account %Proxy-Password%
> --upload-file c:\data\test.pdf
> ftp://someURL:21/

You're using the -x and -U proxy options, but this doesn't make sense
for FTP proxies since curl doesn't consider those special. Instead, try
ignoring the fact that this is a FTP proxy and use regular FTP options
instead. For example:

  curl -v \
  -u "FTP-Username_at_remote-FTP-Server Proxy-User" \
  --ftp-account Proxy-Password \
  --upload-file c:\data\test.pdf \
  ftp://myftp.proxy.server:21/upload/path/

From curl's perspective, this is a simple upload to the proxy server. The
proxy server will take care of translating this to commands on the real,
remote server.

>>> Dan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-05