diff --git a/package.json b/package.json index 9c3bca7b..a078f18a 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@mercuryworkshop/bare-as-module3": "^2.2.2", "@mercuryworkshop/bare-mux": "^2.0.1", "@mercuryworkshop/epoxy-transport": "^2.1.3", - "@mercuryworkshop/libcurl-transport": "^1.3.6", + "@mercuryworkshop/libcurl-transport": "^1.3.7", "@titaniumnetwork-dev/ultraviolet": "3.2.1", "@tomphttp/bare-server-node": "^2.0.3", "axios": "^1.7.2", diff --git a/views/assets/js/register-sw.js b/views/assets/js/register-sw.js index 44ae88fb..145222fd 100644 --- a/views/assets/js/register-sw.js +++ b/views/assets/js/register-sw.js @@ -4,7 +4,7 @@ const connection = new BareMux.BareMuxConnection("/baremux/worker.js"); const wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/"; // Proxy configuration -const proxyUrl = "socks5://localhost:9050"; // Replace with your proxy URL +const proxyUrl = "socks5h://localhost:9050"; // Replace with your proxy URL async function registerSW() { if (!navigator.serviceWorker) { @@ -18,14 +18,14 @@ async function registerSW() { } // Update the transport setup to include the proxy option - await connection.setTransport("/libcurl/index.mjs", [{ wisp: wispUrl, proxy: proxyUrl }]); + await connection.setTransport("/libcurl/index.mjs", [{ wisp: wispUrl /* proxy: proxyUrl */ }]); await navigator.serviceWorker.register(stockSW); } async function setupTransportOnLoad() { const conn = new BareMux.BareMuxConnection("/baremux/worker.js"); if (await conn.getTransport() !== "/baremux/module.js") { - await conn.setTransport("/baremux/module.js", [{ wisp: wispUrl, proxy: proxyUrl }]); + await conn.setTransport("/libcurl/index.mjs", [{ wisp: wispUrl /* proxy: proxyUrl */ }]); } }