The guides I found were more complicated than necessary, so I made this easy guide to youtube-dl via a remote server.
Square bracket are used to indicate placeholders like so: replace [port] by 12345
1. Set up a SSH connection:
ssh -ND [1023 < port < 65536)] [user]@[host]
Ex.: ssh -ND 54321 firstname.lastname@example.org
2. youtube-dl --proxy "socks5://127.0.0.1:[port]" [url]
Ex.: youtube-dl --proxy "socks5://127.0.0.1:54321" http://example.com/video.mp4
3. CTRL+C to tear down the SSH connection. Done.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!