Greetings,
On Fri May 16 12:04:55 2014, MSCHILLI wrote:
Show quoted text> Can you post the code you're using to address the proxy, that'll help
> us reproduce the problem, thanks!
Confirming this problem - using this test code and watching both proxy server and destination web server a HTTP request goes via the proxy, a HTTPS request goes direct to the web server.
#!/usr/bin/env perl
use strict;
use warnings;
use LWP 6.06;
use Getopt::Long;
my ($proxy_url, $proxy_username, $proxy_password);
my $ssl_opt_verify_hostname = 0;
GetOptions(
"proxy=s" => \$proxy_url,
"user=s" => \$proxy_username,
"pass=s" => \$proxy_password,
"verify" => \$ssl_opt_verify_hostname,
) or die;
{
package MyUA;
use base 'LWP::UserAgent';
# Simple - only care about giving proxy credentials
sub get_basic_credentials {
my($self, $realm, $uri, $isproxy) = @_;
return $isproxy ? ($proxy_username, $proxy_password) : ();
}
}
my $ua = MyUA->new();
$ua->proxy(['https','http'], $proxy_url);
$ua->ssl_opts(
verify_hostname => $ssl_opt_verify_hostname,
);
print $ua->get($ARGV[0])->as_string;
If I turn verify_hostname back on and access a site providing an untrusted certificate it's also clear the connection is bypassing the proxy as the error received is (substituting the hostname with servername.example.org):
500 Can't connect to servername.example.org:443 (certificate verify failed)
Content-Type: text/plain
Client-Date: Thu, 12 Jun 2014 04:41:20 GMT
Client-Warning: Internal response
Can't connect to servername.example.org:443 (certificate verify failed)
LWP::Protocol::https::Socket: SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed at /home/eguser/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/LWP/Protocol/http.pm line 41.
Cheerio,
Brad