Class: Net::SSH::Proxy::HTTPS
Overview
A specialization of the HTTP proxy which encrypts the whole connection using OpenSSL. This has the advantage that proxy authentication information is not sent in plaintext.
Defined Under Namespace
Modules: SSLSocketCompatibility
Instance Attribute Summary
Attributes inherited from HTTP
#options, #proxy_host, #proxy_port
Instance Method Summary collapse
-
#initialize(proxy_host, proxy_port = 80, options = {}) ⇒ HTTPS
constructor
Create a new socket factory that tunnels via the given host and port.
Methods inherited from HTTP
Constructor Details
#initialize(proxy_host, proxy_port = 80, options = {}) ⇒ HTTPS
Create a new socket factory that tunnels via the given host and
port. The options parameter is a hash of additional settings that
can be used to tweak this proxy connection. In addition to the options
taken by Net::SSH::Proxy::HTTP it supports:
- :ssl_context => the SSL configuration to use for the connection. The
default verifies the proxy's certificate and hostname against the
system trust store. For a self-signed or private CA certificate pass a
context with it in
cert_store, or, to skip verification and expose the proxy credentials to a man-in-the-middle, a context withverify_modeset to OpenSSL::SSL::VERIFY_NONE.
25 26 27 28 |
# File 'lib/net/ssh/proxy/https.rb', line 25 def initialize(proxy_host, proxy_port = 80, = {}) @ssl_context = .delete(:ssl_context) || default_ssl_context super(proxy_host, proxy_port, ) end |