←back to thread

246 points nh2 | 1 comments | | HN request time: 1.016s | source
Show context
bluGill ◴[] No.41913725[source]
Looks good, but I want to MitM my network. I want youtube.com to redirect to my internal server that only has a few approved videos. My kids do some nice piano lessons from youtube, but every time I let them they wait until I'm out of the room and then switch to something else. There are lots of other great educational videos on youtube, but also plenty to waste their time on. (I want this myself as well since I won't have ads on my internal youtube server - plus it will add an extra step and thus keep me from getting distracted to something that isn't a good use of my time to watch))
replies(3): >>41914060 #>>41914606 #>>41916523 #
lenova ◴[] No.41916523[source]
Out of curiosity, which software/app are you using to MitM on your home network?
replies(1): >>41917485 #
bluGill ◴[] No.41917485[source]
Currently I'm not. I would like to, but I'm not sure how to make it work. If I have a youtube video that I downloaded, I can make youtube.com point to my own web server, but everything after the domain needs to point to the correct things to make it play and I'm not sure how to do that (I also haven't looked).
replies(1): >>41917689 #
ndriscoll ◴[] No.41917689[source]
You'll probably have an easier time blocking youtube (or the Internet in general) on the devices in question and running something like Jellyfin locally to serve your library.
replies(1): >>41918045 #
bluGill ◴[] No.41918045[source]
The hard part is my kids' online piano lesson embeds youtube videos for the lesson. they have enough other content that I paid for an account for my kids, but the videos direct to youtube not someplace they host which means I can't block any of youtube. This is a common way to do things - my kid's school often sends them to some youtube video for some lesson.

Of course once you finish one youtube video it switches to a "you might want to watch next" which is not the educational content I want them on.

replies(1): >>41919908 #
1. ndriscoll ◴[] No.41919908[source]
If you control the client (e.g. you can use librewolf), then you could do something like this greasemonkey script to rewrite youtube iframes into a locally hosted video file with the same name as the youtube video id:

https://gist.github.com/ndriscoll/2f1c98a125c0d4a4f6f993e077...

The event listener might have an annoying perf impact, and if the sites with the embed don't use javascript to build the page, you might be able to leave it off.