GNOME Bugzilla – Bug 776682
Use EphyDownload to download adblock filters
Last modified: 2018-03-25 21:02:57 UTC
Hello. I have epiphany without xwayland, all very good youtube with alsa, fast, proxy with ~/.bashrc all work and gj very big thanks, but i dont can use adblock. i am use mini.iso ubuntu. install weston, gedit, epiphany,gnome-terminal without dependence. when i am want include sound iam install gstreamer-good,base,alsa and i am get sound with mp3 and video html5. my test html5 now YOUR BROWSER SCORES 386 OUT OF 555 POINTS but no work adblock, i think need webkit package, but i dont know how package me need for mini.iso. i remove .config/epiphany/adblock folder and start epiphany, and see new .config/epiphany/adblock but if i am add .config/epiphany/adblock/filters.list a no get 32 hex chars file and adblock no work. say pls how package need install to epiphany and adblock begin work? thanks.
It should work automatically. Could you open the Preferences window and confirm that Allow advertisements is *not* checked? Also, please open the About dialog and tell me the exact version number of Epiphany that you see there, since this code has changed a lot recently.
$ epiphany-browser --version Веб-браузер 3.22.4 no dialog no supported action yes setting no actuality enable adds no check
OK, so the setting is disabled, but there is no file with a 32-character name created under ~/.config/epiphany/adblock? Note: it might miss country-specific ads as it is not currently smart enough to subscribe to country-specific filters, so test on some US site like cnn.com.
Are you able to ping EasyList? $ ping -c1 easylist-downloads.adblockplus.org
thanks ping -c1 easylist-downloads.adblockplus.org PING easylist-downloads.adblockplus.org (176.9.127.15) 56(84) bytes of data. ^C --- easylist-downloads.adblockplus.org ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms i have ufw farewall default deny and drop echo why no use 80 or 443 ports? and sry but i no know how enable ping my /etc/ufw/before.rule # nat Table rules *nat :POSTROUTING ACCEPT [0:0] # Forward traffic from eth1 through eth0. -A POSTROUTING -s 192.168.0.0/24 -o enp4s0 -j MASQUERADE # don't delete the 'COMMIT' line or these nat table rules won't be processed COMMIT # # rules.before # # Rules that should be run before the ufw command line added rules. Custom # rules should be added to one of these chains: # ufw-before-input # ufw-before-output # ufw-before-forward # # Don't delete these required lines, otherwise there will be errors *filter :ufw-before-input - [0:0] :ufw-before-output - [0:0] :ufw-before-forward - [0:0] :ufw-not-local - [0:0] # End required lines # allow all on loopback -A ufw-before-input -i lo -j ACCEPT -A ufw-before-output -o lo -j ACCEPT #for users -A ufw-before-output -m owner --uid-owner m -p all -j DROP #-A ufw-before-input -m owner --uid-owner m -p all -j DROP #-A ufw-before-forward -m owner --uid-owner m -p all -j DROP # quickly process packets for which we already have a connection -A ufw-before-input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A ufw-before-output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A ufw-before-forward -m conntrack --ctstate RELATED,ESTABLISHED -j DROP # drop INVALID packets (logs these in loglevel medium and higher) -A ufw-before-input -m conntrack --ctstate INVALID -j ufw-logging-deny -A ufw-before-input -m conntrack --ctstate INVALID -j DROP # ok icmp codes for INPUT -A ufw-before-input -p icmp --icmp-type destination-unreachable -j DROP -A ufw-before-input -p icmp --icmp-type source-quench -j DROP -A ufw-before-input -p icmp --icmp-type time-exceeded -j DROP -A ufw-before-input -p icmp --icmp-type parameter-problem -j DROP -A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT # ok icmp code for FORWARD -A ufw-before-forward -p icmp --icmp-type destination-unreachable -j DROP -A ufw-before-forward -p icmp --icmp-type source-quench -j DROP -A ufw-before-forward -p icmp --icmp-type time-exceeded -j DROP -A ufw-before-forward -p icmp --icmp-type parameter-problem -j DROP -A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT # allow dhcp client to work -A ufw-before-input -p udp --sport 67 --dport 68 -j DROP # # ufw-not-local # -A ufw-before-input -j ufw-not-local # if LOCAL, RETURN -A ufw-not-local -m addrtype --dst-type LOCAL -j DROP # if MULTICAST, RETURN -A ufw-not-local -m addrtype --dst-type MULTICAST -j DROP # if BROADCAST, RETURN -A ufw-not-local -m addrtype --dst-type BROADCAST -j DROP # all other non-local packets are dropped -A ufw-not-local -m limit --limit 3/min --limit-burst 10 -j ufw-logging-deny -A ufw-not-local -j DROP # allow MULTICAST mDNS for service discovery (be sure the MULTICAST line above # is uncommented) -A ufw-before-input -p udp -d 224.0.0.251 --dport 5353 -j DROP # allow MULTICAST UPnP for service discovery (be sure the MULTICAST line above # is uncommented) -A ufw-before-input -p udp -d 239.255.255.250 --dport 1900 -j DROP # don't delete the 'COMMIT' line or these rules won't be processed
(In reply to Michael Catanzaro from comment #3) > OK, so the setting is disabled, but there is no file with a 32-character > name created under ~/.config/epiphany/adblock? > > Note: it might miss country-specific ads as it is not currently smart enough > to subscribe to country-specific filters, so test on some US site like > cnn.com. yes i use proxy tor but adblock fiters site i have free connect my .config/epiphany/adblock/filters.list https://easylist-downloads.adblockplus.org/liste_fr+easylist.txt
without ping no can work? when i use chrome or ff i get adblock rules and update without ping.
I don't think ping should matter, I was just suggesting that as a way to test if you can connect to EasyList. I didn't anticipate that you would have firewall rules to block ICMP traffic. I don't know what's going wrong here, but it sounds like a problem with your network. Epiphany just downloads the filters from EasyList, that's all there is to it.
(In reply to Michael Catanzaro from comment #8) > I don't think ping should matter, I was just suggesting that as a way to > test if you can connect to EasyList. I didn't anticipate that you would have > firewall rules to block ICMP traffic. > > I don't know what's going wrong here, but it sounds like a problem with your > network. Epiphany just downloads the filters from EasyList, that's all there > is to it. i have perfect network all site, but in epiphany 3.22 from zesty repositories ubuntu not work adblock. i look repository precise ubuntu and see epiphany 3.4 but this package no work without xwayland. i run epiphany with xwayland but no work adblock also i no know what do and and dont know how look where bug and me n0 joy this suite. i like use epiphany without xwayland, i want remove xwayland from my system but i no can becouse alweys use adblock in other browser very many adds in net.
if run epiphany from terminal show it (WebKitWebProcess:5230): WARNING **: Error retrieving adblock filter: no supported
(In reply to what103 from comment #10) > if run epiphany from terminal show it > > (WebKitWebProcess:5230): WARNING **: Error retrieving adblock filter: no > supported Wow.... The filters are downloaded via g_file_copy() [1]. I guess g_file_copy() is returning G_IO_ERROR_NOT_SUPPORTED, which is documented as "Operation (or one of its parameters) not supported". So I think it means gvfs can't download http://. Let's find out; try running this command: gvfs-copy http://example.com ./test.html That should download example.com to the file ./test.html. If that doesn't work, then you at least have a simpler problem to solve. [1] https://git.gnome.org/browse/epiphany/tree/embed/web-extension/ephy-uri-tester.c?h=gnome-3-22#n116
very big thanks, you make understand me. yes gvfs-copy no suport my system, because gvfs not install, but i no want install because gvfs package need x11-common and x11-utils but this packages not install because i am use weston without xwayland and no have excess packages in my system. my system this epiphany, gedit, gnome-terminl, weston, alsa-utils, gstreamer with alsa end. only 584 packages ubuntu zesty mini.iso is my work system. because i no get adblock in epipany without gvfs no joy me sry.
i can have other alternativs without gvfs-copy in epiphany and get work adblock? thanks.
Nope... lots of GNOME apps depend on gvfs. You might want to file a new bug against gvfs about the X11 dependency.
(In reply to Michael Catanzaro from comment #14) > Nope... lots of GNOME apps depend on gvfs. You might want to file a new bug > against gvfs about the X11 dependency. and they say me what many app depnd gvfs have depend x11. okay i am understand. but very big thank for your reply. but i want know is realy best hack make supported adblock in epiphany with help gvfs-copy?
We could use an internal ephy-download for this, the same way it's used for other features like set image as bakcground. g_file_copy is very useful when you don't want to care about whether it's a local file or remote, but in this case we always know we are downloading the filters from HTTP.
okay reasonably, but i read forums about epiphany with this speach and many peoples want have make manual add rule in file adblock in epiphany. if we take chrome or ff and look ublock settings, we see what this app have this and user can add rule manual. why you no want give users this hack? is very difectly or for security no good? but you can add choice manualy or automatic.
now i do it. install xwayland and gvfs with all depend, login in weston with support xwayland in weston.ini, run epiphany, and get hex file ab filters, more i copy filter and hex files for backup other directory, remove gvfs with depend and xwayland. and i get work adblock rules in native wayland epiphany. ps but i think is no better what maby be. all very thanks for reply, but gvfs tools use for work ab is no better idea imha.
(In reply to what103 from comment #17) > okay reasonably, but i read forums about epiphany with this speach and many > peoples want have make manual add rule in file adblock in epiphany. if we > take chrome or ff and look ublock settings, we see what this app have this > and user can add rule manual. > > why you no want give users this hack? is very difectly or for security no > good? > > but you can add choice manualy or automatic. It's something we want to do, see bug #755193. (In reply to Carlos Garcia Campos from comment #16) > We could use an internal ephy-download for this, the same way it's used for > other features like set image as bakcground. g_file_copy is very useful when > you don't want to care about whether it's a local file or remote, but in > this case we always know we are downloading the filters from HTTP. That would be better, yes. That way the correctness does not depend on us never using WebKitProxyManager or something.
(Note: changing this requires adding a mechanism to indicate that an EphyDownload should never be displayed to the user in EphyDownloadsPopover.)
(In reply to Michael Catanzaro from comment #20) > (Note: changing this requires adding a mechanism to indicate that an > EphyDownload should never be displayed to the user in EphyDownloadsPopover.) chin-chin for progress! :)
(In reply to Michael Catanzaro from comment #20) > (Note: changing this requires adding a mechanism to indicate that an > EphyDownload should never be displayed to the user in EphyDownloadsPopover.) We already have that, or at least we used to.
Created attachment 344054 [details] [review] (Broken) use EphyDownload to download adblock filters Note: it's broken and creates only 0-byte files
Created attachment 344055 [details] [review] (Broken) use EphyDownload to download adblock filters Note: it's broken and creates only 0-byte files
is no fun. but epiphany good simple browser iam use it now. maby more gvfs remove depend x11-common and all stay very good.
very big thankyou :) i think very soon is patch be in ubuntu version. if epiphany more think about aspell depends for move in recomendad is very good. i not use aspell and check text and think what if very small depends is very good becouse for me is good.
oops, i not undertand word broken, but now know. i do all what can :)
now if add url filters in dconf-editor, then get hex files in .config/epiphany/adblock/ for every url from dconf-editor, but when start browser through terminal get this ** (epiphany:3882): WARNING **: Error retrieving filter https://easylist-downloads.adblockplus.org/antiadblockfilters.txt: Operation not supported
The following fix has been pushed: 6e9137f Use EphyDownload to download adblock filters
Created attachment 363649 [details] [review] Use EphyDownload to download adblock filters Instead of using gvfs. This means that the adblocker now works even if gvfsd-http is not running. In particular, it should now (hopefully) work under Flatpak.