Set libcurl as default on ios and update libcurl
This commit is contained in:
parent
3e77fdc4be
commit
9357f2ed11
2 changed files with 6 additions and 14 deletions
|
|
@ -16,7 +16,7 @@
|
||||||
"@fastify/static": "^6.12.0",
|
"@fastify/static": "^6.12.0",
|
||||||
"@mercuryworkshop/bare-mux": "^1.0.5",
|
"@mercuryworkshop/bare-mux": "^1.0.5",
|
||||||
"@mercuryworkshop/epoxy-transport": "^1.1.0",
|
"@mercuryworkshop/epoxy-transport": "^1.1.0",
|
||||||
"@mercuryworkshop/libcurl-transport": "^1.2.1",
|
"@mercuryworkshop/libcurl-transport": "^1.2.2",
|
||||||
"@nebula-services/dynamic": "0.7.2-patch.2",
|
"@nebula-services/dynamic": "0.7.2-patch.2",
|
||||||
"@titaniumnetwork-dev/ultraviolet": "^3.0.0",
|
"@titaniumnetwork-dev/ultraviolet": "^3.0.0",
|
||||||
"@tomphttp/bare-server-node": "2.0.3",
|
"@tomphttp/bare-server-node": "2.0.3",
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ function changeTransport(transport: string, wispUrl: string) {
|
||||||
console.log("Setting transport to Libcurl");
|
console.log("Setting transport to Libcurl");
|
||||||
SetTransport("CurlMod.LibcurlClient", {
|
SetTransport("CurlMod.LibcurlClient", {
|
||||||
wisp: wispUrl,
|
wisp: wispUrl,
|
||||||
wasm: "https://cdn.jsdelivr.net/npm/libcurl.js@v0.5.2/libcurl.wasm"
|
wasm: "https://cdn.jsdelivr.net/npm/libcurl.js@v0.5.3/libcurl.wasm"
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "bare":
|
case "bare":
|
||||||
|
|
@ -46,17 +46,9 @@ const wispUrl =
|
||||||
"/wisp/";
|
"/wisp/";
|
||||||
registerRemoteListener(navigator.serviceWorker.controller!);
|
registerRemoteListener(navigator.serviceWorker.controller!);
|
||||||
|
|
||||||
if (isIOS) {
|
changeTransport(
|
||||||
console.log("iOS device detected. Bare will be used.");
|
localStorage.getItem("transport") || "libcurl",
|
||||||
changeTransport(
|
localStorage.getItem("wispUrl") || wispUrl
|
||||||
localStorage.getItem("transport") || "libcurl",
|
);
|
||||||
localStorage.getItem("wispUrl") || wispUrl
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
changeTransport(
|
|
||||||
localStorage.getItem("transport") || "bare",
|
|
||||||
localStorage.getItem("wispUrl") || wispUrl
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export { changeTransport, getTransport };
|
export { changeTransport, getTransport };
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue