[squid-users] Get calling User Details on server
Yuri
yvoinov at gmail.com
Tue Jul 4 21:17:45 UTC 2017
05.07.2017 3:12, Muhammad Usman пишет:
> Thanks again.
> I have trying to setup hotspots and I want to pass all user traffic
> through the proxy server and inject ads (through injection of a JS
> script in html). I want to pass some parameters like AP MAC and
> Customer MAC as parameters to the JS script, in order to keep track at
> user level.
> Can I achieve all this through Squid or do I need to add other
> software's as well.
Yes. It's possible.
Some part of solution:
http://wiki.squid-cache.org/ConfigExamples/Portal/Splash
and this:
http://wiki.squid-cache.org/Features/ICAP
However, content adaptation part is not so simple and can require some
programming (up to C/C++ level), because of I don't know any
ready-to-use and free solution to inject ads (Which is understandable,
given that advertising is money).
>
>
> On Wed, Jul 5, 2017 at 2:04 AM, Yuri <yvoinov at gmail.com
> <mailto:yvoinov at gmail.com>> wrote:
>
> However HTTP headers is yet another story. To work with them on
> the fly - partially, for injecting Ads into pages - you require a
> bit another tool, named Content Adaptation (ICAP/eCAP).
>
> So, finally. Logs is one thing, header/content manipulation - another.
>
> What do you want to achieve exactly?
>
>
> 05.07.2017 2:54, Muhammad Usman пишет:
>> Thanks a lot for your reply.
>> Can you please confirm if it is possible to receive custom
>> attributes in header and if yes, then how can I use those
>> attributes like MAC etc?
>>
>> On Wed, Jul 5, 2017 at 1:49 AM, Yuri <yvoinov at gmail.com
>> <mailto:yvoinov at gmail.com>> wrote:
>>
>> Let's open squid's default access.log:
>>
>> 1499201177.345 155 *172.16.100.3* TCP_MISS/200 633 GET
>> https://discovery-v4-4.syncthing.net/v2/?device=DEVICE_ID
>> <https://discovery-v4-4.syncthing.net/v2/?device=DEVICE_ID> -
>> ORIGINAL_DST/95.85.19.244 <http://95.85.19.244> application/json
>>
>> third (.....|awk {'print $3'}) is exactly client IP.
>>
>> How to get it in redirector? Read manual of yours redirector,
>> I think. Usually this data exactly present in redirector logs
>> because of this is _most_ interesting data.
>>
>> ;-)
>>
>> 05.07.2017 0:56, Muhammad Usman пишет:
>>> Hi,
>>> I have configured Squid and Dansguardian successfully on
>>> Ubuntu. I want to inject ads in user browsing (with user
>>> consent).
>>> I want to get details about the user like their IP etc but I
>>> dont know how to get this in Squid and then pass on
>>> to dansguardian. Any help would be appreciated. Thanks
>>>
>>>
>>> _______________________________________________
>>> squid-users mailing list
>>> squid-users at lists.squid-cache.org
>>> <mailto:squid-users at lists.squid-cache.org>
>>> http://lists.squid-cache.org/listinfo/squid-users
>>> <http://lists.squid-cache.org/listinfo/squid-users>
>>
>>
>> _______________________________________________
>> squid-users mailing list
>> squid-users at lists.squid-cache.org
>> <mailto:squid-users at lists.squid-cache.org>
>> http://lists.squid-cache.org/listinfo/squid-users
>> <http://lists.squid-cache.org/listinfo/squid-users>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20170705/770c0b8d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20170705/770c0b8d/attachment-0001.sig>
More information about the squid-users
mailing list