11 Commits

Author SHA1 Message Date
44d4c9cbcf Update supported websites 2022-07-20 11:56:08 +02:00
b34531b982 Bump version to 2.1.1 2022-07-20 11:55:57 +02:00
e699d3885c Change mp4upload reliability 2022-07-19 11:53:14 +02:00
396038a803 Fix replace video player height 2022-07-19 11:28:11 +02:00
bd64d4ed0b Add doodstream domain 2022-07-19 11:27:03 +02:00
a207c336b0 Add mp4upload support 2022-07-19 11:09:09 +02:00
2460657f2a Remove doodstream comment 2022-07-19 11:06:56 +02:00
698ed5ac3c Add support for doodstream 2022-07-19 11:03:16 +02:00
dc42220f09 Fix streamtape 2022-07-19 10:07:21 +02:00
e146649bbf Use window.location instead of location 2022-07-16 02:34:22 +02:00
424e34190c Rework title of built-in player 2022-07-16 02:32:23 +02:00
6 changed files with 46 additions and 30 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) | | URL can be extracted but not played (see [here](https://github.com/ByteDream/stream-bypass/blob/674527ed9c1aa35a30fed135c46017571dd3ce31/src/match/matches.ts#L18) for more information) | | [doodstream.com](doodstream.com) / [dood.pm](https://dood.pm) | ✔️ | |
| [evoload.io](https://evoload.io) | ✔️ | | | [evoload.io](https://evoload.io) | ✔️ | |
| [mixdrop.co](https://mixdrop.co) | ✔ | | | [mixdrop.co](https://mixdrop.co) | ✔ | |
| [mp4upload.com](https://mp4upload.com) | | URL can be extracted but not. Probably the same issue as with doodstream | | [mp4upload.com](https://mp4upload.com) | | |
| [newgrounds.com](https://newgrounds.com) | ✔ | | | [newgrounds.com](https://newgrounds.com) | ✔ | |
| [streamtape.com](https://streamtape.com) | ✔ | | | [streamtape.com](https://streamtape.com) | ✔ | |
| [streamzz.to](https://streamzz.to) / [streamz.ws](https://streamz.ws) | ✔ | | | [streamzz.to](https://streamzz.to) / [streamz.ws](https://streamz.ws) | ✔ | |
| [upstream.to](https://upstream.to) | ✔ | | | [upstream.to](https://upstream.to) | ✔ | |
| [videovard.sx](https://videovard.sx) | ❌ | Reverse engineering the site costs too much time | | [videovard.sx](https://videovard.sx) | ❌ | Reverse engineering the site costs too much time |
| [vidlox.me](https://vidlox.me) | ⚠ | Website down / Timeout | | [vidlox.me](https://vidlox.me) | ⚠ | Website down / Timeout |
| [vidoza.net](https://vidoza.net) | ✔ | | | [vidoza.net](https://vidoza.net) | ✔ | |
| [vivo.sx](https://vivo.sx) | ⚠️ | Website down / Timeout | | [vivo.sx](https://vivo.sx) | ⚠️ | Website down / Timeout |
| [voe.sx](https://voe.sx) / [voeunblk.com](https://voeunblk.com) | ✔ | | | [voe.sx](https://voe.sx) / [voeunblk.com](https://voeunblk.com) | ✔ | |
| [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.

View File

@ -1,6 +1,6 @@
{ {
"name": "stream-bypass", "name": "stream-bypass",
"version": "2.1.0", "version": "2.1.1",
"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

@ -1,6 +1,7 @@
import {getMatch} from "./match/match"; import {getMatch} from "./match/match";
import {storageDelete, storageGet} from "./store/store"; import {storageDelete, storageGet} from "./store/store";
import {Match, matches} from "./match/matches"; import {Match, matches} from "./match/matches";
import play = chrome.cast.media.timeout.play;
async function main() { async function main() {
let match: Match; let match: Match;
@ -20,7 +21,19 @@ async function main() {
} }
const url = await match.match(re) const url = await match.match(re)
location.assign(chrome.runtime.getURL(`ui/player/player.html?id=${match.id}&url=${encodeURIComponent(url)}`))
if (match.replace && !url.endsWith('.m3u8')) {
const player = document.createElement('video')
player.style.width = '100%'
player.style.height = '100%'
player.controls = true
player.src = url
document.body.innerHTML = ''
document.body.append(player)
} else {
window.location.assign(chrome.runtime.getURL(`ui/player/player.html?id=${match.id}&url=${encodeURIComponent(url)}&domains=${window.location.host}`))
}
} }
main() main()

View File

@ -9,24 +9,23 @@ export abstract class Match {
id: string id: string
reliability: Reliability reliability: Reliability
domains: string[] domains: string[]
replace?: boolean
regex: RegExp regex: RegExp
abstract match(match: RegExpMatchArray): Promise<string> abstract match(match: RegExpMatchArray): Promise<string>
notice?: string notice?: string
} }
// DOES NOT WORK.
// The url can be extracted (sometimes??? wtf) without problems but to receive the actual video, custom request
// headers must be set. And because the javascript and browser ecosystem is so fucked up, there is no good way to
// do this with media which can be natively played with the browser, like here.
class Doodstream implements Match { class Doodstream implements Match {
name = 'Doodstream' name = 'Doodstream'
id = 'doodstream' id = 'doodstream'
reliability = Reliability.HIGH reliability = Reliability.HIGH
domains = [ domains = [
'doodstream.com', 'doodstream.com',
'dood.pm' 'dood.pm',
'dood.ws'
] ]
replace = true
regex = new RegExp(/(\/pass_md5\/.*?)'.*(\?token=.*?expiry=)/s) regex = new RegExp(/(\/pass_md5\/.*?)'.*(\?token=.*?expiry=)/s)
async match(match: RegExpMatchArray): Promise<string> { async match(match: RegExpMatchArray): Promise<string> {
@ -79,19 +78,20 @@ class Mixdrop implements Match {
} }
} }
/*class Mp4Upload implements Match { class Mp4Upload implements Match {
name = 'Mp4Upload' name = 'Mp4Upload'
id = 'mp4upload' id = 'mp4upload'
reliability = Reliability.LOW reliability = Reliability.NORMAL
domains = [ domains = [
'mp4upload.com' 'mp4upload.com'
] ]
replace = true
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` return `https://${match[34]}.mp4upload.com:${match[89]}/d/${match[88]}/video.mp4`
} }
}*/ }
class Newgrounds implements Match { class Newgrounds implements Match {
name = 'Newgrounds' name = 'Newgrounds'
@ -121,10 +121,10 @@ class Streamtape implements Match {
domains = [ domains = [
'streamtape.com' 'streamtape.com'
] ]
regex = new RegExp(/\/get_video\S*(?=')/gm) regex = new RegExp(/id=.*(?=')/gm)
async match(match: RegExpMatchArray): Promise<string> { async match(match: RegExpMatchArray): Promise<string> {
return `https://streamtape.com${match[0]}` return `https://streamtape.com/get_video?${match.reverse()[0]}`
} }
} }
@ -242,8 +242,10 @@ class Vupload implements Match {
} }
export const matches = [ export const matches = [
new Doodstream(),
new Evoload(), new Evoload(),
new Mixdrop(), new Mixdrop(),
new Mp4Upload(),
new Newgrounds(), new Newgrounds(),
new Streamtape(), new Streamtape(),
new Streamzz(), new Streamzz(),

View File

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>HLS</title> <title>Stream Bypass</title>
<link rel="stylesheet" href="player.css"> <link rel="stylesheet" href="player.css">
<script src="player.js" defer></script> <script src="player.js" defer></script>
</head> </head>

View File

@ -65,13 +65,14 @@ 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 = urlQuery.get('url')
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/new">here</a>`)
return return
} }
document.title = match.name document.title = `Stream Bypass (${domain})`
url.endsWith('.m3u8') ? await play_hls(url, match) : await play_native(url, match) url.endsWith('.m3u8') ? await play_hls(url, match) : await play_native(url, match)
} }