Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Unable to block websockets #956
(ublock origin 1.3.3, chrome 46.0.2490.86, custom blocklists, otherwise default settings)
Hi. I'm trying to craft a rule to block a websocket connection. I don't appear to be able to do so.
I have also tried removing that line from the default whitelist, and it still fails to block the connection.
I enabled advanced user mode, which also did not appear to help.
There is an advert network (rev defender) which uses this technique. When the other ads on the page fail to display (as they are wont to do), it forms a websocket connection, over which it delivers the ads as a data: url to be written into the page. Blocking websockets generally (see above), and the domain the connection is made to, does not appear to work.
For a good example of this behavior, try any page on
Is there any guidance you can provide, or are we SOL for blocking this technique?
@dungsaga Code generation (by which I mean running code without the context in which it was defined, eg. through stringification) can yield significant speed benefits in JS in some cases, although it's definitely something you'd have to measure on a per-case basis.
Other performance-critical libraries like Bluebird do something similar.
added a commit
Apr 26, 2016
pushed a commit
Mar 2, 2017
FYI, this has been fixed starting in Chrome 58: https://bugs.chromium.org/p/chromium/issues/detail?id=129353#c87