Add NO_PROXY defaults for http_proxy and document behavior
This commit is contained in:
@@ -217,7 +217,7 @@ All options are set via **Settings → Apps/Add-ons → OpenClaw Assistant → C
|
|||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| `homeassistant_token` | string | _(empty)_ | Optional HA long-lived access token (use at own risk, can be very unsecure but very powerful). Saved to `/config/secrets/homeassistant.token` for use by scripts/skills |
|
| `homeassistant_token` | string | _(empty)_ | Optional HA long-lived access token (use at own risk, can be very unsecure but very powerful). Saved to `/config/secrets/homeassistant.token` for use by scripts/skills |
|
||||||
| `http_proxy` | string | _(empty)_ | Optional outbound proxy URL for HTTP/HTTPS requests from OpenClaw and Node tools. Example: `http://192.168.2.1:3128` |
|
| `http_proxy` | string | _(empty)_ | Optional outbound proxy URL for HTTP/HTTPS requests from OpenClaw and Node tools. Example: `http://192.168.2.1:3128`. When set, the add-on also applies `NO_PROXY/no_proxy` defaults for localhost and private network ranges. |
|
||||||
|
|
||||||
### Router SSH
|
### Router SSH
|
||||||
|
|
||||||
@@ -616,6 +616,8 @@ If Telegram is configured but polling fails with network fetch errors:
|
|||||||
2. Restart the add-on after changing configuration.
|
2. Restart the add-on after changing configuration.
|
||||||
3. Check logs for `INFO: Outbound HTTP/HTTPS proxy enabled from add-on configuration.`
|
3. Check logs for `INFO: Outbound HTTP/HTTPS proxy enabled from add-on configuration.`
|
||||||
4. If you see `WARN: Invalid http_proxy value`, fix the URL format and restart.
|
4. If you see `WARN: Invalid http_proxy value`, fix the URL format and restart.
|
||||||
|
5. Local traffic bypass is applied automatically via `NO_PROXY/no_proxy` defaults:
|
||||||
|
`localhost,127.0.0.1,::1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,.local`
|
||||||
|
|
||||||
### Skills disappearing after update
|
### Skills disappearing after update
|
||||||
|
|
||||||
|
|||||||
@@ -62,11 +62,17 @@ set +x
|
|||||||
# If set, apply it to both HTTP and HTTPS for Node/undici/OpenClaw tooling.
|
# If set, apply it to both HTTP and HTTPS for Node/undici/OpenClaw tooling.
|
||||||
if [ -n "$ADDON_HTTP_PROXY" ]; then
|
if [ -n "$ADDON_HTTP_PROXY" ]; then
|
||||||
if [[ "$ADDON_HTTP_PROXY" =~ ^https?://[^[:space:]]+$ ]]; then
|
if [[ "$ADDON_HTTP_PROXY" =~ ^https?://[^[:space:]]+$ ]]; then
|
||||||
|
# Keep local traffic direct to avoid accidental proxying of loopback/LAN services.
|
||||||
|
DEFAULT_NO_PROXY="localhost,127.0.0.1,::1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,.local"
|
||||||
|
|
||||||
export HTTP_PROXY="$ADDON_HTTP_PROXY"
|
export HTTP_PROXY="$ADDON_HTTP_PROXY"
|
||||||
export HTTPS_PROXY="$ADDON_HTTP_PROXY"
|
export HTTPS_PROXY="$ADDON_HTTP_PROXY"
|
||||||
export http_proxy="$ADDON_HTTP_PROXY"
|
export http_proxy="$ADDON_HTTP_PROXY"
|
||||||
export https_proxy="$ADDON_HTTP_PROXY"
|
export https_proxy="$ADDON_HTTP_PROXY"
|
||||||
|
export NO_PROXY="${NO_PROXY:+${NO_PROXY},}${DEFAULT_NO_PROXY}"
|
||||||
|
export no_proxy="${no_proxy:+${no_proxy},}${DEFAULT_NO_PROXY}"
|
||||||
echo "INFO: Outbound HTTP/HTTPS proxy enabled from add-on configuration."
|
echo "INFO: Outbound HTTP/HTTPS proxy enabled from add-on configuration."
|
||||||
|
echo "INFO: Applied NO_PROXY defaults for localhost/private network ranges."
|
||||||
else
|
else
|
||||||
echo "WARN: Invalid http_proxy value in add-on options; expected URL like http://host:port"
|
echo "WARN: Invalid http_proxy value in add-on options; expected URL like http://host:port"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user