use strict;
use HTTP::Proxy;
my $proxy = HTTP::Proxy->new;
$proxy->port( 8000 );
$proxy->init();
$proxy->agent->proxy([
[ 'http', 'https' ] => 'https://api.test.example.com/',
]);
$proxy->agent->ssl_opts( verify_hostname => 0 );
$proxy->start;
####
curl http://localhost:8000/index
##
##
curl http://SERVER_A:8000/index