addons
addons copied to clipboard
Update trusted_proxies to match docker.address range
Updating DOCS.md to reflect that HA/Supervisor uses 172.30.32.0/23 network for docker so trusted_proxies should match or it's possible for connections to fail with a error of Connection refused) while connecting to upstream.
~# ha net info
docker:
address: 172.30.32.0/23
dns: 172.30.32.3
gateway: 172.30.32.1
interface: hassio
See https://community.home-assistant.io/t/nginx-configuration-connection-refused/62407 and https://github.com/home-assistant/supervisor/blob/7c6c982414794172298b2f29ce2358df062b1c0a/supervisor/const.py#L35 for additional info.
Summary by CodeRabbit
- Documentation
- Updated the example configuration to expand the trusted proxy IP range, now covering both 172.30.32.0/24 and 172.30.33.0/24 subnets.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:
📝 Walkthrough
Walkthrough
The documentation for the NGINX Proxy add-on was updated to expand the example trusted_proxies IP range in the Home Assistant configuration from 172.30.33.0/24 to 172.30.32.0/23, thereby including a wider range of trusted proxy addresses.
Changes
| File(s) | Change Summary |
|---|---|
| nginx_proxy/DOCS.md | Updated example trusted_proxies configuration to use a broader subnet (172.30.32.0/23). |
Sequence Diagram(s)
sequenceDiagram
participant User
participant HomeAssistantConfig
participant NGINXProxy
User -> HomeAssistantConfig: Edits configuration.yaml
HomeAssistantConfig -> NGINXProxy: Sets trusted_proxies: 172.30.32.0/23
NGINXProxy -> HomeAssistantConfig: Accepts requests from expanded IP range
[!TIP]
⚡️ Faster reviews with caching
- CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure
Review - Disable Cacheat either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off theData Retentionsetting under your Organization Settings.Enjoy the performance boost—your workflow just got faster.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaior@coderabbitai titleanywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Updating
DOCS.mdto reflect that HA/Supervisor uses172.30.32.0/23network for docker sotrusted_proxiesshould match or it's possible for connections to fail with a error ofConnection refused) while connecting to upstream.
Well, the proxy runs as an add-on, and gets an IP from the IP assignment pool, which is DOCKER_NETWORK_RANGE. So your Proxy should always get an IP from the 172.30.33.0/24 range.
That said, widen the range doesn't hurt. But it really should not be necessary.
Did you actually encounter that issue? What IP did the NGINX proxy add-on have at that time?
Uh, could it be that your clients connect through IPv6? In that case it seems that the proxy sees the hassio host IP 172.30.32.1 (see also this discussion).
However, defining 172.30.32.1 as trusted proxy IP is not the right solution here, as this would mean all IPv6 addresses are considered trusted. We need to have a NGINX proxy which can make proper IPv6 sockets such that the source IP is correctly mapped to the connecting IPv6 address.