Compare commits

...

121 Commits

41 changed files with 2342 additions and 684 deletions

View File

@@ -1,19 +0,0 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
ident_size = 4
[*.md]
ident_size = 2
trim_trailing_whitespace = false
[*.json]
ident_size = 2
[{.gitignore,.gitkeep,.editorconfig}]
ident_size = 2

3
.github/CODEOWNERS vendored
View File

@@ -1,4 +1 @@
# Require maintainer's :+1: for changes to the .github/ repo-config files
# mainly due to https://github.com/probot/settings privilege escalation
.github/* @frenck
.gitlab-ci.yml @frenck

133
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@@ -0,0 +1,133 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
frenck@frenck.dev.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][mozilla coc].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

3
.github/FUNDING.yml vendored
View File

@@ -1,5 +1,4 @@
---
# github: frenck
github: frenck
patreon: frenck
ko_fi: frenck
custom: https://frenck.dev/donate/

View File

@@ -6,4 +6,4 @@
> ([Github link][autolink-references] to related issues or pull requests)
[autolink-references]: https://help.github.com/articles/autolinked-references-and-urls/
[autolink-references]: https://help.github.com/articles/autolinked-references-and-urls/

1839
.github/SECURITY.md vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
---
"Type: Documentation": ["*.md", "*.j2"]

50
.github/config.yml vendored
View File

@@ -1,50 +0,0 @@
---
# Configuration for request-info - https://github.com/behaviorbot/request-info
# *OPTIONAL* Comment to reply with
# Can be either a string :
requestInfoReplyComment:
- "We would appreciate it if you could provide us with more info about this issue/pr!"
- "Hmmm... That issue/PR is kinda low on text. Could you please provide some more content?"
# *OPTIONAL* default titles to check against for lack of descriptiveness
# MUST BE ALL LOWERCASE
requestInfoDefaultTitles: []
# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
requestInfoLabelToAdd: "Incomplete"
# *OPTIONAL* Require Pull Requests to contain more information than what is provided in the PR template
# Will fail if the pull request's body is equal to the provided template
checkPullRequestTemplate: true
# *OPTIONAL* Only warn about insufficient information on these events type
# Keys must be lowercase. Valid values are 'issue' and 'pullRequest'
requestInfoOn:
pullRequest: true
issue: true
# *OPTIONAL* Add a list of people whose Issues/PRs will not be commented on
# keys must be GitHub usernames
requestInfoUserstoExclude: []
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
# Comment to be posted to on first time issues
newIssueWelcomeComment: >
:wave: Thanks for opening your first issue here!
If you're reporting a :bug: bug, please make sure you include steps to reproduce it.
Also, logs, error messages and information about your hardware might be usefull.
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: >
:sparkling_heart: Thanks for opening this pull request! :sparkling_heart:
If your PR gets accepted and merged in, we will invite you to the project :tada:
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
Congrats on merging your first pull request! :tada::tada::tada:

8
.github/dependabot.yaml vendored Normal file
View File

@@ -0,0 +1,8 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "06:00"

View File

@@ -1,10 +0,0 @@
---
# If true, this will add new contributors as outside collaborators
# to the repo their PR was merged in. Team name is ignored if this
# flag is set to true.
isOutside: false
# Specify team name to add new contributors to a specific team
# within your organization.
# Use team name or team-name-slug
team: Contributors

20
.github/lock.yml vendored
View File

@@ -1,20 +0,0 @@
---
# Configuration for lock-threads - https://github.com/dessant/lock-threads
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 30
# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked because it has not had recent
activity. Please open a new issue for related bugs and link to relevant
comments in this thread.
# Issues or pull requests with these labels will not be locked
# exemptLabels:
# - no-locking
# Limit to only `issues` or `pulls`
# only: issues
# Add a label when locking. Set to `false` to disable
lockLabel: false

20
.github/move.yml vendored
View File

@@ -1,20 +0,0 @@
---
# Delete the command comment when it contains no other content
deleteCommand: true
# Close the source issue after moving
closeSourceIssue: true
# Lock the source issue after moving
lockSourceIssue: true
# Mention issue and comment authors
mentionAuthors: true
# Preserve mentions in the issue content
keepContentMentions: false
# Set custom aliases for targets
# aliases:
# r: repo
# or: owner/repo

View File

@@ -1,13 +0,0 @@
---
# Configuration for probot-no-response - https://github.com/probot/no-response
# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 14
# Label requiring a response
responseRequiredLabel: "Status: Awaiting response"
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.

View File

@@ -1,14 +0,0 @@
---
# Label name and color to set, when potential duplicates are detected
issueLabel: "Potential duplicate"
labelColor: e6e6e6
# If similarity is higher than this threshold, issue will be marked as duplicate
threshold: 0.70
# Comment to post when potential duplicates are detected
referenceComment: >
Potential duplicates found:
{{#issues}}
- [#{{ number }}] {{ title }} ({{ accuracy }}%)
{{/issues}}

150
.github/settings.yml vendored
View File

@@ -1,150 +0,0 @@
---
repository:
description: "ZeroTier One - Community Hass.io Add-on for Home Assistant"
homepage: https://addons.community
topics: zerotier, vpn, peer-to-peer, networking, hassio-addons, hassio, hass, home-assistant, homeassistant
private: false
has_issues: true
has_projects: false
has_wiki: false
has_downloads: false
default_branch: master
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: true
labels:
# Priority labels
- name: "Priority: Critical"
color: ee0701
description: "This should be dealt with ASAP. Not fixing this issue would be a serious error."
- name: "Priority: High"
color: b60205
description: "After critical issues are fixed, these should be dealt with before any further issues."
- name: "Priority: Medium"
color: 0e8a16
description: "This issue may be useful, and needs some attention."
- name: "Priority: Low"
color: e4ea8a
description: "Nice addition, maybe... someday..."
# Type labels
- name: "Type: Bug"
color: ee0701
description: "Inconsistencies or issues which will cause a problem for users or implementors."
- name: "Type: Documentation"
color: 0052cc
description: "Solely about the documentation of the project."
- name: "Type: Enhancement"
color: 1d76db
description: "Enhancement of the code, not introducing new features."
- name: "Type: Feature"
color: 0e8a16
description: "New features or options."
- name: "Type: Support"
color: 5319e7
description: "Marks an issue as an support ticket."
- name: "Type: Discussion"
color: d4c5f9
description: "Marks an issue as an generic discussion ticket."
- name: "Type: Maintenance"
color: 2af79e
description: "Generic maintenance tasks, e.g., package updates."
# Additional markers
- name: "Security"
color: ee0701
description: "Marks an security issues that needs to be resolved asap."
- name: "Idea"
color: fef2c0
description: "Marks an idea, which might be excepted and implemented."
- name: "Incomplete"
color: fef2c0
description: "Marks an PR or issue that is missing information."
- name: "Pull request"
color: fbca04
description: "There is an PR opened for this issue."
- name: "Accepted"
color: c2e0c6
description: "This issue or PR has been accepted."
- name: "Declined"
color: f9d0c4
description: "This issue or PR has been declined."
- name: "Potential duplicate"
color: e6e6e6
description: "This issue has been automatically marked as a potential duplicate."
# Ongoing Status labels
- name: "Status: Triage"
color: fbca04
description: "This issue needs to be triaged."
- name: "Status: On hold"
color: cccccc
description: "Issue or PR that has been placed on hold for now."
- name: "Status: In progress"
color: fbca04
description: "Issue is currently being resolved by a developer."
- name: "Status: Stale"
color: fef2c0
description: "There has not been activity on this issue or PR for quite some time."
- name: "Status: Awaiting response"
color: fef2c0
description: "Issue or PR awaits response from the creator."
- name: "Status: Blocked"
color: fef2c0
description: "Progress on this issue is currently not possible."
# Closing status labels
- name: "Closed: Known limitation"
color: e6e6e6
description: "Issue is closed, it is a known limitation."
- name: "Closed: Expected behavior"
color: e6e6e6
description: "Issues is closed, it is expected behavior."
- name: "Closed: Duplicate"
color: e6e6e6
description: "Issue is closed, duplicate of an existing issue."
- name: "Closed: Invalid"
color: e6e6e6
description: "Issue is closed, marked as not a valid issue (e.g., an user error)."
- name: "Closed: Wrong repository"
color: e6e6e6
description: "Issue is closed, was created in the wrong repository."
- name: "Closed: Won't Fix"
color: e6e6e6
description: "Issue is closed, it won't be fixed."
- name: "Closed: Done"
color: c2e0c6
description: "Issue closed, work on this issue has been marked complete."
# Others
- name: "Beginner Friendly"
color: 0e8a16
description: "Good first issue for people wanting to contribute to the project."
- name: "Help wanted"
color: 0e8a16
description: "We need some extra helping hands or expertise in order to resolve this."
- name: "Hacktoberfest"
description: "Issues/PRs are participating in the Hacktoberfest"
color: fbca04
branches:
- name: master
protection:
required_pull_request_reviews:
# required_approving_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
dismissal_restrictions:
users: []
teams:
- Admins
- Masters
required_status_checks:
strict: false
contexts: []
enforce_admins: false
restrictions:
users: []
teams:
- Admins
- Masters

61
.github/stale.yml vendored
View File

@@ -1,61 +0,0 @@
---
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale Issue or Pull Request is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- "Status: On hold"
- "Status: In progress"
- "Status: Awaiting response"
- "Status: Blocked"
- "Idea"
- "Security"
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
# Label to use when marking as stale
staleLabel: "Status: Stale"
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
unmarkComment: false
# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.
closeComment: false
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
# Limit to only `issues` or `pulls`
only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
# issues:
# exemptLabels:
# - confirmed

22
.github/support.yml vendored
View File

@@ -1,22 +0,0 @@
---
# Configuration for support-requests - https://github.com/dessant/support-requests
# Label used to mark issues as support requests
supportLabel: "Type: Support"
# Comment to post on issues marked as support requests. Add a link
# to a support page, or set to `false` to disable
supportComment: >
:wave: We use the issue tracker exclusively for bug reports and feature requests.
However, this issue appears to be a support request. Please use our
support channels to get help with the project.
Head over to the
[Home Assistant community forum](https://community.home-assistant.io/?u=frenck)
or join our [Discord](https://discord.me/hassioaddons) chat.
# Close issues marked as support requests
close: true
# Lock issues marked as support requests
lock: false

18
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,18 @@
---
name: CI
# yamllint disable-line rule:truthy
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/addon-ci.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

20
.github/workflows/deploy.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Deploy
# yamllint disable-line rule:truthy
on:
release:
types:
- published
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/addon-deploy.yaml@main
secrets:
DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

14
.github/workflows/labels.yaml vendored Normal file
View File

@@ -0,0 +1,14 @@
---
name: Sync labels
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "34 5 * * *"
workflow_dispatch:
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/labels.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

14
.github/workflows/lock.yaml vendored Normal file
View File

@@ -0,0 +1,14 @@
---
name: Lock
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 9 * * *"
workflow_dispatch:
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/lock.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

17
.github/workflows/pr-labels.yaml vendored Normal file
View File

@@ -0,0 +1,17 @@
---
name: PR Labels
# yamllint disable-line rule:truthy
on:
pull_request_target:
types:
- opened
- labeled
- unlabeled
- synchronize
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/pr-labels.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

14
.github/workflows/release-drafter.yaml vendored Normal file
View File

@@ -0,0 +1,14 @@
---
name: Release Drafter
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/release-drafter.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

14
.github/workflows/stale.yaml vendored Normal file
View File

@@ -0,0 +1,14 @@
---
name: Stale
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/stale.yaml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,14 +0,0 @@
---
include: https://raw.githubusercontent.com/hassio-addons/organization/master/gitlabci/addon.yml
variables:
ADDON_GITHUB_REPO: "hassio-addons/addon-zerotier"
ADDON_SLUG: "zerotier"
ADDON_TARGET: "zerotier"
ADDON_LEGACY_TAGS: "true"
ADDON_AARCH64_BASE: "hassioaddons/base-aarch64:4.0.3"
ADDON_AMD64_BASE: "hassioaddons/base-amd64:4.0.3"
ADDON_ARMHF_BASE: "hassioaddons/base-armhf:4.0.3"
ADDON_ARMV7_BASE: "hassioaddons/base-armv7:4.0.3"
ADDON_I386_BASE: "hassioaddons/base-i386:4.0.3"

View File

@@ -1,74 +0,0 @@
# Code of conduct
## Our pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our standards
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention
or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or
electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate
in a professional setting
## Our responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project lead at frenck@addons.community. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project lead is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@@ -1,6 +1,6 @@
# MIT License
Copyright (c) 2019 Franck Nijhof
Copyright (c) 2019-2021 Franck Nijhof
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

131
README.md
View File

@@ -1,4 +1,4 @@
# Community Hass.io Add-ons: ZeroTier One
# Home Assistant Community Add-on: ZeroTier One
[![GitHub Release][releases-shield]][releases]
![Project Stage][project-stage-shield]
@@ -10,16 +10,16 @@
![Supports armv7 Architecture][armv7-shield]
![Supports i386 Architecture][i386-shield]
[![GitLab CI][gitlabci-shield]][gitlabci]
[![Github Actions][github-actions-shield]][github-actions]
![Project Maintenance][maintenance-shield]
[![GitHub Activity][commits-shield]][commits]
[![Discord][discord-shield]][discord]
[![Community Forum][forum-shield]][forum]
[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]
[![Sponsor Frenck via GitHub Sponsors][github-sponsors-shield]][github-sponsors]
[![Support my work on Patreon][patreon-shield]][patreon]
[![Support Frenck on Patreon][patreon-shield]][patreon]
Radically simplify your network with a virtual networking layer that works
the same everywhere.
@@ -35,91 +35,7 @@ embedded devices, cloud resources, and apps any way they want anywhere they go.
It transforms the entire world into a single data center, to which you
can now add your Home Assistant instance using this add-on.
## Installation
The installation of this add-on is pretty straightforward and not different in
comparison to installing any other Hass.io add-on.
1. [Add our Hass.io add-ons repository][repository] to your Hass.io instance.
1. Install the "ZeroTier One" add-on.
1. Create a free account at [zerotier.com][zerotier] and get a network ID.
1. Set the "network_id" add-on option with your network ID.
1. Start the "ZeroTier One" add-on
1. Check the logs of the "ZeroTier One" add-on to see if everything went well.
1. The instance will show up in your ZeroTier account.
**NOTE**: Do not add this repository to Hass.io, please use:
`https://github.com/hassio-addons/repository`.
## Configuration
**Note**: _Remember to restart the add-on when the configuration is changed._
Example add-on configuration:
```json
{
"networks":[
"wgfyiwe73747457",
"fhu3888892jjfdk"
],
"api_auth_token":""
}
```
**Note**: _This is just an example, don't copy and paste it! Create your own!_
### Option: `log_level`
The `log_level` option controls the level of log output by the addon and can
be changed to be more or less verbose, which might be useful when you are
dealing with an unknown issue. Possible values are:
- `trace`: Show every detail, like all called internal functions.
- `debug`: Shows detailed debug information.
- `info`: Normal (usually) interesting events.
- `warning`: Exceptional occurrences that are not errors.
- `error`: Runtime errors that do not require immediate action.
- `fatal`: Something went terribly wrong. Add-on becomes unusable.
Please note that each level automatically includes log messages from a
more severe level, e.g., `debug` also shows `info` messages. By default,
the `log_level` is set to `info`, which is the recommended setting unless
you are troubleshooting.
### Option: `networks`
Configures one or more network identifiers of the networks (VLAN) to join.
You can find this number in your ZeroTier account.
**Note**: _This option support secrets, e.g., `!secret zerotier_network_id`._
### Option: `api_auth_token`
ZeroTier exposes a local HTTP JSON API, which uses the port set using the
`port` option above. It allows tools and programs to access this ZeroTier
instance for quering data (or control it).
This token is like a password for accessing that API, you can leave this
option empty if you are not planning on using this feature.
For more information on the ZeroTier JSON API, [check their documentation][api].
**Note**: _This option support secrets, e.g., `!secret zerotier_token`._
## Changelog & Releases
This repository keeps a change log using [GitHub's releases][releases]
functionality. The format of the log is based on
[Keep a Changelog][keepchangelog].
Releases are based on [Semantic Versioning][semver], and use the format
of ``MAJOR.MINOR.PATCH``. In a nutshell, the version will be incremented
based on the following:
- ``MAJOR``: Incompatible or major changes.
- ``MINOR``: Backwards-compatible new features and enhancements.
- ``PATCH``: Backwards-compatible bugfixes and package updates.
[:books: Read the full add-on documentation][docs]
## Support
@@ -127,7 +43,7 @@ Got questions?
You have several options to get them answered:
- The [Community Hass.io Add-ons Discord chat server][discord] for add-on
- The [Home Assistant Community Add-ons Discord chat server][discord] for add-on
support and feature requests.
- The [Home Assistant Discord chat server][discord-ha] for general Home
Assistant discussions and questions.
@@ -142,7 +58,7 @@ This is an active open-source project. We are always open to people who want to
use the code or contribute to it.
We have set up a separate document containing our
[contribution guidelines](CONTRIBUTING.md).
[contribution guidelines](.github/CONTRIBUTING.md).
Thank you for being involved! :heart_eyes:
@@ -153,18 +69,18 @@ The original setup of this repository is by [Franck Nijhof][frenck].
For a full list of all authors and contributors,
check [the contributor's page][contributors].
## We have got some Hass.io add-ons for you
## We have got some Home Assistant add-ons for you
Want some more functionality to your Hass.io Home Assistant instance?
Want some more functionality to your Home Assistant instance?
We have created multiple add-ons for Hass.io. For a full list, check out
We have created multiple add-ons for Home Assistant. For a full list, check out
our [GitHub Repository][repository].
## License
MIT License
Copyright (c) 2019 Franck Nijhof
Copyright (c) 2019-2021 Franck Nijhof
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -186,35 +102,30 @@ SOFTWARE.
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[api]: https://www.zerotier.com/manual.shtml#4_1
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg
[buymeacoffee]: https://www.buymeacoffee.com/frenck
[commits-shield]: https://img.shields.io/github/commit-activity/y/hassio-addons/addon-zerotier.svg
[commits]: https://github.com/hassio-addons/addon-zerotier/commits/master
[commits]: https://github.com/hassio-addons/addon-zerotier/commits/main
[contributors]: https://github.com/hassio-addons/addon-zerotier/graphs/contributors
[discord-ha]: https://discord.gg/c5DvZ4e
[discord-shield]: https://img.shields.io/discord/478094546522079232.svg
[discord]: https://discord.me/hassioaddons
[dockerhub]: https://hub.docker.com/r/hassioaddons/zerotier
[docs]: https://github.com/hassio-addons/addon-zerotier/blob/main/zerotier/DOCS.md
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg
[forum]: https://community.home-assistant.io/?u=frenck
[forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-zerotier-one/109091?u=frenck
[frenck]: https://github.com/frenck
[gitlabci-shield]: https://gitlab.com/hassio-addons/addon-zerotier/badges/master/pipeline.svg
[gitlabci]: https://gitlab.com/hassio-addons/addon-zerotier/pipelines
[home-assistant]: https://home-assistant.io
[github-actions-shield]: https://github.com/hassio-addons/addon-zerotier/workflows/CI/badge.svg
[github-actions]: https://github.com/hassio-addons/addon-zerotier/actions
[github-sponsors-shield]: https://frenck.dev/wp-content/uploads/2019/12/github_sponsor.png
[github-sponsors]: https://github.com/sponsors/frenck
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
[issue]: https://github.com/hassio-addons/addon-zerotier/issues
[keepchangelog]: http://keepachangelog.com/en/1.0.0/
[license-shield]: https://img.shields.io/github/license/hassio-addons/addon-zerotier.svg
[maintenance-shield]: https://img.shields.io/maintenance/yes/2019.svg
[patreon-shield]: https://www.frenck.nl/images/patreon.png
[patreon]: https://www.patreon.com/
[maintenance-shield]: https://img.shields.io/maintenance/yes/2021.svg
[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png
[patreon]: https://www.patreon.com/frenck
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg
[reddit]: https://reddit.com/r/homeassistant
[releases-shield]: https://img.shields.io/github/release/hassio-addons/addon-zerotier.svg
[releases]: https://github.com/hassio-addons/addon-zerotier/releases
[repository]: https://github.com/hassio-addons/repository
[semver]: http://semver.org/spec/v2.0.0.htm
[zerotier]: https://www.zerotier.com/

View File

@@ -1,12 +1,12 @@
# Community Hass.io Add-ons: ZeroTier One
# Home Assistant Community Add-on: ZeroTier One
[![Release][release-shield]][release] ![Project Stage][project-stage-shield] ![Project Maintenance][maintenance-shield]
[![Discord][discord-shield]][discord] [![Community Forum][forum-shield]][forum]
[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]
[![Sponsor Frenck via GitHub Sponsors][github-sponsors-shield]][github-sponsors]
[![Support my work on Patreon][patreon-shield]][patreon]
[![Support Frenck on Patreon][patreon-shield]][patreon]
Radically simplify your network with a virtual networking layer that works
the same everywhere.
@@ -22,13 +22,11 @@ embedded devices, cloud resources, and apps any way they want anywhere they go.
It transforms the entire world into a single data center, to which you
can now add your Home Assistant instance using this add-on.
[Click here for the full documentation][docs]
{% if channel == "edge" %}
## WARNING! THIS IS AN EDGE VERSION!
This Hass.io Add-ons repository contains edge builds of add-ons. Edge builds
add-ons are based upon the latest development version.
This Home Assistant Add-ons repository contains edge builds of add-ons.
Edge builds add-ons are based upon the latest development version.
- They may not work at all.
- They might stop working at any time.
@@ -48,7 +46,7 @@ If you are more interested in stable releases of our add-ons:
{% if channel == "beta" %}
## WARNING! THIS IS A BETA VERSION!
This Hass.io Add-ons repository contains beta releases of add-ons.
This Home Assistant Add-ons repository contains beta releases of add-ons.
- They might stop working at any time.
- They could have a negative impact on your system.
@@ -63,15 +61,14 @@ If you are more interested in stable releases of our add-ons:
<https://github.com/hassio-addons/repository>
{% endif %}
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg
[buymeacoffee]: https://www.buymeacoffee.com/frenck
[discord-shield]: https://img.shields.io/discord/478094546522079232.svg
[discord]: https://discord.me/hassioaddons
[docs]: {{ repo }}/blob/{{ version }}/README.md
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg
[forum]: https://community.home-assistant.io/?u=frenck
[maintenance-shield]: https://img.shields.io/maintenance/yes/2019.svg
[patreon-shield]: https://www.frenck.nl/images/patreon.png
[forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-zerotier-one/109091?u=frenck
[github-sponsors-shield]: https://frenck.dev/wp-content/uploads/2019/12/github_sponsor.png
[github-sponsors]: https://github.com/sponsors/frenck
[maintenance-shield]: https://img.shields.io/maintenance/yes/2021.svg
[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png
[patreon]: https://www.patreon.com/frenck
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg
[release-shield]: https://img.shields.io/badge/version-{{ version }}-blue.svg

147
zerotier/DOCS.md Normal file
View File

@@ -0,0 +1,147 @@
# Home Assistant Community Add-on: ZeroTier One
ZeroTier delivers the capabilities of VPNs, SDN, and SD-WAN with a single
system. Manage all your connected resources across both local and wide area
networks as if the whole world is a single data center.
People use ZeroTier to seamlessly connect laptops, desktops, phones,
embedded devices, cloud resources, and apps any way they want anywhere they go.
It transforms the entire world into a single data center, to which you
can now add your Home Assistant instance using this add-on.
## Installation
The installation of this add-on is pretty straightforward and not different in
comparison to installing any other Home Assistant add-on.
1. Search for the "ZeroTier One" add-on in the Supervisor add-on store
and install it.
1. Create a free account at [zerotier.com][zerotier] and get a network ID.
1. Set the "network_id" add-on option with your network ID.
1. Start the "ZeroTier One" add-on
1. Check the logs of the "ZeroTier One" add-on to see if everything went well.
1. The instance will show up in your ZeroTier account.
## Configuration
**Note**: _Remember to restart the add-on when the configuration is changed._
Example add-on configuration:
```yaml
networks:
- wgfyiwe73747457
- fhu3888892jjfdk
api_auth_token: ""
```
**Note**: _This is just an example, don't copy and paste it! Create your own!_
### Option: `log_level`
The `log_level` option controls the level of log output by the addon and can
be changed to be more or less verbose, which might be useful when you are
dealing with an unknown issue. Possible values are:
- `trace`: Show every detail, like all called internal functions.
- `debug`: Shows detailed debug information.
- `info`: Normal (usually) interesting events.
- `warning`: Exceptional occurrences that are not errors.
- `error`: Runtime errors that do not require immediate action.
- `fatal`: Something went terribly wrong. Add-on becomes unusable.
Please note that each level automatically includes log messages from a
more severe level, e.g., `debug` also shows `info` messages. By default,
the `log_level` is set to `info`, which is the recommended setting unless
you are troubleshooting.
### Option: `networks`
Configures one or more network identifiers of the networks (VLAN) to join.
You can find this number in your ZeroTier account.
**Note**: _This option support secrets, e.g., `!secret zerotier_network_id`._
### Option: `api_auth_token`
ZeroTier exposes a local HTTP JSON API, which uses the port set using the
`port` option above. It allows tools and programs to access this ZeroTier
instance for quering data (or control it).
This token is like a password for accessing that API, you can leave this
option empty if you are not planning on using this feature.
For more information on the ZeroTier JSON API, [check their documentation][api].
**Note**: _This option support secrets, e.g., `!secret zerotier_token`._
## Changelog & Releases
This repository keeps a change log using [GitHub's releases][releases]
functionality.
Releases are based on [Semantic Versioning][semver], and use the format
of `MAJOR.MINOR.PATCH`. In a nutshell, the version will be incremented
based on the following:
- `MAJOR`: Incompatible or major changes.
- `MINOR`: Backwards-compatible new features and enhancements.
- `PATCH`: Backwards-compatible bugfixes and package updates.
## Support
Got questions?
You have several options to get them answered:
- The [Home Assistant Community Add-ons Discord chat server][discord] for add-on
support and feature requests.
- The [Home Assistant Discord chat server][discord-ha] for general Home
Assistant discussions and questions.
- The Home Assistant [Community Forum][forum].
- Join the [Reddit subreddit][reddit] in [/r/homeassistant][reddit]
You could also [open an issue here][issue] GitHub.
## Authors & contributors
The original setup of this repository is by [Franck Nijhof][frenck].
For a full list of all authors and contributors,
check [the contributor's page][contributors].
## License
MIT License
Copyright (c) 2019-2021 Franck Nijhof
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
[api]: https://www.zerotier.com/manual.shtml#4_1
[contributors]: https://github.com/hassio-addons/addon-zerotier/graphs/contributors
[discord-ha]: https://discord.gg/c5DvZ4e
[discord]: https://discord.me/hassioaddons
[forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-zerotier-one/109091?u=frenck
[frenck]: https://github.com/frenck
[issue]: https://github.com/hassio-addons/addon-zerotier/issues
[reddit]: https://reddit.com/r/homeassistant
[releases]: https://github.com/hassio-addons/addon-zerotier/releases
[semver]: http://semver.org/spec/v2.0.0.htm
[zerotier]: https://www.zerotier.com/

View File

@@ -1,4 +1,4 @@
ARG BUILD_FROM=hassioaddons/base:4.0.3
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.2.2
# hadolint ignore=DL3006
FROM ${BUILD_FROM}
@@ -9,23 +9,23 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003
RUN \
apk add --no-cache --virtual .build-dependencies \
build-base=0.5-r1 \
linux-headers=4.19.36-r0 \
git=2.22.0-r0 \
build-base=0.5-r2 \
linux-headers=5.10.41-r0 \
git=2.32.0-r0 \
\
&& apk add --no-cache \
libgcc=8.3.0-r0 \
libstdc++=8.3.0-r0 \
libgcc=10.3.1_git20210424-r2 \
libstdc++=10.3.1_git20210424-r2 \
\
&& git clone --branch "1.2.12" --depth=1 \
&& git clone --branch "1.8.2" --depth=1 \
"https://github.com/zerotier/ZeroTierOne.git" /tmp/zerotier \
\
&& cd /tmp/zerotier \
&& make \
&& make install \
\
&& rm -f -r /tmp/* \
&& apk del --purge .build-dependencies
&& apk del --no-cache --purge .build-dependencies \
&& rm -f -r /tmp/*
# Copy root filesystem
COPY rootfs /
@@ -33,23 +33,28 @@ COPY rootfs /
# Build arguments
ARG BUILD_ARCH
ARG BUILD_DATE
ARG BUILD_DESCRIPTION
ARG BUILD_NAME
ARG BUILD_REF
ARG BUILD_REPOSITORY
ARG BUILD_VERSION
# Labels
LABEL \
io.hass.name="ZeroTier One" \
io.hass.description="Radically simplify your network with a virtual networking layer that works the same everywhere" \
io.hass.name="${BUILD_NAME}" \
io.hass.description="${BUILD_DESCRIPTION}" \
io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Franck Nijhof <frenck@addons.community>" \
org.label-schema.description="Radically simplify your network with a virtual networking layer that works the same everywhere" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="ZeroTier One" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://community.home-assistant.io/?u=frenck" \
org.label-schema.usage="https://github.com/hassio-addons/addon-zerotier/tree/master/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://github.com/hassio-addons/addon-zerotier" \
org.label-schema.vendor="Community Hass.io Add-ons"
org.opencontainers.image.title="${BUILD_NAME}" \
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
org.opencontainers.image.vendor="Home Assistant Community Add-ons" \
org.opencontainers.image.authors="Franck Nijhof <frenck@addons.community>" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.url="https://addons.community" \
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.revision=${BUILD_REF} \
org.opencontainers.image.version=${BUILD_VERSION}

View File

@@ -1,10 +0,0 @@
{
"build_from": {
"aarch64": "hassioaddons/base-aarch64:4.0.3",
"amd64": "hassioaddons/base-amd64:4.0.3",
"armhf": "hassioaddons/base-armhf:4.0.3",
"armv7": "hassioaddons/base-armv7:4.0.3",
"i386": "hassioaddons/base-i386:4.0.3"
},
"args": {}
}

7
zerotier/build.yaml Normal file
View File

@@ -0,0 +1,7 @@
---
build_from:
aarch64: ghcr.io/hassio-addons/base/aarch64:10.2.2
amd64: ghcr.io/hassio-addons/base/amd64:10.2.2
armhf: ghcr.io/hassio-addons/base/armhf:10.2.2
armv7: ghcr.io/hassio-addons/base/armv7:10.2.2
i386: ghcr.io/hassio-addons/base/i386:10.2.2

View File

@@ -1,46 +0,0 @@
{
"name": "ZeroTier One",
"version": "dev",
"slug": "zerotier",
"description": "Radically simplify your network with a virtual networking layer that works the same everywhere",
"url": "https://github.com/hassio-addons/addon-zerotier",
"startup": "services",
"arch": [
"aarch64",
"amd64",
"armhf",
"armv7",
"i386"
],
"ports": {
"9993/tcp": 9993
},
"ports_description": {
"9993/tcp": "ZeroTier's primary port"
},
"boot": "auto",
"hassio_api": true,
"hassio_role": "default",
"homeassistant_api": false,
"host_network": true,
"privileged": [
"NET_ADMIN",
"SYS_ADMIN"
],
"devices": [
"/dev/net/tun:/dev/net/tun:rwm"
],
"map": [
"config",
"ssl:rw"
],
"options": {
"networks":[],
"api_auth_token": ""
},
"schema": {
"networks":["match(^!secret [a-zA-Z0-9_\\-]+$|[0-9a-z]{16})"],
"api_auth_token": "str",
"log_level": "match(^(trace|debug|info|notice|warning|error|fatal)$)?"
}
}

34
zerotier/config.yaml Normal file
View File

@@ -0,0 +1,34 @@
---
name: ZeroTier One
version: dev
slug: zerotier
description: Radically simplify your network with a virtual networking layer that works the same everywhere
url: https://github.com/hassio-addons/addon-zerotier
startup: services
init: false
arch:
- aarch64
- amd64
- armhf
- armv7
- i386
ports:
9993/tcp: 9993
ports_description:
9993/tcp: ZeroTier's primary port
host_network: true
privileged:
- NET_ADMIN
- SYS_ADMIN
devices:
- /dev/net/tun
map:
- ssl:rw
options:
networks: []
api_auth_token: ""
schema:
networks:
- match(^!secret [a-zA-Z0-9_\-]+$|[0-9a-z]{16})
api_auth_token: str
log_level: list(trace|debug|info|notice|warning|error|fatal)?

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: ZeroTier One
# Home Assistant Community Add-on: ZeroTier One
# Generates an identiy in case it does not exists yet
# ==============================================================================
readonly private='/ssl/zerotier/identity.secret'
@@ -54,11 +54,6 @@ if bashio::config.has_value 'networks'; then
while read -r network; do
bashio::log.info "Configuring network: ${network}"
# Get network ID from secrets, if it is a secret
if bashio::is_secret "${network}"; then
network=$(bashio::secret "${network}")
fi
# Ensure the file exists. An empty file will cause automatic join.
touch "/data/network.${network}.conf"
ln -s \

View File

@@ -1,6 +1,6 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Community Hass.io Add-ons: ZeroTier One
# Home Assistant Community Add-on: ZeroTier One
# Take down the S6 supervision tree when ZeroTier fails
# ==============================================================================
if -n { s6-test $# -ne 0 }

View File

@@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: ZeroTier One
# Home Assistant Community Add-on: ZeroTier One
# Runs ZeroTier One
# ==============================================================================
declare -a options