【发布时间】:2021-08-20 10:00:54
【问题描述】:
我正在尝试通过代理连接到需要 TLS1.2 的 FTP 服务器。
我从 FTP 服务器收到一条错误消息(如下所示),因此连接本身已建立。 但是,如果我尝试在没有 TLS1.2 的情况下进行连接,则会遇到同样的错误,因此代理似乎没有使用 TLS1.2 连接到 FTP 服务器。
我需要怎么做才能让 curl “告诉”代理使用 TLS1.2?
这里是连接的参数和日志。
$ curl -v --tlsv1.2 -x http://login:password@mycompanyproxy.com:8080 --user-agent 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (FM Scene 4.6.1)' ftp://login2:password2@ftp.tls.needed.ftpserver.com/
* About to connect() to proxy mycompanyproxy.com port 8080 (#0)
* Trying 1.2.3.4...
* Connected to mycompanyproxy.com (1.2.3.4) port 8080 (#0)
* Proxy auth using Basic with user 'login'
* Server auth using Basic with user 'login2'
> GET ftp://login2:password2@ftp.tls.needed.ftpserver.com/ HTTP/1.1
> Proxy-Authorization: Basic U1ZDLURFLUlQUy1XU1VTOlNhcHBoaXJlMQ==
> Authorization: Basic Z2VoZS1tcGZyOnRRenNjd0pxdzlISA==
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (FM Scene 4.6.1)
> Host: ftp.tls.needed.ftpserver.com:21
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 401 Unauthorized
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="ftp.tls.needed.ftpserver.com"
< Content-Type: text/plain
< Content-Length: 157
< Cache-Control: proxy-revalidate
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< X-BlueCoat-Authorization: 77988e24a55a2c1a=2EBFE78A00000002od75S6szNgteRTcwOqtLwkNggTT7RwAAAgAAAF/6EwOEAwAAAAAAAIOqMQAAAAAA
< Proxy-support: Session-based-authentication
< Date: Tue, 01 Jun 2021 13:04:57 GMT
<
Security Notice
You are about to access a secured resource. ftp.tls.needed.ftpserver.com
reserves the right to monitor and/or limit access to this resource at
* Connection #0 to host mycompanyproxy.com left intact
提前致谢
【问题讨论】: