Skip to main content
Deno 2 is finally here 🎉️
Learn more

desktop_bridge

A bridge for browser extensions that will allow you to obtain data from other domains or execute PowerShell commands right from your browser.

Proxy

Example of the proxy feature that can be used to access other domains:

const response = await fetch(
  "http:/localhost:4500/?url=https://example.com/&contentType=text/html",
);
const text = await response.text();
console.log(text); // <html>...</html>

The contentType parameter is optional and can be used to set the content type of the response, default value is “text/plain”.

Commands

Example of the commands feature that can be used to execute PowerShell commands:

const response = await fetch("http://localhost:4500/", {
  method: "POST",
  body: `Start-Process notepad.exe echo "Notepad opened"`,
});

const text = await response.text();
console.log(text); // Notepad opened

Running

The command below will run the script with the necessary permissions:

deno run --allow-net --allow-write --allow-run main.ts