#!/usr/bin/perl use HTTP::Proxy qw(); use strict; use warnings; my $proxy = HTTP::Proxy->new( port => 3128 ); $proxy->push_headers_filter( request => sub { my $headers = shift; # grabbed from http request header of logged in browser $headers->header( Authorization => "BASIC cm9verMSZXZhadDpRHRq"); }, response => sub { $_[0]->remove_header(qw(WWW-Authenticate)); }, ); $proxy->start;