.\" Automatically generated by Pod::Man 4.14 (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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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::dual 3pm" .TH Net::Proxy::Connector::dual 3pm "2023-06-26" "perl v5.36.0" "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::dual \- Y\-shaped Net::Proxy connector .SH "DESCRIPTION" .IX Header "DESCRIPTION" Net::Proxy::Connecter::dual is a Net::Proxy::Connector that can forward the connection to two distinct services, based on the client connection, before any data is exchanged. .SH "CONNECTOR OPTIONS" .IX Header "CONNECTOR OPTIONS" This connector can only work as an \f(CW\*(C`in\*(C'\fR connector. .PP The \f(CW\*(C`server_first\*(C'\fR and \f(CW\*(C`client_first\*(C'\fR options are required: they are hashrefs containing the options necessary to create two \f(CW\*(C`out\*(C'\fR Net::Proxy::Connector objects that will be used to connect to the requested service. .PP The Net::Proxy::Connector::dual object decides between the two services by waiting during a short timeout. If the client sends some data directly, then it is connected via the \f(CW\*(C`client_first\*(C'\fR connector. Otherwise, at the end of the timeout, it is connected via the \f(CW\*(C`server_first\*(C'\fR connector. .IP "host" 4 .IX Item "host" The hostname on which the connector will listen for client connections. Default is \f(CW\*(C`localhost\*(C'\fR. .IP "port" 4 .IX Item "port" The port on which the connector will listen for client connections. .IP "server_first" 4 .IX Item "server_first" Typically an \f(CW\*(C`out\*(C'\fR connector to a \s-1SSH\s0 server or any service that sends a banner line. .IP "client_first" 4 .IX Item "client_first" Typically an \f(CW\*(C`out\*(C'\fR connectrot to a web server or \s-1SSL\s0 server. .IP "timeout" 4 .IX Item "timeout" The timeout in seconds (can be decimal) to make a decision. Default is 1 second. .SH "AUTHOR" .IX Header "AUTHOR" Philippe 'BooK' Bruhat, \f(CW\*(C`\*(C'\fR. .SH "ACKNOWLEDGMENTS" .IX Header "ACKNOWLEDGMENTS" This module is based on a script named \fBsslh\fR, which I wrote with Frédéric Plé \f(CW\*(C`\*(C'\fR (who had the original insight about the fact that not all servers speak first on the wire). .PP Frédéric wrote a C program, while I wrote a Perl script (based on my experience with \fBconnect-tunnel\fR). .PP Now that \f(CW\*(C`Net::Proxy\*(C'\fR is available, I've ported the Perl script to use it. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2006\-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.