From: SourceForge.net <no...@so...> - 2013-01-24 16:32:26
|
Actionsfile feedback item #3601646, was opened at 2013-01-21 08:07 Message generated for change (Comment added) made by fabiankeil You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=460288&aid=3601646&group_id=11118 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: filter: other problem Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: m.ardito (m_ardito) Assigned to: Fabian Keil (fabiankeil) Summary: how to allow googleadservices from selected sites? Initial Comment: how to allow googleadservices from selected sites? hi i just want a favourite free software site heidisql.com to show its googleadservices ads (in the site's header) but my privoxy 3.0.19 is blocking it i tried adding ".heidisql.com" and ".googleadservices.com" under allow-ads alias, and under a few others but can't make it work... what is wrong? can't figure out ---------------------------------------------------------------------- >Comment By: Fabian Keil (fabiankeil) Date: 2013-01-24 08:32 Message: You are using "/" as delimiter in your pcrs command, but don't escape it in places where it refers to the character. $1 refers to the first character group, but you don't use any parentheses to group characters. Try something like this instead: s@googlesyndication\.com/@$0PRIVOXY-FORCE/@g Using @ as delimiter make it unnecessary to escape slashes. $0 refers to the whole text that is matched. The idea isn't to have Privoxy modify the URL in the GET request, but to modify the URL on the page where you want to allow the ads, so the browser itself sends the modified URL. ---------------------------------------------------------------------- Comment By: m.ardito (m_ardito) Date: 2013-01-23 06:14 Message: here are the steps that i think to follow, am i in the right direction? i am using firebug to see ulrs and requests. 1) i created a user.filter "allowgooglesyndication" which (tries to) replaces "http://pagead2.googlesyndication.com/pagead/show_ads.js" in the GET request with "http://pagead2.googlesyndication.com/PRIVOXY-FORCE/pagead/show_ads.js" i am using the "regex coach" program to check my regexp, this seems to work,here, s/.*googlesyndication\.com/$1"/PRIVOXY-FORCE"/sg but i have no exerience with substitutions patterns... and i don't know if it is valid for privoxy... 2) create a user.action that enforce that filter for ".heidisql.com" domain, like { +filter{allowgooglesyndication} } .heidisql.com 3) i don't really understand if this setup will work because i feel like privoxy applies that filter only to GET requests related to .heidisql.com, as i see in http://config.privoxy.org/show-url-info?url=www.heidisql.com that the filter is picked up by the action, but i am missing how tat request can catch the googlesyndication pattern..?!? is there any kind of similar example i can learn from? Thanks, Marco ---------------------------------------------------------------------- Comment By: m.ardito (m_ardito) Date: 2013-01-23 04:46 Message: you're right it was that domain, i can't figure out why i tried with that domain... i will try the first method you suggest, because there are a bunch of project i really wish to support in this way, i'll report here if i succeeed or not... :-) thanks. ---------------------------------------------------------------------- Comment By: Fabian Keil (fabiankeil) Date: 2013-01-22 05:37 Message: Looks like www.heidisql.com is using the URL http://pagead2.googlesyndication.com/pagead/show_ads.js so I'm not sure why you tried unblocking .googleadservices.com. To only unblock the URL when it is used on www.heidisql.com, you could use a filter to insert a force prefix into the path. The default force prefix is "/PRIVOXY-FORCE" and you can check it at http://config.privoxy.org/show-status. Obviously this only works if you are not enforcing blocks: http://config.privoxy.org/user-manual/config.html#ENFORCE-BLOCKS You could also tag the requests with the Referer header and use the tag to unblock the requests, but it's a bit more work and will only work if your browser is sending the Referer header. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=460288&aid=3601646&group_id=11118 |