Subject: | Spurious "--tunnel <port:host:hostport> format required" error. |
The --tunnel option in connect-tunnel rejects some perfectly valid
hostnames. For example, any hostname that contains hyphens is not accepted.
The attached patch allows these hostnames to be used.
Subject: | connect-tunnel-hostname.patch |
--- connect-tunnel~ 2007-10-17 23:57:44.000000000 +0100
+++ connect-tunnel 2009-01-19 12:43:20.000000000 +0000
@@ -4,6 +4,7 @@
use Net::Proxy;
use Getopt::Long;
use Pod::Usage;
+use Regexp::Common qw(net);
our $VERSION = '0.07';
@@ -50,7 +51,7 @@
for my $tunnel ( @{ $CONF{tunnel} } ) {
die "--tunnel <port:host:hostport> format required$/"
- if $tunnel !~ /^\d+:[\w.]+:\d+$/;
+ if $tunnel !~ /^\d+:$RE{net}{domain}:\d+$/;
my ( $port, $host, $hostport ) = split ':', $tunnel;
my ( $proxy_host, $proxy_port) = split ':', $CONF{proxy};