Skip to content

fix: accept 0.0.0.0 as a forward target on ports Charon does not use - #2000

Merged
Wikid82 merged 1 commit into
developmentfrom
fix/forward-target-unspecified-address
Nov 17, 2026
Merged

Wikid82 merged 1 commit into
developmentfrom
fix/forward-target-unspecified-address

Conversation

@Wikid82

@Wikid82 Wikid82 commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Fixes #1998.

Problem

Since v0.51.0, proxy hosts that forward to 0.0.0.0:<port> are left out of the generated Caddy config with "Skipping proxy host: its forward target is not permitted by this proxy". The address policy allows loopback but treats the unspecified address as blocked. On Linux 0.0.0.0 reaches this machine like 127.0.0.1, so this was a regression for setups where services publish ports on the host.

Change

  • New forwardLiteralBlocked helper judges IPv4 0.0.0.0 (including legacy spellings) as loopback. It is used by both forward target paths: config generation and the save-time check.
  • AddressPolicy.Blocked, probes and dial-time checks are unchanged.
  • Charon's reserved ports stay refused for 0.0.0.0. Link-local, cloud metadata and :: stay refused.
  • docs/features/orthrus.md updated.

Known limits

  • Test Connection and uptime monitors that dial 0.0.0.0 are still refused at dial time.
  • A name that resolves to 0.0.0.0 is still refused at save.

Tests

Unit tests cover accepted 0.0.0.0 forms on ordinary ports, refusal on reserved ports, and the other blocked addresses. go test ./internal/services/ ./internal/caddy/ ./internal/network/ passes.

Proxy hosts that forward to 0.0.0.0 were left out of the generated config
after the forward target checks tightened, because the address policy
treats the unspecified address as blocked. On Linux it reaches this
machine like 127.0.0.1, so forward targets now judge it as loopback.
Charon's own ports stay refused, and probes and dials are unchanged.

Fixes #1998
@github-actions

Copy link
Copy Markdown
Contributor

✅ Supply Chain Verification Results

✅ PASSED

📦 SBOM Summary

  • Components: 1873

🔍 Vulnerability Scan

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 13
🟢 Low 2
Total 16

📎 Artifacts

  • SBOM (CycloneDX JSON) and Grype results available in workflow artifacts

Generated by Supply Chain Verification workflow • View Details

@github-advanced-security

Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Wikid82
Wikid82 merged commit 0a982f4 into development Nov 17, 2026
74 of 76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants