mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-06-27 18:40:31 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
841c824590 | |||
2055a3ea81 | |||
0262d1853c | |||
81da6600e6 | |||
817f5b82f9 | |||
9a17fb0d9b | |||
17f8aab216 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stream-bypass",
|
"name": "stream-bypass",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"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": {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
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;
|
||||||
@ -32,7 +31,7 @@ async function main() {
|
|||||||
document.body.innerHTML = ''
|
document.body.innerHTML = ''
|
||||||
document.body.append(player)
|
document.body.append(player)
|
||||||
} else {
|
} else {
|
||||||
window.location.assign(chrome.runtime.getURL(`ui/player/player.html?id=${match.id}&url=${encodeURIComponent(url)}&domains=${window.location.host}`))
|
window.location.assign(chrome.runtime.getURL(`ui/player/player.html?id=${match.id}&url=${encodeURIComponent(url)}&domain=${window.location.host}`))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.0",
|
"version": "2.1.2",
|
||||||
"homepage_url": "https://github.com/ByteDream/stream-bypass",
|
"homepage_url": "https://github.com/ByteDream/stream-bypass",
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
|
@ -67,14 +67,22 @@ class Evoload implements Match {
|
|||||||
class Mixdrop implements Match {
|
class Mixdrop implements Match {
|
||||||
name = 'Mixdrop'
|
name = 'Mixdrop'
|
||||||
id = 'mixdrop'
|
id = 'mixdrop'
|
||||||
reliability = Reliability.HIGH
|
reliability = Reliability.NORMAL
|
||||||
domains = [
|
domains = [
|
||||||
'mixdrop.co'
|
'mixdrop.co'
|
||||||
]
|
]
|
||||||
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://a-${match[1]}.${match[4]}.${match[5]}/v/${match[2]}.${match[6]}?s=${match[12]}&e=${match[13]}`
|
const prefix = /(?<=\/\/)[a|s](?=-)/.exec(document.body.innerHTML)[0]
|
||||||
|
const subdomain = match[1].length < match[2].length ? match[1] : match[2]
|
||||||
|
const domain = match.slice().sort((a, b) => b.length - a.length).find(m => /^[a-z]+$/.test(m))
|
||||||
|
const id = match[1].length > match[2].length ? match[1] : match[2]
|
||||||
|
const tld = match.find(m => ['net', 'io', 'to', 'sx', 'com'].indexOf(m) !== -1)
|
||||||
|
const s = match.slice().sort((a, b) => b.length - a.length).slice(1)[0]
|
||||||
|
const e_t = match.find(m => m.length === 10 && !isNaN(parseInt(m)))
|
||||||
|
|
||||||
|
return `https://${prefix}-${subdomain}.${domain}.${tld}/v/${id}.mp4?s=${s}&e=${e_t}&_t=${e_t}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<video id="video"></video>
|
<video id="video"></video>
|
||||||
<div id="message-container">
|
<div id="message-container" hidden>
|
||||||
<p id="message" hidden></p>
|
<p id="message"></p>
|
||||||
|
<br>
|
||||||
|
<p>Open a new issue <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -15,8 +15,10 @@ video
|
|||||||
display: flex
|
display: flex
|
||||||
justify-content: center
|
justify-content: center
|
||||||
align-items: center
|
align-items: center
|
||||||
|
flex-direction: column
|
||||||
|
color: white
|
||||||
|
text-align: center
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|
||||||
#message
|
& a, & a:visited
|
||||||
color: white
|
color: red
|
||||||
text-align: center
|
|
||||||
|
@ -49,12 +49,12 @@ async function play_hls(url: string, match: Match) {
|
|||||||
break
|
break
|
||||||
case Reliability.HIGH:
|
case Reliability.HIGH:
|
||||||
message = `The reliability for this domains is high, errors like this are very unlikely to happen.
|
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 <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a>.
|
Try to refresh the page and if the error still exists you might want to open a new issue.
|
||||||
When you're using <a href="https://www.torproject.org/">Tor</a> such errors have a slight chance to occur more often,
|
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`
|
so if this is the case just try to reload the page and see if it's working then`
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
show_message(`Could not load HLS video. ${message}`)
|
show_message(`Could not load video. ${message}`)
|
||||||
}
|
}
|
||||||
} 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>')
|
||||||
|
Reference in New Issue
Block a user