1
0
mirror of https://github.com/pixeltris/TwitchAdSolutions.git synced 2024-11-22 18:32:46 +01:00

Update m3u8 proxy url (obfuscated)

This commit is contained in:
pixeltris 2020-12-31 19:43:35 +00:00
parent b83c472d97
commit 4fa5512699
17 changed files with 359 additions and 66 deletions

View File

@ -23,7 +23,9 @@
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -38,6 +40,14 @@
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -275,9 +285,15 @@
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -14,7 +14,9 @@ twitch-videoad.js application/javascript
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -29,6 +31,14 @@ twitch-videoad.js application/javascript
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -266,9 +276,15 @@ twitch-videoad.js application/javascript
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -23,7 +23,9 @@
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -38,6 +40,14 @@
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -275,9 +285,15 @@
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -14,7 +14,9 @@ twitch-videoad.js application/javascript
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = true;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -29,6 +31,14 @@ twitch-videoad.js application/javascript
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -266,9 +276,15 @@ twitch-videoad.js application/javascript
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -23,7 +23,9 @@
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = true;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -38,6 +40,14 @@
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -275,9 +285,15 @@
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -14,7 +14,9 @@ twitch-videoad.js application/javascript
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -29,6 +31,14 @@ twitch-videoad.js application/javascript
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -266,9 +276,15 @@ twitch-videoad.js application/javascript
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -23,7 +23,9 @@
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -38,6 +40,14 @@
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -275,9 +285,15 @@
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -14,7 +14,9 @@ twitch-videoad.js application/javascript
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -29,6 +31,14 @@ twitch-videoad.js application/javascript
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -266,9 +276,15 @@ twitch-videoad.js application/javascript
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -23,7 +23,9 @@
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -38,6 +40,14 @@
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -275,9 +285,15 @@
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -14,7 +14,9 @@ twitch-videoad.js application/javascript
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -29,6 +31,14 @@ twitch-videoad.js application/javascript
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -266,9 +276,15 @@ twitch-videoad.js application/javascript
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -23,7 +23,9 @@
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -38,6 +40,14 @@
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -275,9 +285,15 @@
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -14,7 +14,9 @@ twitch-videoad.js application/javascript
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -29,6 +31,14 @@ twitch-videoad.js application/javascript
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -266,9 +276,15 @@ twitch-videoad.js application/javascript
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -23,7 +23,9 @@
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = '';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = false;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = false;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -38,6 +40,14 @@
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -275,9 +285,15 @@
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -13,8 +13,10 @@ twitch-videoad.js application/javascript
scope.OPT_MODE_NOTIFY_ADS_WATCHED_MIN_REQUESTS = true;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = 'https://got-greedy.corblimey.workers.dev/';
scope.OPT_MODE_PROXY_M3U8_FULL_URL = true;
scope.OPT_MODE_PROXY_M3U8 = 'Ax0ZHhYNF0QLXg8PFBsRBgIfR0MVWQUJBVwFVBJBHAYfBQBFS0UcVhhM';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = true;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = true;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -29,6 +31,14 @@ twitch-videoad.js application/javascript
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -266,9 +276,15 @@ twitch-videoad.js application/javascript
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -1,2 +1,3 @@
OPT_MODE_PROXY_M3U8 'https://got-greedy.corblimey.workers.dev/'
OPT_MODE_PROXY_M3U8_FULL_URL true
OPT_MODE_PROXY_M3U8 'Ax0ZHhYNF0QLXg8PFBsRBgIfR0MVWQUJBVwFVBJBHAYfBQBFS0UcVhhM'
OPT_MODE_PROXY_M3U8_OBFUSCATED true
OPT_MODE_PROXY_M3U8_PARTIAL_URL true

View File

@ -22,8 +22,10 @@
scope.OPT_MODE_NOTIFY_ADS_WATCHED_MIN_REQUESTS = true;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT = false;
scope.OPT_MODE_NOTIFY_ADS_WATCHED_RELOAD_PLAYER_ON_AD_SEGMENT_DELAY = 0;
scope.OPT_MODE_PROXY_M3U8 = 'https://got-greedy.corblimey.workers.dev/';
scope.OPT_MODE_PROXY_M3U8_FULL_URL = true;
scope.OPT_MODE_PROXY_M3U8 = 'Ax0ZHhYNF0QLXg8PFBsRBgIfR0MVWQUJBVwFVBJBHAYfBQBFS0UcVhhM';
scope.OPT_MODE_PROXY_M3U8_OBFUSCATED = true;
scope.OPT_MODE_PROXY_M3U8_FULL_URL = false;
scope.OPT_MODE_PROXY_M3U8_PARTIAL_URL = true;
scope.OPT_VIDEO_SWAP_PLAYER_TYPE = 'thunderdome';
scope.OPT_INITIAL_M3U8_ATTEMPTS = 1;
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = '';
@ -38,6 +40,14 @@
if (!scope.OPT_ACCESS_TOKEN_PLAYER_TYPE && scope.OPT_MODE_EMBED) {
scope.OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';
}
if (scope.OPT_MODE_PROXY_M3U8 && scope.OPT_MODE_PROXY_M3U8_OBFUSCATED) {
var newStr = '';
scope.OPT_MODE_PROXY_M3U8 = atob(scope.OPT_MODE_PROXY_M3U8);
for (var i = 0; i < scope.OPT_MODE_PROXY_M3U8.length; i++) {
newStr += String.fromCharCode(scope.OPT_MODE_PROXY_M3U8.charCodeAt(i) ^ scope.CLIENT_ID.charCodeAt(i % scope.CLIENT_ID.length));
}
scope.OPT_MODE_PROXY_M3U8 = newStr;
}
// These are only really for Worker scope...
scope.StreamInfos = [];
scope.StreamInfosByUrl = [];
@ -275,9 +285,15 @@
}
CurrentChannelNameFromM3U8 = channelName;
if (OPT_MODE_PROXY_M3U8) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
console.log('proxy-m3u8: ' + url);
if (OPT_MODE_PROXY_M3U8_FULL_URL || OPT_MODE_PROXY_M3U8_PARTIAL_URL) {
if (OPT_MODE_PROXY_M3U8_FULL_URL) {
url = OPT_MODE_PROXY_M3U8 + url;
} else {
url = OPT_MODE_PROXY_M3U8 + url.split('.m3u8')[0];
}
if (!OPT_MODE_PROXY_M3U8_OBFUSCATED) {
console.log('proxy-m3u8: ' + url);
}
var opt2 = {};
opt2.headers = [];
opt2.headers['Access-Control-Allow-Origin'] = '*';// This is to appease the currently set proxy

View File

@ -22,13 +22,14 @@ namespace TwitchAdUtils
static bool UseAccessTokenTemplate = false;
static bool ShouldNotifyAdWatched = true;
static bool ShouldNotifyAdWatchedMin = true;
static string PlayerTypeNormal = "site";//embed
static bool ShouldDenyAd = false;
static string PlayerTypeNormal = "site";//embed squad_secondary squad_primary
static string PlayerTypeMiniNoAd = "picture-by-picture";//"thunderdome";
static string Platform = "web";
static string PlayerBackend = "mediaplayer";
static string MainM3U8AdditionalParams = "";
static string AdSignifier = "stitched-ad";
static string ProxyUrl = "http://choosen.dev/stream/twitch/";
static string ProxyUrl = "";
static int TargetResolution = 480;
static TimeSpan LoopDelay = TimeSpan.FromSeconds(1);
@ -115,7 +116,7 @@ namespace TwitchAdUtils
for (int i = 0; i < lines.Length; i++)
{
string line = lines[i];
if (line.Trim().StartsWith("declareOptions("))
if (line.Trim().StartsWith("// Modify options based on mode"))
{
modifiedOptions = true;
}
@ -290,26 +291,42 @@ namespace TwitchAdUtils
string streamM3u8Url = lines.FirstOrDefault(x => x.EndsWith(".m3u8"));
if (!string.IsNullOrEmpty(streamM3u8Url))
{
string streamM3u8 = wc.DownloadString(streamM3u8Url);
if (!string.IsNullOrEmpty(streamM3u8Url))
bool foundAd = true;
while (foundAd)
{
if (streamM3u8.Contains(AdSignifier))
string streamM3u8 = wc.DownloadString(streamM3u8Url);
if (!string.IsNullOrEmpty(streamM3u8Url))
{
Console.WriteLine("has ad " + DateTime.Now.TimeOfDay);
if (streamM3u8.Contains(AdSignifier))
{
Console.WriteLine("has ad " + DateTime.Now.TimeOfDay);
if (ShouldDenyAd)
{
DeclineAd(uniqueId, streamM3u8);
}
}
else
{
Console.WriteLine("no ad " + DateTime.Now.TimeOfDay);
}
if ((streamM3u8.Contains(AdSignifier) || forceSkipAd) &&
(!UseOldAccessToken && (ShouldNotifyAdWatched || forceSkipAd)))
{
NotifyWatchedAd(uniqueId, streamM3u8);
}
}
else
{
Console.WriteLine("no ad " + DateTime.Now.TimeOfDay);
Console.WriteLine("Failed to fetch streamM3u8Url");
}
if ((streamM3u8.Contains(AdSignifier) || forceSkipAd) &&
(!UseOldAccessToken && (ShouldNotifyAdWatched || forceSkipAd)))
if (!ShouldDenyAd)
{
NotifyWatchedAd(uniqueId, streamM3u8);
break;
}
else
{
Thread.Sleep(LoopDelay);
}
}
else
{
Console.WriteLine("Failed to fetch streamM3u8Url");
}
}
else
@ -371,6 +388,41 @@ namespace TwitchAdUtils
return defaultValue;
}
static void DeclineAd(string uniqueId, string streamM3u8)
{
string[] lines = streamM3u8.Split('\n');
for (int i = 0; i < lines.Length; i++)
{
if (lines[i].Contains(AdSignifier))
{
Dictionary<string, string> attr = ParseAttributes(lines[i]);
Dictionary<string, string> vals = new Dictionary<string, string>();
vals["TARG_adSessionID"] = GetOrDefault(attr, "X-TV-TWITCH-AD-AD-SESSION-ID");
string str = @"[{""operationName"":""VideoAdRequestDecline"",""variables"":{""context"":{""adSessionID"":""TARG_adSessionID"",""clientContext"":""{\""isAudioOnly\"":false,\""isMiniTheater\"":false,\""isPIP\"":true,\""isUsingExternalPlayback\"":false}"",""isAudioOnly"":false,""isMiniTheater"":false,""isPIP"":false,""isUsingExternalPlayback"":false,""duration"":30,""isVLM"":false,""rollType"":""PREROLL""}},""extensions"":{""persistedQuery"":{""version"":1,""sha256Hash"":""XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX""}}}]";
foreach (KeyValuePair<string, string> val in vals)
{
str = str.Replace(val.Key, val.Value);
}
using (WebClient wc = new WebClient())
{
wc.Proxy = null;
wc.Headers["Client-Id"] = ClientID;
wc.Headers["X-Device-Id"] = uniqueId;
wc.Headers["accept"] = "*/*";
wc.Headers["accept-encoding"] = "gzip, deflate, br";
wc.Headers["accept-language"] = "en-us";
wc.Headers["content-type"] = "text/plain; charset=UTF-8";
wc.Headers["origin"] = "https://www.twitch.tv";
wc.Headers["referer"] = "https://www.twitch.tv/";
wc.Headers["user-agent"] = UserAgent;
string st2 = wc.UploadString("https://gql.twitch.tv/gql", str);
Console.WriteLine(st2);
}
return;
}
}
}
static void SendGqlAdEvent(WebClient wc, string eventName, bool includeAdInfo, int adQuartile, int adPos, Dictionary<string, string> vals)
{
// TARG_eventName TARG_roll_type TARG_radToken TARG_adInfo