@titaniumnetwork-dev/ultraviolet
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -7,3 +7,3 @@ (()=>{var d=self.Ultraviolet,w=["cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","origin-isolation","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-download-options","x-frame-options","x-permitted-cross-domain-policies","x-powered-by","x-xss-protection"],x=["GET","HEAD"],p=class extends d.EventEmitter{constructor(e=__uv$config){super(),e.prefix||(e.prefix="/service/"),this.config=e,this.bareClient=new d.BareClient}route({request:e}){return!!e.url.startsWith(location.origin+this.config.prefix)}async fetch({request:e}){let o;try{if(!e.url.startsWith(location.origin+this.config.prefix))return await fetch(e);let t=new d(this.config);typeof this.config.construct=="function"&&this.config.construct(t,"service");let g=await t.cookie.db();t.meta.origin=location.origin,t.meta.base=t.meta.url=new URL(t.sourceUrl(e.url));let i=new b(e,t,x.includes(e.method.toUpperCase())?null:await e.blob());if(t.meta.url.protocol==="blob:"&&(i.blob=!0,i.base=i.url=new URL(i.url.pathname)),e.referrer&&e.referrer.startsWith(location.origin)){let s=new URL(t.sourceUrl(e.referrer));(i.headers.origin||t.meta.url.origin!==s.origin&&e.mode==="cors")&&(i.headers.origin=s.origin),i.headers.referer=s.href}let u=await t.cookie.getCookies(g)||[],y=t.cookie.serialize(u,t.meta,!1);i.headers["user-agent"]=navigator.userAgent,y&&(i.headers.cookie=y);let f=new h(i,null,null);if(this.emit("request",f),f.intercepted)return f.returnValue;o=i.blob?"blob:"+location.origin+i.url.pathname:i.url;let c=await this.bareClient.fetch(o,{headers:i.headers,method:i.method,body:i.body,credentials:i.credentials,mode:i.mode,cache:i.cache,redirect:i.redirect}),r=new m(i,c),a=new h(r,null,null);if(this.emit("beforemod",a),a.intercepted)return a.returnValue;for(let s of w)r.headers[s]&&delete r.headers[s];if(r.headers.location&&(r.headers.location=t.rewriteUrl(r.headers.location)),e.destination==="document"){let s=r.headers["content-disposition"];if(!/\s*?((inline|attachment);\s*?)filename=/i.test(s)){let l=/^\s*?attachment/i.test(s)?"attachment":"inline",[v]=new URL(c.finalURL).pathname.split("/").slice(-1);r.headers["content-disposition"]=`${l}; filename=${JSON.stringify(v)}`}}if(r.headers["set-cookie"]&&(Promise.resolve(t.cookie.setCookies(r.headers["set-cookie"],g,t.meta)).then(()=>{self.clients.matchAll().then(function(s){s.forEach(function(l){l.postMessage({msg:"updateCookies",url:t.meta.url.href})})})}),delete r.headers["set-cookie"]),r.body)switch(e.destination){case"script":case"worker":{let s=[t.bundleScript,t.clientScript,t.configScript,t.handlerScript].map(l=>JSON.stringify(l)).join(",");r.body=`if (!self.__uv && self.importScripts) { ${t.createJsInject(t.cookie.serialize(u,t.meta,!0),e.referrer)} importScripts(${s}); } | ||
reload.addEventListener("click", () => location.reload()); | ||
uvVersion.textContent = ${JSON.stringify("3.1.2")}; | ||
uvVersion.textContent = ${JSON.stringify("3.1.3")}; | ||
`;return`<!DOCTYPE html> | ||
@@ -10,0 +10,0 @@ <html> |
{ | ||
"name": "@titaniumnetwork-dev/ultraviolet", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more!", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.cjs", | ||
"devDependencies": { | ||
"@mercuryworkshop/bare-mux": "^1.1.0", | ||
"@mercuryworkshop/bare-mux": "^1.1.2", | ||
"css-tree": "^2.3.1", | ||
@@ -28,0 +28,0 @@ "esbuild": "^0.18.11", |
@@ -27,6 +27,6 @@ <p align="center"><img src="https://raw.githubusercontent.com/titaniumnetwork-dev/Ultraviolet-Static/main/public/uv.png" height="250"></p> | ||
- [Holy Unblocker](https://github.com/holy-unblocker/website) | ||
- [Alu](https://github.com/titaniumnetwork-dev/Alu) | ||
- [AnuraOS](https://github.com/MercuryWorkshop/anuraOS) | ||
- [Nebula](https://github.com/NebulaServices/Nebula) | ||
- [Holy Unblocker](https://github.com/holy-unblocker/website) | ||
- [Terbium](https://github.com/TerbiumOS/webOS) | ||
@@ -33,0 +33,0 @@ - [Incognito](https://github.com/caracal-js/Incognito) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3272454
3155