.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Net::Proxy::Connector::connect_ssl 3pm" .TH Net::Proxy::Connector::connect_ssl 3pm 2024-05-15 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Net::Proxy::Connector::connect_ssl \- Create SSL/CONNECT tunnels through HTTP proxies .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& # sample proxy using Net::Proxy::Connector::tcp \& # and Net::Proxy::Connector::connect_ssl \& use Net::Proxy; \& \& # listen on localhost:6789 \& # and proxy to remotehost:9876 through proxy.company.com:8080 \& # using the given credentials \& my $proxy = Net::Proxy\->new( \& in => { type => \*(Aqtcp\*(Aq, port => \*(Aq6789\*(Aq }, \& out => { \& type => \*(Aqconnect_ssl\*(Aq, \& host => \*(Aqremotehost\*(Aq, \& port => \*(Aq9876\*(Aq, \& proxy_host => \*(Aqproxy.company.com\*(Aq, \& proxy_port => \*(Aq8080\*(Aq, \& proxy_user => \*(Aqjrandom\*(Aq, \& proxy_pass => \*(Aqs3kr3t\*(Aq, \& proxy_agent => \*(AqMozilla/4.04 (X11; I; SunOS 5.4 sun4m)\*(Aq, \& }, \& ); \& $proxy\->register(); \& \& Net::Proxy\->mainloop(); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Net::Proxy::Connecter::connect_ssl is a Net::Proxy::Connector that uses the HTTP CONNECT method to ask the proxy to create a tunnel to an outside server. The data is then encrypted using SSL. .PP Obviously, you'll need a server that understands SSL (or a proxy using Net::Proxy::Connector::ssl) at the other end. .PP This connector is only an "out" connector. .PP In addition to the options listed below, this connector accepts all \&\f(CW\*(C`SSL_...\*(C'\fR options to IO::Socket::SSL. They are transparently passed through to the appropriate IO::Socket::SSL methods when upgrading the socket to SSL. .SH "CONNECTOR OPTIONS" .IX Header "CONNECTOR OPTIONS" Net::Proxy::Connector::connect_ssl accepts the following options: .ie n .SH """out""" .el .SH \f(CWout\fP .IX Header "out" .IP host 4 .IX Item "host" The destination host. .IP port 4 .IX Item "port" The destination port. .IP proxy_host 4 .IX Item "proxy_host" The web proxy name or address. .IP proxy_port 4 .IX Item "proxy_port" The web proxy port. .IP proxy_user 4 .IX Item "proxy_user" The authentication username for the proxy. .IP proxy_pass 4 .IX Item "proxy_pass" The authentication password for the proxy. .IP proxy_agent 4 .IX Item "proxy_agent" The user-agent string to use when connecting to the proxy. .SH METHODS .IX Header "METHODS" The Net::Proxy::Connector::connect_ssl connector has an extra method, obtained from Net::Proxy::Connector::ssl: .SS upgrade_SSL .IX Subsection "upgrade_SSL" .Vb 1 \& $connector\->upgrade_SSL( $sock ) .Ve .PP This method will upgrade a cleartext socket to SSL. If the socket is already in SSL, it will \f(CWcarp()\fR. .SH AUTHOR .IX Header "AUTHOR" Philippe 'BooK' Bruhat, \f(CW\*(C`\*(C'\fR. .SH HISTORY .IX Header "HISTORY" Because Net::Proxy blocks when it tries to connect to itself, it wasn't possible to pass an SSL-encrypted connection through a proxy with a single script: you needed one for the SSL encapsulation, and another one for bypassing the proxy with the \f(CW\*(C`CONNECT\*(C'\fR HTTP method. .PP See Net::Proxy::Connector::connect and Net::Proxy::Connector::ssl for details. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2007\-2014 Philippe 'BooK' Bruhat, All Rights Reserved. .SH LICENSE .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.