mirror of
https://github.com/pixeltris/TwitchAdSolutions.git
synced 2024-11-25 20:02:52 +01:00
.. | ||
extension | ||
proxy-server-build.bat | ||
proxy-server-info.txt | ||
proxy-server.cs | ||
proxy-server.exe | ||
README.md |
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.txt
and runproxy-server.exe
(installMono
if using Linux/Mac and run viamono proxy-server.exe
). - Load the
extension
folder as an unpacked extension in your browser. Alternatively useproxy-m3u8
uBlock Origin
/userscript
scripts (ublock / userscript). (TODO: more helpful info).
VPN + VMWare
- Set up
VMWare Workstation
withWindows
and your desired VPN. - In your VM
Settings
under theHardware
tab selectNetwork Adapter
and change theNetwork connection
toBridged
. This is to simplify connecting toproxy-server
from your host. You can do it without bridged but it requires additional VMWare network configuration. - Add
proxy-server.exe
to your Windows VM Firewall (or disable your Windows Firewall in the VM) and then runproxy-server.exe
. - Modify
extension/background.js
and change the IP to your VM IP (obtained viaipconfig
inside your VM). If you're usingproxy-m3u8
change the IP there.
NOTE: See "mixed-content" below.
VPS
- Run
proxy-server.exe
on your VPS which is hosted in an ad-free country (installMono
if using Linux and run viamono proxy-server.exe
). - Modify the url in
extension/background.js
to point to your VPS and load theextension
folder as an unpacked extension. If usingproxy-m3u8
scripts 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
HttpListener
on 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.exe
needs 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.cs
yourself runproxy-server-build.bat
. If you're on Mac/Linux build it withmsbuild
which should come withMono
or.NET Core
(TODO: more helpful info). proxy-server
should 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.