<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>This is a solution, too. But more better to do this with specific
tool, designed for this tasks exactly.<br>
</p>
<br>
<div class="moz-cite-prefix">05.07.2017 3:24, Muhammad Usman пишет:<br>
</div>
<blockquote type="cite"
cite="mid:CAHfqhMmET9B4j-BvG6y=R_jOAFFs1i9+6GWbt8E4HskHL1mTpA@mail.gmail.com">
<div dir="ltr">I dont want to redirect them to some splash page, I
want to continuously inject my JS script in their session.
Currently I am able to do this using dansguardian.
<div>The only part pending is to send IP & other information
as parameter.</div>
<div><br>
</div>
<div>
<pre id="gmail-line1"><<span class="gmail-start-tag">script</span> <span class="gmail-attribute-name">type</span>="<a class="gmail-attribute-value" moz-do-not-send="true">text/javascript</a>" <span class="gmail-attribute-name">apmac</span>="11-22-33-44-55-66" <span class="gmail-attribute-name">data-cusip</span>="<a class="gmail-attribute-value" moz-do-not-send="true">10.1.0.1</a>" <span class="gmail-attribute-name">request</span>="" <span class="gmail-attribute-name">src</span>="<a class="gmail-attribute-value" moz-do-not-send="true">http://mysite.com/js</a>"></<span class="end-tag">script</span>></pre>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jul 5, 2017 at 2:17 AM, Yuri <span
dir="ltr"><<a href="mailto:yvoinov@gmail.com"
target="_blank" moz-do-not-send="true">yvoinov@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="m_-1735151163014101773moz-cite-prefix">05.07.2017
3:12, Muhammad Usman пишет:<br>
</div>
<span class="">
<blockquote type="cite">
<div dir="ltr">Thanks again.
<div>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.</div>
<div>Can I achieve all this through Squid or do I
need to add other software's as well.</div>
</div>
</blockquote>
</span> Yes. It's possible.<br>
<br>
Some part of solution:<br>
<br>
<a class="m_-1735151163014101773moz-txt-link-freetext"
href="http://wiki.squid-cache.org/ConfigExamples/Portal/Splash"
target="_blank" moz-do-not-send="true">http://wiki.squid-cache.org/<wbr>ConfigExamples/Portal/Splash</a><br>
<br>
and this:<br>
<br>
<a class="m_-1735151163014101773moz-txt-link-freetext"
href="http://wiki.squid-cache.org/Features/ICAP"
target="_blank" moz-do-not-send="true">http://wiki.squid-cache.org/<wbr>Features/ICAP</a><br>
<br>
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).
<div>
<div class="h5"><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jul 5, 2017 at
2:04 AM, Yuri <span dir="ltr"><<a
href="mailto:yvoinov@gmail.com"
target="_blank" moz-do-not-send="true">yvoinov@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>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).</p>
<p>So, finally. Logs is one thing,
header/content manipulation - another.</p>
<p>What do you want to achieve exactly?<br>
</p>
<span> <br>
<div
class="m_-1735151163014101773m_-3916191736732124555moz-cite-prefix">05.07.2017
2:54, Muhammad Usman пишет:<br>
</div>
</span>
<blockquote type="cite">
<div dir="ltr">Thanks a lot for your
reply.
<div>
<div class="m_-1735151163014101773h5">
<div>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? </div>
</div>
</div>
</div>
<div>
<div class="m_-1735151163014101773h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jul
5, 2017 at 1:49 AM, Yuri <span
dir="ltr"><<a
href="mailto:yvoinov@gmail.com"
target="_blank"
moz-do-not-send="true">yvoinov@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div text="#000000"
bgcolor="#FFFFFF">
<p>Let's open squid's default
access.log:</p>
<p>1499201177.345 155 <b>172.16.100.3</b>
TCP_MISS/200 633 GET <a
class="m_-1735151163014101773m_-3916191736732124555m_2226415958044252193moz-txt-link-freetext"
href="https://discovery-v4-4.syncthing.net/v2/?device=DEVICE_ID"
target="_blank"
moz-do-not-send="true">https://discovery-v4-4.syncthi<wbr>ng.net/v2/?device=DEVICE_ID</a>
- ORIGINAL_DST/<a
href="http://95.85.19.244"
target="_blank"
moz-do-not-send="true">95.85.19.244</a>
application/json<br>
</p>
<p>third (.....|awk {'print
$3'}) is exactly client IP.</p>
<p>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.</p>
<span
class="m_-1735151163014101773m_-3916191736732124555m_2226415958044252193moz-smiley-s3"><span>;-)</span></span><br>
<br>
<div
class="m_-1735151163014101773m_-3916191736732124555m_2226415958044252193moz-cite-prefix">05.07.2017
0:56, Muhammad Usman пишет:<br>
</div>
<blockquote type="cite"><span>
<div dir="ltr">Hi,
<div>I have configured
Squid and
Dansguardian successfully
on Ubuntu. I want to
inject ads in user
browsing (with user
consent). </div>
<div>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</div>
</div>
<br>
<fieldset
class="m_-1735151163014101773m_-3916191736732124555m_2226415958044252193mimeAttachmentHeader"></fieldset>
<br>
</span>
<pre>______________________________<wbr>_________________
squid-users mailing list
<a class="m_-1735151163014101773m_-3916191736732124555m_2226415958044252193moz-txt-link-abbreviated" href="mailto:squid-users@lists.squid-cache.org" target="_blank" moz-do-not-send="true">squid-users@lists.squid-cache.<wbr>org</a>
<a class="m_-1735151163014101773m_-3916191736732124555m_2226415958044252193moz-txt-link-freetext" href="http://lists.squid-cache.org/listinfo/squid-users" target="_blank" moz-do-not-send="true">http://lists.squid-cache.org/l<wbr>istinfo/squid-users</a>
</pre>
</blockquote>
<br>
</div>
<br>
______________________________<wbr>_________________<br>
squid-users mailing list<br>
<a
href="mailto:squid-users@lists.squid-cache.org"
target="_blank"
moz-do-not-send="true">squid-users@lists.squid-cache.<wbr>org</a><br>
<a
href="http://lists.squid-cache.org/listinfo/squid-users"
rel="noreferrer"
target="_blank"
moz-do-not-send="true">http://lists.squid-cache.org/l<wbr>istinfo/squid-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>