Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
app_settings: the browser SOCKS5 proxy, direct with Undo
milind-soni5c339c129f36
diff --git a/server/app-settings/host.test.ts b/server/app-settings/host.test.tsindex 922d04f91f..d3cec1fcd1 100644--- a/server/app-settings/host.test.ts+++ b/server/app-settings/host.test.ts@@ -406,6 +406,16 @@ describe("every other setting applies at once with Undo, Full access or not", ()expect(fx.botPatches).toEqual([{ botId: "kiwi", body: { memoryEnabled: false, computer: "local" } }, { botId: "kiwi", body: { memoryEnabled: true, computer: null } }]);});+ it("the browser proxy takes only a socks5 address, reads as set or not set, and Undo clears it", async () => {+ const fx = fixture();+ expect((await fx.set("desktops.browserProxy", "http://proxy.example:8080")).status).toBe(400);+ const result = await fx.set("desktops.browserProxy", "socks5://proxy.example:1080");+ expect(result.body.text).toMatch(/^Done: Send bots' browsers to public sites through the SOCKS5 proxy you named\. Browser proxy now: set\./);+ expect(JSON.stringify(fx.messages)).not.toContain("proxy.example");+ expect(await fx.undo()).toEqual({ claimed: true, state: "undone" });+ expect(fx.saved).toEqual([{ browserEngine: { egress: { proxy: "socks5://proxy.example:1080" } } }, { browserEngine: { egress: { proxy: "" } } }]);+ });+it("a bot's library skills are set from the full list, and Undo gives back the earlier list", async () => {const fx = fixture();await fx.set("bots.skills", JSON.stringify({ botId: "clive", skills: [] }));diff --git a/server/app-settings/registry-config.ts b/server/app-settings/registry-config.tsindex a00bcb3e19..9bbad908e6 100644--- a/server/app-settings/registry-config.ts+++ b/server/app-settings/registry-config.ts@@ -8,6 +8,7 @@ import { IMAGE_PROVIDERS } from "../../shared/image-generation.ts";import { EFFORT_LEVELS } from "../../shared/wire.ts";import { DEFAULT_WINDOW_MINUTES } from "../cache-keepwarm.ts";import { botsTowardLimit } from "../../shared/bot-limit.ts";+import { parseSocks5Proxy } from "../browser/egress/policy.ts";import { CONFIG_PATCH_FIELDS as F, MAX_THREAD_EVENT_LOG_BYTES, MIN_THREAD_EVENT_LOG_BYTES } from "../config.ts";import { display, withoutKeys, type RegistryDeps, type SettingEntry, type Where, type WritableSpec } from "./registry.ts";@@ -128,6 +129,14 @@ export function configEntries(deps: Pick<RegistryDeps, "cfg" | "saveConfig" | "bcurrent: () => cfg().browserEngine?.egress?.localNetwork === true, patch: (localNetwork) => ({ browserEngine: { egress: { localNetwork } } }),says: (on) => (on ? "Let bots' browsers open sites on your local network" : "Keep bots' browsers off your local network"),}),+ section({+ id: "desktops.browserProxy", label: "Browser proxy", help: "An unauthenticated SOCKS5 proxy bots' browsers reach public sites through; empty sends them direct. Its address is never shown, only whether one is set.",+ where: "Settings → Desktops & browser", synonyms: ["proxy", "socks", "socks5", "browser proxy"],+ value: z.string().trim().max(512).refine((text) => text === "" || parseSocks5Proxy(text) !== null, "an unauthenticated socks5://host:port address, or empty"),+ allowed: 'an unauthenticated "socks5://host:port", or "" for no proxy', current: () => cfg().browserEngine?.egress?.proxy ?? "",+ read: () => (cfg().browserEngine?.egress?.proxy ? "set" : ""), patch: (proxy) => ({ browserEngine: { egress: { proxy } } }),+ says: (proxy) => (proxy ? "Send bots' browsers to public sites through the SOCKS5 proxy you named" : "Send bots' browsers to public sites directly, with no proxy"),+ }),section({id: "desktops.browserEngine", label: "Browser engine", help: "What runs bots' browsers: agent-browser (the default) or MausBot's own Chrome driver (early).", where: "Settings → Desktops & browser",synonyms: ["browser engine", "chrome", "new browser", "agent-browser"], value: z.enum(["agent-browser", "chrome"]), allowed: "agent-browser or chrome",