this post was submitted on 29 Oct 2023
3 points (100.0% liked)

Self-Hosted Main

515 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

Hi all,

I'm using viewtube for 3 days, and I love it.

My next step is migrate all request to that service, I test the video/playlist url os the same, and I use pi-hole as my local dns server.

Is possible to rewrite the domain on pi-hole? like any request to YouTube.com/watch?v=v43DXkj5b0I to mydomain.com/watch?v=v43DXkj5b0I ?

I was reading pi-hole docs and I can't find anything useful for this feature.

Thank you.

top 13 comments
sorted by: hot top controversial new old
[–] pentesticals@alien.top 1 points 1 year ago (1 children)

Not really, you can use DNS to point YouTube.com to an iP you control, but the problem is that you will get TLS issues. It won’t redirect the hostname, but just the IP address. You could use a custom CA and sign YouTube.com certificates, but you will likely still have problems if you use Chrome because they will be pinning certificates for Google services, and your mobile applications will also pin the certs so your mobile YouTube will stop working completely.

[–] dotinho@alien.top 1 points 1 year ago

Ok, I see my idea will give me too much trouble.

[–] leewhat@alien.top 1 points 1 year ago (1 children)
[–] dotinho@alien.top 1 points 1 year ago

I’ll check that.

[–] tubbana@alien.top 1 points 1 year ago

Is using viewtube constant fighting with google? It breaks, gets updated and fixed, it breaks again, gets updated and fixed eventually, it breaks...?

[–] rasg@alien.top 1 points 1 year ago (2 children)

i have something similar with another service.

  1. local DNS (dnsmasq) to redirect requests (officialservice.com -> localservice.local)
  2. localservice.local is my apache proxy setting headers and opening all http requests to replace the links inside the page

quick example

ProxyHTMLEnable     on

[...]

ProxyHTMLURLMap     /aaa    /bbb/ccc

[...]

AddOutputFilterByType INFLATE;SUBSTITUTE;DEFLATE application/x-javascript
Substitute 's|/service/aaa/|/service/bbb/|nq' Substitute 's|/domain/res/|/anotherdomain/res/|nq'
[–] ProgrammerPlus@alien.top 1 points 1 year ago

Why not use SNIProxy?

[–] krogaw@alien.top 1 points 1 year ago

Don't forget to Import your own CA into every device or you will get ssl/tls errors. And good luck to import it into devices like a chromecast...

[–] Cirx0808@alien.top 1 points 1 year ago

I would set up an Nginx container to forward all request to youtube.com to your ViewTube container. Then in PiHole set the A record for youtube.com to be your Nginx container.

[–] utopiah@alien.top 1 points 1 year ago

I'm using Vimperator so I made an autocmd to redirect all such content to https://github.com/user234683/youtube-local

If you don't use Vimperator I recommend checking it or any other tool that allow you to get more control of your browser, especially if, like me, you spend most of your day in it, not on your desktop.

[–] lilolalu@alien.top 1 points 1 year ago

No, pihole won't help you there because what you want is nothing a DNS can do, you need a proxy server to handle that. How this works depends on the proxy server you are going to use.

[–] lilolalu@alien.top 1 points 1 year ago (1 children)

.. but why don't you just use vidious and clipious as a client? They even have an Android tv Client. Is there anything that "Viewtube" does better?

[–] dotinho@alien.top 1 points 1 year ago

Ok, I will look into that also.