No description
nginx | ||
smart-ipv6-rotator@6c7286107b | ||
.gitmodules | ||
config.toml | ||
docker-compose.yml | ||
README.md | ||
reset.sh |
git clone --recursive
- 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
- Search and replace
- 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 orapt install python3-pyroute2
on debian
- If you want to use gluetun, uncomment everything below
gluetun:
and the two linesnetwork_mode
anddepends_on
- By default uses WireGuard config in
wg0.conf
in base directory
- By default uses WireGuard config in
- If something else, you should know what you're doing
- If you want to rotate IPv6, replace the subnet in
- Set the companion secret key in
config.toml
- 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
withgluetun
inconf.d/companion.conf
./reset.sh
- Issue a certificate, steps here
- Schedule
reset.sh
. This rotates your IP, updates containers, and it's generally a good practice to auto restart.
If you have multiple companions, you should make them restart at different minutes. Like if you have0
here you should have30
elsewhere.
This restarts every 3 hours (*/3
). If you have a dirtier IP, it'll probably too infrequently for you.@reboot sleep 30s && cd /opt/invidious-companion && ./reset.sh 0 */3 * * * 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