Use runtime-dir Unix sockets for local gRPC
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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: ""
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
],
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "browser@keepassgo.invalid"
|
||||
"id": "browser@keepassgo.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 || "";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user