Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark fields "allowed_ips" and "client_allowed_ips" as required #315

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thijzert
Copy link

@thijzert thijzert commented May 30, 2024

The add-on refuses to start without them. This fixes #262

Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation
    • Clarified usage of peers.allowed_ips and peers.client_allowed_ips in server and client configurations by removing the (optional) tag.
    • Expanded explanation of the log_level option for better troubleshooting guidance.
    • Minor formatting adjustments made for improved clarity throughout the document.

Copy link

coderabbitai bot commented May 30, 2024

Walkthrough

The update to wireguard/DOCS.md clarifies that the configuration options peers.allowed_ips and peers.client_allowed_ips are mandatory for server and client setups, removing any previous indications that they were optional. Additionally, the documentation now provides a more detailed explanation of the log_level option and includes minor formatting adjustments for clarity.

Changes

File Change Summary
wireguard/DOCS.md Removed the (optional) tag from peers.allowed_ips and peers.client_allowed_ips, clarifying their necessity. Expanded the description of the log_level option for better understanding. Minor formatting adjustments made throughout.

Assessment against linked issues

Objective Addressed Explanation
Update documentation to mark peers.allowed_ips as required (#262)
Update documentation to mark peers.client_allowed_ips as required (#262)

Poem

In the realm of code, a change so bright,
allowed_ips now in the light.
No longer optional, clear and true,
For servers and clients, a path anew.
A doc refined, precise and neat,
Our VPN's heart now skips a beat.
🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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 @coderabbitai in 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 @coderabbitai in 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.

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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2f12cf7 and 91f0027.

Files selected for processing (1)
  • wireguard/DOCS.md (2 hunks)
Additional context used
LanguageTool
wireguard/DOCS.md

[style] ~3-~3: As an alternative to the over-used intensifier ‘extremely’, consider replacing this phrase.
Context: ...: WireGuard [WireGuard®][wireguard] is an extremely simple yet fast and modern VPN that utilizes s...


[misspelling] ~13-~13: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...d) and widely deployable, including via an Hass.io add-on! WireGuard is currently...


[style] ~22-~22: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...minology used. The add-on takes care of a lot of things for you (if you want). Follow t...


[style] ~58-~58: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...however, one big difference: The add-on is able to generate configurations for the add-on,...


[grammar] ~122-~122: An auxiliary verb seems to be missing from this progressive structure. Did you mean “it's effectively making”, “it is effectively making”, or “it was effectively making”?
Context: ...r clients to use those. What this does, it effectively making your clients to have ad-filtering (e.g....


[uncategorized] ~169-~169: Did you mean: “By default,”?
Context: ...o "off", will disable that behavior. By default it executes the following: ```bash ipt...


[uncategorized] ~186-~186: Did you mean: “By default,”?
Context: ...o "off", will disable that behavior. By default it executes the following: ```bash ipt...


[grammar] ~246-~246: A determiner may be missing.
Context: ...n can generate public/private keypairs, from best security practice perspective, it is st...


[style] ~247-~247: Style-wise, it’s not ideal to insert an adverb (‘manually’) in the middle of an infinitive construction (‘to provide’). Try moving the adverb to avoid split infinitives.
Context: ...ty practice perspective, it is strongly advised to manually provide a public key for each of your peers. In that case, t...


[uncategorized] ~290-~290: Did you mean: “By default,”?
Context: ...tent keepalive interval of 25 seconds. By default or when unspecified, this option is set...


[uncategorized] ~302-~302: Possible missing comma found.
Context: ...onnect to its peer. This is completely optional as the endpoint will be updated automat...


[style] ~308-~308: This phrase might be redundant. Consider either removing or replacing the adjective ‘additional’.
Context: ...y generated by wg genpsk. This option adds an additional layer of symmetric-key cryptography to be mix...


[uncategorized] ~327-~327: Loose punctuation mark.
Context: ...n issue. Possible values are: - trace: Show every detail, like all called inte...


[uncategorized] ~328-~328: Loose punctuation mark.
Context: ...all called internal functions. - debug: Shows detailed debug information. - `in...


[uncategorized] ~329-~329: Loose punctuation mark.
Context: ...ows detailed debug information. - info: Normal (usually) interesting events. - ...


[uncategorized] ~330-~330: Loose punctuation mark.
Context: ...usually) interesting events. - warning: Exceptional occurrences that are not er...


[uncategorized] ~331-~331: Loose punctuation mark.
Context: ...currences that are not errors. - error: Runtime errors that do not require imme...


[uncategorized] ~332-~332: Loose punctuation mark.
Context: ... not require immediate action. - fatal: Something went terribly wrong. Add-on b...


[uncategorized] ~356-~356: When ‘start-up’ is used as a noun or modifier, it needs to be hyphenated.
Context: ...-on to throw a large warning during the start up. However, the add-on will work as adver...


[uncategorized] ~359-~359: The preposition ‘to’ seems more likely in this position.
Context: ...hen this happens, the add-on falls back on a standalone instance of WireGuard runn...


[style] ~362-~362: Consider a shorter alternative to avoid wordiness.
Context: ...has drawbacks in terms of performance. In order to run WireGuard optimal, you should insta...


[style] ~422-~422: ‘take into account’ might be wordy. Consider a shorter alternative.
Context: ...sistant Backups. There is one caveat to take into account: A partial backup of the add-on DOES NO...


[style] ~446-~446: For conciseness, consider replacing this expression with an adverb.
Context: ...esource: http://a0d7b954-wireguard ``` At this moment, we do not have template or examples on...


[uncategorized] ~462-~462: Possible missing preposition found.
Context: ...n add 172.30.32.1 as a DNS IP address the list to use it. - If you run a protecti...


[uncategorized] ~485-~485: Loose punctuation mark.
Context: ...ented based on the following: - MAJOR: Incompatible or major changes. - `MINOR...


[uncategorized] ~486-~486: Loose punctuation mark.
Context: ...Incompatible or major changes. - MINOR: Backwards-compatible new features and e...


[uncategorized] ~487-~487: Loose punctuation mark.
Context: ...new features and enhancements. - PATCH: Backwards-compatible bugfixes and packa...

wireguard/DOCS.md Show resolved Hide resolved
wireguard/DOCS.md Show resolved Hide resolved
@thijzert
Copy link
Author

@coderabbitai, if you're so smart, please also add the label documentation to this PR.

Copy link

coderabbitai bot commented May 30, 2024

Tip

For best results, initiate chat on the files or code changes.

@thijzert, it seems that I currently do not have the necessary permissions to add labels to the PR. You might need to add the label documentation manually or adjust the repository settings to grant the necessary permissions for this action. If there's anything else I can assist with, please let me know!

Analysis chain
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Adding the label 'documentation' to PR #315
gh pr edit 315 --add-label "documentation"

Length of output: 123

Permission issue

There was a permission issue. Please ask the repository administrator to refresh CodeRabbit's permissions at https://github.com/apps/coderabbitai/installations/50882955.

Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jun 30, 2024
@thijzert
Copy link
Author

Does this count as "further activity"?

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Jul 1, 2024
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added stale There has not been activity on this issue or PR for quite some time. and removed stale There has not been activity on this issue or PR for quite some time. labels Aug 17, 2024
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Sep 17, 2024
@thijzert
Copy link
Author

@frenck It feels almost impolite to keep bumping my own PR every month. Could you maybe dial down the settings for the auto-stale bot?

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Sep 18, 2024
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Oct 18, 2024
@thijzert
Copy link
Author

That whole "Thank you for your contributions." spiel is beginning to sound a bit hollow, tbh.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Oct 19, 2024
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Nov 18, 2024
@thijzert
Copy link
Author

thijzert commented Nov 18, 2024 via email

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Nov 19, 2024
The add-on refuses to start without them. This fixes hassio-addons#262
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
wireguard/DOCS.md (2)

Line range hint 251-258: Update documentation to indicate that peers.allowed_ips is required

The current documentation suggests that if no IPs are configured, the add-on will use the addresses from peers.addresses. However, according to the PR objectives and issue #262, this field is required and the add-on fails to start without it. Please update the documentation to clearly state that this is a required field.

-If there are no IP addresses configured, the add-on will use the addresses
-listed in `peers.addresses`.
+This is a required field. The add-on will fail to start if this field is not configured.

Line range hint 266-275: Update documentation to indicate that peers.client_allowed_ips is required

The current documentation suggests defaults will be used if not configured. However, according to the PR objectives, issue #262, and the retrieved learnings, this field is required and the add-on fails to start without it. Please update the documentation to clearly state that this is a required field.

-If not configured, the add-on will use `0.0.0.0/0` in the generated client
-configuration, routing all traffic on your client through the VPN tunnel.
+This is a required field. The add-on will fail to start if this field is not configured.
+When set to `0.0.0.0/0`, all traffic on your client will be routed through the VPN tunnel.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 91f0027 and acb530b.

📒 Files selected for processing (1)
  • wireguard/DOCS.md (2 hunks)
🧰 Additional context used
📓 Learnings (1)
wireguard/DOCS.md (1)
Learnt from: thijzert
PR: hassio-addons/addon-wireguard#315
File: wireguard/DOCS.md:266-266
Timestamp: 2024-11-12T09:25:07.158Z
Learning: The `peers.client_allowed_ips` field in the WireGuard add-on configuration must be explicitly set; otherwise, the add-on won't start. This is checked and processed in `wireguard/rootfs/etc/cont-init.d/config.sh`.

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.

peers.allowed_ips and peers.client_allowed_ips are not optional
1 participant