<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">05.07.2017 3:12, Muhammad Usman пишет:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHfqhMmsDZ2u6JCgnWadGWJee22U0tvjoGfJYHxWW6qnoBrqDg@mail.gmail.com">
      <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>
    Yes. It's possible.<br>
    <br>
    Some part of solution:<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://wiki.squid-cache.org/ConfigExamples/Portal/Splash">http://wiki.squid-cache.org/ConfigExamples/Portal/Splash</a><br>
    <br>
    and this:<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://wiki.squid-cache.org/Features/ICAP">http://wiki.squid-cache.org/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).<br>
    <br>
    <blockquote type="cite"
cite="mid:CAHfqhMmsDZ2u6JCgnWadGWJee22U0tvjoGfJYHxWW6qnoBrqDg@mail.gmail.com">
      <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 class=""> <br>
                <div class="m_-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="h5">
                      <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="h5">
                    <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_-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_-3916191736732124555m_2226415958044252193moz-smiley-s3"><span>;-)</span></span><br>
                            <br>
                            <div
                              class="m_-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_-3916191736732124555m_2226415958044252193mimeAttachmentHeader"></fieldset>
                                <br>
                              </span>
                              <pre>______________________________<wbr>_________________
squid-users mailing list
<a class="m_-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_-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>
  </body>
</html>