Use runtime-dir Unix sockets for local gRPC

This commit is contained in:
Joe Julian
2026-04-11 08:26:37 -07:00
parent c017308aa1
commit 2ef571c241
16 changed files with 346 additions and 29 deletions
+2 -2
View File
@@ -2,9 +2,9 @@
Shared extension assets for Firefox and Chromium-based browsers live here.
- `manifest.firefox.json` uses the fixed Firefox extension id `browser@keepassgo.invalid`
- `manifest.firefox.json` uses the fixed Firefox extension id `browser@keepassgo.com`
- `manifest.chromium.json` is the Chromium/Chrome manifest template
- `background.js` talks to the native messaging host `org.keepassgo.browser`
- `background.js` talks to the native messaging host `com.keepassgo.browser`
- `content.js` fills username and password fields on the current page
- `options.html` stores the local gRPC address and API token in browser extension storage
+2 -2
View File
@@ -1,7 +1,7 @@
const ext = globalThis.browser ?? globalThis.chrome;
const nativeHost = "org.keepassgo.browser";
const nativeHost = "com.keepassgo.browser";
const defaultSettings = {
grpcAddress: "127.0.0.1:47777",
grpcAddress: "",
bearerToken: ""
};
+1 -1
View File
@@ -25,7 +25,7 @@
],
"browser_specific_settings": {
"gecko": {
"id": "browser@keepassgo.invalid"
"id": "browser@keepassgo.com"
}
}
}
+1 -1
View File
@@ -17,7 +17,7 @@
<form id="settings-form" class="settings-form">
<label>
<span>gRPC address</span>
<input id="grpc-address" name="grpc-address" type="text" value="127.0.0.1:47777" autocomplete="off">
<input id="grpc-address" name="grpc-address" type="text" value="" placeholder="Leave blank for the local default socket" autocomplete="off">
</label>
<label>
<span>API token</span>
+1 -1
View File
@@ -18,7 +18,7 @@ async function loadSettings() {
if (!response?.success) {
throw new Error(response?.error || "Could not load settings.");
}
document.getElementById("grpc-address").value = response.settings.grpcAddress || "127.0.0.1:47777";
document.getElementById("grpc-address").value = response.settings.grpcAddress || "";
document.getElementById("bearer-token").value = response.settings.bearerToken || "";
}