I want to setup squid proxy server to be used without manually configuring the browser to use a proxy. For example I should be able to do this in the browser address bar: htttp://squidserverip:3128/www.serverfault.com
. It did not work for me with my basic squid configuration.
What I want is a basic http proxy server with some authentication feature. When the users put the url of the proxy server in the browser address bar (e.g. www.proxyserver.net), on getting authenticated, it will display a list of urls that can be accessed through the proxy. Clicking on those urls will fetch those sites through the proxy.
Some relevant links:
http://www-archive.mozilla.org/catalog/end-user/customizing/enduserPAC.html
http://en.wikipedia.org/wiki/Proxy_auto-config
http://technet.microsoft.com/en-us/library/dd361887.aspx
You most likely want something along the lines of an HTTP/web-based proxy. Something like the discontinued PHProxy would do what you're after.
http://sourceforge.net/projects/poxy/
The bit about not manually configuring the browser, can be achieved by setting up your network to transparently redirect all HTTP requests (note: not HTTPS) to your squid proxy. Search for "transparent proxy redirection iptables" on this forum for an example on how to do it with iptables.
Once your user is redirected to the proxy server, you can use ACLs in squid to block certain URLs, while allowing others. You should also be able to configure a custom error page is squid to achieve your "captive portal", where you would list URLs a user has permissions to access.
Alternatively, these sorts of features are baked into most entry-level Enterprise firewalls, such as FortiGate. You may want to look into that as well..
-- ab1