partial implementation of PAC proxy