Compare commits

...
59 Commits
Author SHA1 Message Date
dimitriy-dade bee2463b4a Setting proper DACL for daemon directory 2026-06-09 23:04:54 -04:00
dimitriy-dade 8aa436300c fixing msi for 1.16.2 2026-06-09 11:28:22 -04:00
Dimitriy Dade a3b1a346c4 Merge pull request #2592 from zerotier/cv1
bringing back cv1 yaml
2026-05-27 16:23:53 -04:00
dimitriy-dade 9c2d5cd74c bringing back cv1 yaml 2026-05-27 16:14:53 -04:00
Dimitriy Dade fc5c3ec220 Merge pull request #2590 from zerotier/1.16.2
Merging 1.16.2 from Private to Public
2026-05-27 14:42:28 -04:00
dimitriy-dade fe29cd8888 fixing changelogs as required by linux builds and version for Mac 2026-05-27 14:29:53 -04:00
dimitriy-dade 2ed9b86852 updated workflows 2026-05-22 19:56:47 -04:00
dimitriy-dade f87d5477f6 Merging 1.16.2 from Private to Public 2026-05-22 11:39:10 -04:00
countbinoculars 544809e738 Merge pull request #2588 from zerotier/dep-updates
Update some Rust dependencies
2026-05-21 15:53:07 -07:00
Chris Spiegel d678338b28 Update some Rust dependencies 2026-05-21 15:21:38 -07:00
Grant Limberg 7b747aff3b Merge pull request #2582 from zerotier/rust-dep-updates
Dependency update for rust deps
2026-04-27 11:54:32 -07:00
Grant Limberg 484d9e0d8c cargo update 2026-04-27 11:31:02 -07:00
Grant Limberg 55aa87c372 Merge pull request #2577 from zerotier/cv1-schema-change
Handle a few incoming CV1 schema changes
2026-04-17 14:04:29 -07:00
Grant Limberg aa586efbb5 query fix 2026-04-17 13:50:49 -07:00
Grant Limberg a2340bf60c add --provenance false to avoid $IMAGE is a manifest list error 2026-03-04 11:58:43 -08:00
Grant Limberg e918ec44d5 one last fix 2026-03-04 11:47:09 -08:00
Grant Limberg 34777b6bb4 another fix for multi-arch builds 2026-03-04 11:35:56 -08:00
Grant Limberg 97db010112 fix multi-arch manifest 2026-03-04 11:12:19 -08:00
Grant Limberg e81053aed7 fix build 2026-03-04 10:57:46 -08:00
Grant Limberg 91428eacae add github action for creating CV1 controller images 2026-03-04 10:51:13 -08:00
Grant Limberg 936801a51b update gitignore 2026-03-02 14:08:07 -08:00
Grant Limberg 8f1b213994 still use use_redis column 2026-03-02 14:08:02 -08:00
Grant Limberg 7f47b2ba8f update dockerfile to get around go stdlib bug in controller build 2026-03-02 14:07:53 -08:00
Grant Limberg eac140aa73 Update use of ztc_controller table for changes in progress in CV1. 2026-03-02 13:14:16 -08:00
Dimitriy Dade d9a7f62a5c Merge pull request #2568 from zerotier/dimitriy-dev
Updating versions that were flagged as vulnerable by Dependabot
2026-02-26 13:44:04 -05:00
dimitriy.dade 294af67370 Updating versions that were flagged as vulnerable by Dependabot 2026-02-25 17:00:20 -05:00
Adam Ierymenko 67648579b5 Merge pull request #2549 from zerotier/1.16.1
1.16.1
2026-01-20 11:53:31 -05:00
Adam Ierymenko fa601636aa Merge branch 'dev' into 1.16.1 2025-12-22 18:20:59 -05:00
Adam Ierymenko d2b4b6e91d Add date to release notes. 2025-12-22 17:49:15 -05:00
Adam Ierymenko a77009e4f0 notes 2025-12-22 16:50:13 -05:00
Chris Spiegel 9c2bd25d86 Add a couple entries to the release notes
The date still needs to be updated when this is actually released.
2025-12-22 12:50:02 -08:00
Adam Ierymenko 22b47f851e 1.16.1 Windows bump 2025-12-12 14:43:40 -05:00
Adam Ierymenko 2342926442 All version bumps but Windows. 2025-12-12 14:17:21 -05:00
Joseph Henry 458c5c9709 Merge pull request #21 from zerotier/joseph-henry-disable-http-debug
Disable debug logging for the HTTP API library
2025-12-01 14:34:32 -08:00
Joseph Henry 4f6b9038f1 Disable debug logging for the HTTP API library
This just quiets things down a little since the HTTP library produces so much verbose text.
2025-12-01 14:32:11 -08:00
Chris Spiegel 20007a73df Merge pull request #12 from zerotier/erase-after-unique
Ensure erase() is called after std::unique()
2025-11-10 12:45:36 -08:00
Joseph Henry 7f5850a943 Merge pull request #11 from zerotier/snprintf-into-self
Avoid using the same source and destination in snprintf()
2025-11-10 09:50:22 -08:00
Joseph Henry 8e5d81728f Merge pull request #10 from zerotier/windows-bool-assign
Fix assignment vs comparison typo
2025-11-10 09:46:58 -08:00
Joseph Henry 300b05aaf0 Merge pull request #8 from zerotier/2152-disable-metrics
Allow metrics to be disabled
2025-11-10 09:39:43 -08:00
Joseph Henry 595a70c5ed Remove old multipathMode setting 2025-11-10 09:38:59 -08:00
Chris Spiegel 9e53fe4b12 Avoid using the same source and destination in snprintf()
It's undefined to write to a buffer you're reading from in snprintf().
On modern glibc and musl versions, this results in the string
"/zerotier_dump.txt" being generated, i.e. in the root directory. Use a
new variable to hold the string dump.

This is done for MacOS as well. On Sequoia, at least, it's not
necessary, as it handles overlapping objects fine, but this is more
future-proof.

At the same time, include a specific error message when the dumpfile
can't be opened to help users track down problems. Also, truncate the
file so that new writes don't potentially leave stale data.
2025-11-06 08:28:33 -08:00
Chris Spiegel fb162084f5 Fix assignment vs comparison typo
At the same time, ensure a newline is written after the error message.
2025-11-06 05:24:56 -08:00
Chris Spiegel 1d9f06d4ac Disable metrics by default 2025-11-06 05:18:26 -08:00
Chris Spiegel 48311896f8 Allow metrics to be disabled 2025-11-06 05:17:57 -08:00
Chris Spiegel 616698fa91 Ensure erase() is called after std::unique()
Without this the duplicates are just moved to the end of the collection,
but not actually erased.
2025-11-06 05:15:48 -08:00
Chris Spiegel b8e3ca6a2c Merge pull request #7 from zerotier/2279-prometheus-after-daemonize
Stop and restart the Prometheus worker thread when daemonizing
2025-11-05 15:11:00 -08:00
Chris Spiegel f231561276 Stop and restart the Prometheus worker thread when daemonizing
Also use _Exit() instead of returning from main() to avoid duplicate
cleanup/flusing/etc.
2025-11-05 14:15:47 -08:00
Joseph Henry ce5556a677 Merge pull request #4 from zerotier/dev-merge-from-public-repo
Dev merge from public repo
2025-11-04 15:26:05 -08:00
Joseph Henry 8d4cb1e05b Merge pull request #2535 from cspiegel/uninitialized-vars
Ensure members in PacketMultiplexer are initialized
2025-11-03 14:21:34 -08:00
Chris Spiegel 45773f0b6e Ensure members in PacketMultiplexer are initialized
_enabled is set to true by setUpPostDecodeReceiveThreads(), so disabled
until then, but the constructor wasn't initializing it. _concurrency is
not being used before being set but for safety's sake, ensure it has a
starting value as well.

Also, remove the vestigial _rxThreadCount, which is no longer used.
2025-11-03 11:20:01 -08:00
Luke Souter ab75985766 Merge pull request #2511 from zerotier/update-readme
Shorten/clean README.md. Split README into a few separate, including BUILD. Correctly references licensing information.
2025-10-02 16:05:05 -07:00
Luke Souter 4b9724c8fa Merge branch 'update-readme' of https://github.com/zerotier/ZeroTierOne into update-readme 2025-09-23 10:20:58 -07:00
Luke Souter f2d4a882d9 removed duplicate title, added build link, fixed controller link 2025-09-23 10:20:49 -07:00
Luke Souter 0cf5ab9375 Merge branch 'dev' into update-readme 2025-09-18 14:29:49 -07:00
Luke Souter 4f2717c244 added build.md
Drastically shortened main readme and linked out to build notes instead. Clarified licensing info to just match license.txt.
2025-09-18 14:29:09 -07:00
Luke Souter b62b9e28b9 Merge branch 'update-readme' of https://github.com/zerotier/ZeroTierOne into update-readme 2025-09-12 14:14:11 -07:00
Luke Souter be5baa76b9 Update README.md 2025-09-12 14:14:06 -07:00
Luke Souter a6d2e80b08 Merge branch 'dev' into update-readme 2025-09-11 12:27:03 -07:00
Luke Souter b0ba0d7227 Update README.md 2025-09-11 12:16:33 -07:00
43 changed files with 1586 additions and 1976 deletions

No files matched your search

+2 -2
View File
@@ -90,7 +90,7 @@ jobs:
build_windows:
runs-on: windows-latest
runs-on: windows-2022
steps:
- name: gitconfig
run: |
@@ -102,7 +102,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: aarch64-apple-darwin
targets: x86_64-pc-windows-msvc
components: rustfmt, clippy
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
@@ -0,0 +1,67 @@
name: Central Controller CV1 Build and Push
on:
push:
pull_request:
workflow_dispatch:
jobs:
central_controller:
name: Central Controller CV1 Build
strategy:
matrix:
runner: [gha-runner-x64, gha-runner-arm64]
runs-on: ${{ matrix.runner }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Docker Auth
run: echo "${{ secrets.PORTUS_PW }}" | docker login registry.zerotier.com -u ${{ secrets.PORTUS_USER }} --password-stdin
- name: Get branch name and sanitize
id: branch
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
SANITIZED_BRANCH="${BRANCH_NAME//\//-}"
echo "branch_name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT
- name: Get short git commit SHA
id: sha
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Build & Push Docker Image
run: |
docker build --provenance false --no-cache -t registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-${{ runner.arch }} -f ext/central-controller-docker/Dockerfile . --push
multi-arch-docker:
runs-on: gha-runner-x64
needs: central_controller
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker Auth
run: echo "${{ secrets.PORTUS_PW }}" | docker login registry.zerotier.com -u ${{ secrets.PORTUS_USER }} --password-stdin
- name: Get branch name and sanitize
id: branch
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
SANITIZED_BRANCH="${BRANCH_NAME//\//-}"
echo "branch_name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT
- name: Get short git commit SHA
id: sha
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Create and push multi-arch manifest
run: |
docker manifest create registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }} \
--amend registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-X64 \
--amend registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-ARM64
docker manifest push registry.zerotier.com/zerotier-central/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}
+5 -6
View File
@@ -12,26 +12,25 @@ jobs:
git config --global core.autocrlf input
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
targets: x86_64-unknown-linux-gnu
components: rustfmt, clippy
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
continue-on-error: false
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
shared-key: ${{ runner.os }}-cargo-
workspaces: |
zeroidc/
rustybits/
- name: validate-1m-linux
env:
+5
View File
@@ -91,6 +91,7 @@ debian/zerotier-one*.debhelper
debian/*.log
debian/zerotier-one.substvars
root-watcher/config.json
build/
# Java/Android/JNI build droppings
java/obj/
@@ -106,6 +107,7 @@ windows/WinUI/bin/
windows/ZeroTierOne/Debug/
/ext/installfiles/windows/chocolatey/zerotier-one/*.nupkg
# Miscellaneous mac/Xcode droppings
.Trashes
*.swp
@@ -141,3 +143,6 @@ __pycache__
*.pyc
*_source.tar.bz2
snap/.snapcraft
# local Claude configurations
.claude/*.local.*
+21 -186
View File
@@ -1,197 +1,32 @@
ZeroTier - Global Area Networking
======
# ZeroTier - Global Area Networking
*This document is written for a software developer audience. For information on using ZeroTier, see the: [Website](https://www.zerotier.com), [Documentation Site](https://docs.zerotier.com), and [Discussion Forum](https://discuss.zerotier.com).*
## Quick Links
* [ZeroTier Documentation](https://docs.zerotier.com) - **Start here for downloads, installation, and usage**
* [How to build](build.md) - **Build instructions and platform requirements**
* [Corporate Site](https://www.zerotier.com/)
* [Downloads](https://www.zerotier.com/download/)
* [Service API Reference](service/README.md)
* [Network Controller](nonfree/controller/README.md)
* [Commercial Support](https://www.zerotier.com/contact)
* [License Information](#license)
## About
ZeroTier is a smart programmable Ethernet switch for planet Earth. It allows all networked devices, VMs, containers, and applications to communicate as if they all reside in the same physical data center or cloud region.
This is accomplished by combining a cryptographically addressed and secure peer to peer network (termed VL1) with an Ethernet emulation layer somewhat similar to VXLAN (termed VL2). Our VL2 Ethernet virtualization layer includes advanced enterprise SDN features like fine grained access control rules for network micro-segmentation and security monitoring.
This is accomplished by combining a cryptographically addressed and secure peer-to-peer network (termed VL1) with an Ethernet emulation layer somewhat similar to VXLAN (termed VL2). Our VL2 Ethernet virtualization layer includes advanced enterprise SDN features like fine grained access control rules for network micro-segmentation and security monitoring.
All ZeroTier traffic is encrypted end-to-end using secret keys that only you control. Most traffic flows peer to peer, though we offer free (but slow) relaying for users who cannot establish peer to peer connections.
All ZeroTier traffic is encrypted end-to-end using secret keys that only you control. Most traffic flows peer-to-peer, though we offer free (but slow) relaying for users who cannot establish peer-to-peer connections.
The goals and design principles of ZeroTier are inspired by among other things the original [Google BeyondCorp](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43231.pdf) paper and the [Jericho Forum](https://en.wikipedia.org/wiki/Jericho_Forum) with its notion of "deperimeterization."
Apps for Android and iOS are available for free in the Google Play and Apple app stores.
Visit [ZeroTier's site](https://www.zerotier.com/) for more information and [pre-built binary packages](https://www.zerotier.com/download/). Apps for Android and iOS are available for free in the Google Play and Apple app stores.
For repository layout, build instructions, platform requirements, and information about running ZeroTier, see [build.md](build.md).
ZeroTier is licensed under the [BSL version 1.1](https://mariadb.com/bsl11/). See [LICENSE.txt](LICENSE.txt) and the [ZeroTier pricing page](https://www.zerotier.com/pricing) for details. ZeroTier is free to use internally in businesses and academic institutions and for non-commercial purposes. Certain types of commercial use such as building closed-source apps and devices based on ZeroTier or offering ZeroTier network controllers and network management as a SaaS service require a commercial license.
## License
A small amount of third party code is also included in ZeroTier and is not subject to our BSL license. See [AUTHORS.md](AUTHORS.md) for a list of third party code, where it is included, and the licenses that apply to it. All of the third party code in ZeroTier is liberally licensed (MIT, BSD, Apache, public domain, etc.).
See [LICENSE-MPL.txt](LICENSE-MPL.txt) for all code in node/, osdep/. service/, and everywhere else except ext/ and nonfree/.
### Getting Started
See [nonfree/LICENSE.md](nonfree/LICENSE.md) for all non-free ("source available") portions of this repository.
Everything in the ZeroTier world is controlled by two types of identifier: 40-bit/10-digit *ZeroTier addresses* and 64-bit/16-digit *network IDs*. These identifiers are easily distinguished by their length. A ZeroTier address identifies a node or "device" (laptop, phone, server, VM, app, etc.) while a network ID identifies a virtual Ethernet network that can be joined by devices.
ZeroTier addresses can be thought of as port numbers on an enormous planet-wide enterprise Ethernet smart switch supporting VLANs. Network IDs are VLAN IDs to which these ports may be assigned. A single port can be assigned to more than one VLAN.
A ZeroTier address looks like `8056c2e21c` and a network ID looks like `8056c2e21c000001`. Network IDs are composed of the ZeroTier address of that network's primary controller and an arbitrary 24-bit ID that identifies the network on this controller. Network controllers are roughly analogous to SDN controllers in SDN protocols like [OpenFlow](https://en.wikipedia.org/wiki/OpenFlow), though as with the analogy between VXLAN and VL2 this should not be read to imply that the protocols or design are the same. You can use our convenient and inexpensive SaaS hosted controllers at [my.zerotier.com](https://my.zerotier.com/) or [run your own controller](controller/) if you don't mind messing around with JSON configuration files or writing scripts to do so.
### Project Layout
The base path contains the ZeroTier One service main entry point (`one.cpp`), self test code, makefiles, etc.
- `artwork/`: icons, logos, etc.
- `attic/`: old stuff and experimental code that we want to keep around for reference.
- `controller/`: the reference network controller implementation, which is built and included by default on desktop and server build targets.
- `debian/`: files for building Debian packages on Linux.
- `doc/`: manual pages and other documentation.
- `ext/`: third party libraries, binaries that we ship for convenience on some platforms (Mac and Windows), and installation support files.
- `include/`: include files for the ZeroTier core.
- `java/`: a JNI wrapper used with our Android mobile app. (The whole Android app is not open source but may be made so in the future.)
- `node/`: the ZeroTier virtual Ethernet switch core, which is designed to be entirely separate from the rest of the code and able to be built as a stand-alone OS-independent library. Note to developers: do not use C++11 features in here, since we want this to build on old embedded platforms that lack C++11 support. C++11 can be used elsewhere.
- `osdep/`: code to support and integrate with OSes, including platform-specific stuff only built for certain targets.
- `rule-compiler/`: JavaScript rules language compiler for defining network-level rules.
- `service/`: the ZeroTier One service, which wraps the ZeroTier core and provides VPN-like connectivity to virtual networks for desktops, laptops, servers, VMs, and containers.
- `windows/`: Visual Studio solution files, Windows service code, and the Windows task bar app UI.
- `zeroidc/`: OIDC implementation used by ZeroTier service to log into SSO-enabled networks. (This part is written in Rust, and more Rust will be appearing in this repository in the future.)
### Contributing
Please do pull requests off of the `dev` branch.
Releases are done by merging `dev` into `main` and then tagging and doing builds.
### Build and Platform Notes
To build on Mac and Linux just type `make`. On FreeBSD and OpenBSD `gmake` (GNU make) is required and can be installed from packages or ports. For Windows there is a Visual Studio solution in `windows/`.
- **Mac**
- Xcode command line tools for macOS 10.13 or newer are required.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
- **Linux**
- The minimum compiler versions required are GCC/G++ 8.x or CLANG/CLANG++ 5.x.
- Linux makefiles automatically detect and prefer clang/clang++ if present as it produces smaller and slightly faster binaries in most cases. You can override by supplying CC and CXX variables on the make command line.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
- **Windows**
- Visual Studio 2022 on Windows 10 or newer.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
- **FreeBSD**
- GNU make is required. Type `gmake` to build.
- `binutils` is required. Type `pkg install binutils` to install.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
- **OpenBSD**
- There is a limit of four network memberships on OpenBSD as there are only four tap devices (`/dev/tap0` through `/dev/tap3`).
- GNU make is required. Type `gmake` to build.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
Typing `make selftest` will build a *zerotier-selftest* binary which unit tests various internals and reports on a few aspects of the build environment. It's a good idea to try this on novel platforms or architectures.
### Running
Running *zerotier-one* with `-h` option will show help.
On Linux and BSD, if you built from source, you can start the service with:
sudo ./zerotier-one -d
On most distributions, macOS, and Windows, the installer will start the service and set it up to start on boot.
A home folder for your system will automatically be created.
The service is controlled via the JSON API, which by default is available at `127.0.0.1:9993`. It also listens on `0.0.0.0:9993` which is only usable if `allowManagementFrom` is properly configured in `local.conf`. We include a *zerotier-cli* command line utility to make API calls for standard things like joining and leaving networks. The *authtoken.secret* file in the home folder contains the secret token for accessing this API. See [service/README.md](service/README.md) for API documentation.
Here's where home folders live (by default) on each OS:
* **Linux**: `/var/lib/zerotier-one`
* **FreeBSD** / **OpenBSD**: `/var/db/zerotier-one`
* **Mac**: `/Library/Application Support/ZeroTier/One`
* **Windows**: `\ProgramData\ZeroTier\One` (That's the default. The base 'shared app data' folder might be different if Windows is installed with a non-standard drive letter assignment or layout.)
### Basic Troubleshooting
For most users, it just works.
If you are running a local system firewall, we recommend adding a rules permitting zerotier. If you installed binaries for Windows this should be done automatically. Other platforms might require manual editing of local firewall rules depending on your configuration.
See the [documentation site](https://docs.zerotier.com/zerotier/troubleshooting) for more information.
The Mac firewall can be found under "Security" in System Preferences. Linux has a variety of firewall configuration systems and tools.
On CentOS check `/etc/sysconfig/iptables` for IPTables rules. For other distributions consult your distribution's documentation. You'll also have to check the UIs or documentation for commercial third party firewall applications like Little Snitch (Mac), McAfee Firewall Enterprise (Windows), etc. if you are running any of those. Some corporate environments might have centrally managed firewall software, so you might also have to contact IT.
ZeroTier One peers will automatically locate each other and communicate directly over a local wired LAN *if UDP port 9993 inbound is open*. If that port is filtered, they won't be able to see each others' LAN announcement packets. If you're experiencing poor performance between devices on the same physical network, check their firewall settings. Without LAN auto-location peers must attempt "loopback" NAT traversal, which sometimes fails and in any case requires that every packet traverse your external router twice.
Users behind certain types of firewalls and "symmetric" NAT devices may not be able to connect to external peers directly at all. ZeroTier has limited support for port prediction and will *attempt* to traverse symmetric NATs, but this doesn't always work. If P2P connectivity fails you'll be bouncing UDP packets off our relay servers resulting in slower performance. Some NAT router(s) have a configurable NAT mode, and setting this to "full cone" will eliminate this problem. If you do this you may also see a magical improvement for things like VoIP phones, Skype, BitTorrent, WebRTC, certain games, etc., since all of these use NAT traversal techniques similar to ours.
If a firewall between you and the Internet blocks ZeroTier's UDP traffic, you will fall back to last-resort TCP tunneling to rootservers over port 443 (https impersonation). This will work almost anywhere but is *very slow* compared to UDP or direct peer to peer connectivity.
Additional help can be found in our [knowledge base](https://zerotier.atlassian.net/wiki/spaces/SD/overview).
### Prometheus Metrics
Prometheus Metrics are available at the `/metrics` API endpoint. This endpoint is protected by an API key stored in `metricstoken.secret` to prevent unwanted information leakage. Information that could be gleaned from the metrics include joined networks and peers your instance is talking to.
Access control is via the ZeroTier control interface itself and `metricstoken.secret`. This can be sent as a bearer auth token, via the `X-ZT1-Auth` HTTP header field, or appended to the URL as `?auth=<token>`. You can see the current metrics via `cURL` with the following command:
// Linux
curl -H "X-ZT1-Auth: $(sudo cat /var/lib/zerotier-one/metricstoken.secret)" http://localhost:9993/metrics
// macOS
curl -H "X-ZT1-Auth: $(sudo cat /Library/Application\ Support/ZeroTier/One/metricstoken.secret)" http://localhost:9993/metrics
// Windows PowerShell (Admin)
Invoke-RestMethod -Headers @{'X-ZT1-Auth' = "$(Get-Content C:\ProgramData\ZeroTier\One\metricstoken.secret)"; } -Uri http://localhost:9993/metrics
To configure a scrape job in Prometheus on the machine ZeroTier is running on, add this to your Prometheus `scrape_config`:
- job_name: zerotier-one
honor_labels: true
scrape_interval: 15s
metrics_path: /metrics
static_configs:
- targets:
- 127.0.0.1:9993
labels:
group: zerotier-one
node_id: $YOUR_10_CHARACTER_NODE_ID
authorization:
credentials: $YOUR_METRICS_TOKEN_SECRET
If neither of these methods are desirable, it is probably possible to distribute metrics via [Prometheus Proxy](https://github.com/pambrose/prometheus-proxy) or some other tool. Note: We have not tested this internally, but will probably work with the correct configuration.
Metrics are also available on disk in ZeroTier's working directory:
// Linux
/var/lib/zerotier-one/metrics.prom
// macOS
/Library/Application\ Support/ZeroTier/One/metrics.prom
//Windows
C:\ProgramData\ZeroTier\One\metrics.prom
#### Available Metrics
| Metric Name | Labels | Metric Type | Description |
| --- | --- | --- | --- |
| zt_packet | packet_type, direction | Counter | ZeroTier packet type counts |
| zt_packet_error | error_type, direction | Counter | ZeroTier packet errors|
| zt_data | protocol, direction | Counter | number of bytes ZeroTier has transmitted or received |
| zt_num_networks | | Gauge | number of networks this instance is joined to |
| zt_network_multicast_groups_subscribed | network_id | Gauge | number of multicast groups networks are subscribed to |
| zt_network_packets | network_id, direction | Counter | number of incoming/outgoing packets per network |
| zt_peer_latency | node_id | Histogram | peer latency (ms) |
| zt_peer_path_count | node_id, status | Gauge | number of paths to peer |
| zt_peer_packets | node_id, direction | Counter | number of packets to/from a peer |
| zt_peer_packet_errors | node_id | Counter | number of incoming packet errors from a peer |
If there are other metrics you'd like to see tracked, ask us in an Issue or send us a Pull Request!
### HTTP / App server
There is a static http file server suitable for hosting Single Page Apps at http://localhost:9993/app/<app-path>
Use `zerotier-cli info -j` to find your zerotier-one service's homeDir
``` sh
cd $ZT_HOME
sudo mkdir -p app/app1
sudo mkdir -p app/appB
echo '<html><meta charset=utf-8><title>appA</title><body><h1>hello world A' | sudo tee app/appA/index.html
echo '<html><meta charset=utf-8><title>app2</title><body><h1>hello world 2' | sudo tee app/app2/index.html
curl -sL http://localhost:9993/app/appA http://localhost:9993/app/app2
```
Then visit [http://localhost:9993/app/app1/](http://localhost:9993/app/app1/) and [http://localhost:9993/app/appB/](http://localhost:9993/app/appB/)
Requests to paths don't exist return the app root index.html, as is customary for SPAs.
If you want, you can write some javascript that talks to the service or controller [api](https://docs.zerotier.com/service/v1).
Code in ext/ is external code included for build convenience or backward compatibility and retains its original license.
+15
View File
@@ -1,6 +1,21 @@
ZeroTier Release Notes
======
## 2026-05-20 -- Version 1.16.2
* Fixed line endings for the zttap300.inf for the Windows ARM x64 install.
* Internal updates to the central controller (CV1) including schema changes and a multi-architecture Docker build pipeline.
* Increased `ZT_MAX_NETWORK_SPECIALISTS` from 256 to 512 to accommodate users with large networks that exceeded the previous limit. The network config dictionary capacity was raised correspondingly.
* Resolved intermittent multi-minute delays when leaving one network and joining another under Windows.
* Compiler warning cleanup across the codebase, covering GCC 14, Clang 18, and Clang 21.
## 2025-12-22 -- Version 1.16.1
* Metrics collection is now disabled by default. It can be enabled via the `enableMetrics` setting in `local.conf`.
* Fix for an issue where metrics were not being recorded while running in daemon mode.
* Fix debug dumpfile being written to the root directory.
* Minor bug fixes in Mac and BSD tun/tap code.
## 2025-08-21 -- Version 1.16.0
* License Changes
+88
View File
@@ -0,0 +1,88 @@
# ZeroTier Build and Project Information
## Build and Platform Notes
### Basic Build Instructions
To build on Mac and Linux just type `make`. On FreeBSD and OpenBSD `gmake` (GNU make) is required and can be installed from packages or ports. For Windows there is a Visual Studio solution in `windows/`.
### Platform Requirements
#### Mac
- Xcode command line tools for macOS 10.13 or newer are required.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
#### Linux
- The minimum compiler versions required are GCC/G++ 8.x or CLANG/CLANG++ 5.x.
- Linux makefiles automatically detect and prefer clang/clang++ if present as it produces smaller and slightly faster binaries in most cases. You can override by supplying CC and CXX variables on the make command line.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
#### Windows
- Visual Studio 2022 on Windows 10 or newer.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
#### FreeBSD
- GNU make is required. Type `gmake` to build.
- `binutils` is required. Type `pkg install binutils` to install.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
#### OpenBSD
- There is a limit of four network memberships on OpenBSD as there are only four tap devices (`/dev/tap0` through `/dev/tap3`).
- GNU make is required. Type `gmake` to build.
- Rust for x86_64 and ARM64 targets *if SSO is enabled in the build*.
### Testing
Typing `make selftest` will build a *zerotier-selftest* binary which unit tests various internals and reports on a few aspects of the build environment. It's a good idea to try this on novel platforms or architectures.
## Running ZeroTier
Running *zerotier-one* with `-h` option will show help.
On Linux and BSD, if you built from source, you can start the service with:
sudo ./zerotier-one -d
On most distributions, macOS, and Windows, the installer will start the service and set it up to start on boot.
A home folder for your system will automatically be created.
The service is controlled via the JSON API, which by default is available at `127.0.0.1:9993`. It also listens on `0.0.0.0:9993` which is only usable if `allowManagementFrom` is properly configured in `local.conf`. We include a *zerotier-cli* command line utility to make API calls for standard things like joining and leaving networks. The *authtoken.secret* file in the home folder contains the secret token for accessing this API. See [service/README.md](service/README.md) for API documentation.
## Directory Structure
### Home Folder Locations
ZeroTier stores its configuration and state files in platform-specific locations:
* **Linux**: `/var/lib/zerotier-one`
* **FreeBSD** / **OpenBSD**: `/var/db/zerotier-one`
* **Mac**: `/Library/Application Support/ZeroTier/One`
* **Windows**: `\ProgramData\ZeroTier\One` (That's the default. The base 'shared app data' folder might be different if Windows is installed with a non-standard drive letter assignment or layout.)
### Project Structure
The repository is organized as follows:
- **node/** - Core ZeroTier networking code
- **osdep/** - Operating system dependent code
- **service/** - Service implementation and API
- **controller/** - Network controller implementation
- **ext/** - External code included for build convenience (retains original licenses)
- **nonfree/** - Source available (non-free) portions
- **windows/** - Windows-specific Visual Studio solution files
### Build System
The project supports various build targets and platforms:
- Standard build: `make`
- Self-test build: `make selftest`
- Platform-specific requirements:
- FreeBSD/OpenBSD: Use `gmake` (GNU make)
- Windows: Visual Studio solution in `windows/`
### License Structure
- **node/**, **osdep/**, **service/**: Licensed under MPL-2.0 (see LICENSE-MPL.txt)
- **nonfree/**: Non-free "source available" code (see nonfree/LICENSE.md)
- **ext/**: External code with original licenses retained
+6
View File
@@ -1,3 +1,9 @@
zerotier-one (1.16.2) unstable; urgency=medium
* See RELEASE-NOTES.md for release notes.
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Wed, 27 May 2026 01:00:00 -0700
zerotier-one (1.16.0-2) unstable; urgency=medium
* Fix build settings to include controller.
+2 -2
View File
@@ -3,8 +3,8 @@ FROM registry.zerotier.com/zerotier/ctlbuild:2025-07-14 AS builder
ADD . /ZeroTierOne
RUN export PATH=$PATH:~/.cargo/bin && cd ZeroTierOne && make clean && make central-controller -j8
FROM golang:bookworm AS go_base
RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
FROM golang:1.24.1-bookworm AS go_base
RUN GONOSUMDB=* GOFLAGS='-p=1' go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
FROM registry.zerotier.com/zerotier/ctlrun:2025-07-14 AS run_base
COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
+1 -1
View File
@@ -702,7 +702,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false />
<key>VERSION</key>
<string>1.16.0</string>
<string>1.16.2</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
+36 -36
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DOCUMENT Type="Advanced Installer" CreateVersion="10.9" version="22.9.1" Modules="enterprise" RootPath="." Language="en" Id="{DC564647-6BF0-4550-87F4-89C938D0159C}">
<DOCUMENT Type="Advanced Installer" CreateVersion="10.9" version="23.6" Modules="enterprise" RootPath="." Language="en" Id="{DC564647-6BF0-4550-87F4-89C938D0159C}">
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
<ROW Property="AI_EXTERNALUIUNINSTALLERNAME" MultiBuildValue="DefaultBuild:aiui"/>
@@ -21,31 +21,31 @@
<ROW Property="AiFeatIcoZeroTierOne" Value="ZeroTierIcon.exe" Type="8"/>
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
<ROW Property="ProductCode" Value="1033:{C805CD5B-45F5-49F7-B428-142396DE03CA} " Type="16"/>
<ROW Property="ProductCode" Value="1033:{92C58C3B-8397-4484-BC62-3E038F546773} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="ZeroTier One"/>
<ROW Property="ProductVersion" Value="1.16.0" Options="32"/>
<ROW Property="ProductVersion" Value="1.16.2" Options="32"/>
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
<ROW Property="UpgradeCode" Value="{B0E2A5F3-88B6-4E77-B922-CB4739B4C4C8}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME#ExeBuild:Windows 9x/ME" ValueLocId="-"/>
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME#ExeBuild:Windows 9x/ME" ValueLocId="-"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME#ExeBuild:Windows 9x/ME#MsiBuild:Windows 9x/ME#MsiBuild_1:Windows 9x/ME#Build:Windows 9x/ME" ValueLocId="-"/>
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME#ExeBuild:Windows 9x/ME#MsiBuild:Windows 9x/ME#MsiBuild_1:Windows 9x/ME#Build:Windows 9x/ME" ValueLocId="-"/>
<ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows 7 x86, Windows 8 x86, Windows 8.1 x86" ValueLocId="-"/>
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0#ExeBuild:Windows NT 4.0" ValueLocId="-"/>
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0#ExeBuild:Windows NT 4.0" ValueLocId="-"/>
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000#ExeBuild:Windows 2000" ValueLocId="-"/>
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000#ExeBuild:Windows 2000" ValueLocId="-"/>
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003#ExeBuild:Windows XP/2003" ValueLocId="-"/>
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003#ExeBuild:Windows XP/2003" ValueLocId="-"/>
<ROW Property="WindowsTypeNT60" MultiBuildValue="DefaultBuild:Windows Vista/Server 2008#ExeBuild:Windows Vista/Server 2008" ValueLocId="-"/>
<ROW Property="WindowsTypeNT60Display" MultiBuildValue="DefaultBuild:Windows Vista/Server 2008#ExeBuild:Windows Vista/Server 2008" ValueLocId="-"/>
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0#ExeBuild:Windows NT 4.0#MsiBuild:Windows NT 4.0#MsiBuild_1:Windows NT 4.0#Build:Windows NT 4.0" ValueLocId="-"/>
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0#ExeBuild:Windows NT 4.0#MsiBuild:Windows NT 4.0#MsiBuild_1:Windows NT 4.0#Build:Windows NT 4.0" ValueLocId="-"/>
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000#ExeBuild:Windows 2000#MsiBuild:Windows 2000#MsiBuild_1:Windows 2000#Build:Windows 2000" ValueLocId="-"/>
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000#ExeBuild:Windows 2000#MsiBuild:Windows 2000#MsiBuild_1:Windows 2000#Build:Windows 2000" ValueLocId="-"/>
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003#ExeBuild:Windows XP/2003#MsiBuild:Windows XP/2003#MsiBuild_1:Windows XP/2003#Build:Windows XP/2003" ValueLocId="-"/>
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003#ExeBuild:Windows XP/2003#MsiBuild:Windows XP/2003#MsiBuild_1:Windows XP/2003#Build:Windows XP/2003" ValueLocId="-"/>
<ROW Property="WindowsTypeNT60" MultiBuildValue="DefaultBuild:Windows Vista/Server 2008#ExeBuild:Windows Vista/Server 2008#MsiBuild:Windows Vista/Server 2008#MsiBuild_1:Windows Vista/Server 2008#Build:Windows Vista/Server 2008" ValueLocId="-"/>
<ROW Property="WindowsTypeNT60Display" MultiBuildValue="DefaultBuild:Windows Vista/Server 2008#ExeBuild:Windows Vista/Server 2008#MsiBuild:Windows Vista/Server 2008#MsiBuild_1:Windows Vista/Server 2008#Build:Windows Vista/Server 2008" ValueLocId="-"/>
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows 7 x64, Windows Server 2008 R2 x64, Windows 8 x64, Windows Server 2012 x64, Windows 8.1 x64, Windows Server 2012 R2 x64" ValueLocId="-"/>
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows 7 x64, Windows Server 2008 R2 x64, Windows 8 x64, Windows Server 2012 x64, Windows 8.1 x64, Windows Server 2012 R2 x64" ValueLocId="-"/>
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows 7 x86, Windows 8 x86, Windows 8.1 x86" ValueLocId="-"/>
<ROW Property="ZTHEADLESS" Value="No"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1" DirectoryOptions="15"/>
<ROW Directory="APPDIR" Directory_Parent="ZeroTier_Inst_Dir" DefaultDir="One" DirectoryOptions="15"/>
<ROW Directory="CommonAppDataFolder" Directory_Parent="TARGETDIR" DefaultDir="COMMON~1|CommonAppDataFolder" IsPseudoRoot="1"/>
<ROW Directory="One_Dir" Directory_Parent="ZeroTier_Dir" DefaultDir="One" DirectoryOptions="12"/>
<ROW Directory="ProgramFilesFolder" Directory_Parent="TARGETDIR" DefaultDir="PROGRA~1|ProgramFilesFolder" IsPseudoRoot="1"/>
@@ -53,6 +53,7 @@
<ROW Directory="StartupFolder" Directory_Parent="TARGETDIR" DefaultDir="STARTU~1|StartupFolder" IsPseudoRoot="1"/>
<ROW Directory="TARGETDIR" DefaultDir="SourceDir"/>
<ROW Directory="ZeroTier_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="ZeroTier" DirectoryOptions="12"/>
<ROW Directory="ZeroTier_Inst_Dir" Directory_Parent="ProgramFilesFolder" DefaultDir="ZeroTier" DirectoryOptions="12"/>
<ROW Directory="driverarm64_Dir" Directory_Parent="One_Dir" DefaultDir=".:DRIVER~1|driver-arm64" DirectoryOptions="12"/>
<ROW Directory="driverx64_Dir" Directory_Parent="One_Dir" DefaultDir=".:DRIVER~2|driver-x64" DirectoryOptions="15"/>
<ROW Directory="driverx86_Dir" Directory_Parent="One_Dir" DefaultDir=".:DRIVER~3|driver-x86" DirectoryOptions="15"/>
@@ -109,6 +110,17 @@
<COMPONENT cid="caphyon.advinst.custcomp.AiComponentAliasComponent">
<ROW AliasRowId="AI_CustomARPName" AliasRowOperation="2" Condition="#DefaultBuild:ZTHEADLESS=&quot;No&quot;"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.custcomp.MsiLockPermissionsExComponent">
<ROW MsiLockPermissionsEx="Perm_ZeroTier_Dir" LockObject="ZeroTier_Dir" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1301bf;;;BA)(A;OICI;0x1200a9;;;WD)"/>
<ROW MsiLockPermissionsEx="Perm_One_Dir" LockObject="One_Dir" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1301bf;;;BA)(A;OICI;0x1200a9;;;WD)"/>
<ROW MsiLockPermissionsEx="Perm_networks.d_Dir" LockObject="networks.d_Dir" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1301bf;;;BA)(A;OICI;0x1200a9;;;WD)"/>
<ROW MsiLockPermissionsEx="Perm_driverx64_Dir" LockObject="driverx64_Dir" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;WD)"/>
<ROW MsiLockPermissionsEx="Perm_driverx86_Dir" LockObject="driverx86_Dir" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;WD)"/>
<ROW MsiLockPermissionsEx="Perm_driverarm64_Dir" LockObject="driverarm64_Dir" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1301bf;;;BA)(A;OICI;0x1200a9;;;WD)"/>
<ROW MsiLockPermissionsEx="Perm_regid.201001.com.zerotier_Dir" LockObject="regid.201001.com.zerotier_Dir" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;WD)"/>
<ROW MsiLockPermissionsEx="Perm_APPDIR" LockObject="APPDIR" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1301bf;;;BA)(A;OICI;0x1200a9;;;WD)"/>
<ROW MsiLockPermissionsEx="Perm_i686_Dir" LockObject="i686_Dir" Table="CreateFolder" SDDLText="D:PAR(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;WD)"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BootstrOptComponent">
<ROW BootstrOptKey="GlobalOptions" GeneralOptions="qh" DownloadFolder="[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites"/>
</COMPONENT>
@@ -117,8 +129,11 @@
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="251"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
<ROW BuildKey="Build" BuildName="Build" BuildOrder="5" BuildType="0" PackageFileName="ZeroTier One" Languages="en" InstallationType="2" UseLargeSchema="true"/>
<ROW BuildKey="DefaultBuild" BuildName="MSI" BuildOrder="1" BuildType="0" PackageFolder="..\..\.." PackageFileName="ZeroTier One" Languages="en" InstallationType="4" ExtUI="true" UseLargeSchema="true"/>
<ROW BuildKey="ExeBuild" BuildName="update" BuildOrder="2" BuildType="0" PackageFolder="..\..\.." PackageFileName="ZeroTier One" Languages="en" InstallationType="2" CabsLocation="1" CompressCabs="false" UseLzma="true" LzmaMethod="2" LzmaCompressionLevel="4" PackageType="1" FilesInsideExe="true" ExeIconPath="..\..\..\artwork\ZeroTierIcon.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" MsiCmdLine="/qn" ExtUI="true" UseLargeSchema="true" ExeName="zt1_update_2_1,2_[|ProductVersion]_0"/>
<ROW BuildKey="MsiBuild" BuildName="MsiBuild" BuildOrder="3" BuildType="0" PackageFolder="[|AI_AIP_FOLDER][|AI_AIP_FILENAME]-[|AI_BUILD_NAME]-SetupFiles" PackageFileName="[|AI_AIP_FILENAME]" Languages="en" InstallationType="4" UseLargeSchema="true"/>
<ROW BuildKey="MsiBuild_1" BuildName="MsiBuild_1" BuildOrder="4" BuildType="0" PackageFolder="[|AI_AIP_FOLDER][|AI_AIP_FILENAME]-[|AI_BUILD_NAME]-SetupFiles" PackageFileName="[|AI_AIP_FILENAME]" Languages="en" InstallationType="4" UseLargeSchema="true"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.CacheComponent">
<ATTRIBUTE name="Enable" value="false"/>
@@ -309,7 +324,7 @@
<ROW Action="AI_XmlRollback" Type="11521" Source="xmlCfg.dll" Target="OnXmlRollback" WithoutSeq="true"/>
<ROW Action="AI_XmlUninstall" Type="1" Source="xmlCfg.dll" Target="OnXmlUninstall" AdditionalSeq="AI_DATA_SETTER_1"/>
<ROW Action="LaunchUI" Type="194" Source="viewer.exe" Target="/DontWait &quot;[APPDIR]zerotier_desktop_ui.exe&quot;" Options="1"/>
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[ProgramFilesFolder]ZeroTier\One"/>
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="DefaultBuild:[ProgramFilesFolder]ZeroTier\One" MultiBuildTarget="DefaultBuild:[ProgramFilesFolder]ZeroTier\One"/>
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
<ROW Action="TapDeviceRemove32" Type="3154" Source="zerotierone_x86.exe" Target="-D"/>
@@ -405,28 +420,13 @@
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 &lt;&gt; 601) OR (MsiNTProductType &lt;&gt; 1)) AND ((VersionNT64 &lt;&gt; 601) OR (MsiNTProductType = 1)) AND ((VersionNT64 &lt;&gt; 602) OR (MsiNTProductType &lt;&gt; 1)) AND ((VersionNT64 &lt;&gt; 602) OR (MsiNTProductType = 1)) AND ((VersionNT64 &lt;&gt; 603) OR (MsiNTProductType &lt;&gt; 1)) AND ((VersionNT64 &lt;&gt; 603) OR (MsiNTProductType = 1)) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND (VersionNT &lt;&gt; 601) AND (VersionNT &lt;&gt; 602) AND (VersionNT &lt;&gt; 603) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNTDisplay]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="((VersionNT &lt;&gt; 501) AND (VersionNT &lt;&gt; 502))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
<ROW Condition="(VersionNT &lt;&gt; 400)" Description="[ProductName] cannot be installed on [WindowsTypeNT40Display]." DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
<ROW Condition="(VersionNT &lt;&gt; 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
<ROW Condition="(VersionNT &lt;&gt; 600)" Description="[ProductName] cannot be installed on [WindowsTypeNT60Display]." DescriptionLocId="AI.LaunchCondition.NoNT60" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
<ROW Condition="((VersionNT &lt;&gt; 501) AND (VersionNT &lt;&gt; 502))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild;ExeBuild;MsiBuild;MsiBuild_1;Build"/>
<ROW Condition="(VersionNT &lt;&gt; 400)" Description="[ProductName] cannot be installed on [WindowsTypeNT40Display]." DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild;ExeBuild;MsiBuild;MsiBuild_1;Build"/>
<ROW Condition="(VersionNT &lt;&gt; 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild;ExeBuild;MsiBuild;MsiBuild_1;Build"/>
<ROW Condition="(VersionNT &lt;&gt; 600)" Description="[ProductName] cannot be installed on [WindowsTypeNT60Display]." DescriptionLocId="AI.LaunchCondition.NoNT60" IsPredefined="true" Builds="DefaultBuild;ExeBuild;MsiBuild;MsiBuild_1;Build"/>
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="SETUPEXEDIR OR (REMOVE=&quot;ALL&quot;)" Description="This package can only be run from a bootstrapper." DescriptionLocId="AI.LaunchCondition.RequireBootstrapper" IsPredefined="true" Builds="ExeBuild"/>
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiLockPermComponent">
<ROW LockObject="ZeroTier_Dir" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="ZeroTier_Dir" Table="CreateFolder" User="[GRP_ADMINISTRATORS]" Permission="1245631" Flags="0"/>
<ROW LockObject="One_Dir" Table="CreateFolder" User="[GRP_ADMINISTRATORS]" Permission="1245631" Flags="0"/>
<ROW LockObject="One_Dir" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="networks.d_Dir" Table="CreateFolder" User="[GRP_ADMINISTRATORS]" Permission="1245631" Flags="0"/>
<ROW LockObject="networks.d_Dir" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="driverx64_Dir" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="driverx86_Dir" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="driverarm64_Dir" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="regid.201001.com.zerotier_Dir" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="APPDIR" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="i686_Dir" Table="CreateFolder" User="[GRP_EVERYONE]" Permission="1179817" Flags="0"/>
<ROW LockObject="driverarm64_Dir" Table="CreateFolder" User="[GRP_ADMINISTRATORS]" Permission="1245631" Flags="0"/>
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild;ExeBuild;MsiBuild;MsiBuild_1;Build"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiRegLocatorComponent">
<ROW Signature_="AI_EXE_PATH_CU" Root="1" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]" Name="AI_ExePath" Type="2"/>
@@ -467,7 +467,7 @@
<ROW Registry="UninstallString" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="UninstallString" Value="[AI_UNINSTALLER] /x [ProductCode] AI_UNINSTALLER_CTP=1" Component_="AI_CustomARPName"/>
<ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
<ROW Registry="VersionMajor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMajor" Value="#1" Component_="AI_CustomARPName" VirtualValue="#"/>
<ROW Registry="VersionMinor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMinor" Value="#6" Component_="AI_CustomARPName" VirtualValue="#"/>
<ROW Registry="VersionMinor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMinor" Value="#16" Component_="AI_CustomARPName" VirtualValue="#"/>
<ROW Registry="Windows" Root="-1" Key="Software\Microsoft\Windows" Name="\"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiServConfigFailureActionsComponent">
File diff suppressed because it is too large. Load diff
@@ -50,6 +50,16 @@ namespace prometheus {
public:
SaveToFile() = default;
void stop() {
must_die = true;
worker_thread.join();
}
void restart() {
must_die = false;
worker_thread = std::thread(&SaveToFile::worker_function, this);
}
~SaveToFile() {
must_die = true;
worker_thread.join();
+1 -1
View File
@@ -135,7 +135,7 @@ extern "C" {
/**
* Maximum number of "specialists" on a network -- bridges, relays, etc.
*/
#define ZT_MAX_NETWORK_SPECIALISTS 256
#define ZT_MAX_NETWORK_SPECIALISTS 512
/**
* Maximum number of multicast group subscriptions per network
-4
View File
@@ -472,10 +472,6 @@ central-controller-docker: _buildx FORCE
docker buildx build --platform linux/amd64,linux/arm64 --no-cache -t registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP} -f ext/central-controller-docker/Dockerfile --build-arg git_branch=`git name-rev --name-only HEAD` . --push
@echo Image: registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP}
centralv2-controller-docker: _buildx FORCE
docker buildx build --platform linux/amd64,linux/arm64 --no-cache -t us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:$(shell git rev-parse --short HEAD) -f ext/central-controller-docker/Dockerfile --build-arg git_branch=`git name-rev --name-only HEAD` . --push
@echo Image: us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:$(shell git rev-parse --short HEAD)
debug: FORCE
make ZT_DEBUG=1 one
make ZT_DEBUG=1 selftest
+1 -2
View File
@@ -58,7 +58,6 @@ class Capability : public Credential {
Capability() : _nwid(0), _ts(0), _id(0), _maxCustodyChainLength(0), _ruleCount(0)
{
memset(_rules, 0, sizeof(_rules));
memset(_custody, 0, sizeof(_custody));
}
/**
@@ -513,7 +512,7 @@ class Capability : public Credential {
Address to;
Address from;
ECC::Signature signature;
} _custody[ZT_MAX_CAPABILITY_CUSTODY_CHAIN_LENGTH];
} _custody[ZT_MAX_CAPABILITY_CUSTODY_CHAIN_LENGTH] = {};
};
} // namespace ZeroTier
+3 -3
View File
@@ -35,7 +35,7 @@ namespace ZeroTier {
*/
class Identity {
public:
Identity() : _privateKey((ECC::Private*)0)
Identity() : _publicKey{0}, _privateKey{(ECC::Private*)0}
{
}
@@ -43,14 +43,14 @@ class Identity {
{
}
Identity(const char* str) : _privateKey((ECC::Private*)0)
Identity(const char* str) : _publicKey{0}, _privateKey{(ECC::Private*)0}
{
if (! fromString(str)) {
throw ZT_EXCEPTION_INVALID_SERIALIZED_DATA_INVALID_TYPE;
}
}
template <unsigned int C> Identity(const Buffer<C>& b, unsigned int startAt = 0) : _privateKey((ECC::Private*)0)
template <unsigned int C> Identity(const Buffer<C>& b, unsigned int startAt = 0) : _publicKey{0}, _privateKey{(ECC::Private*)0}
{
deserialize(b, startAt);
}
+2 -2
View File
@@ -160,7 +160,7 @@ InetAddress::IpScope InetAddress::ipScope() const
void InetAddress::set(const void* ipBytes, unsigned int ipLen, unsigned int port)
{
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
if (ipLen == 4) {
uint32_t ipb[1];
memcpy(ipb, ipBytes, 4);
@@ -215,7 +215,7 @@ bool InetAddress::fromString(const char* ipSlashPort)
{
char buf[64];
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
if (! *ipSlashPort) {
return true;
+23 -23
View File
@@ -74,15 +74,15 @@ struct InetAddress : public sockaddr_storage {
InetAddress()
{
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
}
InetAddress(const InetAddress& a)
{
memcpy(this, &a, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &a, sizeof(InetAddress));
}
InetAddress(const InetAddress* a)
{
memcpy(this, a, sizeof(InetAddress));
memcpy(static_cast<void*>(this), a, sizeof(InetAddress));
}
InetAddress(const struct sockaddr_storage& ss)
{
@@ -132,7 +132,7 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const InetAddress& a)
{
if (&a != this) {
memcpy(this, &a, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &a, sizeof(InetAddress));
}
return *this;
}
@@ -140,7 +140,7 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const InetAddress* a)
{
if (a != this) {
memcpy(this, a, sizeof(InetAddress));
memcpy(static_cast<void*>(this), a, sizeof(InetAddress));
}
return *this;
}
@@ -148,7 +148,7 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_storage& ss)
{
if (reinterpret_cast<const InetAddress*>(&ss) != this) {
memcpy(this, &ss, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &ss, sizeof(InetAddress));
}
return *this;
}
@@ -156,7 +156,7 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_storage* ss)
{
if (reinterpret_cast<const InetAddress*>(ss) != this) {
memcpy(this, ss, sizeof(InetAddress));
memcpy(static_cast<void*>(this), ss, sizeof(InetAddress));
}
return *this;
}
@@ -164,8 +164,8 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_in& sa)
{
if (reinterpret_cast<const InetAddress*>(&sa) != this) {
memset(this, 0, sizeof(InetAddress));
memcpy(this, &sa, sizeof(struct sockaddr_in));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &sa, sizeof(struct sockaddr_in));
}
return *this;
}
@@ -173,8 +173,8 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_in* sa)
{
if (reinterpret_cast<const InetAddress*>(sa) != this) {
memset(this, 0, sizeof(InetAddress));
memcpy(this, sa, sizeof(struct sockaddr_in));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
memcpy(static_cast<void*>(this), sa, sizeof(struct sockaddr_in));
}
return *this;
}
@@ -182,8 +182,8 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_in6& sa)
{
if (reinterpret_cast<const InetAddress*>(&sa) != this) {
memset(this, 0, sizeof(InetAddress));
memcpy(this, &sa, sizeof(struct sockaddr_in6));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
memcpy(static_cast<void*>(this), &sa, sizeof(struct sockaddr_in6));
}
return *this;
}
@@ -191,8 +191,8 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr_in6* sa)
{
if (reinterpret_cast<const InetAddress*>(sa) != this) {
memset(this, 0, sizeof(InetAddress));
memcpy(this, sa, sizeof(struct sockaddr_in6));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
memcpy(static_cast<void*>(this), sa, sizeof(struct sockaddr_in6));
}
return *this;
}
@@ -200,13 +200,13 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr& sa)
{
if (reinterpret_cast<const InetAddress*>(&sa) != this) {
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
switch (sa.sa_family) {
case AF_INET:
memcpy(this, &sa, sizeof(struct sockaddr_in));
memcpy(static_cast<void*>(this), &sa, sizeof(struct sockaddr_in));
break;
case AF_INET6:
memcpy(this, &sa, sizeof(struct sockaddr_in6));
memcpy(static_cast<void*>(this), &sa, sizeof(struct sockaddr_in6));
break;
}
}
@@ -216,13 +216,13 @@ struct InetAddress : public sockaddr_storage {
inline InetAddress& operator=(const struct sockaddr* sa)
{
if (reinterpret_cast<const InetAddress*>(sa) != this) {
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
switch (sa->sa_family) {
case AF_INET:
memcpy(this, sa, sizeof(struct sockaddr_in));
memcpy(static_cast<void*>(this), sa, sizeof(struct sockaddr_in));
break;
case AF_INET6:
memcpy(this, sa, sizeof(struct sockaddr_in6));
memcpy(static_cast<void*>(this), sa, sizeof(struct sockaddr_in6));
break;
}
}
@@ -513,7 +513,7 @@ struct InetAddress : public sockaddr_storage {
*/
inline void zero()
{
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
}
/**
@@ -635,7 +635,7 @@ struct InetAddress : public sockaddr_storage {
template <unsigned int C> inline unsigned int deserialize(const Buffer<C>& b, unsigned int startAt = 0)
{
memset(this, 0, sizeof(InetAddress));
memset(static_cast<void*>(this), 0, sizeof(InetAddress));
unsigned int p = startAt;
switch (b[p++]) {
case 0:
+5 -9
View File
@@ -479,15 +479,11 @@ class Network {
int64_t _lastConfigUpdate;
struct _IncomingConfigChunk {
_IncomingConfigChunk()
{
memset(this, 0, sizeof(_IncomingConfigChunk));
}
uint64_t ts;
uint64_t updateId;
uint64_t haveChunkIds[ZT_NETWORK_MAX_UPDATE_CHUNKS];
unsigned long haveChunks;
unsigned long haveBytes;
uint64_t ts = 0;
uint64_t updateId = 0;
uint64_t haveChunkIds[ZT_NETWORK_MAX_UPDATE_CHUNKS]{};
unsigned long haveChunks = 0;
unsigned long haveBytes = 0;
Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> data;
};
_IncomingConfigChunk _incomingConfigChunks[ZT_NETWORK_MAX_INCOMING_UPDATES];
Loaded 20 of 43 files, more files were not shown because too many files have changed in this diff. Show more