Live data from Hacker News

Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

ericdraken.com

541–550 of 659 posts

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#541

Earlier quoted context omitted.

yes, absolutely, but only inasmuch as it only decreases their producer surplus so it doesn't actually cost them anything. If the monopolist allowed competition, then I'd evaluate and choose, but I don't have that choice till then.

You could choose to not use YouTube out of principle. Besides these days it's barely a monopoly with TikTok.

"you can believe in the benefits of law and order, and just walk away any time you encounter a thief who doesn't". Yes, or I can steal my stuff back which gives me pleasure.

"anyway, you can switch from the high end monopolist to the low brow monopolist so I don't see what you're complaining about" Yes, you don't.

the right to wear hair-shirts is not the only principle that counts.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#542
post #380

Earlier quoted context omitted.

I second the recommendation for SponsorBlock! You've saved people from 10,945 segments ( 2d 17h 9.6 minutes of their lives ) You've skipped 4,006 segments ( 1d 9h 11.8 minutes )

It doesn’t help on TV/mobile though, right? I do appreciate that a lot of creators have been putting the “progress bar” during the sponsored segment that make them easier to skip

There’s a reason your TV’s manufacturer doesn’t allow you to install browser addons (or for that matter any software that you really control) on your TV.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#543
post #28

This reminds me of a now-dockerized Privaxy, which is a UBlock-origin blocklist compatible MITM proxy. It’s crazy to see how many ads and tracking scripts are on smart products, especially my TV where so far in my testing it’s over 40% unnecessary traffic. Its been pretty fun to try and strip out ads on my smart-tv apps. https://github.com/deetungsten/webui-privaxy is the dockerized fork of https://github.com/Barre/p…

It took me entirely too long to understand that a dockerized fork meant that the gui has been replaced with a web gui.

Fwiw I’m familiar with docker and I certainly wouldn’t have understood it that way if you hadn’t said so. I wonder why they can’t just upstream the web gui either in addition or instead of the existing one.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#544
post #491

Earlier quoted context omitted.

Brilliant response and observations. I’m not sure I’d agree with this one tiny assertion though: “1.87MB is not that big“ I have lived in rural communities most of my life and unless I’m on my own Wi-Fi, this actually is a big file to download. Maybe they have a workaround for mobile? Mostly I just want to add that rural Wi-Fi still struggles with Web 2.0 architecture. More often we’re operating on 2-4G speeds. Altho…

If you struggle with 2MB payload, how do you expect to stream video, which is usually hundreds of megabytes? You’re right about 2MB being a large payload in some network configurations, but I think it isn’t that big in Youtube’s context.

I'm also in the rural 'my ISP is a WIFI ISP' boat.. I pay for 10/2! While they do burst its not uncommon for my speeds to dip down into single digits. Sometimes I have to tune my video streams down as low as they'll go. Packet latency can frequently be so bad that playing online games is VERY DIFFICULT so I mostly play single player, downloads of new games often take 24 hours+.

My ISP when I talk to them about their speed issues "Well, 7mbps is all you need to stream Hulu", which is.. a terrible response. Want to do something else while streaming? What if _two_ people want to stream? What if I want to stream a video while my partner is playing a game online?

Ads are simply a _HUGE WASTE_ of my bandwidth, so I filter as much as I can.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#545
post #529

Earlier quoted context omitted.

> If a weak Android phone is only able to decode 50Mb/s of TLS traffic That's a lower, not an upper bound. An RPi 4 can encrypt/decrypt AES-256-GCM at more than 300 Mbit/s, according to my rough measurements. That's per core, of which it has four. RSA can be much more expensive, but that's besides the point – the author was claiming that AES-NI makes a meaningful difference here, which I'd really doubt even in the ca…

> That's per core, of which it has four. Which only matters for multiple concurrent connections... a single download would still be a sequential task on a single core at 300Mb/s, which I would find to be an unacceptable bottleneck on my gigabit connection. In reality, it would probably only be 300Mb/s for up to 2 connections, since it needs to both decrypt and reencrypt, which could be parallelized onto 2 cores, othe…

A few points...

If you've got a Raspberry Pi 4 as your proxy, aren't you already struggling to pump more than 600Mbps over your network? Even if so, are you really pulling down more than 300Mb/s over a single TLS connection?

Even in that scenario, AES encryption/decryption can be parallelized (https://github.com/gurupunskill/parallel-aes).

To me, it seems like a pretty narrow set of scenarios where you'd not have the processing power to decrypt/encrypt at the speed of your network.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#546

Earlier quoted context omitted.

I think you're underestimating the CPU requirements. If a weak Android phone is only able to decode 50Mb/s of TLS traffic, that's not a big problem in practice. It's a slow phone, usually connected to slow networks. On the other hand, if you have a gigabit internet connection at home and it is being bottlenecked to 50Mb/s by that weak device sitting between all of your computers and the internet, then that is a big p…

The author also seemed to think parsing a <2MB protobuf was CPU intensive. Even for a cheap embedded network device, you'll never convince me that is true.

But... can you do it at 1Gbps on a single core of a Raspberry Pi? You have to both parse and then reencode it. 1000Mbps = 125MBps. 125MBps/(2MB/message) = 62 messages per second.

62 messages per second means that you have 16ms to do 5 things: decrypt the TLS, parse the protobuf message, filter the message, encode the protobuf message, encrypt the TLS traffic. If you take more than 16ms, you cannot achieve 1Gbps.

We've already established[0] that you can't even hit 1Gbps with just the TLS traffic. The protobuf messages might be fast to parse... but they will still slow things down even further.

[0]: https://news.ycombinator.com/item?id=37284909

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#547

Earlier quoted context omitted.

Brilliant response and observations. I’m not sure I’d agree with this one tiny assertion though: “1.87MB is not that big“ I have lived in rural communities most of my life and unless I’m on my own Wi-Fi, this actually is a big file to download. Maybe they have a workaround for mobile? Mostly I just want to add that rural Wi-Fi still struggles with Web 2.0 architecture. More often we’re operating on 2-4G speeds. Altho…

It's a little weird on HN to see someone refer to "rural wifi". Unless you're talking about a relatively rare form of mesh networking, there's not really any such thing as rural wifi, at least not in the sense that its different from any other kind of wifi - a very local RF network designed to share an access point. I assume you're using wifi as a stand-in for "internet" or "broadband". 4G speeds are completely fine…

> Unless you're talking about a relatively rare form of mesh networking

It’s not rare. Ubiquiti is very popular for setting up point to point links getting a single internet connection shared amongst a bunch of rural homes.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#548
post #28

This reminds me of a now-dockerized Privaxy, which is a UBlock-origin blocklist compatible MITM proxy. It’s crazy to see how many ads and tracking scripts are on smart products, especially my TV where so far in my testing it’s over 40% unnecessary traffic. Its been pretty fun to try and strip out ads on my smart-tv apps. https://github.com/deetungsten/webui-privaxy is the dockerized fork of https://github.com/Barre/p…

How do you get your TV to trust the self signed cert?

I have asked this question repeatedly every time someone mentions inspecting TV meteor requests via a LAN proxy and never received a satisfactory answer..

If there are known exploits for the TV (a bunch are now running old and unpatched Android), the answer is easy enough (root it and do what you want - though that opens different and maybe easier options for ad stripping), but I’ve heard of it on Apple TV where jailbreaking isn’t so easy. Perhaps MDM deployments?

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#549

Earlier quoted context omitted.

> That's per core, of which it has four. Which only matters for multiple concurrent connections... a single download would still be a sequential task on a single core at 300Mb/s, which I would find to be an unacceptable bottleneck on my gigabit connection. In reality, it would probably only be 300Mb/s for up to 2 connections, since it needs to both decrypt and reencrypt, which could be parallelized onto 2 cores, othe…

A few points... If you've got a Raspberry Pi 4 as your proxy, aren't you already struggling to pump more than 600Mbps over your network? Even if so, are you really pulling down more than 300Mb/s over a single TLS connection? Even in that scenario, AES encryption/decryption can be parallelized ( https://github.com/gurupunskill/parallel-aes ). To me, it seems like a pretty narrow set of scenarios where you'd not have t…

> If you've got a Raspberry Pi 4 as your proxy, aren't you already struggling to pump more than 600Mbps over your network?

The Pi 4 is capable of a full gigabit connection, unlike previous Raspberry Pis. So, no, not fundamentally.

> To me, it seems like a pretty narrow set of scenarios where you'd not have the processing power to decrypt/encrypt at the speed of your network.

The whole scenario was set up by the comment at the top of this thread: "I'd be really surprised if MITMing TLS on an RPi 4 was actually infeasible, even when using RSA cryptography purely in software."[0]

I consider it "infeasible" if it is a significant bottleneck on the network. It could be infeasible for multiple reasons, as you're alluding to, but that only strengthens my argument.

> Even in that scenario, AES encryption/decryption can be parallelized

An AES implementation that no one uses is not a very compelling argument, except as a hypothetical. Do trusted AES implementations do the encryption in parallel? That's all that matters, IMO.

[0]: https://news.ycombinator.com/item?id=37282322

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#550
post #529

Earlier quoted context omitted.

I think you're underestimating the CPU requirements. If a weak Android phone is only able to decode 50Mb/s of TLS traffic, that's not a big problem in practice. It's a slow phone, usually connected to slow networks. On the other hand, if you have a gigabit internet connection at home and it is being bottlenecked to 50Mb/s by that weak device sitting between all of your computers and the internet, then that is a big p…

> If a weak Android phone is only able to decode 50Mb/s of TLS traffic That's a lower, not an upper bound. An RPi 4 can encrypt/decrypt AES-256-GCM at more than 300 Mbit/s, according to my rough measurements. That's per core, of which it has four. RSA can be much more expensive, but that's besides the point – the author was claiming that AES-NI makes a meaningful difference here, which I'd really doubt even in the ca…

> An RPi 4 can encrypt/decrypt AES-256-GCM at more than 300 Mbit/s, according to my rough measurements. That's per core, of which it has four.

But the bottleneck is usually in terminating and establishing SSL connections?

Post reply on HN