Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

A desktop app found on the tailnet says how to share it

Milind Soni8e13d1411864
diff --git a/electron/server-probe.d.mts b/electron/server-probe.d.mts
index db6ae144fb..e4f86523c6 100644
--- a/electron/server-probe.d.mts
+++ b/electron/server-probe.d.mts
@@ -1,7 +1,7 @@
import type { ServerInputProblem, ServerTransport } from "./server-address.mjs";
export type ServerProbeProblem = ServerInputProblem | "unreachable" | "dns" | "certificate" | "notMausBot" | "desktopApp" | "loopback" | "localNetwork"
- | "tailscaleOff" | "otherTailnet" | "tailnetBlocked" | "tailnetSilent";
+ | "desktopAppTailnet" | "tailscaleOff" | "otherTailnet" | "tailnetBlocked" | "tailnetSilent";
export type ServerProbe =
| { outcome: "found"; origin: string; label: string; version: string | null; transport: ServerTransport; code: string | null; credential: string | null }
| { outcome: "problem"; problem: ServerProbeProblem; host?: string; code?: string; reason?: "refused" | "timeout" };
diff --git a/electron/server-probe.mjs b/electron/server-probe.mjs
index b36aed74a5..d34dbb66da 100644
--- a/electron/server-probe.mjs
+++ b/electron/server-probe.mjs
@@ -23,6 +23,7 @@ export const CONNECT_PROBLEM_KEYS = Object.freeze({
certificate: "native.connect.certificate",
notMausBot: "native.connect.notMausBot",
desktopApp: "native.connect.desktopApp",
+ desktopAppTailnet: "native.connect.desktopAppTailnet",
loopback: "native.connect.loopback",
localNetwork: "native.connect.localNetwork",
tailscaleOff: "native.connect.tailscaleOff",
@@ -38,6 +39,7 @@ export const CONNECT_PROBLEM_KEYS = Object.freeze({
* out), or the computer there is asleep, offline or not sharing.
*/
function tailnetProblem(kind, platform, tailnet) {
+ if (kind === "desktopApp") return "desktopAppTailnet";
if (!tailnet) return "tailscaleOff";
if (kind === "dns") return "otherTailnet";
if (kind === "noRoute" && platform === "darwin") return "tailnetBlocked";
diff --git a/electron/server-probe.node-test.mjs b/electron/server-probe.node-test.mjs
index 4e6b541e76..402c01c768 100644
--- a/electron/server-probe.node-test.mjs
+++ b/electron/server-probe.node-test.mjs
@@ -67,6 +67,9 @@ test("a tailnet address that doesn't answer says whose Tailscale to fix", async
assert.equal((await probe(fakeFetch({}).fetch)).problem, "tailnetSilent");
// A bare tailnet address and an https name are tailnet addresses too.
assert.equal((await probeServer({ address: "http://100.101.102.103:8799", fetch: fakeFetch({ "http://100.101.102.103:8799": blocked() }).fetch, platform: "darwin", tailnet: () => true })).problem, "tailnetBlocked");
+ // The phone port of a desktop app on the tailnet: that app can share itself, so say how.
+ const phonePort = () => new Response(JSON.stringify({ error: "pair this device from Remote access settings" }), { status: 401, headers: { "content-type": "application/json" } });
+ assert.equal((await probeServer({ address: "http://macmini.tail1234.ts.net:8810", fetch: fakeFetch({ "http://macmini.tail1234.ts.net:8810": phonePort }).fetch, tailnet: () => true })).problem, "desktopAppTailnet");
// Off a tailnet a bare 100.64/10 address is just a private one: carrier NAT or another VPN keeps the Local Network hint.
const bare = await probeServer({ address: "http://100.101.102.103:8799", fetch: fakeFetch({ "http://100.101.102.103:8799": blocked() }).fetch, platform: "darwin", tailnet: () => false });
assert.deepEqual(bare, { outcome: "problem", problem: "localNetwork", host: "100.101.102.103:8799" });
diff --git a/src/locales/en.json b/src/locales/en.json
index 3964befafa..4b47c30bca 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -9215,6 +9215,7 @@
"native.connect.certificate": "{host}'s certificate isn't valid yet. A new server can take a minute to get one.",
"native.connect.notMausBot": "That address answers, but it isn't a MausBot server.",
"native.connect.desktopApp": "{host} is a MausBot desktop app, and one desktop app can't connect to another. To use that computer from here, share it with My Cloud from its own app, or use My Cloud.",
+ "native.connect.desktopAppTailnet": "{host} is a MausBot desktop app on your tailnet. To open it from here, turn on Tailscale and Your other computers in its Settings → Phone & devices, then use the address shown there.",
"native.connect.loopback": "This points at this computer ({host}), not at the server. Use the server's own address.",
"native.connect.localNetwork": "Can't reach {host}. On a Mac, turn on OpenMausBot in System Settings → Privacy & Security → Local Network, then try again. Also check that the server is running on this network.",
"native.connect.tailscaleOff": "{host} is on a Tailscale network, and Tailscale isn't connected on this computer. Open Tailscale here, sign in to the same tailnet, then try again.",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index 6977e77767..d626a6f447 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -9187,6 +9187,7 @@
"native.connect.certificate": "O certificado de {host} ainda não é válido. Um servidor novo pode levar um minuto para obter um.",
"native.connect.notMausBot": "Esse endereço responde, mas não é um servidor MausBot.",
"native.connect.desktopApp": "{host} é um app de desktop do MausBot, e um app de desktop não pode se conectar a outro. Para usar esse computador daqui, compartilhe-o com o My Cloud pelo próprio app dele, ou use o My Cloud.",
+ "native.connect.desktopAppTailnet": "{host} é um app desktop do MausBot na sua tailnet. Para abri-lo daqui, ligue o Tailscale e Seus outros computadores nas Configurações dele → Celular e dispositivos e use o endereço mostrado lá.",
"native.connect.loopback": "Isso aponta para este computador ({host}), não para o servidor. Use o endereço do próprio servidor.",
"native.connect.localNetwork": "Não foi possível acessar {host}. No Mac, ative o OpenMausBot em Ajustes do Sistema → Privacidade e Segurança → Rede Local e tente de novo. Verifique também se o servidor está rodando nesta rede.",
"native.connect.tailscaleOff": "{host} está em uma rede Tailscale, e o Tailscale não está conectado neste computador. Abra o Tailscale aqui, entre na mesma tailnet e tente de novo.",