Compare commits

...
644 Commits
Author SHA1 Message Date
Joseph Henry 03d894f1a6 Add undefined to sanitizer options 2025-09-17 22:01:49 -07:00
Adam Ierymenko 895b8211e1 Merge pull request #2514 from zerotier/fix-debian-controller-build
Fix debian controller build
2025-09-15 12:27:29 -04:00
Adam Ierymenko a28a6d1bf5 Build fix. 2025-09-13 11:07:36 -04:00
Adam Ierymenko 6921628610 RPM too 2025-09-12 19:17:37 -04:00
Adam Ierymenko 5d18a57518 Include controller on debian. 2025-09-12 19:17:11 -04:00
Adam Ierymenko bc0a42651b Merge pull request #2510 from zerotier/dev-main-merge
Dev main merge
2025-09-11 13:57:46 -04:00
Adam Ierymenko a16d6dbc01 Merge remote-tracking branch 'github/main' into dev 2025-09-11 13:55:34 -04:00
Adam Ierymenko 7b7d39becc Merge pull request #2507 from zerotier/adam/1.16
V1.16 kitchen sink branch, 1.16 ready.
2025-09-11 13:52:09 -04:00
Grant Limberg 3e6a22c3d8 Fix JNI after ZT_Node_New function signature change 2025-09-11 07:36:25 -07:00
Adam Ierymenko dd3dbb6f24 Merge branch 'adam/1.16' of /Users/api/Code/ZeroTier/local/ZeroTier-v1 into adam/1.16 2025-09-08 16:17:36 -04:00
Adam Ierymenko 223fa90e6c Advanced installer update. 2025-09-08 16:17:24 -04:00
Adam Ierymenko ffd34a3e46 Add merged PRs. 2025-09-08 13:05:25 -04:00
Adam Ierymenko fad7123417 Enable controller on production Windows builds. 2025-09-08 12:36:57 -04:00
Adam Ierymenko 5db2abab73 Make nonfree the official build for Linux. 2025-09-05 17:49:10 -04:00
Adam Ierymenko a4d762d404 messages for non-free builds 2025-09-05 15:39:47 -04:00
Adam Ierymenko 03a198a1b5 bump rust versions per bot recommendation. 2025-09-04 17:16:23 -04:00
Adam Ierymenko a51029a503 Merge pull request #2489 from SwarmboticsAI/fix-link-select-cli
Fix link select field in bond CLI
2025-09-04 17:15:23 -04:00
Adam Ierymenko f754d716d0 Merge pull request #2493 from jfly/add-warning-about-allowDNS-on-linux
Add a warning about missing DNS functionality on Linux
2025-09-04 17:14:47 -04:00
Adam Ierymenko bbba390e97 Windows build and version bump. 2025-08-26 09:33:54 -07:00
Adam Ierymenko ad044f9272 Windows build fixes. 2025-08-25 17:07:27 -07:00
Adam Ierymenko 5a62824049 Add -Iext/opentelemetry-cpp-api-only/include for BSD 2025-08-25 14:16:56 -07:00
Adam Ierymenko bfa4bd2584 Removing this, which was suggested by a linter, turns out to break things by breaking equality comparison. The NetworkConfig struct would have to be re-implemented in a more modern way to allow the compiler to properly generate comparison operators, which is not important right now. 2025-08-25 13:38:57 -07:00
Adam Ierymenko 1e62d69762 Do not compress frames -- also unrelated to bug. 2025-08-25 11:47:50 -07:00
Adam Ierymenko bed6557a6d Re-enable relaying checks, also not bug related but put back after we decided to punt removing moons. 2025-08-25 11:22:21 -07:00
Adam Ierymenko 0d3ed4769e Merge branch 'dev' of github.com:/zerotier/ZeroTierOne into adam/1.16 2025-08-25 11:07:29 -07:00
Adam Ierymenko bee3ea79f0 Minor thing, unrelated to bug but missing. 2025-08-21 18:47:41 -04:00
Adam Ierymenko ca4e35d52c License stuff, version bump, CLI output. 2025-08-21 11:01:52 -04:00
Adam Ierymenko 6623aa3a7d License files. 2025-08-21 10:39:25 -04:00
Adam Ierymenko 67360aaeef Bump Rust package versions due to dependabot alert and fix a few more makefile things for macOS. 2025-08-21 10:20:20 -04:00
Adam Ierymenko 3e21edb891 Remove a bunch of warnings by eliminating deprecated functions. 2025-08-21 10:06:56 -04:00
Adam Ierymenko 6e6fc9a704 Add conditional compilation of controller. 2025-08-21 09:55:08 -04:00
Grant Limberg 86f402edb7 Merge pull request #2495 from zerotier/gl/cv1-os-arch
hosted controller changes for cv1 os/arch reporting
2025-08-20 15:09:35 -07:00
Adam Ierymenko 6bf7b4d9ba Merge branch 'adam/1.16' of github.com:/zerotier/ZeroTierOne into adam/1.16 2025-08-20 17:27:03 -04:00
Adam Ierymenko 2f2f864aa8 Clear ifname buffer before copying into it. 2025-08-20 17:23:18 -04:00
Grant Limberg c479cba71a Merge branch 'dev' into gl/cv1-os-arch 2025-08-20 09:38:09 -07:00
Grant Limberg 564d29e445 fix include 2025-08-12 10:52:25 -07:00
Adam Ierymenko ab208bb8f9 Make encrypted HELLO a local.conf setting -- 99.999999% of users do not need it and it introduces scalability problems on large controllers. 2025-08-12 12:34:54 -04:00
Adam Ierymenko eb422ddf08 Null out current LICENSE in prep for new 2025-08-12 10:30:07 -04:00
Adam Ierymenko c668990b4d Remove ancient unused LFDB code and change license notice in controller files. 2025-08-11 17:19:05 -04:00
Adam Ierymenko c21636b295 Remove moon comments from the CLI help. They still work but are not shown. 2025-08-11 13:22:39 -04:00
Adam Ierymenko 3cd413ed1f Revert "Remove moons, phase I, and also fix usages of sprintf. These were safe but the function itself is considered unsafe and deprecated."
This reverts commit 8518d28dc4.
2025-08-08 14:59:22 -04:00
Adam Ierymenko 8518d28dc4 Remove moons, phase I, and also fix usages of sprintf. These were safe but the function itself is considered unsafe and deprecated. 2025-08-08 13:43:40 -04:00
Adam Ierymenko 52de8ff62d docs 2025-08-08 13:22:23 -04:00
Adam Ierymenko d3d738f93b Remove antique software updater code. It has not been used in many years, is not something we intend to use, and might in theory be an attack vector if someone found a problem with it. Better for it not to be there. 2025-08-08 13:21:38 -04:00
Adam Ierymenko f6d52dd96c Rest -> MPL except controller. 2025-08-06 12:16:44 -04:00
Adam Ierymenko 9aff094b6f node/ -> MPL 2025-08-06 12:10:18 -04:00
Grant Limberg 02a3929472 ctl changes for cv1 os/arch reporting 2025-08-05 12:29:29 -07:00
Adam Ierymenko 41c4642a21 Fix otel includes in .clangd 2025-08-05 11:32:17 -04:00
Adam Ierymenko f319078694 Merge github/dev 2025-08-05 11:03:59 -04:00
Adam Ierymenko a548c7ea71 Merge pull request #2482 from zerotier/otel
Add OpenTelemetry support in Central Controllers
2025-08-04 12:35:05 -04:00
Adam Ierymenko 6e34b192e3 cleanup 2025-08-04 11:09:06 -04:00
Lennon Day-Reynolds 969e8ff0ec Merge pull request #2487 from zerotier/ldr/fix-windows-startup
Windows installer fixes
2025-07-31 15:11:57 -07:00
Jeremy Fleischman 66a8c01d0e Add a warning about missing DNS functionality on Linux
It took me quite some searching before I found out that this simply is
not implemented. A warning would have been very useful.

refs: https://github.com/zerotier/ZeroTierOne/issues/2492
2025-07-31 14:40:44 -07:00
Adam Ierymenko 21986038be cleanup 2025-07-31 11:09:09 -04:00
Adam Ierymenko 3eb7ed2892 Move controller/ into nonfree/controller and update references 2025-07-30 14:18:36 -04:00
Adam Ierymenko 2410389912 Merge remote-tracking branch 'github/dev' into adam/network-specific-relays 2025-07-30 13:26:05 -04:00
Joseph Henry a8ead37312 Merge pull request #2491 from zerotier/fix/standardize-linkSelectMethod-naming
fix: standardize bond link selection method JSON field naming
2025-07-29 10:29:30 -07:00
Aaron JohnsonandClaude ecec45697b fix: standardize bond link selection method JSON field naming
Adds support for "linkSelectMethod" as the JSON configuration field name
while maintaining backward compatibility with the legacy "activeReselect"
field name.

This change aligns the JSON field name with the internal API naming
convention (setLinkSelectMethod/getLinkSelectMethod) and follows the
established pattern in the codebase where JSON field names match their
corresponding setter method names.

The implementation:
- Checks for the new field name first, then falls back to the legacy name
- Emits a deprecation warning when "activeReselect" is used
- Ensures existing configurations continue to work without modification

Resolves terminology inconsistency identified in docs PR #263

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 10:32:40 -07:00
William Yates 2c5ded78e3 Fix link select field in bond CLI 2025-07-18 18:03:33 -07:00
Adam Ierymenko d51b82d0e6 Temporarily disable checks to always forward -- for testing. 2025-07-18 14:26:19 -04:00
Lennon Day Reynolds 815c20c822 windows installer changes: add auto-startup shortcut for UI and auto-restart backend on failure 2025-07-17 15:22:30 -07:00
Adam Ierymenko 92838fa1b2 Controller support for "relays" field. 2025-07-17 17:04:07 -04:00
Grant Limberg 307c4ed4b6 network/member deletes work now 2025-07-16 16:35:28 -07:00
Grant Limberg 14c0ccc94c trace attribs 2025-07-16 13:12:00 -07:00
Grant Limberg 4aea588eef fixes for otel in non-controller build 2025-07-16 12:57:18 -07:00
Grant Limberg 4c4a360469 udno 2025-07-16 12:09:21 -07:00
Grant Limberg a0253a0970 argh 2025-07-16 12:03:01 -07:00
Grant Limberg 7662ffb64a let's try saving things here 2025-07-16 11:55:21 -07:00
Grant Limberg 9375c48e33 one more addDB update 2025-07-16 11:16:06 -07:00
Grant Limberg 5494c44a30 let's try this 2025-07-16 11:13:53 -07:00
Grant Limberg 3f19712178 inheritence mess cleanup 2025-07-16 10:40:29 -07:00
Grant Limberg 4a15671e84 Merge branch 'dev' into otel 2025-07-16 10:12:54 -07:00
Grant Limberg 51b2f284f0 call DB::eraseNetwork when it should be
One of those i'm not sure how this ever worked situations
2025-07-16 09:05:54 -07:00
Adam Ierymenko 055be92ef0 Plumb through attaching network ID to packet sends. 2025-07-16 11:55:00 -04:00
Lennon Day-Reynolds 67c2336176 Merge pull request #2486 from zerotier/ldr/fix-validate-action
add 'apt update' to validation action
2025-07-15 14:32:12 -07:00
Lennon Day Reynolds 6667c57e89 add 'apt update' to validation action, as prior runs have started failing due to a stale package cache 2025-07-15 13:59:18 -07:00
Grant Limberg 4edeacd1f0 end cv1 spans before sleeps 2025-07-15 12:11:10 -07:00
Grant Limberg 01bd4373b6 one more span change to end before a sleep 2025-07-15 11:26:02 -07:00
Grant Limberg 2db20f0a6c move another span outside of a sleep 2025-07-15 11:12:14 -07:00
Grant Limberg 7934fef84c end spans before thread waits
also removed some spans from the networks/members db watcher.  Those will be 5 seconds long no matter what, and the underlying processes already have their own spans
2025-07-15 11:10:19 -07:00
Adam Ierymenko 58c80ff0ab Add network ID to upstream lookup, cleanup, release notes for 1.16. 2025-07-15 13:54:10 -04:00
Grant Limberg 4b6ff77fea nevermind. Just use OTEL_SERVICE_NAME 2025-07-15 10:35:27 -07:00
Grant Limberg a0cc7babdf set service.name iff it's not set by the OTEL_SERVICE_NAME env var 2025-07-15 10:24:18 -07:00
Grant Limberg cf77a6a805 set service.name iff it's not set by the environment 2025-07-15 10:08:46 -07:00
Grant Limberg b3da8d9aa1 don't specify service.name so we can override it 2025-07-15 09:53:53 -07:00
Grant Limberg d8272b7370 remove define 2025-07-15 09:06:47 -07:00
Grant Limberg 5329326591 batch tracing spans instead of sending them all individually 2025-07-15 09:06:12 -07:00
Grant Limberg 06bc1e5e6b copy optentelemetry .so files to /usr/local/lib64 2025-07-15 08:30:45 -07:00
Grant Limberg 9b31fe1e98 fix build 2025-07-14 20:38:47 -07:00
Grant Limberg 0ae551a970 more fun setting up tracing 2025-07-14 20:32:34 -07:00
Grant Limberg 8e733ff0da definition fix 2025-07-14 17:50:44 -07:00
Grant Limberg 52b6355a54 logging & config update 2025-07-14 17:27:36 -07:00
Grant Limberg 54fb480ade set exporter endpoint & sample rate in startup script 2025-07-14 13:57:52 -07:00
Grant Limberg b292d4f06d Merge branch 'dev' into otel 2025-07-14 13:46:55 -07:00
Grant Limberg 076ed83b81 more dependencies in the build container 2025-07-14 13:34:03 -07:00
Grant Limberg b12bc59b57 Update incllude path for Windows builds to include otel api headers 2025-07-14 13:29:02 -07:00
Grant Limberg 8e5522647a build updates 2025-07-14 10:17:52 -07:00
Grant Limberg 3fd42ad2a0 set errors in otel if/when they happen 2025-07-14 10:17:46 -07:00
Grant Limberg 99cd9d174b remove these for now 2025-07-12 13:39:45 -07:00
Grant Limberg f71a85a675 fix otel api-only header dir 2025-07-12 13:35:45 -07:00
Grant Limberg b9de551e0c controller tracing 2025-07-12 13:29:07 -07:00
Grant Limberg 0e87c21d87 began instrumentation of http control plane and controller 2025-07-12 12:43:57 -07:00
Grant Limberg 2c2574e182 instantiate and configure otel for controllers 2025-07-12 12:12:25 -07:00
Grant Limberg 5c3daca2a0 only build otlp stuff for central controllers 2025-07-11 14:47:58 -07:00
Adam Ierymenko 5232af0a61 Merge pull request #2481 from zerotier/rust-updates
Rust warning removal, clippy allows, update library versions.
2025-07-11 17:07:49 -04:00
Grant Limberg 7f835b414a include the otel header-only part directly for ease of use 2025-07-11 13:12:13 -07:00
Grant Limberg 8895ad182f fix linking on linux 2025-07-11 11:20:43 -07:00
Grant Limberg 3784b66cdb clean updates 2025-07-11 11:15:10 -07:00
Grant Limberg 0c7afe3d0a add otel target to zerotier-one dependency in linux makefile 2025-07-11 11:12:58 -07:00
Grant Limberg 478cd2840b add otel to mac & linux builds
Off by default.  set `ZT_OTEL=1` to enable
2025-07-11 11:07:47 -07:00
Grant Limberg fbac205e65 add otel library to ext 2025-07-11 10:37:21 -07:00
Adam Ierymenko 697011df7b Cleanup, define specialist for network specific relays, remove some dead code. 2025-07-11 10:48:12 -04:00
Adam Ierymenko 67e8f344ac Rust warning removal, clippy allows, update library versions. 2025-07-11 09:50:27 -04:00
Adam Ierymenko 5fb8d2aa37 Merge pull request #2306 from zerotier/fix-flows-for-bridge-mode-mp
Fix flow assignment for bridged EXT_FRAME packets
2025-07-10 15:52:03 -04:00
Adam Ierymenko d50ec3094f Merge pull request #2438 from zerotier/dev-extosdep
Add custom control plane for third-party device vendors
2025-07-10 15:43:09 -04:00
Joseph Henry 7473d1942d Merge changes from dev 2025-07-09 18:01:11 -07:00
Adam Ierymenko e22c80dce6 Merge branch 'dev' into dev-extosdep 2025-07-08 16:41:46 -04:00
Adam Ierymenko 8affcb0e3d Merge pull request #2474 from zerotier/hello-encryption
Hello encryption
2025-07-08 16:39:35 -04:00
Adam Ierymenko 16dd3fd7af Windows build fixes from clang-format, disable for Windows include order 2025-07-08 15:11:57 -04:00
Joseph Henry a46fb73260 Merge branch 'dev' into dev-extosdep 2025-07-07 10:48:04 -07:00
Adam Ierymenko db6045fe9c clang-format 2025-07-07 12:09:35 -04:00
Adam Ierymenko 4efd206dd4 build fix 2025-07-03 19:14:39 -04:00
Adam Ierymenko b0889e1454 Merge branch 'dev' into hello-encryption 2025-07-03 14:49:17 -04:00
Adam Ierymenko 69de477d0b Merge branch 'dev' into dev-extosdep
# Conflicts:
#	controller/DB.hpp
#	controller/DBMirrorSet.cpp
#	controller/DBMirrorSet.hpp
#	controller/EmbeddedNetworkController.cpp
#	controller/FileDB.cpp
#	controller/FileDB.hpp
#	controller/LFDB.cpp
#	controller/LFDB.hpp
#	controller/PostgreSQL.cpp
#	controller/PostgreSQL.hpp
#	node/Metrics.cpp
#	node/Metrics.hpp
#	osdep/EthernetTap.cpp
#	osdep/Http.hpp
#	osdep/ManagedRoute.cpp
#	service/OneService.cpp
2025-07-03 14:14:04 -04:00
Adam Ierymenko 5eb3cd2699 clang-format this branch to match dev 2025-07-03 14:10:44 -04:00
Joseph Henry 226bb1d4ef Merge pull request #2427 from SwarmboticsAI/fix-active-backup-selection
Fix active backup link selection
2025-07-03 10:55:38 -07:00
Joseph Henry 8753829c1b Merge pull request #2477 from zerotier/dev-multicast-bridge-fix
Don't count bridges towards multicast limit. Send to all bridges
2025-07-03 10:14:14 -07:00
Adam Ierymenko 55e9320299 Ofast is deprecated 2025-07-03 12:55:22 -04:00
Joseph Henry c4af2d79c5 Don't count bridges towards multicast limit. Send to all bridges 2025-07-03 09:44:45 -07:00
Adam Ierymenko ce708df877 Merge branch 'dev' into hello-encryption
# Conflicts:
#	controller/DB.hpp
#	controller/DBMirrorSet.cpp
#	controller/DBMirrorSet.hpp
#	controller/EmbeddedNetworkController.cpp
#	controller/FileDB.cpp
#	controller/FileDB.hpp
#	controller/LFDB.cpp
#	controller/LFDB.hpp
#	controller/PostgreSQL.cpp
#	controller/PostgreSQL.hpp
#	node/C25519.cpp
#	node/C25519.hpp
#	node/Capability.hpp
#	node/CertificateOfMembership.cpp
#	node/CertificateOfMembership.hpp
#	node/CertificateOfOwnership.hpp
#	node/Credential.hpp
#	node/Identity.cpp
#	node/Identity.hpp
#	node/IncomingPacket.cpp
#	node/Metrics.cpp
#	node/Metrics.hpp
#	node/Multicaster.cpp
#	node/Network.cpp
#	node/Node.cpp
#	node/Packet.cpp
#	node/Packet.hpp
#	node/Peer.cpp
#	node/Revocation.hpp
#	node/Switch.cpp
#	node/Tag.hpp
#	node/World.hpp
#	osdep/Http.hpp
#	service/OneService.cpp
2025-07-03 12:10:57 -04:00
Adam Ierymenko 342fa9d33f clang-format this branch 2025-07-03 12:02:18 -04:00
Adam Ierymenko fd9a23f30f Merge pull request #2475 from zerotier/clang-format
clang-format
2025-07-03 11:57:35 -04:00
Grant Limberg d72b98b434 does this make windows happy? 2025-07-03 08:48:39 -07:00
Grant Limberg 813fb7a394 one more clang-format fix 2025-07-03 08:41:19 -07:00
Grant Limberg 6d532944bd stop clang-format from breaking the build by sorting headers here 2025-07-03 08:38:21 -07:00
Adam Ierymenko ba2a4a605c clang-format 2025-07-03 11:26:23 -04:00
Grant Limberg d45f280cb7 Merge pull request #2452 from zerotier/gl/cv2-ctl
CV2 db schema support
2025-07-03 08:24:36 -07:00
Grant Limberg 7cf0d7a5d8 Merge remote-tracking branch 'origin/dev' into gl/cv2-ctl 2025-07-03 08:21:39 -07:00
Adam Ierymenko 8b77ef538a self test fixes 2025-07-03 11:14:52 -04:00
Adam Ierymenko e366661a09 Merge branch 'dev' into hello-encryption 2025-07-03 10:55:46 -04:00
Grant Limberg 8636fe3c33 comment debug line 2025-07-02 11:35:59 -07:00
Grant Limberg 08e0da7921 DBMirrorSet wasn't passing along os/arch infof 2025-07-02 11:26:28 -07:00
Grant Limberg 27021ff425 debug log line 2025-07-02 11:15:21 -07:00
Grant Limberg ecedddb19b grab os/arch info from nc request 2025-07-02 09:17:50 -07:00
Grant Limberg ee73ac1a74 update makefile for multi-arch controller-v2 docker build 2025-06-20 14:49:40 -07:00
Grant Limberg 169250d484 update makefile for multi-arch controller-v2 docker build 2025-06-20 14:48:18 -07:00
Grant Limberg 4fea4fc76f debug output 2025-06-20 14:39:12 -07:00
Grant Limberg 6fa849c956 dump member save output only on error 2025-05-21 15:52:16 -07:00
Grant Limberg 3cef1b0842 error output on exceptions in commit thread 2025-05-21 08:40:11 -07:00
Grant Limberg 08b1ceb9a1 "relayed" as ip addr for unknown IP in last_seen 2025-05-21 07:24:35 -07:00
Grant Limberg af0a9118c1 another query update 2025-05-19 11:07:18 -07:00
Grant Limberg 568da750bb another query fix 2025-05-19 10:50:37 -07:00
Grant Limberg d5f6f6b98e fix sql statement 2025-05-19 10:37:52 -07:00
Grant Limberg 10ac0c2e1a remove last_authorized_credential field.
Think that came from when we were trying to have the controller use the same table as CV2.  It's not used or needed by the controller itself
2025-05-19 09:52:27 -07:00
Grant Limberg 1ffadf31de Get node OS/Arch info into the CV2 db 2025-05-14 15:06:24 -07:00
Grant Limberg 224ee88b91 cleanup some debug statements 2025-05-13 13:36:39 -07:00
Grant Limberg b42067e654 account for SSL db connection 2025-05-13 13:31:49 -07:00
Grant Limberg c9e08c951a add postgres tag to go install migrate 2025-05-13 13:27:25 -07:00
Grant Limberg 42f760d72f file:// url 2025-05-13 13:21:57 -07:00
Grant Limberg c68acebe31 Add db migrations to CV2 db 2025-05-13 13:11:27 -07:00
Grant Limberg 4b7c5159a3 "" instead of nullptr 2025-05-08 12:24:57 -07:00
Grant Limberg 4a8daf43e4 more query fixes 2025-05-08 10:33:15 -07:00
Grant Limberg 182148a26c query fix 2025-05-08 10:10:20 -07:00
Grant Limberg af715ca0ff query & null fix 2025-05-08 09:22:28 -07:00
Grant Limberg 990ecb5eb1 another query fix 2025-05-07 12:12:32 -07:00
Grant Limberg 7c88b3f124 fix a couple of queries 2025-05-07 11:57:28 -07:00
Grant Limberg f4053c8af3 Merge pull request #2451 from zerotier/dependabot/cargo/rustybits/crossbeam-channel-0.5.15
Bump crossbeam-channel from 0.5.13 to 0.5.15 in /rustybits
2025-05-02 12:38:07 -07:00
Grant Limberg af3f8b00a4 fix cv2 connection 2025-05-01 15:59:07 -07:00
Grant Limberg db06c98608 startup script 2025-05-01 14:17:49 -07:00
Grant Limberg 332a7d1488 more fun with the startup script 2025-05-01 14:12:30 -07:00
Grant Limberg 48f9f7de14 Allow setting cv2: for the db url 2025-05-01 13:58:54 -07:00
Grant Limberg 35d37559c8 v2controller docker target on mac 2025-05-01 12:57:54 -07:00
Grant Limberg 1a6c0a5f12 reflect schema changes 2025-05-01 12:26:43 -07:00
Grant Limberg 2c8f032a76 CV2 controller. Should have everything but SSO now 2025-04-10 13:32:52 -07:00
dependabot[bot] bcc766f70d Bump crossbeam-channel from 0.5.13 to 0.5.15 in /rustybits
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.13 to 0.5.15.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.13...crossbeam-channel-0.5.15)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-version: 0.5.15
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 14:38:32 +00:00
Grant Limberg dcadc2c4d4 Merge pull request #2449 from zerotier/dependabot/cargo/rustybits/openssl-0.10.72
Bump openssl from 0.10.70 to 0.10.72 in /rustybits
2025-04-08 10:36:25 -07:00
Grant Limberg 55ed5d61e0 Merge branch 'dev' into dependabot/cargo/rustybits/openssl-0.10.72 2025-04-08 08:08:28 -07:00
Grant Limberg 86f424130d Merge pull request #2450 from zerotier/dependabot/cargo/rustybits/tokio-1.43.1
Bump tokio from 1.42.0 to 1.43.1 in /rustybits
2025-04-08 08:08:08 -07:00
dependabot[bot] 4e9b69f0a7 Bump tokio from 1.42.0 to 1.43.1 in /rustybits
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.42.0 to 1.43.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.42.0...tokio-1.43.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.43.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 02:02:25 +00:00
dependabot[bot] 0a17738f39 Bump openssl from 0.10.70 to 0.10.72 in /rustybits
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.70 to 0.10.72.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.70...openssl-v0.10.72)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.72
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 20:53:49 +00:00
Grant Limberg fb7b07fc42 make sure the pg connstring is correct for cv2:// instances 2025-04-03 14:48:13 -07:00
Grant Limberg 1d2130610c use the CV2 db instance if the path prefix is cv2:// 2025-04-03 14:38:58 -07:00
Grant Limberg 0b04f772ef make things compile 2025-04-03 14:26:09 -07:00
Grant Limberg 5c73fe9304 build fix 2025-04-03 10:45:06 -07:00
Grant Limberg 2af105000f WIP: refactoring for CV2 db integration 2025-04-03 10:27:42 -07:00
Grant Limberg cadfa0bc4d Merge pull request #2445 from zerotier/docker-local-conf
Allow setting local.conf content from Docker environment variable
2025-04-03 09:42:11 -07:00
Grant Limberg f2521c8536 Allow setting local.conf content from Docker environment variable 2025-03-26 11:23:46 -07:00
Grant Limberg d353e0c6fa Merge pull request #2442 from zerotier/dependabot/cargo/rustybits/ring-0.17.13
Bump ring from 0.17.8 to 0.17.13 in /rustybits
2025-03-19 08:30:23 -07:00
Grant Limberg 346731ea5d Merge branch 'dev' into dependabot/cargo/rustybits/ring-0.17.13 2025-03-11 10:47:33 -07:00
Grant Limberg 2ef38d84d1 Merge pull request #2444 from zerotier:gl/temporal-sdk-fix
temporal sdk fix
2025-03-10 16:39:39 -07:00
Grant Limberg 5630d48a66 temporal sdk fix
missing WorkflowIdConflictPolicy
2025-03-10 16:35:10 -07:00
Grant Limberg b44a9b8b62 Merge pull request #2443 from zerotier:gl/onelogin-fix
Fix AuthInfo Provider not being set
2025-03-10 16:20:06 -07:00
Grant Limberg f5b0fc6a8f Fix AuthInfo Provider not being set 2025-03-10 16:04:06 -07:00
dependabot[bot] a20bc772f2 Bump ring from 0.17.8 to 0.17.13 in /rustybits
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 17:04:31 +00:00
Travis LaDuke 010c4b0d64 Merge pull request #2441 from zerotier/laduke/update-actions
Run CI on pull requests
2025-03-05 09:18:20 -08:00
Joseph Henry dcb4bc5ef4 Fix path typo: 3rdpatry 2025-03-04 11:18:13 -08:00
Joseph Henry 47e05d5a23 Disable peer metrics for ExtOSDep builds 2025-03-04 10:34:57 -08:00
Joseph Henry 17abb58651 Add missing include to ExtOsDep.hpp 2025-03-04 10:26:31 -08:00
Joseph Henry 05b60bd818 Fix typo 2025-03-04 10:25:06 -08:00
travisladuke 5998f1497a Run CI on pull requests
If the PR is from an external repo,
the action won't run without approval.
right now we can't run the actions on external PRs.
2025-03-03 10:01:33 -08:00
Joseph Henry 269c8d415a Style match 2025-02-26 11:16:03 -08:00
Joseph Henry cd191778c2 Add custom management plane for 3rd party vendors 2025-02-26 10:27:23 -08:00
Joseph Henry 3e7aacf301 Expose routing() method in httplib so changes can be made in OneService 2025-02-26 09:56:08 -08:00
Joseph Henry 6b113c8270 Add auto-detection of platform integer size in prometheus 2025-02-26 09:55:08 -08:00
Grant Limberg a2162c01e3 Merge pull request #2430 from zerotier/dependabot/cargo/rustybits/openssl-0.10.70
Bump openssl from 0.10.68 to 0.10.70 in /rustybits
2025-02-04 15:45:25 -08:00
Grant Limberg 870c221690 Merge branch 'dev' into dependabot/cargo/rustybits/openssl-0.10.70 2025-02-04 15:38:52 -08:00
Grant Limberg 87ad848202 Merge pull request #2432 from zerotier:ci-update
Update upload-artifact action to use v4
2025-02-04 15:38:14 -08:00
Grant Limberg b736b6835d Update upload-artifact action to use v4
V3 is no longer supported and throws an error on use
2025-02-04 15:30:25 -08:00
dependabot[bot] 91bec01da8 Bump openssl from 0.10.68 to 0.10.70 in /rustybits
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.68 to 0.10.70.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.70)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 18:50:34 +00:00
William Yates a0c3f432c4 Sort active backup paths 2025-01-24 17:52:17 -07:00
Grant Limberg b5c51796b9 Merge pull request #2417 from zerotier/rust-deps
update rust dependencies
2024-12-04 14:46:54 -08:00
Grant Limberg 724002f142 update rust dependencies 2024-12-04 13:43:34 -08:00
Grant Limberg 377a9d6f41 Merge pull request #2409 from zerotier/dependabot/cargo/rustybits/rustls-0.23.18
Bump rustls from 0.23.15 to 0.23.18 in /rustybits
2024-11-25 11:27:22 -08:00
dependabot[bot] 003b4cf876 Bump rustls from 0.23.15 to 0.23.18 in /rustybits
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.15 to 0.23.18.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.15...v/0.23.18)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 17:00:23 +00:00
Joseph Henry b12dd19d44 Merge pull request #2405 from zerotier/jh-fix-openbsd-tap
Build fix for OpenBSD - See ticket #2397
2024-11-13 15:12:18 -08:00
Joseph Henry 82c6454950 Fix broken ifdef on OpenBSD 2024-11-13 09:01:09 -08:00
Joseph Henry 969c0ee6e3 Omit CPU pinning code on OpenBSD 2024-11-12 14:40:24 -08:00
Joseph Henry c092b63987 Merge pull request #2365 from zerotier/laduke/2361-phy-mtu
Lower ZT_MIN_PHYSMTU
2024-11-12 09:38:11 -08:00
Joseph Henry 47efee1df4 Merge branch 'dev' into laduke/2361-phy-mtu 2024-11-12 06:20:29 -08:00
Joseph Henry 18a5452de8 Merge pull request #2395 from zerotier/core-objs
Move osutils/OSUtils.o into CORE_OBJS
2024-11-12 06:20:04 -08:00
Joseph Henry c3794ba8d4 Merge branch 'dev' into core-objs 2024-11-12 06:05:51 -08:00
Joseph Henry 75a5b4438b Build fix for OpenBSD - See ticket #2397 2024-11-12 05:59:49 -08:00
Adam Ierymenko 185a3a2c76 Merge pull request #2396 from zerotier/1.14.2
1.14.2
2024-10-25 14:37:17 -04:00
Adam Ierymenko 3fcef51137 Windows installer version bump. 2024-10-25 14:14:01 -04:00
Grant Limberg f959c2f4ca Move osutils/OSUtils.o into CORE_OBJS
When building via `make core` to make libzerotiercore.a, you can't link unless OSUtils.cpp is also built & linked.
2024-10-25 09:32:13 -07:00
Adam Ierymenko b7a6e106fd Version increments. 2024-10-23 14:08:57 -04:00
Adam Ierymenko 7dca7fac11 Bump Rust library versions. 2024-10-23 11:03:18 -04:00
Adam Ierymenko 4ef2d4cc8e Merge pull request #2376 from sh1ve/patch-1
Fix build error under certain character sets in Windows
2024-10-23 10:09:40 -04:00
travisladuke 55bbd2aec6 Lower ZT_MIN_PHYSMTU
regarding #2361
2024-10-18 15:44:34 -07:00
Grant Limberg 36b4659f77 Merge pull request #2379 from zerotier/docker-release
add `make docker-release`  command & update dockerfile
2024-10-02 13:21:20 -07:00
Grant Limberg 0b5666bde2 Merge remote-tracking branch 'origin/dev' into docker-release 2024-10-02 13:07:23 -07:00
Grant Limberg e1c72e6d51 add make docker-release command & update dockerfile 2024-10-02 12:59:21 -07:00
sh1ve 5799d9a15b Fix build error under certain character sets
Add some padding after non-ASCII comment
2024-09-29 23:49:38 +08:00
Adam Ierymenko 74404f56ee Actually invoke extended armor 2024-09-27 17:52:43 -04:00
Adam Ierymenko e53abe8bde Bump RPM version for build. 2024-09-27 17:27:01 -04:00
Adam Ierymenko 29ef10e759 Bump version to an intermediate (odd) number. 2024-09-27 17:00:38 -04:00
Adam Ierymenko 1e679cc94d Bug fix in extended armor. 2024-09-26 20:13:10 -04:00
Adam Ierymenko 96ba1079b2 Clang-format!!! 2024-09-26 08:52:29 -04:00
Adam Ierymenko f190df8621 Restrict usage to when encryption is not active. 2024-09-25 20:12:19 -04:00
Adam Ierymenko 6b078ee935 Implement extended armor throughout system but not turned on yet. 2024-09-25 19:51:15 -04:00
Adam Ierymenko 3de5cbd105 Change indent 2024-09-24 10:31:31 -04:00
Adam Ierymenko 6faee38395 Specify start of extended encryption. 2024-09-24 10:27:06 -04:00
Adam Ierymenko a44fd40889 Remove some obsolete stuff, rev protocol version. 2024-09-22 12:32:17 -04:00
Adam Ierymenko 5b7e1ceb68 More ECC work to prep for a FIPS mode 2024-09-20 14:04:49 -07:00
Joseph Henry d9d58c8bde Merge pull request #2371 from zerotier/jh-fix-bsd-tap-build-error
Fix build error for BSD tap driver
2024-09-18 08:49:28 -07:00
Joseph Henry d34481d830 Fix build error for BSD tap driver 2024-09-17 11:04:01 -07:00
Adam Ierymenko 307befa892 Rename C25519.* to ECC.* 2024-09-15 17:34:01 -04:00
Adam Ierymenko 7647c8e8d1 Rename ECC key and signature size defines to be generic. 2024-09-15 16:33:41 -04:00
Adam Ierymenko b2d71f900a A few revs and removal of unnecessary stuff. 2024-09-14 11:13:45 -04:00
Adam Ierymenko 9e4ce68444 clean out some stuff 2024-09-14 08:21:08 -04:00
Joseph Henry 4920b68d2c Merge pull request #2364 from zerotier/jh-fix-for-lbm
Fix for low-bandwidth mode
2024-09-13 10:01:47 -07:00
Joseph Henry 5ce3d1e7a1 Fix for low-bandwidth mode 2024-09-13 09:46:36 -07:00
Adam Ierymenko 8140264cb6 Merge pull request #2363 from zerotier/dev
1.14.1 merge dev to main
2024-09-12 18:51:36 -04:00
Adam Ierymenko a0acc82e99 1.14.1 (#2362)
* Bump version in most places.

* Update official release steps for desktop

* Version bump a bunch of Rust packages.

* Windows fix for disabling MT properly.

* Release notes.
2024-09-12 18:48:34 -04:00
Adam Ierymenko 98e532de20 Merge pull request #2244 from zerotier/lel-amri-fix-mac-handling-in-rules-parser
Fix mac handling in rules parser
2024-09-11 14:56:10 -04:00
Adam Ierymenko e1ee3eb494 Merge branch 'dev' into lel-amri-fix-mac-handling-in-rules-parser 2024-09-11 12:13:32 -04:00
Adam Ierymenko 4a485df0c7 Merge pull request #2234 from zerotier/jh-zerotier-multithreaded
Add multi-core concurrent packet processing
2024-09-11 10:17:22 -04:00
Travis LaDuke 2522d29fdc Merge pull request #2360 from laduke/dev
retain build artifacts from build action
2024-09-10 13:55:29 -07:00
travisladuke 560d6fba1b tar mac and linux binary
to keep the execute permission bit
2024-09-10 13:45:50 -07:00
travisladuke 223ec0c59d retain build artifacts
cleaned up all the github action deprecation warnings.
save zerotier-one binary for mac, windows, and linux
2024-09-10 13:36:59 -07:00
Adam Ierymenko 6bc785e771 Merge branch 'dev' into jh-zerotier-multithreaded 2024-09-10 13:10:45 -04:00
Adam Ierymenko fb8cbb69aa Merge pull request #2354 from zerotier/jh-misc-multipath-patches
Multipath improvements
2024-09-10 13:08:37 -04:00
Adam Ierymenko 861147b845 Merge branch 'dev' into jh-zerotier-multithreaded 2024-09-09 16:22:48 -04:00
Adam Ierymenko 763caaebab Merge pull request #2161 from parona-source/execstack
Append noexecstack to linker flags instead of assembler flags
2024-09-09 16:22:14 -04:00
Adam Ierymenko 276259394a Merge branch 'dev' into jh-zerotier-multithreaded 2024-09-09 16:19:37 -04:00
Adam Ierymenko 46c0d1a732 Merge pull request #2320 from zerotier/report-os-arch
Report os arch
2024-09-09 16:13:47 -04:00
Adam Ierymenko 31d2dcec17 Merge pull request #2263 from fedepell/patch-1
Update README.md minimal compilers
2024-09-09 16:04:35 -04:00
Adam Ierymenko c9234ee027 Merge branch 'dev' into patch-1 2024-09-09 16:03:41 -04:00
Adam Ierymenko 9a8d715666 Merge branch 'report-os-arch' of github.com:/zerotier/ZeroTierOne into report-os-arch 2024-09-09 14:36:43 -04:00
Adam Ierymenko 8d474e1395 Add ios differentiation, and .clangd that works w/Zed and clangd. 2024-09-09 14:36:22 -04:00
Adam Ierymenko 52e3d9b804 Merge branch 'dev' into report-os-arch 2024-09-09 14:26:53 -04:00
Joseph Henry 8f5cc4ed33 Completely remove vestigial RX code 2024-09-06 15:19:06 -07:00
Joseph Henry 059d05f41f Comment out vestigial test code (improves mt performance) 2024-09-06 09:52:39 -07:00
Joseph Henry c86b91c5f0 Fix condition where settings may be applied with multithreading is disabled 2024-09-04 12:14:20 -07:00
Joseph Henry e42848d37d Fix bug for when no multithreaded config is given 2024-09-04 11:00:23 -07:00
Joseph Henry bf7dddbd84 Fix issues that prevent user multipath preferences from being respected 2024-08-29 10:09:19 -07:00
Joseph Henry 95983ba168 Build fix for FreeBSD 2024-08-26 12:54:36 -07:00
Joseph Henry c97943d69d Add packet mux source file to Windows project 2024-08-22 15:28:25 -07:00
Joseph Henry b813ea70a5 Simplify packet critical path. Plus more platform fixes 2024-08-22 12:59:06 -07:00
Joseph Henry e734019216 More platform-related build fixes 2024-08-21 14:06:25 -07:00
Joseph Henry b7d9290de9 Fix build issue on macOS 2024-08-21 11:22:07 -07:00
Joseph Henry b1a30ae4ff Switch to local.conf-based config of multithreading 2024-08-20 13:39:15 -07:00
Joseph Henry 8283a6d6d4 Merge branch 'dev' into jh-zerotier-multithreaded 2024-08-18 15:08:42 -07:00
Joseph Henry 36adae3d82 Add packet multiplexer 2024-08-18 15:07:18 -07:00
Joseph Henry f176e2539e Merge pull request #2162 from parona-source/respect-ldflags
Respect user LDFLAGS
2024-07-31 09:54:19 -07:00
Joseph Henry d6bfb8889a Merge branch 'dev' into respect-ldflags 2024-07-31 09:52:50 -07:00
Joseph Henry 24fb1ced3c Merge pull request #2169 from ChrisCarini/ChrisCarini/addArchToSynologyDSM7
Add ARM architectures to Synology DSM7
2024-07-25 15:01:33 -07:00
Joseph Henry 82b8a4f584 Merge pull request #2314 from Mic92/pwd
macos: use more portable pwd instead of PWD
2024-07-16 11:21:24 -07:00
Chris Carini 979bca57d5 Merge branch 'dev' into ChrisCarini/addArchToSynologyDSM7 2024-07-13 04:24:04 -07:00
Grant Limberg 93fd93da5c Merge pull request #2330 from zerotier/controller-redis
break up redis tx inserts into smaller chunks
2024-07-08 14:30:14 -07:00
Grant Limberg 508527f7cd break up redis tx inserts into smaller chunks 2024-07-08 14:08:54 -07:00
Joseph Henry 64634c916c Fix build for macOS, tune to prevent packet re-ordering 2024-07-03 08:49:07 -07:00
Grant Limberg 34cc26176c Merge pull request #2266 from zerotier/winbuild
fix rebuild for x64
2024-06-28 08:07:25 -07:00
Adam Ierymenko e2840b0eb8 undo stuff from other branch 2024-06-24 18:54:05 -04:00
Adam Ierymenko f4edb092b7 Merge branch 'dev' into rusty-tcp-relay 2024-06-24 18:53:25 -04:00
Adam Ierymenko 8caede300c Add OS_ARCH to network config metadata. 2024-06-24 18:02:58 -04:00
Jörg Thalheim f9c6ee0181 macos: use more portable pwd instead of PWD
In nixpkgs we use coreutils and do not have PWD available.
This change have any downsides on normal macOS systems, but helps
nixpkgs packaging a bit.

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-06-21 15:05:02 +02:00
Grant Limberg f5cc7746b6 Merge branch 'dev' into winbuild 2024-06-18 16:57:47 -07:00
Grant Limberg 41a4690372 Merge pull request #2312 from zerotier/delete 2024-06-18 15:05:06 -07:00
Grant Limberg 9d57ccd7b1 deauth all members upon network delete 2024-06-17 16:38:41 -07:00
Grant Limberg ad60d708e1 fix log line 2024-06-17 16:38:31 -07:00
Adam Ierymenko f79af92599 Add Rust tcp-proxy base, add .clangd 2024-06-17 11:02:13 -04:00
Joseph Henry f368fdbc76 Fix flow assignment for bridged EXT_FRAME packets 2024-06-07 13:02:10 -07:00
Chris Carini 2f3ea8882b Merge branch 'dev' into ChrisCarini/addArchToSynologyDSM7 2024-06-01 03:22:38 -07:00
Brenton Bostick e32fecd16d Thread might actually be detached, so need to handle that 2024-05-21 13:12:22 -04:00
Brenton Bostick dca77cb0d2 expand GETENV macro that needs to be modified 2024-05-21 13:12:22 -04:00
Alfred Wingate 9ec6c2901c Respect user LDFLAGS
* Respect user LDFLAGS instead of replacing them.

Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-05-18 16:01:32 +03:00
Sean OMeara e915d10953 cargo update rustybits (#2286) 2024-05-09 18:57:48 +02:00
Grant Limberg ddb2759a52 Merge pull request #2287 from zerotier:actions
Fix macOS GitHub Action
2024-05-09 09:47:48 -07:00
Grant Limberg 28cf1423c9 also install x64 rust in github action 2024-05-09 09:35:54 -07:00
Grant Limberg 0fb9d43998 Merge pull request #2282 from zerotier/main
Main -> dev
2024-05-02 17:15:57 -07:00
Adam Ierymenko 91e7ce87f0 Merge pull request #2281 from zerotier/1.14.0
1.14.0
2024-05-02 19:48:52 -04:00
Adam Ierymenko e59790b401 Update security readme. 2024-05-02 19:45:07 -04:00
Adam Ierymenko d0b8f76ecb release notes 2024-05-02 19:31:57 -04:00
Adam Ierymenko fe05372c67 Merge branch '1.14.0' of 10.95.0.50:/Users/api/Code/ZeroTier/local/ZeroTier-v1 into 1.14.0 2024-05-02 14:54:46 -04:00
Adam Ierymenko 4394ab58d7 Linux build fixes for Rust on some platforms, and OpenSSL on Fedora builds. 2024-05-02 14:52:57 -04:00
Adam Ierymenko fcaf008beb Fix notarytool stuff for macOS 2024-04-17 18:20:06 -07:00
Adam Ierymenko 1e15a510fd Windows version bump. 2024-04-17 17:50:10 -07:00
Grant Limberg 9de2b90528 fix rebuild for x64 2024-03-27 14:40:38 -07:00
Adam Ierymenko a71e0bf551 Merge branch 'dev' into 1.14.0 2024-03-27 12:15:46 -04:00
Federico Pellegrin 280cc77e23 Update README.md minimal compilers
Update the minimal compilers in documentation. As `std=c++17` is used the minimal got quite bumped from last update. For gcc 7.x would seem possibly enough, but some of the dependencies (eg. libpqxx) need 8.x at least, so setting that as documented minimum.
2024-03-25 05:06:22 +01:00
Joseph Henry a681fbf533 Merge pull request #2262 from tas50/tas50/spellcheck
Fix minor spelling errors in docs
2024-03-23 08:15:37 -07:00
Tim Smith 448df73a35 Fix minor spelling errors in docs
Nothing too fancy here. Just some spellchecking.

Signed-off-by: Tim Smith <tsmith84@gmail.com>
2024-03-22 20:43:46 -07:00
Adam Ierymenko 1982071d46 1.14.0 version bump for Linux and macOS, date update. 2024-03-19 14:38:48 -07:00
Travis LaDuke 4dfb15e37c Merge pull request #2258 from zerotier/version-bump
Bump version.h to 1.14.0
2024-03-19 12:49:07 -07:00
travisladuke 154b72b4f1 Bump version.h to 1.14.0 2024-03-19 12:22:21 -07:00
Grant Limberg de4ee08ad4 add make target to build the central-controller run image 2024-03-19 11:31:05 -07:00
Lennon Day-Reynolds 5ae862ff54 Merge pull request #2255 from zerotier/ldr/update-rust-deps
update temporal SDK + other Rust deps, strip debug symbols from release builds
2024-03-19 11:28:06 -07:00
Lennon Day-Reynolds 859031dcd9 Merge branch 'dev' into ldr/update-rust-deps 2024-03-19 10:06:05 -07:00
Lennon Day-Reynolds 39e1aabd2a update temporal SDK version + other Rust dependencies, strip debug symbols from generated libraries in production builds 2024-03-19 10:03:15 -07:00
Travis LaDuke 9f499827af Merge pull request #2253 from zerotier/freebsd-localhost
Consider ::ffff:127.0.0.1 as a loopback address
2024-03-19 09:04:32 -07:00
travisladuke 9bde5b9065 Consider ::ffff:127.0.0.1 as a loopback address
cpp-httplib  sets IPV6_V6ONLY to false on it's sockets.
On FreeBSD, this makes all ipv4 addresses get get prefixed with ::ffff:
it makes them IPv6 addresses mapped to v4.

This is a partial fix for #2151. The cli will work again.
Something should probably also be adjusted with the httplib.

If you want to, for example, use the `allowManagementFrom` option in
local.conf
you will need to prefix it with "::ffff:", "::ffff:1.2.3.4"
which is a little surprising and inconsistent between BSD and other OSs.
2024-03-15 11:00:13 -07:00
Joseph Henry acaebbd75e Merge pull request #2252 from zerotier/jh-fix-ab-failover
Fix condition where active-backup would fail to engage
2024-03-14 11:52:42 -07:00
Joseph Henry 3ed6379c4c Fix condition where active-backup would fail to engage 2024-03-14 00:19:26 -07:00
travisladuke b4eb39fb16 feat: static file server
this lets you host web apps out of
:9993/app/{app_name}
:9993/app/{other_app}

from $ZT_HOME/app/{app_name}
2024-03-13 12:39:21 -07:00
Lennon Day-Reynolds 6be0e67a5c Merge pull request #2245 from zerotier/gl/win-arm64-fix
more project updates for win ARM64
2024-03-05 14:28:23 -08:00
Grant Limberg abad7d8fe1 more project updates for win ARM64 2024-03-05 13:56:29 -08:00
Lennon Day-Reynolds 72cf3f2315 add Debug target fixes + README examples to run a custom binary 2024-03-05 12:17:51 -08:00
Lennon Day-Reynolds c02ea1bf60 fix include + link paths for ARM64 2024-03-05 12:17:51 -08:00
Joseph Henry b9d0cf9c89 Don't pass result of void function to string constructor 2024-03-05 12:14:12 -08:00
Joseph Henry 80cfc2bd26 Merge branch 'dev' into fix-mac-handling-in-rules-parser 2024-03-05 11:26:33 -08:00
Joseph Henry 08d85d4ae1 Merge pull request #2238 from zerotier/jh-multipath-improvements
Port multipath improvements to newer version
2024-03-05 10:59:05 -08:00
Joseph Henry 43b141547e Merge branch 'dev' into fix-mac-handling-in-rules-parser 2024-03-05 10:48:58 -08:00
Joseph Henry d658c1187c Fix crash when multipath is used with forceTcpRelay 2024-03-05 10:44:55 -08:00
Joseph Henry 1f4c00c7b5 Improve CLI error message for write permission failures 2024-03-05 00:14:56 -08:00
Joseph Henry bbe97dd080 Improve CLI error handling for setmtu command 2024-03-05 00:13:07 -08:00
Joseph Henry 9724e04e6e Improve CLI error handling when showing non-existent bond 2024-03-04 23:23:14 -08:00
Joseph Henry 364ac499eb Merge branch 'dev' into jh-multipath-improvements 2024-03-04 20:28:32 -08:00
Joseph Henry 8b15fa2422 Merge pull request #2241 from zerotier/jh-comment-out-debug-traces
Comment out debug traces in Rules Engine
2024-03-04 20:12:47 -08:00
Joseph Henry 41cb6fb0d5 Comment out debug traces in Rules Engine 2024-03-04 16:38:10 -08:00
Joseph Henry 5d8bd674cd Merge pull request #2232 from zerotier/unstable-api-fixes
Unstable api fixes
2024-03-04 13:11:30 -08:00
Joseph Henry 2e6cda38f6 Port multipath improvements to newer version 2024-03-01 15:43:28 -08:00
travisladuke 6e8fcce777 Fix unstable network member list endpoint
It was returning an array of array instead of
just array
2024-03-01 09:54:13 -08:00
travisladuke 559e8a907b Improve full controller network list api
it was counting incorrectly in some cases and
returning empty objects.
Basically just handling if network data is null
2024-03-01 09:54:13 -08:00
Joseph Henry 024649c175 Merge pull request #2229 from zerotier/tl-add-homedir
Add homeDir to info json
2024-03-01 09:44:21 -08:00
Grant Limberg 7fb3711ed6 Merge branch 'dev' into tl-add-homedir 2024-03-01 12:37:47 -05:00
Travis LaDuke 1dff0c6b5f Merge pull request #2214 from zerotier/tl-tags-3
Fix rules engine evaluation quirks
2024-03-01 09:15:59 -08:00
travisladuke 768c6242cd Add homeDir to info json
Want to show it in UIs. So need to get it via API.

It's also a pain to look up. You have to go to external docs.

zerotier-cli info -j

```json
"config": {
  "settings": {
   "allowTcpFallbackRelay": true,
   "forceTcpRelay": true,
   "homeDir": "/Library/Application Support/ZeroTier/One",
```
2024-02-29 10:44:59 -08:00
travisladuke bca650e1fc Printfs for rules debugging
re-uses ZT_TRACE to enable.
2024-02-29 10:41:12 -08:00
travisladuke 0bf67bf67c Fix rules engine quirks
See #2200

Mostly makes Tag based rules work as expected
2024-02-29 10:41:12 -08:00
Travis LaDuke 99ef1e2696 Merge pull request #2237 from zerotier/main-into-dev
Main into dev
2024-02-29 10:38:31 -08:00
travisladuke 57b6b790c1 docs: Add Contributing section to README 2024-02-29 10:34:09 -08:00
travisladuke 3593a2d49f Merge branch 'main' into main-into-dev 2024-02-29 10:24:22 -08:00
zjslqshqz dad33c9bde fix makefile -pthread (#2182) 2024-02-28 16:12:52 -08:00
Joseph Henry 683d332abc Add multi-core concurrent packet processing 2024-02-23 09:57:39 -08:00
travisladuke ac6d532651 Fix deleting controller network member directory
That trailing slash was making it not work.

ZT_HOME/controller.d/network/$nwid
2024-02-22 11:46:50 -08:00
travisladuke d1a306a021 Prevent creating members on non-existent networks.
```sh
curl -s -X POST "http://localhost:9993/controller/network/abcdabcdabcdabcd/member/1122334455"
```

Would return 200 and ZT_HOME/controller.d/abcdabcdabcdabcd/members/1122334455
would be created. Without a ZT_HOME/controller.d/abcdabcdabcdabcd.json

Then other parts of the system mistakenly think a abcdabcdabcdabcd
network sorta kinda exists and then fail in weird ways.
2024-02-22 11:46:50 -08:00
Joseph Henry 4cd1dcfee1 Merge remote-tracking branch 'origin/tl-stuck' 2024-02-09 13:31:56 -08:00
travisladuke 3ab31545f4 Update cpp-httplib library
There was as Windows directory traversal bug in the static
file server feature. We don't use that feature, so we are ok.

We are going to use that feature soon, so we are
taking the opportunity to update.
2024-02-09 09:25:12 -08:00
Joseph Henry 197bbbb267 Merge pull request #2219 from zerotier/jh-minor-readme-update
Update client JSON API endpoint address in README.md
2024-02-08 10:26:38 -08:00
Joseph Henry 58adecc3a1 Reduce ambiguity in README text 2024-02-07 16:34:59 -08:00
Joseph Henry 830d96d2ed Update client JSON API endpoint address in README.md 2024-02-07 16:16:31 -08:00
travisladuke f027d8f519 Fix typo in metric name 2024-02-07 15:13:42 -08:00
Chris Carini 8b44ac984c Merge branch 'dev' into ChrisCarini/addArchToSynologyDSM7 2024-02-05 02:45:32 -08:00
travisladuke 5542dbcc0b Fix random port rebinding
It was checking for "offline" every loop.
But the port rebinding happens only ever X
loops. So the port would keep changing before it
would get bound.
2024-02-01 14:39:54 -08:00
travisladuke 0ca8ae7970 Create an alternate networks list endpoint
Add /unstable/controller/network endpoint

Similar to /unstable/controller/network/{id}/member, it returns actual network objects,
instead of just network ids.
Also includes the total network count,
and each network has it's member counts in meta{}.
2024-02-01 13:12:24 -08:00
travisladuke 0b83f850e4 Create an alternate members list endpoint
The current api at /controller/network/1111111111767f2f/member
Lists only the members' ID and revision number.
If you want details, you have to query each specific member.
So if you want to make a members list, and you have
10000 members on a network, you need to make
10000 http requests.

It's also in a hard to specify and use shape
{ [member-id-1]: 13, [member-id-2]: 14, ... }

GET http://localhost:9993/unstable/controller/network/1111111111767f2f/member ->

```
{
  data: [ {...member1}, {...member2}, ...],
  meta: { totalCount: 4, authorizedCount: 3 }
}

```
2024-02-01 12:47:51 -08:00
travisladuke 06399c86f6 Store a network members name
Because the GET request to get a specific member just dumps
the whole member object, `name` is included there too for free.
2024-02-01 12:31:44 -08:00
Grant Limberg 663ed73768 Merge pull request #2165 from zerotier/network-check
check hooks are enabled before firing
2023-11-20 08:16:10 -08:00
Grant Limberg d37dce508a don't require temporal for central controller startup 2023-11-17 14:53:30 -08:00
Grant Limberg 2e882b4af2 Merge branch 'dev' into network-check 2023-11-16 09:34:14 -08:00
Léo El Amri 1aa31e0414 Fix how MAC addresses are handled by the rules parser
It wasn't ignoring separator characters such as the colon and hyphen.
The rules compiler automatically add a colon to separate bytes, which is
not compatible with how they are parsed.
2023-11-15 16:51:03 +01:00
Brenton Bostick a477688e51 Remove extra '/'
On macOS, dump gives this output:
% sudo zerotier-cli dump
Writing dump to: /Users/brenton/Desktop//zerotier_dump.txt

No reason for extra '/' in path
2023-11-06 09:32:35 -05:00
ChrisCarini 5533b82450 Add ARM architectures to Synology DSM7 2023-11-03 18:19:56 -07:00
Grant Limberg 1bd2fecbf6 Merge pull request #2166 from zerotier/glimberg-patch-1
Update SECURITY.md
2023-10-31 19:42:34 -07:00
Grant Limberg 8b5ac93388 Update SECURITY.md 2023-10-31 22:42:23 -04:00
Grant Limberg 2fd50b104c check hooks are enabled before firing 2023-10-31 12:16:26 -07:00
Grant Limberg 0088cef2fc Merge pull request #2164 from zerotier/smee
remove some debug logging
2023-10-30 15:41:35 -07:00
Grant Limberg 85cab3d0f1 remove some debug logging 2023-10-30 15:20:09 -07:00
Grant Limberg f89cde8186 Merge pull request #2163 from zerotier:temporal
Temporal integration with hosted controllers
2023-10-30 08:09:40 -07:00
Alfred Wingate e171384c19 Append noexecstack to linker flags instead of assembler flags
* Better compatibility with LLVM toolchain where clang -c doesn't
  support the flag, but the linker does. LLD already defaults to
  noexecstack, but adding it in the linker phase will avoid errors about
  unsupported options.

Signed-off-by: Alfred Wingate <parona@protonmail.com>
2023-10-29 14:03:26 +02:00
Grant Limberg c89683fb0f update rust dependencies 2023-10-26 11:55:08 -07:00
Grant Limberg e7ed1e4f93 Merge branch 'dev' into temporal 2023-10-18 10:58:12 -07:00
Adam Ierymenko c6d5dc1534 Merge pull request #2129 from zerotier/1.12.2
1.12.2
2023-09-14 15:12:14 -04:00
Adam Ierymenko 9ae8b0b3b6 Merge pull request #2128 from zerotier/1.12.2
1.12.2
2023-09-14 15:10:16 -04:00
Adam Ierymenko 327eb9013b Doc fix. 2023-09-14 15:09:26 -04:00
Adam Ierymenko 42f290b037 Windows version bump. 2023-09-14 15:08:14 -04:00
Joseph Henry b7fb4eeda5 Merge pull request #2127 from zerotier/brenton/fix-always-true
Fix test that was always true
2023-09-14 10:42:02 -07:00
Brenton Bostick f03aae7a34 Fix test that was always true
Intention was to have (x >= 0 && x <= 8) but rules[rn].v.qosBucket is
unsigned (thus always >= 0)
2023-09-14 13:35:50 -04:00
Adam Ierymenko 78eb35010f Linux version bump 2023-09-12 16:46:54 -04:00
Adam Ierymenko fd9afdce34 macOS version bump 2023-09-12 16:20:40 -04:00
travisladuke 21e4e2924e Relase Notes for 1.12.2 2023-09-12 10:54:39 -07:00
Grant Limberg e3d1565261 Merge branch 'dev' into temporal 2023-09-08 12:31:08 -07:00
travisladuke 557b92a167 More reliable full tunnel on macOs
This makes switching between physical networks
with full tunnel mode enabled more reliable.
There were issues with the physical default route or device
changing.
2023-09-08 12:19:08 -07:00
Travis LaDuke e299eea2b1 Merge pull request #2110 from zerotier/dev-experimental-reset-function
Re-contact peers when default gateway changes
2023-09-06 16:42:21 -07:00
travisladuke e1f1d05e08 Improve time to reconnect to peers.
When you move between physical networks.
Just moved some timings around basically.
2023-09-06 16:26:27 -07:00
Grant Limberg 125257f264 Merge branch 'dev' into temporal 2023-09-06 09:52:22 -07:00
Grant Limberg 2d49931300 Merge pull request #2122 from zerotier:ctlapi
fix /controller endpoint
2023-09-06 09:44:58 -07:00
Grant Limberg 8426677c55 fix /controller endpoint 2023-09-06 09:44:25 -07:00
Grant Limberg d322f332e8 simplify hook firing
only need network and member IDs
2023-08-30 14:51:39 -07:00
Travis LaDuke f8359f554b Merge pull request #2118 from zerotier/tl-main-to-dev
merge main to dev
2023-08-30 14:51:09 -07:00
Grant Limberg 60fb8c941a fully wire up temporal. add startup script test to ensure temporal is running 2023-08-29 16:43:05 -07:00
travisladuke cb6a99408c Merge branch 'main' into tl-main-to-dev 2023-08-29 15:58:50 -07:00
Grant Limberg d865c42ef8 get connected to temporal 2023-08-29 12:19:28 -07:00
Grant Limberg 69c590ff81 Merge branch 'dev' into temporal 2023-08-28 12:54:29 -07:00
Grant Limberg 72533cbd13 Merge pull request #2115 from zerotier/gh-2114
fix for issue #2114
2023-08-28 08:50:36 -07:00
Grant Limberg c974a159af fix for issue #2114 2023-08-28 08:10:17 -07:00
+6 54efb62731 1.12.1 merge to dev (#2111)
* 1.10.6 merge to main (#1930)

* add note about forceTcpRelay

* Create a sample systemd unit for tcp proxy

* set gitattributes for rust & cargo so hashes dont conflict on Windows

* Revert "set gitattributes for rust & cargo so hashes dont conflict on Windows"

This reverts commit 032dc5c108.

* Turn off autocrlf for rust source

Doesn't appear to play nice well when it comes to git and vendored cargo package hashes

* Fix #1883 (#1886)

Still unknown as to why, but the call to `nc->GetProperties()` can fail
when setting a friendly name on the Windows virtual ethernet adapter.
Ensure that `ncp` is not null before continuing and accessing the device
GUID.

* Don't vendor packages for zeroidc (#1885)

* Added docker environment way to join networks (#1871)

* add StringUtils

* fix headers
use recommended headers and remove unused headers

* move extern "C"
only JNI functions need to be exported

* cleanup

* fix ANDROID-50: RESULT_ERROR_BAD_PARAMETER typo

* fix typo in log message

* fix typos in JNI method signatures

* fix typo

* fix ANDROID-51: fieldName is uninitialized

* fix ANDROID-35: memory leak

* fix missing DeleteLocalRef in loops

* update to use unique error codes

* add GETENV macro

* add LOG_TAG defines

* ANDROID-48: add ZT_jnicache.cpp

* ANDROID-48: use ZT_jnicache.cpp and remove ZT_jnilookup.cpp and ZT_jniarray.cpp

* add Event.fromInt

* add PeerRole.fromInt

* add ResultCode.fromInt

* fix ANDROID-36: issues with ResultCode

* add VirtualNetworkConfigOperation.fromInt

* fix ANDROID-40: VirtualNetworkConfigOperation out-of-sync with ZT_VirtualNetworkConfigOperation enum

* add VirtualNetworkStatus.fromInt

* fix ANDROID-37: VirtualNetworkStatus out-of-sync with ZT_VirtualNetworkStatus enum

* add VirtualNetworkType.fromInt

* make NodeStatus a plain data class

* fix ANDROID-52: synchronization bug with nodeMap

* Node init work: separate Node construction and init

* add Node.toString

* make PeerPhysicalPath a plain data class

* remove unused PeerPhysicalPath.fixed

* add array functions

* make Peer a plain data class

* make Version a plain data class

* fix ANDROID-42: copy/paste error

* fix ANDROID-49: VirtualNetworkConfig.equals is wrong

* reimplement VirtualNetworkConfig.equals

* reimplement VirtualNetworkConfig.compareTo

* add VirtualNetworkConfig.hashCode

* make VirtualNetworkConfig a plain data class

* remove unused VirtualNetworkConfig.enabled

* reimplement VirtualNetworkDNS.equals

* add VirtualNetworkDNS.hashCode

* make VirtualNetworkDNS a plain data class

* reimplement VirtualNetworkRoute.equals

* reimplement VirtualNetworkRoute.compareTo

* reimplement VirtualNetworkRoute.toString

* add VirtualNetworkRoute.hashCode

* make VirtualNetworkRoute a plain data class

* add isSocketAddressEmpty

* add addressPort

* add fromSocketAddressObject

* invert logic in a couple of places and return early

* newInetAddress and newInetSocketAddress work
allow newInetSocketAddress to return NULL if given empty address

* fix ANDROID-38: stack corruption in onSendPacketRequested

* use GETENV macro

* JniRef work
JniRef does not use callbacks struct, so remove
fix NewGlobalRef / DeleteGlobalRef mismatch

* use PRId64 macros

* switch statement work

* comments and logging

* Modifier 'public' is redundant for interface members

* NodeException can be made a checked Exception

* 'NodeException' does not define a 'serialVersionUID' field

* 'finalize()' should not be overridden
this is fine to do because ZeroTierOneService calls close() when it is done

* error handling, error reporting, asserts, logging

* simplify loadLibrary

* rename Node.networks -> Node.networkConfigs

* Windows file permissions fix (#1887)

* Allow macOS interfaces to use multiple IP addresses (#1879)

Co-authored-by: Sean OMeara <someara@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* Fix condition where full HELLOs might not be sent when necessary (#1877)

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* 1.10.4 version bumps

* Add security policy to repo (#1889)

* [+] add e2k64 arch (#1890)

* temp fix for ANDROID-56: crash inside newNetworkConfig from too many args

* 1.10.4 release notes

* Windows 1.10.4 Advanced Installer bump

* Revert "temp fix for ANDROID-56: crash inside newNetworkConfig from too many args"

This reverts commit dd627cd7f4.

* actual fix for ANDROID-56: crash inside newNetworkConfig
cast all arguments to varargs functions as good style

* Fix addIp being called with applied ips (#1897)

This was getting called outside of the check for existing ips
Because of the added ifdef and a brace getting moved to the
wrong place.

```
if (! n.tap()->addIp(*ip)) {
	fprintf(stderr, "ERROR: unable to add ip address %s" ZT_EOL_S, ip->toString(ipbuf));
}
WinFWHelper::newICMPRule(*ip, n.config().nwid);

```

* 1.10.5 (#1905)

* 1.10.5 bump

* 1.10.5 for Windows

* 1.10.5

* Prevent path-learning loops (#1914)

* Prevent path-learning loops

* Only allow new overwrite if not bonded

* fix binding temporary ipv6 addresses on macos (#1910)

The check code wasn't running.

I don't know why !defined(TARGET_OS_IOS) would exclude code on
desktop macOS. I did a quick search and changed it to defined(TARGET_OS_MAC).
Not 100% sure what the most correct solution there is.

You can verify the old and new versions with

`ifconfig | grep temporary`

plus

`zerotier-cli info -j` -> listeningOn

* 1.10.6 (#1929)

* 1.10.5 bump

* 1.10.6

* 1.10.6 AIP for Windows.

---------

Co-authored-by: travis laduke <travisladuke@gmail.com>
Co-authored-by: Grant Limberg <grant.limberg@zerotier.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
Co-authored-by: Sean OMeara <someara@users.noreply.github.com>
Co-authored-by: Joseph Henry <joseph-henry@users.noreply.github.com>
Co-authored-by: Roman Peshkichev <roman.peshkichev@gmail.com>

* 1.12.0 merge to main (#2104)

* add note about forceTcpRelay

* Create a sample systemd unit for tcp proxy

* set gitattributes for rust & cargo so hashes dont conflict on Windows

* Revert "set gitattributes for rust & cargo so hashes dont conflict on Windows"

This reverts commit 032dc5c108.

* Turn off autocrlf for rust source

Doesn't appear to play nice well when it comes to git and vendored cargo package hashes

* Fix #1883 (#1886)

Still unknown as to why, but the call to `nc->GetProperties()` can fail
when setting a friendly name on the Windows virtual ethernet adapter.
Ensure that `ncp` is not null before continuing and accessing the device
GUID.

* Don't vendor packages for zeroidc (#1885)

* Added docker environment way to join networks (#1871)

* add StringUtils

* fix headers
use recommended headers and remove unused headers

* move extern "C"
only JNI functions need to be exported

* cleanup

* fix ANDROID-50: RESULT_ERROR_BAD_PARAMETER typo

* fix typo in log message

* fix typos in JNI method signatures

* fix typo

* fix ANDROID-51: fieldName is uninitialized

* fix ANDROID-35: memory leak

* fix missing DeleteLocalRef in loops

* update to use unique error codes

* add GETENV macro

* add LOG_TAG defines

* ANDROID-48: add ZT_jnicache.cpp

* ANDROID-48: use ZT_jnicache.cpp and remove ZT_jnilookup.cpp and ZT_jniarray.cpp

* add Event.fromInt

* add PeerRole.fromInt

* add ResultCode.fromInt

* fix ANDROID-36: issues with ResultCode

* add VirtualNetworkConfigOperation.fromInt

* fix ANDROID-40: VirtualNetworkConfigOperation out-of-sync with ZT_VirtualNetworkConfigOperation enum

* add VirtualNetworkStatus.fromInt

* fix ANDROID-37: VirtualNetworkStatus out-of-sync with ZT_VirtualNetworkStatus enum

* add VirtualNetworkType.fromInt

* make NodeStatus a plain data class

* fix ANDROID-52: synchronization bug with nodeMap

* Node init work: separate Node construction and init

* add Node.toString

* make PeerPhysicalPath a plain data class

* remove unused PeerPhysicalPath.fixed

* add array functions

* make Peer a plain data class

* make Version a plain data class

* fix ANDROID-42: copy/paste error

* fix ANDROID-49: VirtualNetworkConfig.equals is wrong

* reimplement VirtualNetworkConfig.equals

* reimplement VirtualNetworkConfig.compareTo

* add VirtualNetworkConfig.hashCode

* make VirtualNetworkConfig a plain data class

* remove unused VirtualNetworkConfig.enabled

* reimplement VirtualNetworkDNS.equals

* add VirtualNetworkDNS.hashCode

* make VirtualNetworkDNS a plain data class

* reimplement VirtualNetworkRoute.equals

* reimplement VirtualNetworkRoute.compareTo

* reimplement VirtualNetworkRoute.toString

* add VirtualNetworkRoute.hashCode

* make VirtualNetworkRoute a plain data class

* add isSocketAddressEmpty

* add addressPort

* add fromSocketAddressObject

* invert logic in a couple of places and return early

* newInetAddress and newInetSocketAddress work
allow newInetSocketAddress to return NULL if given empty address

* fix ANDROID-38: stack corruption in onSendPacketRequested

* use GETENV macro

* JniRef work
JniRef does not use callbacks struct, so remove
fix NewGlobalRef / DeleteGlobalRef mismatch

* use PRId64 macros

* switch statement work

* comments and logging

* Modifier 'public' is redundant for interface members

* NodeException can be made a checked Exception

* 'NodeException' does not define a 'serialVersionUID' field

* 'finalize()' should not be overridden
this is fine to do because ZeroTierOneService calls close() when it is done

* error handling, error reporting, asserts, logging

* simplify loadLibrary

* rename Node.networks -> Node.networkConfigs

* Windows file permissions fix (#1887)

* Allow macOS interfaces to use multiple IP addresses (#1879)

Co-authored-by: Sean OMeara <someara@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* Fix condition where full HELLOs might not be sent when necessary (#1877)

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* 1.10.4 version bumps

* Add security policy to repo (#1889)

* [+] add e2k64 arch (#1890)

* temp fix for ANDROID-56: crash inside newNetworkConfig from too many args

* 1.10.4 release notes

* Windows 1.10.4 Advanced Installer bump

* Revert "temp fix for ANDROID-56: crash inside newNetworkConfig from too many args"

This reverts commit dd627cd7f4.

* actual fix for ANDROID-56: crash inside newNetworkConfig
cast all arguments to varargs functions as good style

* Fix addIp being called with applied ips (#1897)

This was getting called outside of the check for existing ips
Because of the added ifdef and a brace getting moved to the
wrong place.

```
if (! n.tap()->addIp(*ip)) {
	fprintf(stderr, "ERROR: unable to add ip address %s" ZT_EOL_S, ip->toString(ipbuf));
}
WinFWHelper::newICMPRule(*ip, n.config().nwid);

```

* 1.10.5 (#1905)

* 1.10.5 bump

* 1.10.5 for Windows

* 1.10.5

* Prevent path-learning loops (#1914)

* Prevent path-learning loops

* Only allow new overwrite if not bonded

* fix binding temporary ipv6 addresses on macos (#1910)

The check code wasn't running.

I don't know why !defined(TARGET_OS_IOS) would exclude code on
desktop macOS. I did a quick search and changed it to defined(TARGET_OS_MAC).
Not 100% sure what the most correct solution there is.

You can verify the old and new versions with

`ifconfig | grep temporary`

plus

`zerotier-cli info -j` -> listeningOn

* 1.10.6 (#1929)

* 1.10.5 bump

* 1.10.6

* 1.10.6 AIP for Windows.

* Release notes for 1.10.6 (#1931)

* Minor tweak to Synology Docker image script (#1936)

* Change if_def again so ios can build (#1937)

All apple's variables are "defined"
but sometimes they are defined as "0"

* move begin/commit into try/catch block (#1932)

Thread was exiting in some cases

* Bump openssl from 0.10.45 to 0.10.48 in /zeroidc (#1938)

Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.45 to 0.10.48.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.45...openssl-v0.10.48)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* new drone bits

* Fix multiple network join from environment entrypoint.sh.release (#1961)

* _bond_m guards _bond, not _paths_m (#1965)

* Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964)

* Bump h2 from 0.3.16 to 0.3.17 in /zeroidc (#1963)

Bumps [h2](https://github.com/hyperium/h2) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.16...v0.3.17)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* Add note that binutils is required on FreeBSD (#1968)

* Add prometheus metrics for Central controllers (#1969)

* add header-only prometheus lib to ext

* rename folder

* Undo rename directory

* prometheus simpleapi included on mac & linux

* wip

* wire up some controller stats

* Get windows building with prometheus

* bsd build flags for prometheus

* Fix multiple network join from environment entrypoint.sh.release (#1961)

* _bond_m guards _bond, not _paths_m (#1965)

* Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964)

* Serve prom metrics from /metrics endpoint

* Add prom metrics for Central controller specific things

* reorganize metric initialization

* testing out a labled gauge on Networks

* increment error counter on throw

* Consolidate metrics definitions

Put all metric definitions into node/Metrics.hpp.  Accessed as needed
from there.

* Revert "testing out a labled gauge on Networks"

This reverts commit 499ed6d95e.

* still blows up but adding to the record for completeness right now

* Fix runtime issues with metrics

* Add metrics files to visual studio project

* Missed an "extern"

* add copyright headers to new files

* Add metrics for sent/received bytes (total)

* put /metrics endpoint behind auth

* sendto returns int on Win32

---------

Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>

* Central startup update (#1973)

* allow specifying authtoken in central startup

* set allowManagedFrom

* move redis_mem_notification to the correct place

* add node checkins metric

* wire up min/max connection pool size metrics

* x86_64-unknown-linux-gnu on ubuntu runner (#1975)

* adding incoming zt packet type metrics (#1976)

* use cpp-httplib for HTTP control plane (#1979)

refactored the old control plane code to use [cpp-httplib](https://github.com/yhirose/cpp-httplib) instead of a hand rolled HTTP server.  Makes the control plane code much more legible.  Also no longer randomly stops responding.

* Outgoing Packet Metrics (#1980)

add tx/rx labels to packet counters and add metrics for outgoing packets

* Add short-term validation test workflow (#1974)

Add short-term validation test workflow

* Brenton/curly braces (#1971)

* fix formatting

* properly adjust various lines
breakup multiple statements onto multiple lines

* insert {} around if, for, etc.

* Fix rust dependency caching (#1983)

* fun with rust caching

* kick

* comment out invalid yaml keys for now

* Caching should now work

* re-add/rename key directives

* bump

* bump

* bump

* Don't force rebuild on Windows build GH Action (#1985)

Switching `/t:ZeroTierOne:Rebuild` to just `/t:ZeroTierOne` allows the Windows build to use the rust cache.  `/t:ZeroTierOne:Rebuild` cleared the cache before building.

* More packet metrics (#1982)

* found path negotation sends that weren't accounted for

* Fix histogram so it will actually compile

* Found more places for packet metrics

* separate the bind & listen calls on the http backplane (#1988)

* fix memory leak (#1992)

* fix a couple of metrics (#1989)

* More aggressive CLI spamming (#1993)

* fix type signatures (#1991)

* Network-metrics (#1994)

* Add a couple quick functions for converting a uint64_t network ID/node ID into std::string

* Network metrics

* Peer metrics (#1995)

* Adding peer metrics

still need to be wired up for use

* per peer packet metrics

* Fix crash from bad instantiation of histogram

* separate alive & dead path counts

* Add peer metric update block

* add peer latency values in doPingAndKeepalive

* prevent deadlock

* peer latency histogram actually works now

* cleanup

* capture counts of packets to specific peers

---------

Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>

* Metrics consolidation (#1997)

* Rename zt_packet_incoming -> zt_packet

Also consolidate zt_peer_packets into a single metric with tx and rx labels.  Same for ztc_tcp_data and ztc_udp_data

* Further collapse tcp & udp into metric labels for zt_data

* Fix zt_data metric description

* zt_peer_packets description fix

* Consolidate incoming/outgoing network packets to a single metric

* zt_incoming_packet_error -> zt_packet_error

* Disable peer metrics for central controllers

Can change in the future if needed, but given the traffic our controllers serve, that's going to be a *lot* of data

* Disable peer metrics for controllers pt 2

* Update readme files for metrics (#2000)

* Controller Metrics & Network Config Request Fix (#2003)

* add new metrics for network config request queue size and sso expirations
* move sso expiration to its own thread in the controller
* fix potential undefined behavior when modifying a set

* Enable RTTI in Windows build

The new prometheus histogram stuff needs it.

Access violation - no RTTI data!INVALID packet 636ebd9ee8cac6c0 from cafe9efeb9(2605:9880:200:1200:30:571:e34:51/9993) (unexpected exception in tryDecode())

* Don't re-apply routes on BSD

See issue #1986

* Capture setContent by-value instead of by-reference (#2006)

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* fix typos (#2010)

* central controller metrics & request path updates (#2012)

* internal db metrics

* use shared mutexes for read/write locks

* remove this lock. only used for a metric

* more metrics

* remove exploratory metrics

place controller request benchmarks behind ifdef

* Improve validation test (#2013)

* fix init order for EmbeddedNetworkController (#2014)

* add constant for getifaddrs cache time

* cache getifaddrs - mac

* cache getifaddrs - linux

* cache getifaddrs - bsd

* cache getifaddrs - windows

* Fix oidc client lookup query

join condition referenced the wrong table.  Worked fine unless there were multiple identical client IDs

* Fix udp sent metric

was only incrementing by 1 for each packet sent

* Allow sending all surface addresses to peer in low-bandwidth mode

* allow enabling of low bandwidth mode on controllers

* don't unborrow bad connections

pool will clean them up later

* Multi-arch controller container (#2037)

create arm64 & amd64 images for central controller

* Update README.md

issue #2009

* docker tags change

* fix oidc auth url memory leak (#2031)

getAuthURL() was not calling zeroidc::free_cstr(url);

the only place authAuthURL is called, the url can be retrieved
from the network config instead.

You could alternatively copy the string and call free_cstr in getAuthURL.
If that's better we can change the PR.

Since now there are no callers of getAuthURL I deleted it.

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* Bump openssl from 0.10.48 to 0.10.55 in /zeroidc (#2034)

Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.48 to 0.10.55.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.48...openssl-v0.10.55)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* zeroidc cargo warnings (#2029)

* fix unused struct member cargo warning

* fix unused import cargo warning

* fix unused return value cargo warning

---------

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* fix memory leak in macos ipv6/dns helper (#2030)

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>

* Consider ZEROTIER_JOIN_NETWORKS in healthcheck (#1978)

* Add a 2nd auth token only for access to /metrics (#2043)

* Add a 2nd auth token for /metrics

Allows administrators to distribute a token that only has access to read
metrics and nothing else.

Also added support for using bearer auth tokens for both types of tokens

Separate endpoint for metrics #2041

* Update readme

* fix a couple of cases of writing the wrong token

* Add warning to cli for allow default on FreeBSD

It doesn't work.
Not possible to fix with deficient network
stack and APIs.

ZeroTierOne-freebsd # zerotier-cli set 9bee8941b5xxxxxx allowDefault=1
400 set Allow Default does not work properly on FreeBSD. See #580
root@freebsd13-a:~/ZeroTierOne-freebsd # zerotier-cli get 9bee8941b5xxxxxx allowDefault
1

* ARM64 Support for TapDriver6 (#1949)

* Release memory previously allocated by UPNP_GetValidIGD

* Fix ifdef that breaks libzt on iOS (#2050)

* less drone (#2060)

* Exit if loading an invalid identity from disk (#2058)

* Exit if loading an invalid identity from disk

Previously, if an invalid identity was loaded from disk, ZeroTier would
generate a new identity & chug along and generate a brand new identity
as if nothing happened.  When running in containers, this introduces the
possibility for key matter loss; especially when running in containers
where the identity files are mounted in the container read only.  In
this case, ZT will continue chugging along with a brand new identity
with no possibility of recovering the private key.

ZeroTier should exit upon loading of invalid identity.public/identity.secret #2056

* add validation test for #2056

* tcp-proxy: fix build

* Adjust tcp-proxy makefile to support metrics

There's no way to get the metrics yet. Someone will
have to add the http service.

* remove ZT_NO_METRIC ifdef

* Implement recvmmsg() for Linux to reduce syscalls. (#2046)

Between 5% and 40% speed improvement on Linux, depending on system configuration and load.

* suppress warnings: comparison of integers of different signs: 'int64_t' (aka 'long') and 'uint64_t' (aka 'unsigned long') [-Wsign-compare] (#2063)

* fix warning: 'OS_STRING' macro redefined [-Wmacro-redefined] (#2064)

Even though this is in ext, these particular chunks of code were added
by us, so are ok to modify.

* Apply default route a different way - macOS

The original way we applied default route, by forking
0.0.0.0/0 into 0/1 and 128/1 works, but if mac os has any networking
hiccups -if you change SSIDs or sleep/wake- macos erases the system default route.
And then all networking on the computer is broken.

to summarize the new way:
allowDefault=1
```
sudo route delete default 192.168.82.1
sudo route add default 10.2.0.2
sudo route add -ifscope en1 default 192.168.82.1
```

gives us this routing table
```
Destination        Gateway            RT_IFA             Flags        Refs      Use    Mtu          Netif Expire    rtt(ms) rttvar(ms)
default            10.2.0.2           10.2.0.18          UGScg          90        1   2800       feth4823
default            192.168.82.1       192.168.82.217     UGScIg
```

allowDefault=0
```
sudo route delete default
sudo route delete -ifscope en1 default
sudo route add default 192.168.82.1
```

Notice the I flag, for -ifscope, on the physical default route.

route change does not seem to work reliably.

* fix docker tag for controllers (#2066)

* Update build.sh (#2068)

fix mkwork compilation errors

* Fix network DNS on macOS

It stopped working for ipv4 only networks in Monterey.
See #1696

We add some config like so to System Configuration

```
scutil
show State:/Network/Service/9bee8941b5xxxxxx/IPv4
<dictionary> {
  Addresses : <array> {
    0 : 10.2.1.36
  }
  InterfaceName : feth4823
  Router : 10.2.1.36
  ServerAddress : 127.0.0.1
}

```

* Add search domain to macos dns configuration

Stumbled upon this while debugging something else.
If we add search domain to our system configuration for
network DNS, then search domains work:

```
ping server1                                                                                                                                                                                    ~
PING server1.my.domain (10.123.3.1): 56 data bytes
64 bytes from 10.123.3.1
```

* Fix reporting of secondaryPort and tertiaryPort See: #2039

* Fix typos (#2075)

* Disable executable stacks on assembly objects (#2071)

Add `--noexecstack` to the assembler flags so the resulting binary
will link with a non-executable stack.

Fixes zerotier/ZeroTierOne#1179

Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>

* Test that starting zerotier before internet works

* Don't skip hellos when there are no paths available

working on #2082

* Update validate-1m-linux.sh

* Save zt node log files on abort

* Separate test and summary step in validator script

* Don't apply default route until zerotier is "online"

I was running into issues with restarting the zerotier service while
"full tunnel" mode is enabled.
When zerotier first boots, it gets network state from the cache
on disk. So it immediately applies all the routes it knew about
before it shutdown.
The network config may have change in this time.
If it has, then your default route is via a route
you are blocked from talking on. So you  can't get the current
network config, so your internet does not work.

Other options include
- don't use cached network state on boot
- find a better criteria than "online"

* Fix node time-to-online counter in validator script

* Export variables so that they are accessible by exit function

* Fix PortMapper issue on ZeroTier startup

See issue #2082

We use a call to libnatpmp::ininatpp to make sure the computer
has working network sockets before we go into the main
nat-pmp/upnp logic.

With basic exponenetial delay up to 30 seconds.

* testing

* Comment out PortMapper debug

this got left turned on in a confusing merge previously

* fix macos default route again

see commit fb6af1971 * Fix network DNS on macOS
adding that stuff to System Config causes this extra route to be added
which breaks ipv4 default route.
We figured out a weird System Coniguration setting
that works.

--- old
couldn't figure out how to fix it in SystemConfiguration
so here we are# Please enter the commit message for your changes. Lines starting

We also moved the dns setter to before the syncIps stuff
to help with a race condition. It didn't always work when
you re-joined a network with default route enabled.

* Catch all conditions in switch statement, remove trailing whitespaces

* Add setmtu command, fix bond lifetime issue

* Basic cleanups

* Check if null is passed to VirtualNetworkConfig.equals and name fixes

* ANDROID-96: Simplify and use return code from node_init directly

* Windows arm64 (#2099)

* ARM64 changes for 1.12

* 1.12 Windows advanced installer updates and updates for ARM64

* 1.12.0

* Linux build fixes for old distros.

* release notes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: travis laduke <travisladuke@gmail.com>
Co-authored-by: Grant Limberg <grant.limberg@zerotier.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
Co-authored-by: Sean OMeara <someara@users.noreply.github.com>
Co-authored-by: Joseph Henry <joseph-henry@users.noreply.github.com>
Co-authored-by: Roman Peshkichev <roman.peshkichev@gmail.com>
Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Jake Vis <jakevis@outlook.com>
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
Co-authored-by: lison <imlison@foxmail.com>
Co-authored-by: Kenny MacDermid <kenny@macdermid.ca>

* Fix primary port binding issue in 1.12 (#2107)

* Add test for primary port bindings to validator - See #2105

* Add delay to binding test

* Remove TCP binding logic from Binder to fix #2105

* add second control plane socket for ipv6

* fix controller network post endpoint

* exit if we can't bind at least one of IPV4 or IPV6 for control plane port

---------

Co-authored-by: Grant Limberg <grant.limberg@zerotier.com>

* Version bump, Linux version stuff, Debian dependencies from 1.12.0 rebuild, release notes.

* macOS version bump in installer

* Windows version bump.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: travis laduke <travisladuke@gmail.com>
Co-authored-by: Grant Limberg <grant.limberg@zerotier.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
Co-authored-by: Sean OMeara <someara@users.noreply.github.com>
Co-authored-by: Joseph Henry <joseph-henry@users.noreply.github.com>
Co-authored-by: Roman Peshkichev <roman.peshkichev@gmail.com>
Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Jake Vis <jakevis@outlook.com>
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
Co-authored-by: lison <imlison@foxmail.com>
Co-authored-by: Kenny MacDermid <kenny@macdermid.ca>
2023-08-25 19:05:48 -04:00
Joseph HenryandGrant Limberg 7637ef10d7 Fix primary port binding issue in 1.12 (#2107)
* Add test for primary port bindings to validator - See #2105

* Add delay to binding test

* Remove TCP binding logic from Binder to fix #2105

* add second control plane socket for ipv6

* fix controller network post endpoint

* exit if we can't bind at least one of IPV4 or IPV6 for control plane port

---------

Co-authored-by: Grant Limberg <grant.limberg@zerotier.com>
2023-08-25 12:51:33 -04:00
Adam Ierymenko ffb63f3ee5 1.12.0 release notes (#2103)
* 1.12.0

* Linux build fixes for old distros.

* release notes
2023-08-23 13:07:38 -04:00
Adam Ierymenko 0859a0d1e5 1.12.0 (#2102)
* 1.12.0

* Linux build fixes for old distros.
2023-08-23 13:03:57 -04:00
travisladuke e41a6f2ec4 update readme 2023-08-22 09:29:03 -07:00
Joseph Henry c53c6bd9c3 Merge pull request #2100 from zerotier/brenton/fix-rx-in-tx
Fix problem of doing RX while inside of TX
2023-08-21 13:09:49 -07:00
Brenton Bostick 707d7deed2 Fix problem of doing RX while inside of TX
Part of fix for:
https://github.com/zerotier/libzt/issues/211
2023-08-21 15:04:48 -04:00
Adam Ierymenko ed0a388bcd Windows arm64 (#2099)
* ARM64 changes for 1.12

* 1.12 Windows advanced installer updates and updates for ARM64
2023-08-17 12:48:48 -04:00
Brenton Bostick 826a1ee346 ANDROID-96: Simplify and use return code from node_init directly 2023-08-16 09:18:06 -04:00
Brenton Bostick d4e63fcdfe Check if null is passed to VirtualNetworkConfig.equals and name fixes 2023-08-16 09:18:06 -04:00
Brenton Bostick 0806b881ea Basic cleanups 2023-08-16 09:18:06 -04:00
Grant Limberg 5becb41bd4 pass hook_id instead of url 2023-08-15 14:51:14 -07:00
Joseph Henry ead68038a3 Merge pull request #2096 from zerotier/dev-multipath-improvements
Add setmtu command, fix bond lifetime issue
2023-08-15 13:24:08 -07:00
Joseph Henry b8b5d0bff8 Add setmtu command, fix bond lifetime issue 2023-08-15 12:59:58 -07:00
Joseph Henry e18172d434 Merge pull request #2095 from zerotier/dev-minor-oneservice-fixes
Catch all conditions in switch statement, remove trailing whitespaces
2023-08-15 08:58:43 -07:00
Joseph Henry a15883d49b Catch all conditions in switch statement, remove trailing whitespaces 2023-08-15 08:54:05 -07:00
Grant Limberg 714ef59814 Merge branch 'dev' into temporal 2023-08-15 08:45:28 -07:00
travisladuke 1d095e81d9 fix macos default route again
see commit fb6af1971 * Fix network DNS on macOS
adding that stuff to System Config causes this extra route to be added
which breaks ipv4 default route.
We figured out a weird System Coniguration setting
that works.

--- old
couldn't figure out how to fix it in SystemConfiguration
so here we are# Please enter the commit message for your changes. Lines starting

We also moved the dns setter to before the syncIps stuff
to help with a race condition. It didn't always work when
you re-joined a network with default route enabled.
2023-08-14 17:06:05 -07:00
travisladuke d976a9f5a0 Comment out PortMapper debug
this got left turned on in a confusing merge previously
2023-08-14 17:06:05 -07:00
travisladuke f2060e0c76 testing 2023-08-11 11:26:21 -07:00
travisladuke b81ad9a84d Fix PortMapper issue on ZeroTier startup
See issue #2082

We use a call to libnatpmp::ininatpp to make sure the computer
has working network sockets before we go into the main
nat-pmp/upnp logic.

With basic exponenetial delay up to 30 seconds.
2023-08-11 11:26:21 -07:00
Joseph Henry 53bc05fe89 Merge pull request #2093 from zerotier/dev-validator-fix-dump-at-abort
Export variables so that they are accessible by exit function
2023-08-11 10:37:16 -07:00
Joseph Henry a6d5c452d5 Export variables so that they are accessible by exit function 2023-08-11 10:35:42 -07:00
Joseph Henry 515fdc22a5 Merge pull request #2092 from zerotier/dev-validator-fix-dump-at-abort
Fix node time-to-online counter in validator script
2023-08-11 10:15:28 -07:00
Joseph Henry 424e276150 Fix node time-to-online counter in validator script 2023-08-11 10:14:29 -07:00
travisladuke b071d6bbec Don't apply default route until zerotier is "online"
I was running into issues with restarting the zerotier service while
"full tunnel" mode is enabled.
When zerotier first boots, it gets network state from the cache
on disk. So it immediately applies all the routes it knew about
before it shutdown.
The network config may have change in this time.
If it has, then your default route is via a route
you are blocked from talking on. So you  can't get the current
network config, so your internet does not work.

Other options include
- don't use cached network state on boot
- find a better criteria than "online"
2023-08-11 10:13:34 -07:00
Joseph Henry 27a9cc6254 Merge pull request #2091 from zerotier/dev-validator-fix-dump-at-abort
Separate test and summary step in validator script
2023-08-10 15:38:27 -07:00
Joseph Henry bb9ad5e41a Separate test and summary step in validator script 2023-08-10 15:37:45 -07:00
Joseph Henry d91f80464d Merge pull request #2090 from zerotier/dev-validator-fix-dump-at-abort
Save zt node log files on abort
2023-08-10 11:08:52 -07:00
Joseph Henry d826ddb294 Save zt node log files on abort 2023-08-10 11:02:37 -07:00
Joseph Henry a7600c8072 Merge pull request #2089 from zerotier/dev-validator-fix-dump-at-abort
Save ZT dump files on validator abort
2023-08-10 10:55:41 -07:00
Joseph Henry 82a9122fc3 Update validate-1m-linux.sh 2023-08-10 09:58:47 -07:00
Joseph Henry 0e9e7f2ebc Merge pull request #2086 from zerotier/tl-2082
Don't skip hellos when there are no paths available
2023-08-09 11:49:42 -07:00
travisladuke 14671009f8 Don't skip hellos when there are no paths available
working on #2082
2023-08-09 09:35:12 -07:00
Grant Limberg 802c9907a1 limit to hooks with hook_type = NETWORK_JOIN enabled 2023-08-08 13:14:55 -07:00
Grant Limberg 88b96265d7 look up hook URLs dynamically 2023-08-07 16:42:23 -07:00
travisladuke 0bc10923a1 Test that starting zerotier before internet works 2023-08-07 13:25:15 -07:00
Grant Limberg 0dc92c2d7b update openidconnect rust lib 2023-08-07 10:41:19 -07:00
Grant Limberg 04a3206e53 fix rust cache in github actions 2023-08-04 15:38:49 -07:00
Grant Limberg 98360d94a5 attempt at fixing the windows build 2023-08-04 15:28:52 -07:00
Grant Limberg a9c8307d97 should only run this if smee is configured 2023-08-04 15:14:40 -07:00
Grant Limberg 581489f67b this should theoretically send the new member notification 2023-08-04 15:02:37 -07:00
Grant Limberg 5e89d5a03f fix a typo 2023-08-04 15:02:30 -07:00
Grant Limberg d71d051c53 instantiate smee client 2023-08-04 14:31:35 -07:00
Grant Limberg d2aeff6752 another mac fix 2023-08-04 14:04:20 -07:00
Grant Limberg 36be14de06 fix zeroidc include path 2023-08-04 13:31:24 -07:00
Grant Limberg f9af9a15f2 rusftormat zeroidc 2023-08-04 13:09:14 -07:00
Grant Limberg 4674bb5c8b add smee client 2023-08-04 13:08:41 -07:00
Grant Limberg a6b764bf7c move zeroidc to rustybits folder 2023-08-03 14:57:00 -07:00
Kenny MacDermidandJoseph Henry c6f07ee19f Disable executable stacks on assembly objects (#2071)
Add `--noexecstack` to the assembler flags so the resulting binary
will link with a non-executable stack.

Fixes zerotier/ZeroTierOne#1179

Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>
2023-08-02 15:12:49 -07:00
Brenton Bostick e36127283c Fix typos (#2075) 2023-08-01 08:53:55 -07:00
Joseph Henry 230ae6bd16 Fix reporting of secondaryPort and tertiaryPort See: #2039 2023-07-31 20:44:16 -07:00
travisladuke 5b5ef07350 Add search domain to macos dns configuration
Stumbled upon this while debugging something else.
If we add search domain to our system configuration for
network DNS, then search domains work:

```
ping server1                                                                                                                                                                                    ~
PING server1.my.domain (10.123.3.1): 56 data bytes
64 bytes from 10.123.3.1
```
2023-07-31 12:37:59 -07:00
travisladuke fb6af1971b Fix network DNS on macOS
It stopped working for ipv4 only networks in Monterey.
See #1696

We add some config like so to System Configuration

```
scutil
show State:/Network/Service/9bee8941b5xxxxxx/IPv4
<dictionary> {
  Addresses : <array> {
    0 : 10.2.1.36
  }
  InterfaceName : feth4823
  Router : 10.2.1.36
  ServerAddress : 127.0.0.1
}

```
2023-07-27 14:26:36 -07:00
lison 41f9bdc5db Update build.sh (#2068)
fix mkwork compilation errors
2023-07-27 12:43:31 -04:00
Grant Limberg 12e64aa191 fix docker tag for controllers (#2066) 2023-07-20 16:22:03 -07:00
travis laduke 22ab673480 Apply default route a different way - macOS
The original way we applied default route, by forking
0.0.0.0/0 into 0/1 and 128/1 works, but if mac os has any networking
hiccups -if you change SSIDs or sleep/wake- macos erases the system default route.
And then all networking on the computer is broken.

to summarize the new way:
allowDefault=1
```
sudo route delete default 192.168.82.1
sudo route add default 10.2.0.2
sudo route add -ifscope en1 default 192.168.82.1
```

gives us this routing table
```
Destination        Gateway            RT_IFA             Flags        Refs      Use    Mtu          Netif Expire    rtt(ms) rttvar(ms)
default            10.2.0.2           10.2.0.18          UGScg          90        1   2800       feth4823
default            192.168.82.1       192.168.82.217     UGScIg
```

allowDefault=0
```
sudo route delete default
sudo route delete -ifscope en1 default
sudo route add default 192.168.82.1
```

Notice the I flag, for -ifscope, on the physical default route.

route change does not seem to work reliably.
2023-07-20 13:37:05 -07:00
Brenton Bostick 03841dcb81 fix warning: 'OS_STRING' macro redefined [-Wmacro-redefined] (#2064)
Even though this is in ext, these particular chunks of code were added
by us, so are ok to modify.
2023-07-20 11:38:08 -04:00
Brenton Bostick 64c2634b71 suppress warnings: comparison of integers of different signs: 'int64_t' (aka 'long') and 'uint64_t' (aka 'unsigned long') [-Wsign-compare] (#2063) 2023-07-20 11:37:50 -04:00
Adam Ierymenko f1019dc4ee Implement recvmmsg() for Linux to reduce syscalls. (#2046)
Between 5% and 40% speed improvement on Linux, depending on system configuration and load.
2023-07-20 11:36:37 -04:00
travisladuke 50ede37a58 remove ZT_NO_METRIC ifdef 2023-07-19 13:42:49 -07:00
travisladuke 60ddca1354 Adjust tcp-proxy makefile to support metrics
There's no way to get the metrics yet. Someone will
have to add the http service.
2023-07-19 13:42:49 -07:00
Jörg Thalheim 19f1f02d91 tcp-proxy: fix build 2023-07-19 13:42:49 -07:00
Grant Limberg 5a36b315a3 Exit if loading an invalid identity from disk (#2058)
* Exit if loading an invalid identity from disk

Previously, if an invalid identity was loaded from disk, ZeroTier would
generate a new identity & chug along and generate a brand new identity
as if nothing happened.  When running in containers, this introduces the
possibility for key matter loss; especially when running in containers
where the identity files are mounted in the container read only.  In
this case, ZT will continue chugging along with a brand new identity
with no possibility of recovering the private key.

ZeroTier should exit upon loading of invalid identity.public/identity.secret #2056

* add validation test for #2056
2023-07-18 14:10:31 -04:00
Sean OMeara b67cd2cf7a less drone (#2060) 2023-07-18 10:57:38 +02:00
Joseph Henry 97492eec7c Fix ifdef that breaks libzt on iOS (#2050) 2023-07-17 16:49:58 -07:00
Joseph Henry fdc2e0f692 Release memory previously allocated by UPNP_GetValidIGD 2023-07-13 16:34:14 -07:00
Jake Vis 2672d037a8 ARM64 Support for TapDriver6 (#1949) 2023-07-13 16:52:06 -04:00
travis laduke ee663d61cd Add warning to cli for allow default on FreeBSD
It doesn't work.
Not possible to fix with deficient network
stack and APIs.

ZeroTierOne-freebsd # zerotier-cli set 9bee8941b5xxxxxx allowDefault=1
400 set Allow Default does not work properly on FreeBSD. See #580
root@freebsd13-a:~/ZeroTierOne-freebsd # zerotier-cli get 9bee8941b5xxxxxx allowDefault
1
2023-07-13 13:20:22 -07:00
Grant Limberg 008a768f15 Add a 2nd auth token only for access to /metrics (#2043)
* Add a 2nd auth token for /metrics

Allows administrators to distribute a token that only has access to read
metrics and nothing else.

Also added support for using bearer auth tokens for both types of tokens

Separate endpoint for metrics #2041

* Update readme

* fix a couple of cases of writing the wrong token
2023-07-07 16:43:32 -07:00
Stavros Kois 33b2e6a856 Consider ZEROTIER_JOIN_NETWORKS in healthcheck (#1978) 2023-07-06 12:45:58 -07:00
Travis LaDukeandGrant Limberg 6540107ccb fix memory leak in macos ipv6/dns helper (#2030)
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-07-06 12:32:10 -07:00
Travis LaDukeandGrant Limberg 1ce08a62a9 zeroidc cargo warnings (#2029)
* fix unused struct member cargo warning

* fix unused import cargo warning

* fix unused return value cargo warning

---------

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-07-06 12:13:00 -07:00
dependabot[bot]andGrant Limberg b82bdc7782 Bump openssl from 0.10.48 to 0.10.55 in /zeroidc (#2034)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.48 to 0.10.55.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.48...openssl-v0.10.55)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-07-06 11:45:32 -07:00
Travis LaDukeandGrant Limberg e0e21dfdda fix oidc auth url memory leak (#2031)
getAuthURL() was not calling zeroidc::free_cstr(url);

the only place authAuthURL is called, the url can be retrieved
from the network config instead.

You could alternatively copy the string and call free_cstr in getAuthURL.
If that's better we can change the PR.

Since now there are no callers of getAuthURL I deleted it.

Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-07-06 11:27:54 -07:00
Grant Limberg 981d09cc28 Merge pull request #2042 from zerotier:docker2
docker tags change
2023-07-06 10:13:35 -07:00
Grant Limberg 2fbd5dc828 docker tags change 2023-07-06 10:12:29 -07:00
Travis LaDuke 931b02dbb1 Update README.md
issue #2009
2023-07-05 13:59:23 -07:00
Grant Limberg 0962af5e72 Multi-arch controller container (#2037)
create arm64 & amd64 images for central controller
2023-06-29 19:45:44 -04:00
Grant Limberg 9b7d13476f Merge pull request #2022 from zerotier:pgpool
don't unborrow bad connections
2023-06-08 08:52:23 -07:00
Grant Limberg 3efb731b40 don't unborrow bad connections
pool will clean them up later
2023-06-08 08:45:50 -07:00
Grant Limberg ce989d0d67 Merge pull request #2019 from zerotier:ctl-reduce-hello 2023-06-01 11:21:21 -07:00
Grant Limberg 405f96c4b7 allow enabling of low bandwidth mode on controllers 2023-05-31 15:08:30 -07:00
Joseph Henry 5ad0212b93 Allow sending all surface addresses to peer in low-bandwidth mode 2023-05-31 15:02:17 -07:00
Grant Limberg 30799dd73f Merge pull request #2017 from zerotier/outbound-bytes-fix 2023-05-31 13:25:52 -07:00
Grant Limberg 8ebe2c563a Fix udp sent metric
was only incrementing by 1 for each packet sent
2023-05-31 13:25:30 -07:00
Grant Limberg 57588dec7a Merge pull request #2016 from zerotier/ctl-oidc-fix 2023-05-31 10:37:33 -07:00
Grant Limberg 9a8b74d744 Fix oidc client lookup query
join condition referenced the wrong table.  Worked fine unless there were multiple identical client IDs
2023-05-31 09:34:31 -07:00
travis laduke e11d70e408 cache getifaddrs - windows 2023-05-25 11:21:35 -07:00
travis laduke 60d2138f30 cache getifaddrs - bsd 2023-05-25 11:21:35 -07:00
travis laduke 259ee610a6 cache getifaddrs - linux 2023-05-25 11:21:35 -07:00
travis laduke 4192f6a6d9 cache getifaddrs - mac 2023-05-25 11:21:35 -07:00
travis laduke 54decda7a4 add constant for getifaddrs cache time 2023-05-25 11:21:35 -07:00
Grant Limberg f42841a6ab fix init order for EmbeddedNetworkController (#2014) 2023-05-25 11:09:08 -07:00
Joseph Henry 524363dcf7 Improve validation test (#2013) 2023-05-25 10:54:26 -07:00
Grant Limberg 17f6b3a10b central controller metrics & request path updates (#2012)
* internal db metrics

* use shared mutexes for read/write locks

* remove this lock. only used for a metric

* more metrics

* remove exploratory metrics

place controller request benchmarks behind ifdef
2023-05-23 12:11:26 -07:00
Brenton Bostick da71e2524c fix typos (#2010) 2023-05-19 19:21:24 +02:00
Brenton BostickandGrant Limberg f3da2b4031 Capture setContent by-value instead of by-reference (#2006)
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-05-17 17:55:32 -07:00
travis laduke e2dad367b4 Don't re-apply routes on BSD
See issue #1986
2023-05-17 14:41:59 -07:00
travis laduke 9b7ff43118 Enable RTTI in Windows build
The new prometheus histogram stuff needs it.

Access violation - no RTTI data!INVALID packet 636ebd9ee8cac6c0 from cafe9efeb9(2605:9880:200:1200:30:571:e34:51/9993) (unexpected exception in tryDecode())
2023-05-17 13:36:15 -07:00
Grant Limberg adfbbc3fb0 Controller Metrics & Network Config Request Fix (#2003)
* add new metrics for network config request queue size and sso expirations
* move sso expiration to its own thread in the controller
* fix potential undefined behavior when modifying a set
2023-05-16 11:56:58 -07:00
Grant Limberg f621261ff9 Update readme files for metrics (#2000) 2023-05-05 12:44:41 -07:00
Grant Limberg 00d55fc4b4 Metrics consolidation (#1997)
* Rename zt_packet_incoming -> zt_packet

Also consolidate zt_peer_packets into a single metric with tx and rx labels.  Same for ztc_tcp_data and ztc_udp_data

* Further collapse tcp & udp into metric labels for zt_data

* Fix zt_data metric description

* zt_peer_packets description fix

* Consolidate incoming/outgoing network packets to a single metric

* zt_incoming_packet_error -> zt_packet_error

* Disable peer metrics for central controllers

Can change in the future if needed, but given the traffic our controllers serve, that's going to be a *lot* of data

* Disable peer metrics for controllers pt 2
2023-05-04 11:12:55 -07:00
Grant LimbergandJoseph Henry 74dc41c7c7 Peer metrics (#1995)
* Adding peer metrics

still need to be wired up for use

* per peer packet metrics

* Fix crash from bad instantiation of histogram

* separate alive & dead path counts

* Add peer metric update block

* add peer latency values in doPingAndKeepalive

* prevent deadlock

* peer latency histogram actually works now

* cleanup

* capture counts of packets to specific peers

---------

Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>
2023-05-04 07:58:02 -07:00
Grant Limberg 925599cab0 Network-metrics (#1994)
* Add a couple quick functions for converting a uint64_t network ID/node ID into std::string

* Network metrics
2023-05-03 13:43:45 -07:00
Brenton Bostick a43048a1ad fix type signatures (#1991) 2023-05-03 11:18:04 -07:00
Joseph Henry d6c5a6cd59 More aggressive CLI spamming (#1993) 2023-05-03 10:49:27 -07:00
Grant Limberg 54f339f0c0 fix a couple of metrics (#1989) 2023-05-03 10:23:06 -07:00
Brenton Bostick 115b9147b9 fix memory leak (#1992) 2023-05-03 10:14:18 -07:00
Grant Limberg 6b5c9b1b8e separate the bind & listen calls on the http backplane (#1988) 2023-05-02 16:46:06 -07:00
Grant Limberg 06b487119d More packet metrics (#1982)
* found path negotation sends that weren't accounted for

* Fix histogram so it will actually compile

* Found more places for packet metrics
2023-05-02 11:16:55 -07:00
Grant Limberg 4ca3f27293 Don't force rebuild on Windows build GH Action (#1985)
Switching `/t:ZeroTierOne:Rebuild` to just `/t:ZeroTierOne` allows the Windows build to use the rust cache.  `/t:ZeroTierOne:Rebuild` cleared the cache before building.
2023-05-02 08:53:29 -07:00
Grant Limberg 785a121825 Fix rust dependency caching (#1983)
* fun with rust caching

* kick

* comment out invalid yaml keys for now

* Caching should now work

* re-add/rename key directives

* bump

* bump

* bump
2023-05-01 16:30:22 -07:00
Brenton Bostick f73e51e94c Brenton/curly braces (#1971)
* fix formatting

* properly adjust various lines
breakup multiple statements onto multiple lines

* insert {} around if, for, etc.
2023-05-01 11:48:16 -07:00
Joseph Henry e6802690b8 Add short-term validation test workflow (#1974)
Add short-term validation test workflow
2023-05-01 09:07:03 -07:00
Grant Limberg 595e033776 Outgoing Packet Metrics (#1980)
add tx/rx labels to packet counters and add metrics for outgoing packets
2023-04-28 14:24:19 -07:00
Grant Limberg e5fc89821f use cpp-httplib for HTTP control plane (#1979)
refactored the old control plane code to use [cpp-httplib](https://github.com/yhirose/cpp-httplib) instead of a hand rolled HTTP server.  Makes the control plane code much more legible.  Also no longer randomly stops responding.
2023-04-28 11:03:28 -07:00
Grant Limberg 411e54023a adding incoming zt packet type metrics (#1976) 2023-04-26 08:49:54 -07:00
Sean OMeara 8f05c85838 x86_64-unknown-linux-gnu on ubuntu runner (#1975) 2023-04-26 13:13:09 +02:00
Grant Limberg e4cb74896b Central startup update (#1973)
* allow specifying authtoken in central startup

* set allowManagedFrom

* move redis_mem_notification to the correct place

* add node checkins metric

* wire up min/max connection pool size metrics
2023-04-25 12:44:18 -07:00
8e6e4ede6d Add prometheus metrics for Central controllers (#1969)
* add header-only prometheus lib to ext

* rename folder

* Undo rename directory

* prometheus simpleapi included on mac & linux

* wip

* wire up some controller stats

* Get windows building with prometheus

* bsd build flags for prometheus

* Fix multiple network join from environment entrypoint.sh.release (#1961)

* _bond_m guards _bond, not _paths_m (#1965)

* Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964)

* Serve prom metrics from /metrics endpoint

* Add prom metrics for Central controller specific things

* reorganize metric initialization

* testing out a labled gauge on Networks

* increment error counter on throw

* Consolidate metrics definitions

Put all metric definitions into node/Metrics.hpp.  Accessed as needed
from there.

* Revert "testing out a labled gauge on Networks"

This reverts commit 499ed6d95e.

* still blows up but adding to the record for completeness right now

* Fix runtime issues with metrics

* Add metrics files to visual studio project

* Missed an "extern"

* add copyright headers to new files

* Add metrics for sent/received bytes (total)

* put /metrics endpoint behind auth

* sendto returns int on Win32

---------

Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
2023-04-21 12:12:43 -07:00
Grant Limberg 0b03ad9a21 Add note that binutils is required on FreeBSD (#1968) 2023-04-19 15:37:49 -07:00
dependabot[bot]andGrant Limberg 0e6a314d86 Bump h2 from 0.3.16 to 0.3.17 in /zeroidc (#1963)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.16...v0.3.17)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-04-19 15:37:17 -07:00
Brenton Bostick 1b59712c48 Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964) 2023-04-18 12:14:05 -07:00
Brenton Bostick 7c8d5b0afd _bond_m guards _bond, not _paths_m (#1965) 2023-04-18 12:12:33 -07:00
Leonardo Amaral 7f63d896f9 Fix multiple network join from environment entrypoint.sh.release (#1961) 2023-04-12 16:47:26 +02:00
Sean OMeara 2115b18ae3 new drone bits 2023-03-31 16:29:18 +02:00
dependabot[bot] 4ac3e7b864 Bump openssl from 0.10.45 to 0.10.48 in /zeroidc (#1938)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.45 to 0.10.48.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.45...openssl-v0.10.48)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 18:52:29 -04:00
Grant Limberg 03bd96d1d1 move begin/commit into try/catch block (#1932)
Thread was exiting in some cases
2023-03-24 13:03:15 -07:00
Travis LaDuke 4a85cf5e74 Change if_def again so ios can build (#1937)
All apple's variables are "defined"
but sometimes they are defined as "0"
2023-03-24 13:02:52 -07:00
Joseph Henry a8fde9e530 Minor tweak to Synology Docker image script (#1936) 2023-03-24 11:58:34 -07:00
Travis LaDuke 1f9a15dd18 Release notes for 1.10.6 (#1931) 2023-03-23 12:13:53 -07:00
Adam Ierymenko 646147c275 1.10.6 (#1929)
* 1.10.5 bump

* 1.10.6

* 1.10.6 AIP for Windows.
2023-03-23 13:38:22 -04:00
Travis LaDuke 314099a267 fix binding temporary ipv6 addresses on macos (#1910)
The check code wasn't running.

I don't know why !defined(TARGET_OS_IOS) would exclude code on
desktop macOS. I did a quick search and changed it to defined(TARGET_OS_MAC).
Not 100% sure what the most correct solution there is.

You can verify the old and new versions with

`ifconfig | grep temporary`

plus

`zerotier-cli info -j` -> listeningOn
2023-03-21 15:25:01 -04:00
Joseph Henry ce9330e9bb Prevent path-learning loops (#1914)
* Prevent path-learning loops

* Only allow new overwrite if not bonded
2023-03-21 13:18:21 -04:00
Adam Ierymenko b2a981f353 1.10.5 (#1905)
* 1.10.5 bump

* 1.10.5 for Windows

* 1.10.5
2023-03-10 11:45:15 -05:00
Travis LaDuke a372619fee Fix addIp being called with applied ips (#1897)
This was getting called outside of the check for existing ips
Because of the added ifdef and a brace getting moved to the
wrong place.

```
if (! n.tap()->addIp(*ip)) {
	fprintf(stderr, "ERROR: unable to add ip address %s" ZT_EOL_S, ip->toString(ipbuf));
}
WinFWHelper::newICMPRule(*ip, n.config().nwid);

```
2023-03-10 10:57:54 -05:00
Brenton Bostick 12cdf39165 actual fix for ANDROID-56: crash inside newNetworkConfig
cast all arguments to varargs functions as good style
2023-03-09 06:51:29 -05:00
Brenton Bostick 19c5343a0a Revert "temp fix for ANDROID-56: crash inside newNetworkConfig from too many args"
This reverts commit dd627cd7f4.
2023-03-09 06:51:29 -05:00
Adam Ierymenko 4a4c8f84d5 Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev 2023-03-07 17:50:01 -05:00
Adam Ierymenko f94208f493 Windows 1.10.4 Advanced Installer bump 2023-03-07 17:49:35 -05:00
Adam Ierymenko f2cb9b36b2 Merge branch 'dev' 2023-03-07 16:51:02 -05:00
Adam Ierymenko 64423f3a09 Merge branch 'dev' of github.com:/zerotier/ZeroTierOne into dev 2023-03-07 16:47:30 -05:00
Adam Ierymenko 9fb3f04385 1.10.4 release notes 2023-03-07 16:46:47 -05:00
Brenton Bostick dd627cd7f4 temp fix for ANDROID-56: crash inside newNetworkConfig from too many args 2023-03-07 14:16:44 -06:00
Roman Peshkichev eedf270127 [+] add e2k64 arch (#1890) 2023-03-07 08:25:08 +01:00
Grant Limberg a1af94f4e9 Add security policy to repo (#1889) 2023-03-07 07:12:29 +01:00
Adam Ierymenko 9f5bf06f95 1.10.4 version bumps 2023-03-06 13:26:47 -05:00
Joseph HenryandGrant Limberg 40705caf7e Fix condition where full HELLOs might not be sent when necessary (#1877)
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-03-06 13:24:34 -05:00
9d5b9efc2f Allow macOS interfaces to use multiple IP addresses (#1879)
Co-authored-by: Sean OMeara <someara@users.noreply.github.com>
Co-authored-by: Grant Limberg <glimberg@users.noreply.github.com>
2023-03-06 13:21:58 -05:00
Grant Limberg cc4251c5b7 Windows file permissions fix (#1887) 2023-03-04 09:43:00 +01:00
Brenton Bostick 8d74d34f2a rename Node.networks -> Node.networkConfigs 2023-03-02 07:19:49 -06:00
Brenton Bostick 7f996ea6d5 simplify loadLibrary 2023-03-02 07:19:49 -06:00
Brenton Bostick 0aa4a4ba7a error handling, error reporting, asserts, logging 2023-03-02 07:19:49 -06:00
Brenton Bostick 1ab36d891c 'finalize()' should not be overridden
this is fine to do because ZeroTierOneService calls close() when it is done
2023-03-02 07:19:49 -06:00
Brenton Bostick 5b5625a6f0 'NodeException' does not define a 'serialVersionUID' field 2023-03-02 07:19:49 -06:00
Brenton Bostick 33a9cd02ba NodeException can be made a checked Exception 2023-03-02 07:19:49 -06:00
Brenton Bostick ca73651e12 Modifier 'public' is redundant for interface members 2023-03-02 07:19:49 -06:00
Brenton Bostick fbd834716f comments and logging 2023-03-02 07:19:49 -06:00
Brenton Bostick 914b4fae7b switch statement work 2023-03-02 07:19:49 -06:00
Brenton Bostick a1bf139188 use PRId64 macros 2023-03-02 07:19:49 -06:00
Brenton Bostick a2f753986b JniRef work
JniRef does not use callbacks struct, so remove
fix NewGlobalRef / DeleteGlobalRef mismatch
2023-03-02 07:19:49 -06:00
Brenton Bostick d28f44335a use GETENV macro 2023-03-02 07:19:49 -06:00
Brenton Bostick 0a925a6f21 fix ANDROID-38: stack corruption in onSendPacketRequested 2023-03-02 07:19:49 -06:00
Brenton Bostick 132bff25df newInetAddress and newInetSocketAddress work
allow newInetSocketAddress to return NULL if given empty address
2023-03-02 07:19:49 -06:00
Brenton Bostick e1c16a8e68 invert logic in a couple of places and return early 2023-03-02 07:19:49 -06:00
Brenton Bostick 4ee73fa272 add fromSocketAddressObject 2023-03-02 07:19:49 -06:00
Brenton Bostick 30cfe65b39 add addressPort 2023-03-02 07:19:49 -06:00
Brenton Bostick 40d5f9b5d2 add isSocketAddressEmpty 2023-03-02 07:19:49 -06:00
Brenton Bostick 809022b273 make VirtualNetworkRoute a plain data class 2023-03-02 07:19:49 -06:00
Brenton Bostick d0c0585553 add VirtualNetworkRoute.hashCode 2023-03-02 07:19:49 -06:00
Brenton Bostick d60929514b reimplement VirtualNetworkRoute.toString 2023-03-02 07:19:49 -06:00
Brenton Bostick 920e1f56c2 reimplement VirtualNetworkRoute.compareTo 2023-03-02 07:19:49 -06:00
Brenton Bostick 86122e1646 reimplement VirtualNetworkRoute.equals 2023-03-02 07:19:49 -06:00
Brenton Bostick f9a27d6778 make VirtualNetworkDNS a plain data class 2023-03-02 07:19:49 -06:00
Brenton Bostick 8b0be5c1fc add VirtualNetworkDNS.hashCode 2023-03-02 07:19:49 -06:00
Brenton Bostick 686561dc5b reimplement VirtualNetworkDNS.equals 2023-03-02 07:19:49 -06:00
Brenton Bostick b8b8e58586 remove unused VirtualNetworkConfig.enabled 2023-03-02 07:19:49 -06:00
Brenton Bostick 54fd7c7e9a make VirtualNetworkConfig a plain data class 2023-03-02 07:19:49 -06:00
Brenton Bostick e060ae3176 add VirtualNetworkConfig.hashCode 2023-03-02 07:19:49 -06:00
Brenton Bostick 7392a32cd8 reimplement VirtualNetworkConfig.compareTo 2023-03-02 07:19:49 -06:00
Brenton Bostick 8b724493cc reimplement VirtualNetworkConfig.equals 2023-03-02 07:19:49 -06:00
Brenton Bostick 9cb16accfd fix ANDROID-49: VirtualNetworkConfig.equals is wrong 2023-03-02 07:19:49 -06:00
Brenton Bostick d5944ae69c fix ANDROID-42: copy/paste error 2023-03-02 07:19:49 -06:00
Brenton Bostick 6102c70855 make Version a plain data class 2023-03-02 07:19:49 -06:00
Brenton Bostick 6cc055dbba make Peer a plain data class 2023-03-02 07:19:49 -06:00
Brenton Bostick f51ce077a3 add array functions 2023-03-02 07:19:49 -06:00
Brenton Bostick 2de4c95446 remove unused PeerPhysicalPath.fixed 2023-03-02 07:19:49 -06:00
Brenton Bostick 63f70ba465 make PeerPhysicalPath a plain data class 2023-03-02 07:19:49 -06:00
Brenton Bostick 7ef68a9d6a add Node.toString 2023-03-02 07:19:49 -06:00
Brenton Bostick 90bf300bd8 Node init work: separate Node construction and init 2023-03-02 07:19:49 -06:00
Brenton Bostick f9528f1248 fix ANDROID-52: synchronization bug with nodeMap 2023-03-02 07:19:49 -06:00
Brenton Bostick 4861ec5a40 make NodeStatus a plain data class 2023-03-02 07:19:49 -06:00
Brenton Bostick acf5b3579b add VirtualNetworkType.fromInt 2023-03-02 07:19:49 -06:00
Brenton Bostick d1460ab65b fix ANDROID-37: VirtualNetworkStatus out-of-sync with ZT_VirtualNetworkStatus enum 2023-03-02 07:19:49 -06:00
Brenton Bostick 85bd773c55 add VirtualNetworkStatus.fromInt 2023-03-02 07:19:49 -06:00
Brenton Bostick ed3918b508 fix ANDROID-40: VirtualNetworkConfigOperation out-of-sync with ZT_VirtualNetworkConfigOperation enum 2023-03-02 07:19:49 -06:00
Brenton Bostick 7c2766096c add VirtualNetworkConfigOperation.fromInt 2023-03-02 07:19:49 -06:00
Brenton Bostick acd8b95114 fix ANDROID-36: issues with ResultCode 2023-03-02 07:19:49 -06:00
Brenton Bostick 34ff813e2a add ResultCode.fromInt 2023-03-02 07:19:49 -06:00
Brenton Bostick 056cef7292 add PeerRole.fromInt 2023-03-02 07:19:49 -06:00
Brenton Bostick 7c5f256d4a add Event.fromInt 2023-03-02 07:19:49 -06:00
Brenton Bostick 82749e4442 ANDROID-48: use ZT_jnicache.cpp and remove ZT_jnilookup.cpp and ZT_jniarray.cpp 2023-03-02 07:19:49 -06:00
Brenton Bostick 7890185e81 ANDROID-48: add ZT_jnicache.cpp 2023-03-02 07:19:49 -06:00
Brenton Bostick 71fc0dd097 add LOG_TAG defines 2023-03-02 07:19:49 -06:00
Brenton Bostick 8373a0fa60 add GETENV macro 2023-03-02 07:19:49 -06:00
Brenton Bostick 21264baaae update to use unique error codes 2023-03-02 07:19:49 -06:00
Brenton Bostick 703f9290c9 fix missing DeleteLocalRef in loops 2023-03-02 07:19:49 -06:00
Brenton Bostick dd1b52c7d9 fix ANDROID-35: memory leak 2023-03-02 07:19:49 -06:00
Brenton Bostick 01003617cd fix ANDROID-51: fieldName is uninitialized 2023-03-02 07:19:49 -06:00
Brenton Bostick bfe4bc2894 fix typo 2023-03-02 07:19:49 -06:00
Brenton Bostick 1c88037ea0 fix typos in JNI method signatures 2023-03-02 07:19:49 -06:00
Brenton Bostick 0027e6bdab fix typo in log message 2023-03-02 07:19:49 -06:00
Brenton Bostick 87edbb2d3a fix ANDROID-50: RESULT_ERROR_BAD_PARAMETER typo 2023-03-02 07:19:49 -06:00
Brenton Bostick 5be92a96df cleanup 2023-03-02 07:19:49 -06:00
Brenton Bostick 0733af5239 move extern "C"
only JNI functions need to be exported
2023-03-02 07:19:49 -06:00
Brenton Bostick 216ed8c8ea fix headers
use recommended headers and remove unused headers
2023-03-02 07:19:49 -06:00
Brenton Bostick 58e3b8c5ad add StringUtils 2023-03-02 07:19:49 -06:00
Leonardo Amaral c6adfd9d67 Added docker environment way to join networks (#1871) 2023-03-02 11:18:11 +01:00
Grant Limberg 672c58be01 Don't vendor packages for zeroidc (#1885) 2023-03-02 09:11:37 +01:00
Grant Limberg 6cf3b65953 Fix #1883 (#1886)
Still unknown as to why, but the call to `nc->GetProperties()` can fail
when setting a friendly name on the Windows virtual ethernet adapter.
Ensure that `ncp` is not null before continuing and accessing the device
GUID.
2023-03-01 18:00:59 -08:00
Grant Limberg 936dda4773 Turn off autocrlf for rust source
Doesn't appear to play nice well when it comes to git and vendored cargo package hashes
2023-03-01 15:08:34 -08:00
Grant Limberg 047e327f01 Revert "set gitattributes for rust & cargo so hashes dont conflict on Windows"
This reverts commit 032dc5c108.
2023-03-01 14:27:19 -08:00
Grant Limberg 032dc5c108 set gitattributes for rust & cargo so hashes dont conflict on Windows 2023-03-01 14:16:51 -08:00
travis laduke dc54e0e1c4 Create a sample systemd unit for tcp proxy 2023-02-23 11:52:21 -08:00
Grant Limberg 9124b0a7a3 Merge branch 'main' into dev 2023-02-22 17:10:34 -08:00
travis laduke 67cf4c42d5 add note about forceTcpRelay 2023-02-21 09:15:18 -08:00
1883 changed files with 272921 additions and 39709 deletions

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
CompileFlags:
Add:
- "-std=c++17"
- "-I../ext"
- "-I../ext/prometheus-cpp-lite-1.0/core/include"
- "-I../ext/prometheus-cpp-lite-1.0/simpleapi/include"
- "-I../ext/opentelemetry-cpp-1.21.0/api/include"
- "-I./ext"
- "-I./ext/prometheus-cpp-lite-1.0/core/include"
- "-I./ext/prometheus-cpp-lite-1.0/simpleapi/include"
- "-I./ext/opentelemetry-cpp-1.21.0/api/include"
-256
View File
@@ -1,256 +0,0 @@
//
// tweakables
//
local registry = "084037375216.dkr.ecr.us-east-2.amazonaws.com";
local build_channel = "zerotier-builds";
local release_channel = "zerotier-releases";
local targets = [
{ "os": "linux", distro: "redhat", "name": "el9", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag", "custom" ] },
{ "os": "linux", distro: "redhat", "name": "el8", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
{ "os": "linux", distro: "redhat", "name": "el7", "isas": [ "386", "amd64", "ppc64le"], "events": [ "tag" ] },
{ "os": "linux", distro: "amazon", "name": "amzn2", "isas": [ "amd64", "arm64" ], "events": [ "tag" ] },
{ "os": "linux", distro: "amazon", "name": "amzn2022", "isas": [ "amd64", "arm64" ], "events": [ "tag" ] },
{ "os": "linux", distro: "fedora", "name": "fc38", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
{ "os": "linux", distro: "fedora", "name": "fc37", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
{ "os": "linux", distro: "fedora", "name": "fc36", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
{ "os": "linux", distro: "ubuntu", "name": "jammy", "isas": [ "armv7", "amd64", "arm64", "ppc64le", "s390x", "riscv64" ], "events": [ "tag" ] },
{ "os": "linux", distro: "ubuntu", "name": "focal", "isas": [ "armv7", "amd64", "arm64", "ppc64le", "s390x", "riscv64" ], "events": [ "tag" ] },
{ "os": "linux", distro: "ubuntu", "name": "bionic", "isas": [ "386", "armv7", "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
{ "os": "linux", distro: "ubuntu", "name": "xenial", "isas": [ "386", "armv7", "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
{ "os": "linux", distro: "ubuntu", "name": "trusty", "isas": [ "386", "armv7", "amd64", "arm64" ], "events": [ "tag" ] },
{ "os": "linux", distro: "debian", "name": "bookworm", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x" ], "events": [ "tag"] },
{ "os": "linux", distro: "debian", "name": "bullseye", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "debian", "name": "buster", "isas": [ "386", "armv7", "amd64", "arm64" ], "events": [ "tag" ] },
{ "os": "linux", distro: "debian", "name": "stretch", "isas": [ "386", "armv7", "amd64", "arm64" ], "events": [ "tag" ] },
{ "os": "linux", distro: "debian", "name": "jessie", "isas": [ "386", "armv7", "amd64" ], "events": [ "tag" ] },
// { "os": "windows", distro: "windows", "name": "windows", "isas": [ "amd64" ], "events": [ "push", "tag", "custom" ] },
// { "os": "darwin", distro: "darwin", "name": "darwin", "isas": [ "amd64" ], "events": [ "push", "tag", "custom" ] },
];
local less_targets = [
{ "os": "linux", distro: "redhat", "name": "el9", "isas": [ "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "redhat", "name": "el8", "isas": [ "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "ubuntu", "name": "jammy", "isas": [ "armv7", "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "ubuntu", "name": "focal", "isas": [ "armv7", "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
];
local native_targets = [
{ "os": "linux", distro: "debian", "name": "bullseye", "isas": [ "386", "armv7", "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
];
local master_targets = [
//
// copypasta from here
//
{ "os": "linux", distro: "redhat", "name": "el9", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "redhat", "name": "el8", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "redhat", "name": "el7", "isas": [ "386", "amd64", "ppc64le"], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "amazon", "name": "amzn2", "isas": [ "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "amazon", "name": "amzn2022", "isas": [ "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "fedora", "name": "fc38", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "fedora", "name": "fc37", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "fedora", "name": "fc36", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "ubuntu", "name": "jammy", "isas": [ "armv7", "amd64", "arm64", "ppc64le", "s390x", "riscv64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "ubuntu", "name": "focal", "isas": [ "armv7", "amd64", "arm64", "ppc64le", "s390x", "riscv64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "ubuntu", "name": "bionic", "isas": [ "386", "armv7", "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "ubuntu", "name": "xenial", "isas": [ "386", "armv7", "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "ubuntu", "name": "trusty", "isas": [ "386", "armv7", "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "debian", "name": "sid", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x", "riscv64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "debian", "name": "bookworm", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "debian", "name": "bullseye", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "debian", "name": "buster", "isas": [ "386", "armv7", "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "debian", "name": "stretch", "isas": [ "386", "armv7", "amd64", "arm64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "linux", distro: "debian", "name": "jessie", "isas": [ "386", "armv7", "amd64" ], "events": [ "push", "tag", "custom" ] },
{ "os": "windows", distro: "windows", "name": "win2k22", "isas": [ "amd64" ], "events": [ "push", "tag", "custom" ] }
];
//
// functions
//
local pipeline_type(os) = if os == "darwin" then "exec" else "docker";
local builder_image(os) = if os == "linux" then registry + "/honda-builder" else registry + "/windows-builder";
local tester_image(os) = if os == "linux" then registry + "/honda-builder" else registry + "/windows-tester";
local build_step_volumes(os) = if os == "linux" then [ { name: "zerotier-builds", path: "/zerotier-builds" } ] else [];
local release_step_volumes(os) = if os == "linux" then [ { name: "zerotier-releases", path: "/zerotier-releases" } ] else [];
local host_volumes(os) = if os == "linux" then [
{ name: "zerotier-builds", host: { path: "/zerotier-builds" } },
{ name: "zerotier-releases", host: { path: "/zerotier-releases" } },
] else [];
local index_image(distro) =
if distro == "debian" || distro == "ubuntu" then
registry + "/apt-builder"
else if distro == "redhat" || distro == "fedora" || distro == "amazon" then
registry + "/dnf-builder"
else if distro == "windows" then
registry + "/msi-builder"
;
local copy_commands(os, distro, name, isa, version) =
if os == "linux" then [
std.join(" ", [ "./ci/scripts/publish.sh", name, distro, isa, version, "${DRONE_BUILD_EVENT}" ])
]
else if os == "windows" then [
"C:\\scripts\\fix-ec2-metadata.ps1",
"Get-ChildItem windows",
// "aws s3 cp windows\\bytey-SetupFiles\\bytey.msi s3://zerotier-builds/windows/" + version + "/bytey.msi",
] else if os == "darwin" then [
"echo hello"
]
;
local index_commands(os, channel, distro, name, isas) =
if os == "linux" then
[ "/usr/local/bin/index " + channel + " " + distro + " " + name + " " + std.join(" ", isas) ]
else if os == "windows" then
[ "Get-ChildItem -Recurse windows" ]
;
local build_commands(os, distro, name, isa, version) =
if os == "linux" then
[ std.join(" ", [ "./ci/scripts/build.sh", name, distro, isa, version, "${DRONE_BUILD_EVENT}" ]) ]
else
if os == "windows" then
[ "windows/build.ps1", "windows/package.ps1" ]
else
if os == "darwin" then
[ "whoami" ]
;
local test_commands(os, distro, name, isa, version) =
if os == "linux" then
[ std.join(" ", [ "./ci/scripts/test.sh", name, distro, isa, version, "${DRONE_BUILD_EVENT}" ]) ]
else
if os == "windows" then
[ "windows/testpackage.ps1 " + version ]
;
//
// render
//
local Build(os, distro, name, isa, events) = {
"kind": "pipeline",
"type": pipeline_type(os),
"name": std.join(" ", [ name, isa, "build" ]),
"pull": "always",
"clone": { "depth": 1, [ if os == "darwin" then "disable" ]: true },
"steps": [
{
"name": "build",
"image": builder_image(os),
"commands": build_commands(os, distro, name, isa, "100.0.0+${DRONE_COMMIT_SHA:0:8}"),
"when": { "event": [ "push" ]},
},
{
"name": "release",
"image": builder_image(os),
"commands": build_commands(os, distro, name, isa, "${DRONE_TAG}"),
"when": { "event": [ "tag" ]},
},
{
"name": "copy build",
"image": builder_image(os),
"commands": copy_commands(os, distro, name, isa, "100.0.0+${DRONE_COMMIT_SHA:0:8}"),
"volumes": build_step_volumes(os),
"when": { "event": [ "push" ]},
},
{
"name": "copy relase",
"image": builder_image(os),
"commands": copy_commands(os, distro, name, isa, "${DRONE_TAG}"),
"volumes": release_step_volumes(os),
"when": { "event": [ "tag" ]},
},
],
"volumes": host_volumes(os),
"platform": { "os": os, [ if isa == "arm64" || isa == "armv7" then "arch" ]: "arm64" },
"trigger": { "event": events }
};
local Test(os, distro, name, isa, events) = {
"kind": "pipeline",
"type": pipeline_type(os),
"name": std.join(" ", [ name, isa, "test"]),
"pull": "always",
"clone": { "depth": 1 },
"steps": [
{
"name": "test build",
"image": tester_image(os),
"volumes": build_step_volumes(os),
"commands": test_commands(os, distro, name, isa, "100.0.0+${DRONE_COMMIT_SHA:0:8}"),
"when": { "event": [ "push" ]},
},
{
"name": "test release",
"image": tester_image(os),
"volumes": release_step_volumes(os),
"commands": test_commands(os, distro, name, isa, "${DRONE_TAG}"),
"when": { "event": [ "tag" ]},
},
],
"volumes": host_volumes(os),
"platform": { "os": os, [ if isa == "arm64" || isa == "armv7" then "arch" ]: "arm64" },
"depends_on": [ std.join(" ", [ name, "index" ]) ],
"trigger": { "event": events }
};
local Index(p) = {
"kind": "pipeline",
"type": pipeline_type(p.os),
"name": std.join(" ", [ p.name, "index" ]),
"pull": "always",
"clone": { "depth": 1 },
"steps": [
{
"name": "index build",
"image": index_image(p.distro),
"commands": index_commands(p.os, "zerotier-builds", p.distro, p.name, p.isas),
"volumes": build_step_volumes(p.os),
"environment":{ "GPG_PRIVATE_KEY": { from_secret: "gpg-private-key" }},
"when": { "event": [ "push" ]},
},
{
"name": "index release",
"image": index_image(p.distro),
"commands": index_commands(p.os, "zerotier-releases", p.distro, p.name, p.isas),
"volumes": release_step_volumes(p.os),
"environment":{ "GPG_PRIVATE_KEY": { from_secret: "gpg-private-key" }},
"when": { "event": [ "tag" ]},
},
],
"volumes": host_volumes(p.os),
"platform": { "os": p.os },
depends_on: std.flattenArrays([ [ std.join(" ", [ p.name, isa, "build" ]) ] for isa in p.isas ]),
"trigger": { "event": p.events }
};
//
// print
//
std.flattenArrays([
[
Build(p.os, p.distro, p.name, isa, p.events)
for isa in p.isas
] +
[
Index(p)
]
for p in native_targets
]) +
std.flattenArrays([
[
Test(p.os, p.distro, p.name, isa, p.events)
for isa in p.isas
]
for p in native_targets
])
-465
View File
@@ -1,465 +0,0 @@
---
clone:
depth: 1
kind: pipeline
name: bullseye 386 build
platform:
os: linux
pull: always
steps:
- commands:
- ./ci/scripts/build.sh bullseye debian 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: build
when:
event:
- push
- commands:
- ./ci/scripts/build.sh bullseye debian 386 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: release
when:
event:
- tag
- commands:
- ./ci/scripts/publish.sh bullseye debian 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: copy build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- ./ci/scripts/publish.sh bullseye debian 386 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: copy relase
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
clone:
depth: 1
kind: pipeline
name: bullseye armv7 build
platform:
arch: arm64
os: linux
pull: always
steps:
- commands:
- ./ci/scripts/build.sh bullseye debian armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: build
when:
event:
- push
- commands:
- ./ci/scripts/build.sh bullseye debian armv7 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: release
when:
event:
- tag
- commands:
- ./ci/scripts/publish.sh bullseye debian armv7 100.0.0+${DRONE_COMMIT_SHA:0:8}
${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: copy build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- ./ci/scripts/publish.sh bullseye debian armv7 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: copy relase
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
clone:
depth: 1
kind: pipeline
name: bullseye amd64 build
platform:
os: linux
pull: always
steps:
- commands:
- ./ci/scripts/build.sh bullseye debian amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: build
when:
event:
- push
- commands:
- ./ci/scripts/build.sh bullseye debian amd64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: release
when:
event:
- tag
- commands:
- ./ci/scripts/publish.sh bullseye debian amd64 100.0.0+${DRONE_COMMIT_SHA:0:8}
${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: copy build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- ./ci/scripts/publish.sh bullseye debian amd64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: copy relase
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
clone:
depth: 1
kind: pipeline
name: bullseye arm64 build
platform:
arch: arm64
os: linux
pull: always
steps:
- commands:
- ./ci/scripts/build.sh bullseye debian arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: build
when:
event:
- push
- commands:
- ./ci/scripts/build.sh bullseye debian arm64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: release
when:
event:
- tag
- commands:
- ./ci/scripts/publish.sh bullseye debian arm64 100.0.0+${DRONE_COMMIT_SHA:0:8}
${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: copy build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- ./ci/scripts/publish.sh bullseye debian arm64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: copy relase
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
clone:
depth: 1
depends_on:
- bullseye 386 build
- bullseye armv7 build
- bullseye amd64 build
- bullseye arm64 build
kind: pipeline
name: bullseye index
platform:
os: linux
pull: always
steps:
- commands:
- /usr/local/bin/index zerotier-builds debian bullseye 386 armv7 amd64 arm64
environment:
GPG_PRIVATE_KEY:
from_secret: gpg-private-key
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/apt-builder
name: index build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- /usr/local/bin/index zerotier-releases debian bullseye 386 armv7 amd64 arm64
environment:
GPG_PRIVATE_KEY:
from_secret: gpg-private-key
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/apt-builder
name: index release
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
clone:
depth: 1
depends_on:
- bullseye index
kind: pipeline
name: bullseye 386 test
platform:
os: linux
pull: always
steps:
- commands:
- ./ci/scripts/test.sh bullseye debian 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: test build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- ./ci/scripts/test.sh bullseye debian 386 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: test release
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
clone:
depth: 1
depends_on:
- bullseye index
kind: pipeline
name: bullseye armv7 test
platform:
arch: arm64
os: linux
pull: always
steps:
- commands:
- ./ci/scripts/test.sh bullseye debian armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: test build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- ./ci/scripts/test.sh bullseye debian armv7 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: test release
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
clone:
depth: 1
depends_on:
- bullseye index
kind: pipeline
name: bullseye amd64 test
platform:
os: linux
pull: always
steps:
- commands:
- ./ci/scripts/test.sh bullseye debian amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: test build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- ./ci/scripts/test.sh bullseye debian amd64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: test release
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
clone:
depth: 1
depends_on:
- bullseye index
kind: pipeline
name: bullseye arm64 test
platform:
arch: arm64
os: linux
pull: always
steps:
- commands:
- ./ci/scripts/test.sh bullseye debian arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: test build
volumes:
- name: zerotier-builds
path: /zerotier-builds
when:
event:
- push
- commands:
- ./ci/scripts/test.sh bullseye debian arm64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
name: test release
volumes:
- name: zerotier-releases
path: /zerotier-releases
when:
event:
- tag
trigger:
event:
- push
- tag
- custom
type: docker
volumes:
- host:
path: /zerotier-builds
name: zerotier-builds
- host:
path: /zerotier-releases
name: zerotier-releases
---
kind: signature
hmac: 887a3ef78d3fe8f0149911e1e4876401dd7dd313b36eb893e791fa42f45d7768
...
+49 -21
View File
@@ -1,4 +1,7 @@
on: [ push ]
on:
pull_request:
push:
workflow_dispatch:
jobs:
build_ubuntu:
@@ -9,23 +12,22 @@ jobs:
git config --global core.autocrlf input
# git config --global core.eol lf
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- 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: make
run: make
@@ -33,6 +35,14 @@ jobs:
run: |
make selftest
./zerotier-selftest
- name: 'Tar files' # keeps permissions (execute)
run: tar -cvf zerotier-one.tar zerotier-one
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: zerotier-one-ubuntu-x64
path: zerotier-one.tar
retention-days: 7
build_macos:
runs-on: macos-latest
@@ -42,29 +52,42 @@ jobs:
git config --global core.autocrlf input
# git config --global core.eol lf
- name: checkout
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: actions/checkout@v4
- name: Install Rust aarch64
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: aarch64-apple-darwin
override: true
components: rustfmt, clippy
- name: Install Rust x86_64
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-apple-darwin
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: make
run: make
- name: selftest
run: |
make selftest
./zerotier-selftest
- name: 'Tar files' # keeps permissions (execute)
run: tar -cvf zerotier-one.tar zerotier-one
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: zerotier-one-mac
path: zerotier-one.tar
retention-days: 7
build_windows:
runs-on: windows-latest
@@ -74,25 +97,30 @@ jobs:
git config --global core.autocrlf true
# git config --global core.eol lf
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: aarch64-apple-darwin
override: true
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: setup msbuild
uses: microsoft/setup-msbuild@v1.1.3
uses: microsoft/setup-msbuild@v2
- name: msbuild
run: |
msbuild windows\ZeroTierOne.sln /m /p:Configuration=Release /property:Platform=x64 /t:ZeroTierOne
msbuild windows\ZeroTierOne.sln /m /p:Configuration=Release /property:Platform=x64 /t:ZeroTierOne
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: zerotier-one-windows
path: windows/Build
retention-days: 7
+3 -2
View File
@@ -1,4 +1,5 @@
on:
pull_request:
push:
workflow_dispatch:
@@ -38,13 +39,13 @@ jobs:
CXX: 'g++'
BRANCH: ${{ github.ref_name }}
run: |
sudo apt install -y valgrind xmlstarlet gcovr iperf3 tree
sudo apt update && sudo apt install -y valgrind xmlstarlet gcovr iperf3 tree
make one ZT_COVERAGE=1 ZT_TRACE=1
sudo chmod +x ./.github/workflows/validate-linux.sh
sudo ./.github/workflows/validate-linux.sh
- name: Archive test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{github.sha}}-test-results
path: "*test-results*"
+9 -6
View File
@@ -6,16 +6,19 @@
/zerotier
/nltest
# IDE stuff
# IDE and dev tool stuff
/.idea
/.nova
/compile_commands.json
/.claude
/.aider
# OS-created garbage files from various platforms
.DS_Store
.Apple*
Thumbs.db
@eaDir
lost+found
._*
# Windows build droppings
@@ -58,6 +61,9 @@ zt1-src.tar.gz
/MacEthernetTapAgent
# Miscellaneous temporaries, build files, etc.
ext/installfiles/windows/*.back*.aip
tcp-proxy/tcp-proxy
rustybits/target
*.log
*.opensdf
*.user
@@ -101,7 +107,6 @@ windows/ZeroTierOne/Debug/
/ext/installfiles/windows/chocolatey/zerotier-one/*.nupkg
# Miscellaneous mac/Xcode droppings
.DS_Store
.Trashes
*.swp
*~.nib
@@ -124,17 +129,15 @@ attic/world/mkworld
workspace/
workspace2/
zeroidc/target/
tcp-proxy/target
#snapcraft specifics
# Snapcraft Linux build stuff
/parts/
/stage/
/prime/
*.snap
.snapcraft
__pycache__
*.pyc
*_source.tar.bz2
snap/.snapcraft
tcp-proxy/tcp-proxy
-14
View File
@@ -1,14 +0,0 @@
kick
kick
kick
kick
kick
kick
kick
kick
kick
kick
kick
kick
kick
kick
-75
View File
@@ -1,75 +0,0 @@
# Authors and Third Party Code Licensing Information
## Primary Authors
* ZeroTier Core and ZeroTier One virtual networking service<br>
Adam Ierymenko / adam.ierymenko@zerotier.com
Joseph Henry / joseph.henry@zerotier.com (QoS and multipath)
* Java JNI Interface to enable Android application development, and Android app itself (code for that is elsewhere)<br>
Grant Limberg / glimberg@gmail.com
* ZeroTier SDK (formerly known as Network Containers)<br>
Joseph Henry / joseph.henry@zerotier.com
## Third Party Contributors
* A number of fixes and improvements to the new controller, other stuff.<br>
Kees Bos / https://github.com/keesbos/
* Debugging and testing, OpenWRT support fixes.<br>
Moritz Warning / moritzwarning@web.de
* Debian GNU/Linux packaging, manual pages, and license compliance edits.<br>
Ben Finney <ben+zerotier@benfinney.id.au>
* Several others made smaller contributions, which GitHub tracks here:<br>
https://github.com/zerotier/ZeroTierOne/graphs/contributors/
## Third-Party Code
ZeroTier includes the following third party code, either in ext/ or incorporated into the ZeroTier core. This third party code remains licensed under its original license and is not subject to ZeroTier's BSL license.
* LZ4 compression algorithm by Yann Collet
* Files: node/Packet.cpp (bundled within anonymous namespace)
* Home page: http://code.google.com/p/lz4/
* License grant: BSD 2-clause
* http-parser by Joyent, Inc. (many authors)
* Files: ext/http-parser/*
* Home page: https://github.com/joyent/http-parser/
* License grant: MIT/Expat
* C++11 json (nlohmann/json) by Niels Lohmann
* Files: ext/json/*
* Home page: https://github.com/nlohmann/json
* License grant: MIT
* tap-windows6 by the OpenVPN project
* Files: windows/TapDriver6/*
* Home page: https://github.com/OpenVPN/tap-windows6/
* License grant: GNU GPL v2
* ZeroTier Modifications: change name of driver to ZeroTier, add ioctl() to get L2 multicast memberships (source is in ext/ and modifications inherit GPL)
* Salsa20 stream cipher, Curve25519 elliptic curve cipher, Ed25519 digital signature algorithm, and Poly1305 MAC algorithm, all by Daniel J. Bernstein
* Files: node/Salsa20.* node/C25519.* node/Poly1305.*
* Home page: http://cr.yp.to/
* License grant: public domain
* ZeroTier Modifications: slight cryptographically-irrelevant modifications for inclusion into ZeroTier core
* MiniUPNPC and libnatpmp by Thomas Bernard
* Files: ext/libnatpmp/* ext/miniupnpc/*
* Home page: http://miniupnp.free.fr/
* License grant: BSD attribution no-endorsement
* cpp-httplib by yhirose
* Files: ext/cpp-httplib/*
* Home page: https://github.com/yhirose/cpp-httplib
* License grant: MIT
-12
View File
@@ -1,12 +0,0 @@
ZeroTier One, an endpoint server for the ZeroTier virtual network layer.
Copyright © 2011–2019 ZeroTier, Inc.
ZeroTier is released under the terms of the BSL version 1.1. See the
file LICENSE.txt for details.
..
Local variables:
coding: utf-8
mode: text
End:
vim: fileencoding=utf-8 filetype=text :
+3 -3
View File
@@ -1,6 +1,6 @@
# vim: ft=dockerfile
FROM debian:bullseye
FROM debian:bookworm
ARG VERSION
@@ -9,9 +9,9 @@ RUN mkdir -p /usr/share/zerotier && \
curl -o /usr/share/zerotier/tmp.asc "https://download.zerotier.com/contact%40zerotier.com.gpg" && \
gpg --no-default-keyring --keyring /usr/share/zerotier/zerotier.gpg --import /usr/share/zerotier/tmp.asc && \
rm -f /usr/share/zerotier/tmp.asc && \
echo "deb [signed-by=/usr/share/zerotier/zerotier.gpg] http://download.zerotier.com/debian/bullseye bullseye main" > /etc/apt/sources.list.d/zerotier.list
echo "deb [signed-by=/usr/share/zerotier/zerotier.gpg] http://download.zerotier.com/debian/bookworm bookworm main" > /etc/apt/sources.list.d/zerotier.list
RUN apt-get update -qq && apt-get install zerotier-one=${VERSION} curl iproute2 net-tools iputils-ping openssl libssl1.1 -y
RUN apt-get update -qq && apt-get install zerotier-one=${VERSION} curl iproute2 net-tools iputils-ping openssl libssl3 -y
RUN rm -rf /var/lib/zerotier-one
COPY entrypoint.sh.release /entrypoint.sh
+373
View File
@@ -0,0 +1,373 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
+3 -147
View File
@@ -1,149 +1,5 @@
-----------------------------------------------------------------------------
See LICENSE-MPL.txt for all code in node/, osdep/. service/, and everywhere else except ext/ and nonfree/.
Business Source License 1.1
See nonfree/LICENSE.md for all non-free ("source available") portions of this repository.
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.
-----------------------------------------------------------------------------
Parameters
Licensor: ZeroTier, Inc.
Licensed Work: ZeroTier Network Virtualization Engine 1.4.4
The Licensed Work is (c)2019 ZeroTier, Inc.
Additional Use Grant: You may make use of the Licensed Work, provided you
do not use it in any of the following ways:
* Sell hosted ZeroTier services as a "SaaS" Product
(1) Operate or sell access to ZeroTier root servers,
network controllers, or authorization key or certificate
generation components of the Licensed Work as a
for-profit service, regardless of whether the use of
these components is sold alone or is bundled with other
services. Note that this does not apply to the use of
ZeroTier behind the scenes to operate a service not
related to ZeroTier network administration.
* Create Non-Open-Source Commercial Derviative Works
(2) Link or directly include the Licensed Work in a
commercial or for-profit application or other product
not distributed under an Open Source Initiative (OSI)
compliant license. See: https://opensource.org/licenses
(3) Remove the name, logo, copyright, or other branding
material from the Licensed Work to create a "rebranded"
or "white labeled" version to distribute as part of
any commercial or for-profit product or service.
* Certain Government Uses
(4) Use or deploy the Licensed Work in a government
setting in support of any active government function
or operation with the exception of the following:
physical or mental health care, family and social
services, social welfare, senior care, child care, and
the care of persons with disabilities.
Change Date: 2025-01-01
Change License: Apache License version 2.0 as published by the Apache
Software Foundation
https://www.apache.org/licenses/
Alternative Licensing
If you would like to use the Licensed Work in any way that conflicts with
the stipulations of the Additional Use Grant, contact ZeroTier, Inc. to
obtain an alternative commercial license.
Visit us on the web at: https://www.zerotier.com/
Notice
The Business Source License (this document, or the "License") is not an Open
Source license. However, the Licensed Work will eventually be made available
under an Open Source License, as stated in this License.
For more information on the use of the Business Source License for ZeroTier
products, please visit our pricing page which contains license details and
and license FAQ: https://zerotier.com/pricing
For more information on the use of the Business Source License generally,
please visit the Adopting and Developing Business Source License FAQ at
https://mariadb.com/bsl-faq-adopting.
-----------------------------------------------------------------------------
Business Source License 1.1
Terms
The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.
Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.
If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.
All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.
You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.
Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.
This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.
-----------------------------------------------------------------------------
MariaDB hereby grants you permission to use this License’s text to license
your works, and to refer to it using the trademark "Business Source License",
as long as you comply with the Covenants of Licensor below.
Covenants of Licensor
In consideration of the right to use this License’s text and the "Business
Source License" name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:
1. To specify as the Change License the GPL Version 2.0 or any later version,
or a license that is compatible with GPL Version 2.0 or a later version,
where "compatible" means that software provided under the Change License can
be included in a program with software provided under GPL Version 2.0 or a
later version. Licensor may specify additional Change Licenses without
limitation.
2. To either: (a) specify an additional grant of rights to use that does not
impose any additional restriction on the right granted in this License, as
the Additional Use Grant; or (b) insert the text "None".
3. To specify a Change Date.
4. Not to modify this License in any other way.
Code in ext/ is external code included for build convenience or backward compatibility and retains its original license.
+3
View File
@@ -31,3 +31,6 @@ drone:
@echo "rendering .drone.yaml from .drone.jsonnet"
drone jsonnet --format --stream
drone sign zerotier/ZeroTierOne --save
clang-format:
find node osdep service tcp-proxy nonfree/controller -iname '*.cpp' -o -iname '*.hpp' | xargs clang-format -i
+2 -1
View File
@@ -14,6 +14,7 @@ The version must be incremented in all of the following files:
/debian/changelog
/ext/installfiles/mac/ZeroTier One.pkgproj
/ext/installfiles/windows/ZeroTier One.aip
../DesktopUI/mac-app-template/ZeroTier.app/Contents/Info.plist
The final .AIP file can only be edited on Windows with [Advanced Installer Enterprise](http://www.advancedinstaller.com/). In addition to incrementing the version be sure that a new product code is generated. (The "upgrade code" GUID on the other hand must never change.)
@@ -29,4 +30,4 @@ You will need [Packages](http://s.sudre.free.fr/Software/Packages/about.html) an
## Windows
First load the Visual Studio solution and rebuild the UI and ZeroTier One in both x64 and i386 `Release` mode. Then load [Advanced Installer Enterprise](http://www.advancedinstaller.com/), check that the version is correct, and build. The build will fail if any build artifacts are missing, and Windows must have our product singing key (from DigiCert) available to sign the resulting MSI file. The MSI must then be tested on at least a few different CLEAN Windows VMs to ensure that the installer is valid and properly signed.
First load the Visual Studio solution and rebuild the UI and ZeroTier One in both x64, i386, and arm64 `Release` mode. Then load [Advanced Installer Enterprise](http://www.advancedinstaller.com/), check that the version is correct, and build. The build will fail if any build artifacts are missing, and Windows must have our product singing key (from DigiCert) available to sign the resulting MSI file. The MSI must then be tested on at least a few different CLEAN Windows VMs to ensure that the installer is valid and properly signed.
+1
View File
@@ -64,6 +64,7 @@ You can control a few settings including the identity used and the authtoken use
- `ZEROTIER_API_SECRET`: replaces the `authtoken.secret` before booting and allows you to manage the control socket's authentication key.
- `ZEROTIER_IDENTITY_PUBLIC`: the `identity.public` file for zerotier-one. Use `zerotier-idtool` to generate one of these for you.
- `ZEROTIER_IDENTITY_SECRET`: the `identity.secret` file for zerotier-one. Use `zerotier-idtool` to generate one of these for you.
- `ZEROTIER_LOCAL_CONF`: Sets the the `local.conf` file content for zerotier-one
### Tips
+29 -3
View File
@@ -44,6 +44,12 @@ The base path contains the ZeroTier One service main entry point (`one.cpp`), se
- `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/`.
@@ -52,7 +58,7 @@ To build on Mac and Linux just type `make`. On FreeBSD and OpenBSD `gmake` (GNU
- 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++ 4.9.3 or CLANG/CLANG++ 3.4.2. (Install `clang` on CentOS 7 as G++ is too old.)
- 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**
@@ -81,7 +87,7 @@ On most distributions, macOS, and Windows, the installer will start the service
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 port 9993. 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.
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:
@@ -120,7 +126,7 @@ Access control is via the ZeroTier control interface itself and `metricstoken.se
curl -H "X-ZT1-Auth: $(sudo cat /var/lib/zerotier-one/metricstoken.secret)" http://localhost:9993/metrics
// macOS
curl -H "X-XT1-Auth: $(sudo cat /Library/Application\ Support/ZeroTier/One/metricstoken.secret)" http://localhost:9993/metrics
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
@@ -169,3 +175,23 @@ Metrics are also available on disk in ZeroTier's working directory:
| 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).
+138 -157
View File
File diff suppressed because it is too large. Load diff
+8 -9
View File
@@ -1,17 +1,18 @@
# Security
ZeroTier takes the security of our software products and services seriously, which
ZeroTier takes the security of our software products and services seriously, which
includes all source code repositories managed through our GitHub organization.
## Supported Versions
The following versions of ZeroTier One receive security updates
| Version | Supported |
| ------- | ------------------ |
| 1.10.x | :white_check_mark: |
| 1.8.x | :white_check_mark: |
| < 1.8.0 | :x: |
| Version | Supported |
| -------- | ------------------ |
| 1.16.x | :white_check_mark: |
| 1.14.x | :white_check_mark: |
| 1.12.x | :x: |
| < 1.12.0 | :x: |
## Reporting a Vulnerability
@@ -20,10 +21,9 @@ The following versions of ZeroTier One receive security updates
Instead, please report vulnerabilities via email to security@zerotier.com. If possible,
please encrypt with our PGP key (see below).
Please include the following information, or as much as you can provide to help us
Please include the following information, or as much as you can provide to help us
understand the nature and scope of the issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
@@ -32,7 +32,6 @@ understand the nature and scope of the issue:
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
## Preferred Languages
We prefer all communications to be in English.
-459
View File
@@ -1,459 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
using System.Windows;
using Newtonsoft.Json;
using System.Diagnostics;
using System.Windows.Threading;
namespace WinUI
{
public class APIHandler
{
private string authtoken;
private string url = null;
private static volatile APIHandler instance;
private static object syncRoot = new Object();
public delegate void NetworkListCallback(List<ZeroTierNetwork> networks);
public delegate void StatusCallback(ZeroTierStatus status);
private string ZeroTierAddress = "";
public static APIHandler Instance
{
get
{
if (instance == null)
{
lock (syncRoot)
{
if (instance == null)
{
if (!initHandler())
{
return null;
}
}
}
}
return instance;
}
}
private static bool initHandler(bool resetToken = false)
{
String localZtDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\ZeroTier\\One";
String globalZtDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ZeroTier\\One";
String authToken = "";
Int32 port = 9993;
if (resetToken)
{
instance = null;
if (File.Exists(localZtDir + "\\authtoken.secret"))
{
File.Delete(localZtDir + "\\authtoken.secret");
}
if (File.Exists(localZtDir + "\\zerotier-one.port"))
{
File.Delete(localZtDir + "\\zerotier-one.port");
}
}
if (!File.Exists(localZtDir + "\\authtoken.secret") || !File.Exists(localZtDir + "\\zerotier-one.port"))
{
// launch external process to copy file into place
String curPath = System.Reflection.Assembly.GetEntryAssembly().Location;
int index = curPath.LastIndexOf("\\");
curPath = curPath.Substring(0, index);
ProcessStartInfo startInfo = new ProcessStartInfo(curPath + "\\copyutil.exe", "\"" + globalZtDir + "\"" + " " + "\"" + localZtDir + "\"");
startInfo.Verb = "runas";
var process = Process.Start(startInfo);
process.WaitForExit();
}
authToken = readAuthToken(localZtDir + "\\authtoken.secret");
if ((authToken == null) || (authToken.Length <= 0))
{
MessageBox.Show("Unable to read ZeroTier One authtoken", "ZeroTier One");
return false;
}
port = readPort(localZtDir + "\\zerotier-one.port");
instance = new APIHandler(port, authToken);
return true;
}
private static String readAuthToken(String path)
{
String authToken = "";
if (File.Exists(path))
{
try
{
byte[] tmp = File.ReadAllBytes(path);
authToken = System.Text.Encoding.UTF8.GetString(tmp).Trim();
}
catch
{
MessageBox.Show("Unable to read ZeroTier One Auth Token from:\r\n" + path, "ZeroTier One");
}
}
return authToken;
}
private static Int32 readPort(String path)
{
Int32 port = 9993;
try
{
byte[] tmp = File.ReadAllBytes(path);
port = Int32.Parse(System.Text.Encoding.ASCII.GetString(tmp).Trim());
if ((port <= 0) || (port > 65535))
port = 9993;
}
catch
{
}
return port;
}
private APIHandler()
{
url = "http://127.0.0.1:9993";
}
public APIHandler(int port, string authtoken)
{
url = "http://127.0.0.1:" + port;
this.authtoken = authtoken;
}
public void GetStatus(StatusCallback cb)
{
var request = WebRequest.Create(url + "/status" + "?auth=" + authtoken) as HttpWebRequest;
if (request != null)
{
request.Method = "GET";
request.ContentType = "application/json";
}
try
{
var httpResponse = (HttpWebResponse)request.GetResponse();
if (httpResponse.StatusCode == HttpStatusCode.OK)
{
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var responseText = streamReader.ReadToEnd();
ZeroTierStatus status = null;
try
{
status = JsonConvert.DeserializeObject<ZeroTierStatus>(responseText);
if (ZeroTierAddress != status.Address)
{
ZeroTierAddress = status.Address;
}
}
catch (JsonReaderException e)
{
Console.WriteLine(e.ToString());
}
cb(status);
}
}
else if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
}
catch (System.Net.Sockets.SocketException)
{
cb(null);
}
catch (System.Net.WebException e)
{
HttpWebResponse res = (HttpWebResponse)e.Response;
if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
else
{
cb(null);
}
}
}
public void GetNetworks(NetworkListCallback cb)
{
var request = WebRequest.Create(url + "/network" + "?auth=" + authtoken) as HttpWebRequest;
if (request == null)
{
cb(null);
}
request.Method = "GET";
request.ContentType = "application/json";
request.Timeout = 10000;
try
{
var httpResponse = (HttpWebResponse)request.GetResponse();
if (httpResponse.StatusCode == HttpStatusCode.OK)
{
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var responseText = streamReader.ReadToEnd();
List<ZeroTierNetwork> networkList = null;
try
{
networkList = JsonConvert.DeserializeObject<List<ZeroTierNetwork>>(responseText);
foreach (ZeroTierNetwork n in networkList)
{
// all networks received via JSON are connected by definition
n.IsConnected = true;
}
}
catch (JsonReaderException e)
{
Console.WriteLine(e.ToString());
}
cb(networkList);
}
}
else if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
}
catch (System.Net.Sockets.SocketException)
{
cb(null);
}
catch (System.Net.WebException e)
{
HttpWebResponse res = (HttpWebResponse)e.Response;
if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
else
{
cb(null);
}
}
}
public void JoinNetwork(Dispatcher d, string nwid, bool allowManaged = true, bool allowGlobal = false, bool allowDefault = false, bool allowDNS = false)
{
Task.Factory.StartNew(() =>
{
var request = WebRequest.Create(url + "/network/" + nwid + "?auth=" + authtoken) as HttpWebRequest;
if (request == null)
{
return;
}
request.Method = "POST";
request.ContentType = "applicaiton/json";
request.Timeout = 30000;
try
{
using (var streamWriter = new StreamWriter(((HttpWebRequest)request).GetRequestStream()))
{
string json = "{\"allowManaged\":" + (allowManaged ? "true" : "false") + "," +
"\"allowGlobal\":" + (allowGlobal ? "true" : "false") + "," +
"\"allowDefault\":" + (allowDefault ? "true" : "false") + "," +
"\"allowDNS\":" + (allowDNS ? "true" : "false") + "}";
streamWriter.Write(json);
streamWriter.Flush();
streamWriter.Close();
}
}
catch (System.Net.WebException)
{
d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
{
MessageBox.Show("Error Joining Network: Cannot connect to ZeroTier service.");
}));
return;
}
try
{
var httpResponse = (HttpWebResponse)request.GetResponse();
if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
else if (httpResponse.StatusCode != HttpStatusCode.OK)
{
Console.WriteLine("Error sending join network message");
}
}
catch (System.Net.Sockets.SocketException)
{
d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
{
MessageBox.Show("Error Joining Network: Cannot connect to ZeroTier service.");
}));
}
catch (System.Net.WebException e)
{
HttpWebResponse res = (HttpWebResponse)e.Response;
if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
{
MessageBox.Show("Error Joining Network: Cannot connect to ZeroTier service.");
}));
}
});
}
public void LeaveNetwork(Dispatcher d, string nwid)
{
Task.Factory.StartNew(() =>
{
var request = WebRequest.Create(url + "/network/" + nwid + "?auth=" + authtoken) as HttpWebRequest;
if (request == null)
{
return;
}
request.Method = "DELETE";
request.Timeout = 30000;
try
{
var httpResponse = (HttpWebResponse)request.GetResponse();
if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
else if (httpResponse.StatusCode != HttpStatusCode.OK)
{
Console.WriteLine("Error sending leave network message");
}
}
catch (System.Net.Sockets.SocketException)
{
d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
{
MessageBox.Show("Error Leaving Network: Cannot connect to ZeroTier service.");
}));
}
catch (System.Net.WebException e)
{
HttpWebResponse res = (HttpWebResponse)e.Response;
if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
{
MessageBox.Show("Error Leaving Network: Cannot connect to ZeroTier service.");
}));
}
catch
{
Console.WriteLine("Error leaving network: Unknown error");
}
});
}
public delegate void PeersCallback(List<ZeroTierPeer> peers);
public void GetPeers(PeersCallback cb)
{
var request = WebRequest.Create(url + "/peer" + "?auth=" + authtoken) as HttpWebRequest;
if (request == null)
{
cb(null);
}
request.Method = "GET";
request.ContentType = "application/json";
try
{
var httpResponse = (HttpWebResponse)request.GetResponse();
if (httpResponse.StatusCode == HttpStatusCode.OK)
{
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var responseText = streamReader.ReadToEnd();
//Console.WriteLine(responseText);
List<ZeroTierPeer> peerList = null;
try
{
peerList = JsonConvert.DeserializeObject<List<ZeroTierPeer>>(responseText);
}
catch (JsonReaderException e)
{
Console.WriteLine(e.ToString());
}
cb(peerList);
}
}
else if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
}
catch (System.Net.Sockets.SocketException)
{
cb(null);
}
catch (System.Net.WebException e)
{
HttpWebResponse res = (HttpWebResponse)e.Response;
if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
{
APIHandler.initHandler(true);
}
else
{
cb(null);
}
}
}
public string NodeAddress()
{
return ZeroTierAddress;
}
}
}
-35
View File
@@ -1,35 +0,0 @@
<Window x:Class="WinUI.AboutView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WinUI"
mc:Ignorable="d"
Title="AboutView" Height="368.267" Width="300" Icon="ZeroTierIcon.ico">
<Grid>
<Image x:Name="image" HorizontalAlignment="Center" Height="100" Margin="0,10,0,0" VerticalAlignment="Top" Width="100" Source="ZeroTierIcon.ico"/>
<RichTextBox x:Name="richTextBox" HorizontalAlignment="Left" Height="209" Margin="10,123,0,0" VerticalAlignment="Top" Width="275" IsReadOnly="True" IsDocumentEnabled="True" BorderThickness="0" FontSize="18" RenderTransformOrigin="0.506,0.63">
<RichTextBox.Resources>
<Style TargetType="Hyperlink">
<Setter Property="Cursor" Value="Hand" />
</Style>
</RichTextBox.Resources>
<FlowDocument>
<Paragraph TextAlignment="Center">
<Run Text="ZeroTier One"/>
</Paragraph>
<Paragraph TextAlignment="Center">
<Run FontSize="14" Text="Version 1.6.6"/>
<LineBreak/>
<Run FontSize="14" Text="(c) 2011-2021 ZeroTier, Inc."/>
<LineBreak/>
<Run FontSize="14" Text="www.zerotier.com"/>
</Paragraph>
<Paragraph TextAlignment="Center">
<Run FontSize="14" Text="ZeroTier One allows your computer to join virtual networks. Just select &quot;join&quot; and enter a network's 16-digit ID. Each network appears on your computer as a new network port."/>
</Paragraph>
</FlowDocument>
</RichTextBox>
</Grid>
</Window>
Loaded 20 of 1883 files, more files were not shown because too many files have changed in this diff. Show more