Я тестирую прокси туннелирования ssl на моем локальном компьютере, и моя компания использует прокси для доступа к общедоступному Интернету. что означает, Клиент (curl, local) -> Proxy1 (apache2.2, ssl tunneling) -> ProxyAgent (127.0.0.1:mmmm, local) <-> Proxy2 (yy.yy.yy.yy:aaaa) -> public интернет
Вот мои настройки apache (virualhost).
Listen local.ip.address:5000
NameVirtualHost local.ip.address:5000
<VirtualHost *:5000>
ServerName test-server:5000
ProxyRequests On
AllowCONNECT 443
ProxyPass / http://127.0.0.1:mmmm/
ProxyPassReverse / http://127.0.0.1:mmmm/
CustomLog logs/internalproxy_access_log combined
ErrorLog logs/internalproxy_error.log
</VirtualHost>
я использую эту команду для проверки:
curl -v https://www.google.com -U имя пользователя: пароль -x http://local.ip.address: 5000
ответ как:
* Expire in 0 ms for 6 (transfer 0x989e70)
* Trying xx.xx.xx.xx... * TCP_NODELAY set * Expire in 200 ms for 4 (transfer 0x989e70) * Connected to xx.xx.xx.xx (xx.xx.xx.xx) port 5000 (#0) * allocate connect buffer! * Establish HTTP proxy tunnel to www.google.com:443 * Proxy auth using Basic with user 'xxxxxx' > CONNECT www.google.com:443 HTTP/1.1 > Host: www.google.com:443 > Proxy-Authorization: Basic XXXXXXXXXXXXXXXXXXXXXX > User-Agent: curl/7.64.0 > Proxy-Connection: Keep-Alive > * error:1408F10B:SSL routines:ssl3_get_record:wrong version number * Closing connection 0 curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number
правильный ответ выглядит так:
* Proxy replied 200 to CONNECT request * CONNECT phase completed! * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: M:\tools\curl\bin\curl-ca-bundle.crt CApath: none * TLSv1.3 (OUT), TLS handshake, Client hello (1): * CONNECT phase completed! * CONNECT phase completed! * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305 * ALPN, server accepted to use h2 * Server certificate: * subject: C=US; ST=California; L=Mountain View; O=Google LLC; CN=www.google.co m * start date: Jan 23 09:15:00 2019 GMT * expire date: Apr 17 09:15:00 2019 GMT * subjectAltName: host "www.google.com" matched cert's "www.google.com" * issuer: C=US; O=Google Trust Services; CN=Google Internet Authority G3 * SSL certificate verify ok. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
Есть ли неправильные места с моими настройками?
Спасибо!