In short, I am looking for a simple way to do the following (please give code samples if possible):
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.
How does Proxy Authentication work in Squid? Users will be authenticated if squid is configured to use proxy_auth ACLs (see next question). Browsers send the user's authentication credentials in the HTTP Authorization: request header.
Squid is a caching and forwarding HTTP web proxy. It has a wide variety of uses, including speeding up a web server by caching repeated requests, caching web, DNS and other computer network lookups for a group of people sharing network resources, and aiding security by filtering traffic.
In Active Directory create a user called "Squid Proxy" with the logon name [email protected]. Ensure the following is true when creating the account. Create a password file used by squid for ldap access and secure the file permissions (substitute the word "squidpass" below with your password).
Squid as Reverse ProxyIn the second operating mode, Squid is employed as a reverse proxy.
I figured from squid tutorials that the simplest configuration to do this is:
http_access allow all http_port 3128 coredump_dir /var/spool/squid3 refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880 refresh_pattern . 0 20% 4320 cache_peer 10.1.2.3 parent 80 0 no-query default login=my_username:my_password never_direct allow all
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With