惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
S
Schneier on Security
Scott Helme
Scott Helme
C
Check Point Blog
T
Tenable Blog
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
Lohrmann on Cybersecurity
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
N
News and Events Feed by Topic
B
Blog
P
Privacy International News Feed
I
Intezer
T
Threatpost
Google DeepMind News
Google DeepMind News
L
LangChain Blog
Last Week in AI
Last Week in AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LINUX DO - 最新话题
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cybersecurity and Infrastructure Security Agency CISA
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News | PayPal Newsroom
The Hacker News
The Hacker News
S
Security @ Cisco Blogs
罗磊的独立博客
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
大猫的无限游戏
大猫的无限游戏
U
Unit 42
Hacker News: Ask HN
Hacker News: Ask HN
D
Docker
AI
AI
小众软件
小众软件
博客园 - 叶小钗
H
Help Net Security
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog

博客园 - 悠哉大斌

AI Agent 安全沙箱技术对比:E2B、Cube Sandbox 与 Docker Sandboxes linux 升级 claude code的坑 debian(WSL) apt 代理配置 linux内核之Namespaces、Cgroups、Capabilities、Seccomp和Landlock 大语言模型推理中的隐藏瓶颈及其解决方法 Docker Sandboxes 技术是什么,和docker容器有什么区别 什么是 Docker Agent以及一个Docker Agent示例 windows wsl 安装 Temurin® JDK claude Code 和 codex 作为编程代理,前者使用typescript开发,后者使用rust,他们的决策依据是什么 Java 并发编程发展史与 java.util.concurrent 全景解析 LLM 真的改变了编码风格吗? 如果人工智能会犯错且不精确,为什么它正在改变世界? Python 的协程模型和 JavaScript 的 async/await python闭包和function.__closure__特殊属性 python 的 dunder name和 sunder name 基于nodejs设计REST API的知名开源框架 windows上使用node-oracledb Thick 模式连接 Oracle 11g Claude Code CLI连接 DeepSeek V4模型后调用报400错误 python里对象(object)到底是什么 Python 泛型演变史 Python 类型别名的演变 Python 类型提示的演变史 PEP 593 新增的Annotated 类型 Alibaba AgentScope 和 microsoft agent framework 详细对比分析 spring AI Alibaba Agent Framework 和 agentscope有什么区别和联系 AI Agent协作模式以及主流开源框架对协作模式的支持 Tailscale 是如何接管 DNS 的? Agent = Model + Harness 使用rust编写typescript编译器的难点在什么地方,哪些数据结构是rust不擅长的? TypeScript/JavaScript 中的异步迭代语句 js中的生成器函数 Tailscale Serve and Funnel websocket协议和http协议有何依赖关系? MCP通信的双方是谁? claude code MCP 安装范围 如何在wsl2环境下给claude code cli 配置 playwright-mcp wsl的网络模式有哪几种,有哪些区别? AI Agent memory是什么? ai agent skills是什么? Go测试生态系统工具与最佳实践深度调研(聚焦认证授权系统) 线性代数中常见矩阵类型的概念关系思维导图 三种主流授权策略
openclaw gateway的网络绑定模式
悠哉大斌 · 2026-02-02 · via 博客园 - 悠哉大斌

openclaw gateway 工作原理(简短)

┌─────────────────────────────────────────────────┐
│                   YOUR DEVICES                  │
│  WhatsApp │ Telegram │ Discord │ Slack │ Web UI │
└─────────────┬───────────────────────────────────┘
              │
              ▼
┌─────────────────────────────────────────────────┐
│              OPENCLAW GATEWAY                   │
│  ┌──────────┐  ┌──────────┐  ┌───────────────┐ │
│  │ Channels │  │ Sessions │  │ Memory DB     │ │
│  │ Router   │  │ Manager  │  │ (Persistent)  │ │
│  └──────────┘  └──────────┘  └───────────────┘ │
│  ┌──────────┐  ┌──────────┐  ┌───────────────┐ │
│  │ Skills   │  │ Security │  │ Config        │ │
│  │ Engine   │  │ Layer    │  │ Management    │ │
│  └──────────┘  └──────────┘  └───────────────┘ │
└─────────────┬───────────────────────────────────┘
              │
              ▼
┌─────────────────────────────────────────────────┐
│            AI MODEL PROVIDERS                   │
│  Anthropic │ OpenAI │ Google │ OpenRouter │ ... │
└─────────────────────────────────────────────────┘

openclaw Gateway 配置文件结构

~/.openclaw/openclaw.json

{
  gateway: {
    // Required: local or remote
    mode: "local",
    
    // Server binding
    port: 18789,
    bind: "loopback",  // 五种网络绑定模式:loopback | lan | tailnet | auto | custom
    host: "127.0.0.1",  // when bind=custom
    
    // Authentication
    auth: {
      mode: "token",  // token | password | none
      token: "gway_...",
      password: "..."  // optional, for password mode
    },
    
    // Tailscale integration
    tailscale: {
      mode: "off",  // off | serve | funnel
      resetOnExit: false
    },
    
    // Remote Gateway (when mode=remote)
    remote: {
      url: "ws://...",
      token: "..."
    },
    
    // Hot reload behavior
    reload: {
      mode: "hybrid"  // hybrid | restart | off
    },
    
    // Control UI settings
    controlUi: {
      allowInsecureAuth: false
    }
  },
  
  // Canvas host (separate HTTP server for node WebViews)
  canvasHost: {
    enabled: true,
    port: 18793,
    bind: "loopback"
  }
}

网络绑定模式gateway.bind

网关Gateway支持五种网络绑定模式,由gateway.bind(或--bind)控制

Mode Bind Address Auth Required Use Case
loopback 127.0.0.1 Optional (recommended) Local-only access, SSH tunnels
lan 0.0.0.0 (all interfaces) Yes(token or password) Direct LAN/WAN access without VPN
tailnet Tailscale IP (100.64.0.0/10) Yes (token or password) Tailscale mesh network
auto Falls back through loopback → tailnet → lan If non-loopback Automatic best-effort
custom gateway.host value Yes (token or password) Specific IP binding

安全规则:

  • loopback模式: Auth可选,但推荐 (默认情况下,向导会生成一个令牌)
  • 非loopback模式 (lan, tailnet, custom): 强制Auth,未设置gateway.auth.token 或者 gateway.auth.password,Gateway拒绝启动