“Content Injection” using the Squid Proxy (pfSense). Is this possible

captive-portalpfsensesquid

In my pfsense box, I'm using Captive Portal (connected to RADIUS MS AD) and Squid setup as Transparent Proxy.

I would like to know if it is possible for me to maybe "inject" a small HTML DIV on the top portion of the browser where it displays Captive Portal information (like login name, session time, company logo and most importantly a logout button)?

pfSense Captive Portal CANNOT do this, I believe. Can Squid do it? Or perhaps some other way?

Best Answer

I use the pfSense captive portal a fair amount and you are correct, I've never seen a way to do this. I'm not sure if squid would do it either - it doesn't seem like a technically clean way to handle it.

Most of the time in hotspot environments I have seen this solved with a small popup window that has time connected, other details and a disconnect option. We did run into issues with this (the pfSense pop-up window had issues with certain browsers, so we disabled it), so we had a default landing page - pfSense does allow you to redirect to a specific page on a successful auth. That page would then give the user an option to launch a separate window with connection details and logout options. It (the status page) was also put on an easy to remember url (status.xxx.yyy) so users that lost the page or the popup could go in relatively easily.

Related Topic