No description
This repository has been archived on 2025-06-03. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
2025-04-12 08:40:27 +02:00
nginx Update nginx/nginx.conf 2025-04-04 07:48:48 +02:00
smart-ipv6-rotator@6c7286107b Initial commit 2025-03-25 17:25:31 +01:00
.gitmodules Initial commit 2025-03-25 17:25:31 +01:00
config.toml Revert to rotating token every 5 minutes 2025-04-10 17:37:58 +02:00
docker-compose.yml Update docker-compose.yml 2025-04-10 17:52:25 +02:00
README.md Restart every hour 2025-04-10 18:29:33 +02:00
reset.sh Update reset.sh 2025-04-12 08:40:27 +02:00

  1. git clone --recursive
  2. Replace IP addresses in docker-compose.yml:
    • Search and replace 203.0.113.1 with the IPv4 address you want nginx to listen on
    • Search and replace 2001:db8::1 with the IPv6 address you want nginx to listen on
    • You can remove lines with either if you don't want to listen on IPv4 or IPv6
  3. How do you want to connect to YouTube?
    • If you want to rotate IPv6, replace the subnet in reset.sh
      • This rotates your ipv6 to bypass ratelimits. It's only effective with subnets larger than /64, the larger the better.
      • Replace 2001:db8::/32 with your subnet.
      • Uncomment the two lines of course
      • You must also install pyroute2. It's on pypi or apt install python3-pyroute2 on debian
    • If you want to use gluetun, uncomment everything below gluetun: and the two lines network_mode and depends_on
      • By default uses WireGuard config in wg0.conf in base directory
    • If something else, you should know what you're doing
  4. Set the companion secret key in config.toml
  5. cd to nginx/ and:
    • openssl dhparam -out dhparam.pem 3072 (takes up to a few minutes, you can do other steps in the meantime)
    • openssl req -new -x509 -days 365 -noenc -out snakeoil.pem -keyout snakeoil.key (keep pressing Enter)
    • If opted in to gluetun, search and replace companion with gluetun in conf.d/companion.conf
  6. cd back and ./reset.sh
  7. Issue a certificate, steps here
  8. Schedule reset.sh. This rotates your IP, updates containers, and it's generally a good practice to auto restart.
    This restarts every hour:00. You can change it, if you want to. / If you have multiple companions, you should make them restart at different times.
    @reboot sleep 30s && cd /opt/invidious-companion && ./reset.sh
    0 * * * * cd /opt/invidious-companion && ./reset.sh
    

TODOs:

  • Automate all (well, almost) above
  • reset.sh only when companion up, currently it brings up no matter what