Skip to content

Linux + iPhone Continuity / iMessage / SMS

super annoying native-messaging-hosts setup

Zack Bartel16012b45c982
diff --git a/extension/README.md b/extension/README.md
index 9908e7a..cd81f75 100644
--- a/extension/README.md
+++ b/extension/README.md
@@ -19,3 +19,31 @@ Both extensions communicate with the local `tetherd` native daemon via standard
1. **In Thunderbird**: The extension monitors incoming emails or displayed messages. `src/mail/extractor.js` parses the text for an OTP and sends it through `src/shared/native.js` directly to the `tetherd` daemon.
2. **The Daemon (`tetherd`)**: Acts as a state manager and vault.
3. **In the Browser**: When you navigate to a page asking for an OTP, `src/content/autofill.js` recognizes the field and requests the OTP from `tetherd`. The daemon returns the OTP, which is then injected into the DOM.
+
+## Installation (Native Messaging Host)
+
+To allow the extension to talk to the local `tether` binary, you must register the native messaging host manifest.
+
+### 1. Locate the manifests
+After building the project, the manifests are generated in your build directory:
+- `build/com.tether.extension.chrome.json`
+- `build/com.tether.extension.mozilla.json`
+
+### 2. Create Symlinks
+**Important:** Most browsers (especially Firefox) require the manifest filename in the config directory to **exactly match** the `"name"` field inside the JSON (`com.tether.extension`).
+
+#### Firefox / Thunderbird
+```bash
+mkdir -p ~/.mozilla/native-messaging-hosts/
+ln -s $(pwd)/build/com.tether.extension.mozilla.json ~/.mozilla/native-messaging-hosts/com.tether.extension.json
+```
+
+#### Chromium / Google Chrome
+1. Find your Extension ID in `chrome://extensions`.
+2. Ensure it is listed in the `allowed_origins` field of the manifest.
+3. Link the file:
+```bash
+mkdir -p ~/.config/chromium/NativeMessagingHosts/
+ln -s $(pwd)/build/com.tether.extension.chrome.json ~/.config/chromium/NativeMessagingHosts/com.tether.extension.json
+```
+
diff --git a/extension/host/com.tether.extension.chrome.json.in b/extension/host/com.tether.extension.chrome.json.in
index e2f6c4e..75adfe8 100644
--- a/extension/host/com.tether.extension.chrome.json.in
+++ b/extension/host/com.tether.extension.chrome.json.in
@@ -4,6 +4,6 @@
"path": "@CMAKE_INSTALL_FULL_BINDIR@/tether-native-host",
"type": "stdio",
"allowed_origins": [
- "chrome-extension://<EXTENSION-ID-HERE>/"
+ "chrome-extension://hchjggllicigneeoiiklokpoealgaglc/"
]
}