Update index.js

main
catvod 2 years ago committed by GitHub
parent 1f391686a5
commit 12d06291c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      open/wrapper/index.js

@ -477,16 +477,7 @@ globalThis.JSFile = function (path) {
}; };
}; };
globalThis.url2Proxy = async function (type, url, headers) { globalThis.js2Proxy = function (dynamic, siteType, site, 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) {
let hd = Object.keys(headers).length == 0 ? '_' : encodeURIComponent(JSON.stringify(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); return (dynamic ? 'js2p://_WEB_/' : 'http://127.0.0.1:13333/jp/') + randStr(6) + '/' + siteType + '/' + site + '/' + hd + '/' + encodeURIComponent(url);
}; };

Loading…
Cancel
Save