Revert "Set libcurl as default on ios and update libcurl"

This reverts commit 9357f2ed11.
This commit is contained in:
rift 2024-03-12 13:15:21 -05:00
parent 9357f2ed11
commit c9ce4b5d1a
2 changed files with 14 additions and 6 deletions

View file

@ -16,7 +16,7 @@
"@fastify/static": "^6.12.0",
"@mercuryworkshop/bare-mux": "^1.0.5",
"@mercuryworkshop/epoxy-transport": "^1.1.0",
"@mercuryworkshop/libcurl-transport": "^1.2.2",
"@mercuryworkshop/libcurl-transport": "^1.2.1",
"@nebula-services/dynamic": "0.7.2-patch.2",
"@titaniumnetwork-dev/ultraviolet": "^3.0.0",
"@tomphttp/bare-server-node": "2.0.3",

View file

@ -16,7 +16,7 @@ function changeTransport(transport: string, wispUrl: string) {
console.log("Setting transport to Libcurl");
SetTransport("CurlMod.LibcurlClient", {
wisp: wispUrl,
wasm: "https://cdn.jsdelivr.net/npm/libcurl.js@v0.5.3/libcurl.wasm"
wasm: "https://cdn.jsdelivr.net/npm/libcurl.js@v0.5.2/libcurl.wasm"
});
break;
case "bare":
@ -46,9 +46,17 @@ const wispUrl =
"/wisp/";
registerRemoteListener(navigator.serviceWorker.controller!);
changeTransport(
localStorage.getItem("transport") || "libcurl",
localStorage.getItem("wispUrl") || wispUrl
);
if (isIOS) {
console.log("iOS device detected. Bare will be used.");
changeTransport(
localStorage.getItem("transport") || "libcurl",
localStorage.getItem("wispUrl") || wispUrl
);
} else {
changeTransport(
localStorage.getItem("transport") || "bare",
localStorage.getItem("wispUrl") || wispUrl
);
}
export { changeTransport, getTransport };