Finalize
This commit is contained in:
parent
af88c5475b
commit
69823802f5
3 changed files with 18 additions and 7 deletions
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="/mux/bare.cjs" defer></script>
|
||||
<script src="/epoxy/index.js" defer></script>
|
||||
<script src="/uv/uv.bundle.js" defer></script>
|
||||
<script src="/uv/uv.config.js" defer></script>
|
||||
|
|
|
|||
|
|
@ -15,14 +15,26 @@ function changeTransport(transport: string, wispUrl: string) {
|
|||
SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl });
|
||||
break;
|
||||
//libcurl when supported can be easily added here
|
||||
//and stuff like bare-as-module3 COULD also be added
|
||||
default:
|
||||
SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function getTransport() {
|
||||
return localStorage.getItem("transport") || "epoxy";
|
||||
}
|
||||
|
||||
function restartTransport() {
|
||||
changeTransport(getTransport(), localStorage.getItem("wispUrl") || (location.protocol === "https:" ? "wss://" : "ws://") + location.host + "/wisp/");
|
||||
}
|
||||
|
||||
//restart transport every minute
|
||||
setInterval(restartTransport, 60000); //60000ms = 60s = 1m
|
||||
|
||||
const wispUrl = (location.protocol === "https:" ? "wss://" : "ws://") + location.host + "/wisp/";
|
||||
registerRemoteListener(navigator.serviceWorker.controller!);
|
||||
changeTransport(localStorage.getItem("transport") || "epoxy", localStorage.getItem("wispUrl") || wispUrl);
|
||||
|
||||
export { changeTransport };
|
||||
export { changeTransport, getTransport };
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ export default defineConfig({
|
|||
dest: "uv",
|
||||
overwrite: false
|
||||
},
|
||||
{
|
||||
src: `${baremuxPath}/**/*`.replace(/\\/g, "/"),
|
||||
dest: "mux",
|
||||
overwrite: false
|
||||
},
|
||||
//{
|
||||
// src: `${baremuxPath}/**/*`.replace(/\\/g, "/"),
|
||||
// dest: "mux",
|
||||
// overwrite: false
|
||||
//},
|
||||
{
|
||||
//include ALL files types
|
||||
src: `${epoxyPath}/**/*`,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue