Skip to content

Commit

Permalink
3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed May 8, 2024
1 parent cb717c9 commit 4f7274f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# 3.1.2

- This version of Ultraviolet cleans up some service worker code to make it faster, and also simplifies the service worker by adding `uv.route()` which allows the service worker to easily detect if the worker should route this request.
```js
importScripts('uv.bundle.js');
importScripts('uv.config.js');
importScripts(__uv$config.sw || 'uv.sw.js');

const uv = new UVServiceWorker();

self.addEventListener('fetch', event => {
event.respondWith(
(async ()=>{
if (uv.route(event)) {
return await uv.fetch(event);
}
return await fetch(event.request);
})()
);
});
```

# v3.1.1

- This version of Ultraviolet upgrades [bare-mux](https://www.npmjs.com/package/@mercuryworkshop/bare-mux). This solves an issue with the bare clients not being found.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@titaniumnetwork-dev/ultraviolet",
"version": "3.1.1",
"version": "3.1.2",
"description": "Highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more!",
"main": "lib/index.cjs",
"license": "MIT",
Expand Down

0 comments on commit 4f7274f

Please sign in to comment.