From 12d06291c028061dabe1f9cce89a8962a4f106f9 Mon Sep 17 00:00:00 2001 From: catvod <88956744+catvod@users.noreply.github.com> Date: Wed, 27 Dec 2023 10:27:24 +0800 Subject: [PATCH] Update index.js --- open/wrapper/index.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/open/wrapper/index.js b/open/wrapper/index.js index 9740f7d..2a599b2 100644 --- a/open/wrapper/index.js +++ b/open/wrapper/index.js @@ -477,16 +477,7 @@ globalThis.JSFile = function (path) { }; }; -globalThis.url2Proxy = async function (type, url, headers) { - let hd = Object.keys(headers).length == 0 ? '_' : encodeURIComponent(JSON.stringify(headers)); - let uri = new Uri(url); - let path = uri.path(); - path = path.substring(path.lastIndexOf('/')); - let ext = path.indexOf('.') >= 0 ? path.substring(path.indexOf('.')) : '.bin'; - return 'http://127.0.0.1:13333/up/' + randStr(6) + '/' + type + '/' + hd + '/' + encodeURIComponent(url) + '/' + ext; -}; - -globalThis.js2Proxy = async function (dynamic, siteType, site, url, headers) { +globalThis.js2Proxy = function (dynamic, siteType, site, url, headers) { let hd = Object.keys(headers).length == 0 ? '_' : encodeURIComponent(JSON.stringify(headers)); return (dynamic ? 'js2p://_WEB_/' : 'http://127.0.0.1:13333/jp/') + randStr(6) + '/' + siteType + '/' + site + '/' + hd + '/' + encodeURIComponent(url); };