From 7cf0dc5dfc93a4daeaa9b242a9968ad4d2853695 Mon Sep 17 00:00:00 2001 From: 0x5487 Date: Wed, 18 Feb 2026 10:25:14 +0800 Subject: [PATCH] chore: Update default host bindings from 0.0.0.0 to 127.0.0.1 for various services and examples. --- README.ja.md | 2 +- README.md | 2 +- README.pt-br.md | 2 +- config/config.example.json | 6 +++--- pkg/config/config.go | 6 +++--- pkg/config/config_test.go | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.ja.md b/README.ja.md index 0da84571a..9f96dce32 100644 --- a/README.ja.md +++ b/README.ja.md @@ -398,7 +398,7 @@ picoclaw gateway "enabled": true, "channel_secret": "YOUR_CHANNEL_SECRET", "channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN", - "webhook_host": "0.0.0.0", + "webhook_host": "127.0.0.1", "webhook_port": 18791, "webhook_path": "/webhook/line", "allow_from": [] diff --git a/README.md b/README.md index 59b9bea7c..ab8cecd99 100644 --- a/README.md +++ b/README.md @@ -432,7 +432,7 @@ picoclaw gateway "enabled": true, "channel_secret": "YOUR_CHANNEL_SECRET", "channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN", - "webhook_host": "0.0.0.0", + "webhook_host": "127.0.0.1", "webhook_port": 18791, "webhook_path": "/webhook/line", "allow_from": [] diff --git a/README.pt-br.md b/README.pt-br.md index d250cc956..0091e919b 100644 --- a/README.pt-br.md +++ b/README.pt-br.md @@ -438,7 +438,7 @@ picoclaw gateway "enabled": true, "channel_secret": "YOUR_CHANNEL_SECRET", "channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN", - "webhook_host": "0.0.0.0", + "webhook_host": "127.0.0.1", "webhook_port": 18791, "webhook_path": "/webhook/line", "allow_from": [] diff --git a/config/config.example.json b/config/config.example.json index 7cd0ab8c6..fdbce0887 100644 --- a/config/config.example.json +++ b/config/config.example.json @@ -25,7 +25,7 @@ }, "maixcam": { "enabled": false, - "host": "0.0.0.0", + "host": "127.0.0.1", "port": 18790, "allow_from": [] }, @@ -58,7 +58,7 @@ "enabled": false, "channel_secret": "YOUR_LINE_CHANNEL_SECRET", "channel_access_token": "YOUR_LINE_CHANNEL_ACCESS_TOKEN", - "webhook_host": "0.0.0.0", + "webhook_host": "127.0.0.1", "webhook_port": 18791, "webhook_path": "/webhook/line", "allow_from": [] @@ -141,7 +141,7 @@ "monitor_usb": true }, "gateway": { - "host": "0.0.0.0", + "host": "127.0.0.1", "port": 18790 } } \ No newline at end of file diff --git a/pkg/config/config.go b/pkg/config/config.go index 1d34f56f3..076625894 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -266,7 +266,7 @@ func DefaultConfig() *Config { }, MaixCam: MaixCamConfig{ Enabled: false, - Host: "0.0.0.0", + Host: "127.0.0.1", Port: 18790, AllowFrom: FlexibleStringSlice{}, }, @@ -292,7 +292,7 @@ func DefaultConfig() *Config { Enabled: false, ChannelSecret: "", ChannelAccessToken: "", - WebhookHost: "0.0.0.0", + WebhookHost: "127.0.0.1", WebhookPort: 18791, WebhookPath: "/webhook/line", AllowFrom: FlexibleStringSlice{}, @@ -319,7 +319,7 @@ func DefaultConfig() *Config { ShengSuanYun: ProviderConfig{}, }, Gateway: GatewayConfig{ - Host: "0.0.0.0", + Host: "127.0.0.1", Port: 18790, }, Tools: ToolsConfig{ diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index febfd0456..2dcc589c5 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -67,7 +67,7 @@ func TestDefaultConfig_Temperature(t *testing.T) { func TestDefaultConfig_Gateway(t *testing.T) { cfg := DefaultConfig() - if cfg.Gateway.Host != "0.0.0.0" { + if cfg.Gateway.Host != "127.0.0.1" { t.Error("Gateway host should have default value") } if cfg.Gateway.Port == 0 { @@ -194,7 +194,7 @@ func TestConfig_Complete(t *testing.T) { if cfg.Agents.Defaults.MaxToolIterations == 0 { t.Error("MaxToolIterations should not be zero") } - if cfg.Gateway.Host != "0.0.0.0" { + if cfg.Gateway.Host != "127.0.0.1" { t.Error("Gateway host should have default value") } if cfg.Gateway.Port == 0 {