Get calling User Details on server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Get calling User Details on server

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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Yuri Voinov

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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users



_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Yuri Voinov



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?
http://wiki.squid-cache.org/Features/LogFormat
http://www.squid-cache.org/Doc/config/logformat/

I guess Squid's doc answers all.

On Wed, Jul 5, 2017 at 1:49 AM, Yuri <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users




_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Yuri Voinov
In reply to this post by Muhammad Usman

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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users




_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

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.


On Wed, Jul 5, 2017 at 2:04 AM, Yuri <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users





_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Muhammad Usman
This assumes that AP will send its MAC and Customer MAC while proxying traffic to the server. Otherwise I can pass Source IP as parameter as well.

On Wed, Jul 5, 2017 at 2:12 AM, Muhammad Usman <[hidden email]> wrote:
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.


On Wed, Jul 5, 2017 at 2:04 AM, Yuri <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users






_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Yuri Voinov
In reply to this post by Muhammad Usman



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 <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users






_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Yuri Voinov
In reply to this post by Muhammad Usman



05.07.2017 3:13, Muhammad Usman пишет:
This assumes that AP will send its MAC and Customer MAC while proxying traffic to the server. Otherwise I can pass Source IP as parameter as well.
Something like, yes.

On Wed, Jul 5, 2017 at 2:12 AM, Muhammad Usman <[hidden email]> wrote:
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.


On Wed, Jul 5, 2017 at 2:04 AM, Yuri <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users







_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Muhammad Usman
In reply to this post by Yuri Voinov
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. 
The only part pending is to send IP & other information as parameter.

<script type="text/javascript" apmac="11-22-33-44-55-66" data-cusip="10.1.0.1" request="" src="http://mysite.com/js"></script>

On Wed, Jul 5, 2017 at 2:17 AM, Yuri <[hidden email]> wrote:



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 <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users







_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Yuri Voinov

This is a solution, too. But more better to do this with specific tool, designed for this tasks exactly.


05.07.2017 3:24, Muhammad Usman пишет:
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. 
The only part pending is to send IP & other information as parameter.

<script type="text/javascript" apmac="11-22-33-44-55-66" data-cusip="10.1.0.1" request="" src="http://mysite.com/js"></script>

On Wed, Jul 5, 2017 at 2:17 AM, Yuri <[hidden email]> wrote:



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 <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users








_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Muhammad Usman
Can you please recommend tools designed for this?

On Wed, Jul 5, 2017 at 2:27 AM, Yuri <[hidden email]> wrote:

This is a solution, too. But more better to do this with specific tool, designed for this tasks exactly.


05.07.2017 3:24, Muhammad Usman пишет:
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. 
The only part pending is to send IP & other information as parameter.

<script type="text/javascript" apmac="11-22-33-44-55-66" data-cusip="10.1.0.1" request="" src="http://mysite.com/js"></script>

On Wed, Jul 5, 2017 at 2:17 AM, Yuri <[hidden email]> wrote:



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 <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users









_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Yuri Voinov

Sure,

http://c-icap.sourceforge.net/

http://e-cap.org/

however remember: you still require to write required module by yourself. ;-)

05.07.2017 3:31, Muhammad Usman пишет:
Can you please recommend tools designed for this?

On Wed, Jul 5, 2017 at 2:27 AM, Yuri <[hidden email]> wrote:

This is a solution, too. But more better to do this with specific tool, designed for this tasks exactly.


05.07.2017 3:24, Muhammad Usman пишет:
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. 
The only part pending is to send IP & other information as parameter.

<script type="text/javascript" apmac="11-22-33-44-55-66" data-cusip="10.1.0.1" request="" src="http://mysite.com/js"></script>

On Wed, Jul 5, 2017 at 2:17 AM, Yuri <[hidden email]> wrote:



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 <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users










_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Muhammad Usman
Thanks a lot..

On Wed, Jul 5, 2017 at 2:42 AM, Yuri <[hidden email]> wrote:

Sure,

http://c-icap.sourceforge.net/

http://e-cap.org/

however remember: you still require to write required module by yourself. ;-)

05.07.2017 3:31, Muhammad Usman пишет:
Can you please recommend tools designed for this?

On Wed, Jul 5, 2017 at 2:27 AM, Yuri <[hidden email]> wrote:

This is a solution, too. But more better to do this with specific tool, designed for this tasks exactly.


05.07.2017 3:24, Muhammad Usman пишет:
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. 
The only part pending is to send IP & other information as parameter.

<script type="text/javascript" apmac="11-22-33-44-55-66" data-cusip="10.1.0.1" request="" src="http://mysite.com/js"></script>

On Wed, Jul 5, 2017 at 2:17 AM, Yuri <[hidden email]> wrote:



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 <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users











_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

Yuri Voinov

You are welcome :-)


05.07.2017 3:46, Muhammad Usman пишет:
Thanks a lot..

On Wed, Jul 5, 2017 at 2:42 AM, Yuri <[hidden email]> wrote:

Sure,

http://c-icap.sourceforge.net/

http://e-cap.org/

however remember: you still require to write required module by yourself. ;-)

05.07.2017 3:31, Muhammad Usman пишет:
Can you please recommend tools designed for this?

On Wed, Jul 5, 2017 at 2:27 AM, Yuri <[hidden email]> wrote:

This is a solution, too. But more better to do this with specific tool, designed for this tasks exactly.


05.07.2017 3:24, Muhammad Usman пишет:
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. 
The only part pending is to send IP & other information as parameter.

<script type="text/javascript" apmac="11-22-33-44-55-66" data-cusip="10.1.0.1" request="" src="http://mysite.com/js"></script>

On Wed, Jul 5, 2017 at 2:17 AM, Yuri <[hidden email]> wrote:



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 <[hidden email]> 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 <[hidden email]> 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 - ORIGINAL_DST/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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users












_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get calling User Details on server

babajaga
This post has NOT been accepted by the mailing list yet.
In reply to this post by Muhammad Usman
>I don't know any ready-to-use and free solution to inject ads<
I developed a ready-to-use non-free solution to inject ads, several years ago already. Feel free to contact me for details.
Loading...