3.3 KiB
3.3 KiB
This gives an overview of using proxies to avoid Twitch ads (without having to proxy all of your traffic ~ just the initial m3u8 per-stream).
proxy-server fetches the m3u8 (hopefully ad-free). extension contains a Chrome / Firefox compatible extension for sending the m3u8 request. proxy-m3u8 (uBlock Origin / userscript) scripts also work as an alternative to the extension.
Socks5
- Put your socks5 proxy info into
proxy-server-info.txtand runproxy-server.exe(installMonoif using Linux/Mac and run viamono proxy-server.exe). - Load the
extensionfolder as an unpacked extension in your browser. Alternatively useproxy-m3u8uBlock Origin/userscriptscripts (ublock / userscript). (TODO: more helpful info).
VPN + VMWare
- Set up
VMWare WorkstationwithWindowsand your desired VPN. - In your VM
Settingsunder theHardwaretab selectNetwork Adapterand change theNetwork connectiontoBridged. This is to simplify connecting toproxy-serverfrom your host. You can do it without bridged but it requires additional VMWare network configuration. - Add
proxy-server.exeto your Windows VM Firewall (or disable your Windows Firewall in the VM) and then runproxy-server.exe. - Modify
extension/background.jsand change the IP to your VM IP (obtained viaipconfiginside your VM). If you're usingproxy-m3u8change the IP there.
NOTE: See "mixed-content" below.
VPS
- Run
proxy-server.exeon your VPS which is hosted in an ad-free country (installMonoif using Linux and run viamono proxy-server.exe). - Modify the url in
extension/background.jsto point to your VPS and load theextensionfolder as an unpacked extension. If usingproxy-m3u8scripts find the equivalent urls there and modify them where applicable (you'll likely need to fork to do this).
NOTE: See "mixed-content" below.
Notes
- Running the
HttpListeneron https has many convoluted steps. On localhost (127.0.0.1) Chrome / Firefox allow mixed content requests so there aren't any issues there. For other IPs (i.e. in the VPS/VPN example) you'll need to enable "mixed-content" (also known as "Insecure content") for twitch.tv or otherwise you'll get CORS errors. proxy-server.exeneeds to be ran as Admin to listen on the desired IP/Port.- Disable other Twitch ad blocking extensions / scripts as they may interfere.
- You will likely have to try multiple locations until you find something that works.
- If you're having problems use Wireshark (or similar) to make sure the m3u8 is being re-routed.
- To build
proxy-server.csyourself runproxy-server-build.bat. If you're on Mac/Linux build it withmsbuildwhich should come withMonoor.NET Core(TODO: more helpful info). proxy-servershould be visible over LAN/WAN assuming correct firewall settings, however if you wish to connect to it from another machine you'll need to edit the IP inextension/background.js.- TODO: Provide an authenticated option to allow Twitch Turbo to be used to provide streams to non-Turbo users.
I would only really recommend using the info + code here as a starting point for building a more robust solution.