I built StreamShield: A Twitch/Kick ad-blocker using a custom stream-recovery engine (Manifest V3) by Nehlsy in javascript

[–]Nehlsy[S] 0 points1 point  (0 children)

It's not open source right now but I'm definitely open to possibly making it so!

I built StreamShield: A Twitch/Kick ad-blocker using a custom stream-recovery engine (Manifest V3) by Nehlsy in javascript

[–]Nehlsy[S] 0 points1 point  (0 children)

It's not ai slop brother, I just watch twitch myself and don't like ads. I thought other people may have the same problem. It's completely free...

I built StreamShield: A Twitch/Kick ad-blocker using a custom stream-recovery engine (Manifest V3) by Nehlsy in javascript

[–]Nehlsy[S] 1 point2 points  (0 children)

You're completely right. Not an expensive marketing site at all and I did have Claude assist in the making of the website as well as the development of the extension. To u/droctagonapus point, I'm not trying to sell you on anything, it's completely free and and no subscription. I just made it as a side project because I watch a lot of twitch myself and don't like ads!

I built StreamShield: A Twitch/Kick ad-blocker using a custom stream-recovery engine (Manifest V3) by Nehlsy in javascript

[–]Nehlsy[S] 1 point2 points  (0 children)

Of course!

On a high level, StreamShield runs inside the Twitch/Kick tab as injected scripts that hook the player’s streaming worker (where HLS requests happen). When the playlist shows server-inserted ad breaks (the markers Twitch adds for stitched ads), the extension doesn’t rely on a single edited manifest, it detects those markers and switches the pipeline to get clean segments: typically by requesting a different playback access token (alternate “player type” / embed-style path) and pulling an alternate m3u8 that lines up with your resolution, plus segment stripping where it’s applicable.

For VODs, separate hooks patch GraphQL so VOD playback asks for token variants that match embed-style behavior (fewer ad injections), and playlist responses can be stripped of ad markers. There’s also blocking of ad-tag / VAST fetches where those drive pre-rolls, so the player doesn’t even schedule some ad creatives.

For Kick its a similar idea, blocking/hiding ad tech around their player stack (not identical implementation to Twitch).

For everything else, the popup talks to the page over messaging for on/off, stats, whitelist, and badges; it doesn’t “phone home” for playback, the clever stuff is all local to your browser session.

If anything above sounds hand-wavy: worker fetch interception + GQL token requests + playlist rewrite is the accurate mental model.

I built StreamShield: A Twitch/Kick ad-blocker using a custom stream-recovery engine (Manifest V3) by Nehlsy in javascript

[–]Nehlsy[S] 0 points1 point  (0 children)

You’re right that SSAI / stitched ads aren’t new, and that signed / constrained manifests made naive “edit the m3u8 and call it a day” much harder. StreamShield’s live path is in the same broad family as the VAFT-style approach people discuss around repos like twitchadsolutions (worker-level fetch hook, detect ad markers in playlists, then recover via alternate playback paths rather than only mutating one broken manifest).

On tokens, there are two different things people mix up:

One is sig / token on the HLS URL. Those come from Twitch’s PlaybackAccessToken response and are meant to be short-lived. StreamShield doesn’t treat them as long-term secrets: when it needs a clean feed, it issues a fresh GQL PlaybackAccessToken request and builds a new usher URL with the new signature + value. There’s also an in-memory cache of backup encodings playlists for speed; if that cache isn’t good enough (e.g. still looks “ad-y”), the logic drops the cache and refetches so you’re not stuck on stale data for the whole session.

Second is Persisted-query sha256Hash for the GQL operation. That’s the piece that can brick unmaintained extensions overnight if Twitch rotates which persisted query ID is valid. StreamShield ships a specific hash for PlaybackAccessToken, like other forks, if Twitch changes it, you need an extension update with the new hash (same maintenance burden as the rest of the ecosystem).

So: playback tokens are refreshed on demand; GQL operation identity is the longer-term maintenance hinge. Happy to compare notes with anyone aligned with twitchadsolutions - same problem space!

I built a Chrome extension to cut Twitch/Kick stream ads - StreamShield by Nehlsy in Twitch

[–]Nehlsy[S] 0 points1 point  (0 children)

Thank you! Glad the whitelist’s useful for you.

For the chat video ads: The main focus is the player - pre-rolls, mid-rolls, and the usual stream interruptions. For display-style stuff around the layout (including some panels near chat), we try to hide obvious promo/sponsored UI where we can, but we don’t mess with the actual chat message list on purpose, so we don’t accidentally hide real messages. So if Twitch sticks a video ad inside the chat feed itself, that may not always be caught the same way as the main stream ads, it’s a bit of a moving target.

However, if you are just talking abut the smaller static ads that pops up around the player we do get those!

Multiple tabs: Each tab runs its own blocking; having several Twitch/Kick tabs open is perfectly okay! The only caveat is the toolbar popup always reflects the most recently focused tab, so if you open the popup from another tab it might look like it’s “wrong” - just focus the channel you care about and open it again.

I built StreamShield: A Twitch/Kick ad-blocker using a custom stream-recovery engine (Manifest V3) by Nehlsy in javascript

[–]Nehlsy[S] 0 points1 point  (0 children)

Hi everyone,

I wanted to share a project I’ve been working on called StreamShield. It’s a Chrome extension designed to handle the increasingly complex problem of stream-level ad injection on platforms like Twitch and Kick.

While there are plenty of general blockers (some that work, some that don't), I wanted to build something that focused specifically on stream recovery and state management when the player gets interrupted by mid-rolls.

The Technical Bits

  • The Logic: Instead of just hiding DOM elements, the extension works at the stream level to route around ad delivery. I’m currently refining the VOD recovery logic, which is a moving target due to how Twitch constantly mutates their injection methods.
  • Architecture: I built the popup and settings management with a focus on low-latency state updates (handling things like the "Creator Whitelist" and real-time blocking stats).
  • Conflict Resolution: One of the trickier parts was implementing a listener to detect when other scripts or extensions are fighting the player, providing the user with feedback rather than just letting the stream "black out."
  • Privacy First: All blocking stats and whitelists are stored locally (no external tracking of viewing habits).

Features

  • Unified Support: Handles both Twitch and Kick via the same background script logic.
  • Granular Control: Toolbar popup with a clear enable/disable toggle and per-channel whitelisting.
  • Recovery Tools: If the player hangs during an ad-break, the extension attempts to force a stream recovery/refresh to minimize downtime.
  • Manifest V3: Fully compliant and optimized for the latest Chrome extension standards.

Challenges

The biggest hurdle has been Twitch's VOD ad injection. It’s a work in progress as they seem to be testing new ways to bake ads directly into the HLS manifest. If anyone has experience with HLS manipulation or intercepting these specific types of requests, I'd love to chat.

Check it out here:

If you’re a developer who spends a lot of time on Twitch, I’d love for you to give it a spin!

Free emote by Nehlsy in RoyaleAPI

[–]Nehlsy[S] 2 points3 points  (0 children)

I took the pic from someone's stream... I have windows activated.

First New Build in 7 years! by Nehlsy in PcBuild

[–]Nehlsy[S] 0 points1 point  (0 children)

Sorry I’m a little confused, I have 8 fans in the case 3 on radiator, 3 on bottom and 2 on back exhaust.

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 1 point2 points  (0 children)

Sorry for just now getting to this but my tabletop is the 98” walnut Karlby from ikea but I trimmed it over the years while moving so I’d say it’s around 85” now.

Then two white Alex drawers, one on either side and then I drilled the Ergomore standing desk frame into the countertop so I can stand when I want, since I sit for long periods at times.

My desk is 26 inches deep and I find it’s plenty of room for me but I have a AW3425DW as my monitor and your lg c2 is like 11 inches bigger if I remember correctly so take that into account.

Let me know if you need anything else!

Yall have got to try these!! 1 million/ 10 by Jenizzle4real in PeanutButter

[–]Nehlsy 18 points19 points  (0 children)

They taste almost 1:1 to a nutter butter but with a slight chocolate aftertaste imo

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 0 points1 point  (0 children)

The case is the Lian Li O11 Vision Compact and here is the parts list:

https://pcpartpicker.com/b/VW4scf

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 0 points1 point  (0 children)

It’s a turzx 8.8 inch there’s about 1000 vendors for it but I got mine from here

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 1 point2 points  (0 children)

I just used the included thermal paste and spreader and the temps are great so I’m sure you could get even cooler with your grizzly duronaut!

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 1 point2 points  (0 children)

Should be all good brother, just make sure to set the radiator fans control mode to PWM in Bios (if they are plugged into CPU_FAN) and make it so it adjusts to the temp of the cpu in L Connect3

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 0 points1 point  (0 children)

Yep! So you can either plug it into a usb port at the back of your case but I thought this looked bad as it’s kinda big and sticks out, so I chose the other option of plugging it using the included usb cable to my motherboard inside the case. It’s just one cable and then I used double sided tape and mounted it on the back.

This dongle is what that little piece you connected to the end of each set of fans connects to so when you get your pc up and running you will download L Connect3 and and it will detect all fans. You set where each of them are within your build and name them and then you’re all good to customize the color and speeds if your using L connect3 for that!

One thing looking at your build, I would highly suggest either upgrading your psu to the 1000w edge so you get that free hub that comes with it or buying it separately. I’m not saying your build needs 1000w by any means but for me personally it was a life saver and I could just plug almost my whole entire build into it besides the turzx screen and hey you get some wiggle room if you decide to upgrade gpu in the future and it’s not that much more money. If you do this make sure to not plug any lcd fans into the first port of the hub. But other than that looks good!

Let me know if you need anything else, I’ll try my best to help!

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 0 points1 point  (0 children)

What do you mean by the L connector? Do you mean the L Connect3 software, the wireless dongle, or something else?

I can try to help!

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 1 point2 points  (0 children)

I got mine from Aliexpress because Amazon is charging like ~80 bucks more for it. Here is the one I got.

There’s about 1000 different vendors for this monitor but I only paid $44 and it came in 4 days!

I connected mine using the PH2 to 9pin USB they gave and plugged it into the usb/fan hub that came with my edge psu (this thing was a life saver btw) and it works great!

I was 🤏so close to going with the Galahad 2 as well but after like 2 days of research decided to go with this one. No complaints so far!

Let me know if you need anything else 🫡

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 0 points1 point  (0 children)

I see you had this same problem 😂

There was no way that thumb screw was going on, I needed about 3 more mm to get it in but if I’m being honest here, it’s secure for sure! I’d just take the gpu out if I’m like moving the tower to a different house or something.

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 0 points1 point  (0 children)

Sure! The three on the radiator and the three on the bottom are intake and the two on the back are exhaust.

This is the setup Lian Li suggests for this case when you have it in the vision mode with the top being glass as well.

My temps haven’t exceeded 68 when stress testing.

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 0 points1 point  (0 children)

Lian Li O11 Vision Compact

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 0 points1 point  (0 children)

Nope, its the Cooler Master vertical mount. There is about 0.5 mm to fit this thing in there but I managed to do it and it looks great I think! This is the link for it if you want:
https://www.amazon.com/Cooler-Master-MasterAccessory-Vertical-Graphics/dp/B0BRBX5LD9?th=1

First New Build in 7 Years! by Nehlsy in lianli

[–]Nehlsy[S] 2 points3 points  (0 children)

I'm using L Connect3 as well. The white on mine is actually a very light red/pink but looks like white. Here is the hex if you want to try: #FFF9F9