How to setup a local proxy server for testing a program?
Setup pfSense either in virtual machine or set it up on any spare computer (requirements are very low) and follow official documentation how to setup transparent proxy. When you done,
- Set up users who allowed to use proxy in Services > Proxy > Users
- Disable Transparent HTTP proxy in Services > Proxy > General
- Select LOCAL Authentication method in Services > Proxy > Authentication
- Disable in firewall outgoing connections to ports 80,443
(if you really want to create corporate production setup)
To drive workstations over proxy with authentication you either need to setup WPAD (but you would need to setup first any simple web server (can be added as package in pfSense
)) or manually on each workstation incontrol panel/internet options
on the tab Connections
hit button LAN settings and tick checkbox Use a proxy server for your LAN
in Proxy server
section. (Use IP of pfSense
and port 3128
). This network settings would be applied to the whole system.
If you would go with WPAD then on the same tabConnections
in control panel/internet options
leave all check boxes empty except Automatically detect settings
. (If you have a lot of computers then it would be better to setup WPAD address in DHCP option 252 on pfSense
this way all workstation will pick all settings automatically)
In firefox
(in Options->Adavanced->network->Connection Settings) you can choose eitherUse system proxy settings
(it will pick settings described above) or you may set protocols that should go over proxy with authorization in Manual proxy configuration