2026-11-07 13:27:07 +00:00
|
|
|
|
# HTTPS on this server's own address in the local network (no domain): Caddy signs the
|
|
|
|
|
|
# certificate itself (its own small certificate authority, kept in the caddy-data volume) and
|
|
|
|
|
|
# renews it by itself. setup.sh 「區網 IP」 writes this with LAN_IP replaced by the address.
|
|
|
|
|
|
#
|
|
|
|
|
|
# Each phone and computer trusts that authority once: open http://LAN_IP/anybot-ca.crt and
|
|
|
|
|
|
# install it (iPhone: then 設定 › 一般 › 關於本機 › 憑證信任設定, turn it on). After that the
|
|
|
|
|
|
# browser and AnyBot connect to https://LAN_IP without warnings.
|
|
|
|
|
|
{
|
|
|
|
|
|
# A browser asking for an IP address doesn't say which name it wants (no SNI).
|
|
|
|
|
|
default_sni LAN_IP
|
|
|
|
|
|
# The authority lives in this container only; nothing is installed on the server itself.
|
|
|
|
|
|
skip_install_trust
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
https://LAN_IP {
|
|
|
|
|
|
tls internal
|
|
|
|
|
|
encode gzip
|
|
|
|
|
|
reverse_proxy relay:8080 {
|
|
|
|
|
|
# The phone's "anything new?" request waits up to 35 s. Each AnyBot also keeps one
|
|
|
|
|
|
# WebSocket open here (pinged every 15–20 s, so it never sits idle for 60 s).
|
|
|
|
|
|
transport http {
|
安全、修正: harden sandboxes, approval gates, vault, relay roles, and fix protocol/UI bugs
- macOS 沙盒與工具 (tools.rs, policy.rs, docindex.rs): block AppleScript raw events and
concatenation outside the sandbox; stop exposing ~/.ssh or localhost sockets in Sealed
mode; deny writes to shell profiles, LaunchAgents and .git/hooks; expand secret-file
ignores and enforce symlink/policy checks across SSH, device and document search.
- 電腦操作與遮罩 (computer.rs, agent.rs, marks.rs, desktop.rs, cloudbox.rs, portal.rs):
forbid clicking or typing into AnyBot's own windows; extend the sensitive-action hard
gate to raw coordinates, Return/Delete submits and remote devices; stop batch steps if
the front app changes; black out secrets on zoom, show, >600-node trees, adjacent OTP
labels, box screenshots and control text lists; preserve non-text Wayland clipboards.
- 保險庫與瀏覽器 (vault.rs, vault_store.rs, browser.rs, botbrowser.rs, web.rs, box/browser):
verify tab host and HTTPS atomically at fill time; taint filled tabs against browser_eval
and PDF export while masking card/CVC values and screenshots; remember sites only on
always-allow; drop --remote-allow-origins=*; gate private URLs and block metadata/Docker
ports, OrbStack 198.18/15 and IPv6 transition ranges.
- 帳號伺服器、同步與傳送 (relay/, remote.rs, mirror_ui.rs, share.rs, drops.rs): isolate
paired hands hosts from brain sync, tickets, pairing and backup overwrites; redact
routine trigger secrets and clear REDACTED when endpoints change; isolate channel and
team-member turns from owner memories, appctl and grants; scrub shared bot exports and
reset grants/routines on import; validate drop IDs and serialize chunk writes.
- 網路與協定穩定性 (httpd.rs, tunnel.rs, vnc.rs, Caddyfile*): fix chunked integer overflow
and CRLF header injection; enforce Origin checks, connection/job caps, 200 MB backup
reads, unique atomic temp files and ASCII hex guards; bound deflate unzip and VNC sniff
buffers; move VNC stdin/text off the tunnel loop.
- 介面、排程、語言與其他修正 (app.rs, i18n.rs, providers.rs, skills.rs, routines.rs,
setup.rs, store.rs, preview.rs, attach.rs, speech.rs, teams.rs, mcp.rs, voice.rs):
wire up the delete-routine confirmation dialog and mirror run-now; preserve unsaved
mirror edits across brief disconnects; give Chinese skills distinct folders and approval
gates; convert parsed tool JSON fields without corrupting code fences, URLs or paths;
fix Hourly DST offsets and time out unattended routine approvals; lock --install-skill,
cap docx/xlsx unzip sizes, isolate test env keys, and tighten local file permissions.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-12 06:34:10 +00:00
|
|
|
|
read_timeout 620s
|
2026-11-07 13:27:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
# Reloading this file doesn't cut those connections at once.
|
|
|
|
|
|
stream_close_delay 5m
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Plain http only hands out the certificate to trust (it's public anyway), and sends
|
|
|
|
|
|
# everything else to https.
|
|
|
|
|
|
http://LAN_IP {
|
|
|
|
|
|
handle /anybot-ca.crt {
|
|
|
|
|
|
root * /data/caddy/pki/authorities/local
|
|
|
|
|
|
rewrite * /root.crt
|
|
|
|
|
|
header Content-Type application/x-x509-ca-cert
|
|
|
|
|
|
file_server
|
|
|
|
|
|
}
|
|
|
|
|
|
handle {
|
|
|
|
|
|
redir https://LAN_IP{uri}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|