In short, I am looking for a simple way to do the following (please give code samples if possible):
- set up and start a proxy server on my computer (say address is 10.10.200.200:6767) that can capture all web requests from my phone
- once the request from phone comes to this proxy, it will add custom authentication details (my_username/my_password) and forward it to the institute proxy (say address is 10.1.2.3:80)
- I dont need any caching/acceleration on my local proxy (10.10.200.200). It just needs to catch the request and forward it.
Now, more details to fully explain my situation:
In my institute, authentication is needed to pass through a proxy so that we can connect to the internet. I normally enter my ldap username/password to authenticate when the pop up appears.
Now, I want to connect my phone to the institute WiFi but my phone does not have the option of authentication with proxy. Only a proxy address can be specified. So, I am planning to set up a local proxy on my computer to catch all requests from my phone, add authentication details and pass it to my institute proxy through my computer.
I installed squid3 (on Ubuntu), but looking at the configuration file, I am lost. I tried googling but it looks all too complicated.
Hoping someone can provide help.
I figured from squid tutorials that the simplest configuration to do this is:
These lines should get you a working proxy server on your local machine that forwards all requests to another proxy server (change ip addresses accordingly). However, please note that in the above script, I have disabled any access control/filters, so potentially, anybody can connect and use your proxy. You need to add additional code to restrict entry to only some devices.