11 Commits

Author SHA1 Message Date
f4cbdd3258 Version 2.1.7 2022-11-10 16:33:48 +01:00
fa41a8de8e Fix voe regex 2022-10-24 23:10:27 +02:00
ce8bc855b9 Update dead sites 2022-10-23 16:56:05 +02:00
03202b2a12 Fix issues link 2022-10-01 12:10:19 +02:00
9f0e1b59ce Update version to 2.1.6 2022-09-30 20:30:42 +02:00
d928d25e09 Update supported websites 2022-09-30 20:29:15 +02:00
266771aa13 Update issues url 2022-09-30 20:26:43 +02:00
d56672d90f Fix mp4upload 2022-09-30 16:02:00 +02:00
a9ea5fe4b2 Add filemoon.sx 2022-09-30 14:59:42 +02:00
bb3f5384d6 Fix url media matching 2022-09-30 14:57:23 +02:00
6989587161 Remove error message when video is not loaded properly 2022-09-12 22:01:50 +02:00
7 changed files with 52 additions and 134 deletions

View File

@ -67,22 +67,22 @@ Install the addon directly from the [firefox addon store](https://addons.mozilla
## 📜 Supported sites ## 📜 Supported sites
| Site | Supported | Note | | Site | Supported | Note |
|-----------------------------------------------------------------------|-----------|--------------------------------------------------| |-----------------------------------------------------------------------|-----------|--------------------------------------------------------------------------------------------------------------|
| [doodstream.com](doodstream.com) / [dood.pm](https://dood.pm) | ✔️ | | | [doodstream.com](doodstream.com) / [dood.pm](https://dood.pm) | ✔️ | |
| [evoload.io](https://evoload.io) | ✔ | | | [filemoon.sx](https://filemoon.sx) | ✔ | |
| [mixdrop.co](https://mixdrop.co) | ✔ | | | [mcloud.to](https://mcloud.to/) | ❌ | Reverse engineering the site costs too much time ([#5](https://github.com/ByteDream/stream-bypass/issues/5)) |
| [mp4upload.com](https://mp4upload.com) | ✔ | | | [mixdrop.co](https://mixdrop.co) | ✔ | |
| [newgrounds.com](https://newgrounds.com) | ✔ | | | [mp4upload.com](https://mp4upload.com) | ✔ | |
| [streamtape.com](https://streamtape.com) | ✔ | | | [newgrounds.com](https://newgrounds.com) | ✔ | |
| [streamzz.to](https://streamzz.to) / [streamz.ws](https://streamz.ws) | ✔ | | | [streamtape.com](https://streamtape.com) | ✔ | |
| [upstream.to](https://upstream.to) | ✔ | | | [streamzz.to](https://streamzz.to) / [streamz.ws](https://streamz.ws) | ✔ | |
| [videovard.sx](https://videovard.sx) | | Reverse engineering the site costs too much time | | [upstream.to](https://upstream.to) | | |
| [vidlox.me](https://vidlox.me) | | Website down / Timeout | | [videovard.sx](https://videovard.sx) | | Reverse engineering the site costs too much time |
| [vidoza.net](https://vidoza.net) | ✔ | | | [vidoza.net](https://vidoza.net) | ✔ | |
| [vivo.sx](https://vivo.sx) | ⚠️ | Website down / Timeout | | [vidstream.pro](https://vidstream.pro) | | Reverse engineering the site costs too much time ([#5](https://github.com/ByteDream/stream-bypass/issues/5)) |
| [voe.sx](https://voe.sx) / [voeunblk.com](https://voeunblk.com) | ✔ | | | [voe.sx](https://voe.sx) | ✔ | |
| [vupload.com](https://vupload.com) | ✔ | | | [vupload.com](https://vupload.com) | ✔ | |
- ✔️: Everything ok. - ✔️: Everything ok.
- ⚠: Included in the addon but will probably not work. See `Note` in this case, an explanation why will stand there in the most cases. - ⚠: Included in the addon but will probably not work. See `Note` in this case, an explanation why will stand there in the most cases.
@ -90,6 +90,15 @@ Install the addon directly from the [firefox addon store](https://addons.mozilla
Some sites put much effort in obfuscating their code / how they receive the video stream so that it simply cost too much time for me to reverse engineer it and find out how to bypass the native video player of the site. Some sites put much effort in obfuscating their code / how they receive the video stream so that it simply cost too much time for me to reverse engineer it and find out how to bypass the native video player of the site.
<details>
<summary>Hall of dead sites</summary>
<ul>
<li><a href="https://evoload.io">evoload.io</a> - Down</li>
<li><a href="https://vidlox.me">vidlox.me</a> - Reachable but empty</li>
<li><a href="https://vivo.sx">vivo.sx</a> - Down</li>
</ul>
</details>
## ⚙️ Building ## ⚙️ Building
If you want to build the addon from source and not using the [installation](#installation) way, follow the instructions. If you want to build the addon from source and not using the [installation](#installation) way, follow the instructions.

View File

@ -1,6 +1,6 @@
{ {
"name": "stream-bypass", "name": "stream-bypass",
"version": "2.1.5", "version": "2.1.7",
"description": "Multi-browser addon for multiple streaming providers which redirects directly to the source video", "description": "Multi-browser addon for multiple streaming providers which redirects directly to the source video",
"main": "src/index.ts", "main": "src/index.ts",
"scripts": { "scripts": {

View File

@ -3,7 +3,7 @@
"name": "Stream Bypass", "name": "Stream Bypass",
"author": "ByteDream", "author": "ByteDream",
"description": "A multi-browser addon / extension for multiple streaming providers which redirects directly to the source video.", "description": "A multi-browser addon / extension for multiple streaming providers which redirects directly to the source video.",
"version": "2.1.5", "version": "2.1.6",
"homepage_url": "https://github.com/ByteDream/stream-bypass", "homepage_url": "https://github.com/ByteDream/stream-bypass",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {

View File

@ -1,5 +1,5 @@
export enum Reliability { export enum Reliability {
HIGH = 1, HIGH,
NORMAL, NORMAL,
LOW, LOW,
} }
@ -41,27 +41,23 @@ class Doodstream implements Match {
} }
} }
class Evoload implements Match { class Filemoon implements Match {
name = 'Evoload' name = 'Filemoon'
id = 'evoload' id = 'filemoon'
reliability = Reliability.NORMAL reliability = Reliability.HIGH
domains = [ domains = [
'evoload.io' 'filemoon.sx'
] ]
regex = new RegExp(/.*/gm) regex = new RegExp(/(?<=\|)\w{2,}/gm)
async match(match: RegExpMatchArray): Promise<string> { async match(match: RegExpMatchArray): Promise<string> {
const code = window.location.pathname.split('/').slice(-1)[0] const start_idx = match.indexOf('moon')
const response = await fetch('https://evoload.io/SecurePlayer', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({code: code})
})
const json = await response.json() const prefix = `${match[start_idx]}-${match[start_idx-1]}-${match[start_idx-2]}-${match[start_idx-3]}`
return json['stream']['src'] const time = match.find(m => m.length === 10 && !isNaN(parseInt(m)))
const offset = !isNaN(parseInt(match[start_idx-12])) && parseInt(match[start_idx-12]).toString().length == match[start_idx-12].length ? 0 : -1
return `https://${prefix}.filemoon.${match[start_idx-4]}/${match[start_idx-5]}/${match[start_idx-6]}/${match[start_idx-7]}/${match[start_idx-8]}/master.m3u8?t=${match[start_idx-11]}${offset != 0 ? `-${match[start_idx-12]}` : ''}&s=${time}&e=${match[start_idx + offset - 12]}&sp=${match[start_idx + offset - 18]}`
} }
} }
@ -98,7 +94,8 @@ class Mp4Upload implements Match {
regex = new RegExp(/(?<=\|)\w{2,}/gm) regex = new RegExp(/(?<=\|)\w{2,}/gm)
async match(match: RegExpMatchArray): Promise<string> { async match(match: RegExpMatchArray): Promise<string> {
return `https://${match[34]}.mp4upload.com:${match[89]}/d/${match[88]}/video.mp4` let id = match.slice().reduce((a, b) => a.length >= b.length ? a : b)
return `https://www4.mp4upload.com:282/d/${id}/video.mp4`
} }
} }
@ -166,20 +163,6 @@ class Upstream implements Match {
} }
} }
class Vidlox implements Match {
name = 'Vidlox'
id = 'vidlox'
reliability = Reliability.LOW
domains = [
'vidlox.me'
]
regex = new RegExp(/(?<=\[")\S+?(?=")/gm)
async match(match: RegExpMatchArray): Promise<string> {
return match[0]
}
}
class Vidoza implements Match { class Vidoza implements Match {
name = 'Vidoza' name = 'Vidoza'
id = 'vidoza' id = 'vidoza'
@ -194,34 +177,6 @@ class Vidoza implements Match {
} }
} }
class Vivo implements Match {
name = 'Vivo'
id = 'vivo'
reliability = Reliability.LOW
domains = [
'vivo.sx'
]
regex = new RegExp(/(?<=source:\s')(\S+)(?=')/gms)
async match(match: RegExpMatchArray): Promise<string> {
return this.rot47(decodeURIComponent(match[0]))
}
// decrypts a string with the rot47 algorithm (https://en.wikipedia.org/wiki/ROT13#Variants)
rot47(encoded: string): string {
const s = []
for(let i = 0; i < encoded.length; i++) {
const j = encoded.charCodeAt(i)
if((j >= 33) && (j <= 126)) {
s[i] = String.fromCharCode(33+((j+ 14)%94))
} else {
s[i] = String.fromCharCode(j)
}
}
return s.join('')
}
}
class Voe implements Match { class Voe implements Match {
name = 'Voe' name = 'Voe'
id = 'voe' id = 'voe'
@ -229,7 +184,7 @@ class Voe implements Match {
domains = [ domains = [
'voe.sx' 'voe.sx'
] ]
regex = new RegExp(/https?:\/\/\S*m3u8(?=")/gm) regex = new RegExp(/https?:\/\/\S*m3u8.+(?=')/gm)
async match(match: RegExpMatchArray): Promise<string> { async match(match: RegExpMatchArray): Promise<string> {
return match[0] return match[0]
@ -252,16 +207,14 @@ class Vupload implements Match {
export const matches = [ export const matches = [
new Doodstream(), new Doodstream(),
new Evoload(), new Filemoon(),
new Mixdrop(), new Mixdrop(),
new Mp4Upload(), new Mp4Upload(),
new Newgrounds(), new Newgrounds(),
new Streamtape(), new Streamtape(),
new Streamzz(), new Streamzz(),
new Upstream(), new Upstream(),
new Vidlox(),
new Vidoza(), new Vidoza(),
new Vivo(),
new Voe(), new Voe(),
new Vupload() new Vupload()
] ]

View File

@ -11,7 +11,7 @@
<div id="message-container"> <div id="message-container">
<p id="message"></p> <p id="message"></p>
<br> <br>
<p>Open a new issue <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a></p> <p>Open a new issue <a href="https://github.com/ByteDream/stream-bypass/issues">here</a></p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,4 +1,4 @@
import {Match, matches, Reliability} from "../../match/matches"; import {matches} from "../../match/matches";
// @ts-ignore // @ts-ignore
import Hls from "hls.js"; import Hls from "hls.js";
@ -8,51 +8,13 @@ function show_message(message: string) {
document.getElementById('video').hidden = true document.getElementById('video').hidden = true
} }
async function check_loaded(match: Match, check: Promise<boolean>) { async function play_native(url: string) {
const loaded = await new Promise((resolve, _) => {
setTimeout(() => {
resolve(false)
}, match.reliability * 3000)
check
.then(value => resolve(value))
.catch(_ => resolve(false))
})
if (!loaded) {
let message: string
switch (match.reliability) {
case Reliability.LOW:
message = `The reliability for this domain is low, errors like this are common.
Try to choose another streaming provider (if existent) or deactivate the addon for this provider (${match.name}) and try again`
break
case Reliability.NORMAL:
message = `The reliability for this domain is normal, errors like this can occur but are not very common. Try to refresh the page`
break
case Reliability.HIGH:
message = `The reliability for this domains is high, errors like this are very unlikely to happen.
Try to refresh the page and if the error still exists you might want to open a new issue.
When you're using Tor, such errors have a slight chance to occur more often,
so if this is the case just try to reload the page and see if it's working then`
break
}
show_message(`Could not load video. ${message}`)
}
}
async function play_native(url: string, match: Match) {
const video = document.getElementById('video') as HTMLVideoElement const video = document.getElementById('video') as HTMLVideoElement
video.controls = true video.controls = true
video.src = url video.src = url
const readyState = new Promise<boolean>((resolve, _) => {
video.onloadeddata = () => resolve(true)
})
await check_loaded(match, readyState)
} }
async function play_hls(url: string, match: Match) { async function play_hls(url: string) {
const video = document.getElementById('video') as HTMLVideoElement const video = document.getElementById('video') as HTMLVideoElement
video.controls = true video.controls = true
@ -64,12 +26,6 @@ async function play_hls(url: string, match: Match) {
}) })
hls.loadSource(url) hls.loadSource(url)
hls.attachMedia(video) hls.attachMedia(video)
const readyState = new Promise<boolean>((resolve, _) => {
video.onloadeddata = () => resolve(true)
})
await check_loaded(match, readyState)
} else { } else {
show_message('Failed to play m3u8 video (hls is not supported). Try again or create a new issue <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a>') show_message('Failed to play m3u8 video (hls is not supported). Try again or create a new issue <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a>')
} }
@ -78,17 +34,17 @@ async function play_hls(url: string, match: Match) {
async function main() { async function main() {
const urlQuery = new URLSearchParams(window.location.search) const urlQuery = new URLSearchParams(window.location.search)
const id = urlQuery.get('id') const id = urlQuery.get('id')
const url = urlQuery.get('url') const url = decodeURIComponent(urlQuery.get('url'))
const domain = urlQuery.get('domain') const domain = urlQuery.get('domain')
const match = matches.find((m) => m.id === id) const match = matches.find((m) => m.id === id)
if (match === undefined) { if (match === undefined) {
show_message(`Invalid id: ${id}. Please report this <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a>`) show_message(`Invalid id: ${id}. Please report this <a href="https://github.com/ByteDream/stream-bypass/issues">here</a>`)
return return
} }
document.title = `Stream Bypass (${domain})` document.title = `Stream Bypass (${domain})`
url.endsWith('.m3u8') ? await play_hls(url, match) : await play_native(url, match) new URL(url).pathname.endsWith('.m3u8') ? await play_hls(url) : await play_native(url)
} }
main() main()

View File

@ -17,7 +17,7 @@
<hr> <hr>
<table id="sub-container"> <table id="sub-container">
</table> </table>
<a id="error" href="https://github.com/ByteDream/stream-bypass/issues/new">Something does not work</a> <a id="error" href="https://github.com/ByteDream/stream-bypass/issues">Something does not work</a>
</div> </div>
</body> </body>
</html> </html>