Compare commits

...
1860 Commits
Author SHA1 Message Date
Luke SouterandClaude Opus 5 e2e428f655 Rewrite README intro, add badges, fix broken support link
Replace the About section with updated copy describing ZeroTier One as
identity-first SDN, split across About / How It Works / Security, and
move the platform and build notes into their own sections.

Add a centered header block with the existing repo icon and badges for
build and validate workflow status, latest release, license, docs, and
supported platforms.

Point "Commercial Support" at https://docs.zerotier.com/support/ — the
old https://www.zerotier.com/contact URL returns 404. Also fix a stray
period in the license section ("osdep/. service/" -> "osdep/, service/").

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-03 10:04:54 -07:00
Grant Limberg 899352e384 Merge pull request #2607 from zerotier/dependabot-fixes
Fix Dependabot alerts: remove unused testcontainers, bump serde_with
2026-07-22 12:25:34 -07:00
Grant Limberg ae0a91068c Fix Dependabot alerts: remove unused testcontainers, bump serde_with
- Remove testcontainers/testcontainers-modules dev-dependencies, orphaned
  since the rust-based pubsub removal (0f6378359). This drops tokio-tar
  0.3.1 (CVE-2025-62518, PAX header desynchronization) and the rest of
  the bollard/docker graph from the lockfile. Resolves alert #67.
- Update serde_with 3.20.0 -> 3.21.0 (KeyValueMap serialization panic
  on empty sequence/map entries). Resolves alert #68.
2026-07-20 13:02:38 +02:00
Grant Limberg 5951981622 Merge pull request #2526 from zerotier/gl/ctl-pubsub
Add PubSub and BigTable support for Central hosted network controllers
2026-06-29 11:55:55 -07:00
Grant Limberg 1f6a1fd51f Remove ZT_CONTROLLER=1 from makefile. No longer used to build central
controllers
2026-06-29 11:13:40 -07:00
Grant Limberg edcc066d25 Add a SIGSEGV handler to print a stack trace for central controllers
Only enabled in the central controller builds.  Trying to find more info
about some mystery controller restarts in prod
2026-06-26 13:33:07 -07:00
Grant Limberg 0797626b3e Fix a potential crash on central controller shutdown 2026-06-26 13:32:09 -07:00
Grant Limberg 4bcff9d3e3 Fix the sso template for errors returned by IdP
Template was looking for {{networkId}} but that hadn't been populated
yet in the case where the IdP returned an error. This caused the
template parsing to crash and return its own error, disguising the error
from the IdP
2026-06-22 09:47:24 -07:00
Grant Limberg 64cc25baf6 bump actions to get rid of node warnings 2026-06-17 16:51:08 -07:00
Grant Limberg 8304ec79fe update documentation for ConnectionPool 2026-06-17 16:39:32 -07:00
Grant Limberg fcb016b9c1 standardize log formatting across the controller 2026-06-17 16:20:17 -07:00
Grant Limberg 75b51ec229 Ensure everything in nonfree/controller has the proper header comment
pointing to LICENSE.TXT
2026-06-17 13:50:44 -07:00
Grant Limberg 5640b82252 Update build.sh with build instructions
Also add presets for the BSDs
2026-06-17 13:39:22 -07:00
Grant Limberg ab9efc722c use the checkin timestamps for the cell timestamps in BigTable 2026-06-17 13:10:23 -07:00
Grant Limberg 4706ed9682 enable metrics by default for the central controller 2026-06-17 12:45:07 -07:00
Grant Limberg bf426497b0 Conneciton pool update to a timed wait on connection pool exhaustion
More use of scoped RAII guard for connections where appropriate.
2026-06-17 10:54:57 -07:00
Grant Limberg afd8a828df fix printf, connection pool smart pointer semantics, wait for ready spin
lock -> notification, and double notify on erase
2026-06-17 10:17:51 -07:00
Grant Limberg 7192b65a2c Correcting a few things 2026-06-17 09:59:20 -07:00
Grant Limberg 7be64c6bac Concurrency hygene updates 2026-06-17 09:48:18 -07:00
Grant Limberg 4a517e2d27 status update batch delivery reliablilty 2026-06-17 09:33:07 -07:00
Grant Limberg 6f57a77c43 Better connection handling for postgres status writer 2026-06-17 09:20:44 -07:00
Grant Limberg 8271fcadf2 Pubsub devlivery reliability updates 2026-06-17 09:12:15 -07:00
Grant Limberg 111228128f bugfixes 2026-06-17 08:46:15 -07:00
Grant Limberg fd98e0baa3 Addressing comments 2026-06-17 08:08:21 -07:00
Grant Limberg b6d5fb6fce set vcpagkage baseline and remove comment with text windows doesn't like 2026-06-15 18:54:41 -07:00
Grant Limberg c02c649cd3 more build updates.
removing openssl dependency (except on Linux where it's still necessary)
upgrade cpp-httplib
new cmake-presets
2026-06-15 18:51:24 -07:00
Grant Limberg ace5352388 Bump cpp-httplib so it supports win32 2026-06-15 17:41:09 -07:00
Grant Limberg deee555fbf fix deps so that architecture is taken into account 2026-06-15 17:27:00 -07:00
Grant Limberg 404fa9b2f9 fix incompatible options on crypto files in windows 2026-06-15 16:59:49 -07:00
Grant Limberg 4988d53d0e fix linking via CMake on Windows 2026-06-15 16:54:12 -07:00
Grant Limberg 14faaaa13e update to use makefiles by default on *ix 2026-06-15 16:48:58 -07:00
Grant Limberg 8ae153b44c Set thinkgs up for Windows in CMake
Also fixed a ZT_NONFREE issue
2026-06-15 16:22:17 -07:00
Grant Limberg f1c6a64035 build fix 2026-06-15 13:46:15 -07:00
Grant Limberg 0e637a1de6 More linux/mac cmake cleanup
* Brewfile for homebrew dependencies on macos
* Pull & build google-cloud-cpp/otel via bootstrap script rather than
  keeping it all in the ext/ subfolder.
* Update controller CI build with new steps
2026-06-15 12:59:32 -07:00
Grant Limberg e09e7b5c9b Fix PIC/PIE flags 2026-06-12 17:41:45 -07:00
Grant Limberg 052ea55636 bring CMake in line with make-linux/mac/bsd 2026-06-12 17:15:30 -07:00
Grant Limberg 378dd27361 main controller cmake file cleanup 2026-06-12 16:34:26 -07:00
Grant Limberg a4904c97b0 Repo cleanup.
* Remove now dead separate CV1/CV2 implementations.  Consolidated into
  CentralDB.
* Remove smeeclient.  No longer needed.
2026-06-12 16:23:04 -07:00
Grant Limberg 407bfdfd0b fix pubsub flood on ctl startup 2026-06-10 16:45:29 -07:00
Grant Limberg 85eec45372 remove db check from onlineNotificationThread 2026-06-10 15:46:12 -07:00
Grant Limberg fede9b9afb better logging of commit thread ticks
shows whats happening on each
2026-06-10 15:44:05 -07:00
Grant Limberg a3a45a75a7 Better data handling if a db write fails 2026-06-10 14:29:07 -07:00
Grant Limberg a001eba98f better closed connection handling to postgres 2026-06-10 14:05:46 -07:00
Grant Limberg af7c882315 perf(controller): drop per-row BigTable reads in status writer
writePending() did a synchronous ReadRow per queued node to avoid
rewriting unchanged os/arch/version. With thousands of check-ins per
cycle that's thousands of sequential round-trips every 10s, and the read
was nearly pointless since last_seen and the IP cell are written every
cycle anyway.

Replace it with an in-process cache of the last-written node_info per
row (keyed by a 64-bit hash of the row key). node_info is emitted only
when changed, new, or past its refresh window; check_in is still written
every cycle. Failed rows are dropped from the cache so they're rewritten
next cycle, and stale entries are evicted (24h TTL). Net result: one
BulkApply per cycle, no read RPCs.
2026-06-10 13:28:40 -07:00
Grant Limberg eec53a5866 Add handling sso networks for both CV1 & CV2 simultaneously 2026-06-02 14:54:55 -07:00
Grant Limberg 174130c080 More sso error logging & removing a few logs as well 2026-06-02 13:43:50 -07:00
Grant Limberg f76e6b916c This workflow does need to be removed from this branch.
once finally merged it'll be irrelevant.
2026-05-28 09:25:39 -07:00
Grant Limberg 3dffacc024 cargo fix 2026-05-28 09:12:38 -07:00
Grant Limberg 29f5464dbd Merge branch 'dev' into gl/ctl-pubsub 2026-05-28 08:49:48 -07:00
Grant Limberg 346dc907a1 remove noisy log 2026-05-28 08:03:07 -07:00
Dimitriy Dade a3b1a346c4 Merge pull request #2592 from zerotier/cv1
bringing back cv1 yaml
2026-05-27 16:23:53 -04:00
dimitriy-dade 9c2d5cd74c bringing back cv1 yaml 2026-05-27 16:14:53 -04:00
Dimitriy Dade fc5c3ec220 Merge pull request #2590 from zerotier/1.16.2
Merging 1.16.2 from Private to Public
2026-05-27 14:42:28 -04:00
dimitriy-dade fe29cd8888 fixing changelogs as required by linux builds and version for Mac 2026-05-27 14:29:53 -04:00
Grant Limberg b1427153aa handle nulls for remote trace target 2026-05-27 07:52:25 -07:00
dimitriy-dade 2ed9b86852 updated workflows 2026-05-22 19:56:47 -04:00
dimitriy-dade f87d5477f6 Merging 1.16.2 from Private to Public 2026-05-22 11:39:10 -04:00
countbinoculars 544809e738 Merge pull request #2588 from zerotier/dep-updates
Update some Rust dependencies
2026-05-21 15:53:07 -07:00
Chris Spiegel d678338b28 Update some Rust dependencies 2026-05-21 15:21:38 -07:00
Grant Limberg 80f5e81d8c ensure controller doesn't change assigned frontend 2026-05-19 11:09:02 -07:00
Grant Limberg 9a9a8c09c3 fix for missing field in json 2026-05-14 15:30:44 -07:00
Grant Limberg ac20c320cf update network.proto in line with CV1 and CV2 2026-05-14 13:07:13 -07:00
Grant Limberg 1c755845f0 align JSON keys between CentralDB and PubSub listener/writer
- Default enableBroadcast to true on load (initializeNetworks and _getNetwork) to match DB::initNetwork. Networks whose JSONB lacks the field now get broadcast on instead of off, which is the documented ZeroTier default.

- Stop overwriting networks_ctl.frontend on every UPDATE. It should remain whatever was set at INSERT. The early-exit guard already prevents cross-frontend writes from applying, so dropping the SET preserves correctness. Members are unaffected — they source frontend from the network row, not the change payload.

- Add enableBroadcast, creationTime, and revision to PubSubListener's network toJson. The protobuf carries them, but the listener was dropping them on inbound, which caused revision to reset on every PubSub-delivered network update.

- Rename member version keys to vMajor/vMinor/vRev/vProto in both PubSubListener (incoming) and PubSubWriter (outgoing). CentralDB, EmbeddedNetworkController, and the rest of the codebase already use these names; the listener/writer were the only sites using versionMajor/Minor/Rev/Protocol, so member version info was being silently dropped through PubSub in both directions.

- Pass newMember by const reference in ControllerChangeNotifier::notifyMemberChange to match notifyNetworkChange. Avoids a full JSON copy on every member notify.

- Remove duplicate nlohmann::json::parse call in RedisNetworkListener.
2026-05-13 11:01:39 -07:00
Grant Limberg 7b44e0a3a5 Fix json key inconsistency in pubsub writer 2026-05-13 10:40:02 -07:00
Grant Limberg b79592c71f Bugfix pass
ssoConfig checked wrong variable
DNS missing-branch wrote to input not output
SSO fields renamed to sso* and nested under ssoConfig (across CentralDB, DB defaults, migration_models)
Member identity populated into the right field; address = memberId
noAutoAssignIPs → noAutoAssignIps casing
Member version columns now SELECTed + populated (both sites)
removeTraceLevel typo in DB.cpp defaults
8. eraseMember uninitialized tmp2 — member deletes now actually delete
9. Connection leak on continue in both commit branches
10. Unsafe (uint64_t)config["revision"] cast → OSUtils::jsonInt
11. target = "NULL" literal text → std::optional<std::string> for real SQL NULL
~13 unsafe direct json→string casts → OSUtils::jsonString; dead vars removed from save(); change_source blocks use is_string() checks.
Heartbeat zadd literal "controllerId" → variable
Network revision double-increment removed
PubSub notifier now sees actual old state (DB query moved before INSERT in both branches)
_delete_network reads config["id"] instead of config["nwid"]
ip_assignments empty-string guards added at both sites (also closes G)
ensure last_modified is set on every write to networks & members
2026-05-13 10:28:15 -07:00
Grant Limberg f0522a7cdb fix a typo in some json handling that could be affecting an issue I'm tracking down 2026-05-08 10:58:05 -07:00
Grant Limberg 8c3a777108 addressing pr comments 2026-05-04 16:27:45 -07:00
Grant Limberg 23d395d781 change sso topic names for clarity 2026-04-30 09:41:24 -07:00
Grant Limberg 7b747aff3b Merge pull request #2582 from zerotier/rust-dep-updates
Dependency update for rust deps
2026-04-27 11:54:32 -07:00
Grant Limberg 484d9e0d8c cargo update 2026-04-27 11:31:02 -07:00
Grant Limberg 55aa87c372 Merge pull request #2577 from zerotier/cv1-schema-change
Handle a few incoming CV1 schema changes
2026-04-17 14:04:29 -07:00
Grant Limberg aa586efbb5 query fix 2026-04-17 13:50:49 -07:00
Grant Limberg 0e8ec661c8 make sure subscribe pulls stay running 2026-04-11 13:42:44 -07:00
Grant Limberg d2361a9a66 logging 2026-04-11 12:39:05 -07:00
Grant Limberg 910334c2a5 Fix silent PubSub message loss in controller subscription loop
The 10-second session.cancel() loop raced with in-flight acks — when
cancel fired while the GCP client was processing messages, acks were
lost before reaching the server. With message ordering enabled, an
unacked message blocks all subsequent messages on that ordering key,
causing silent stalls with no error output.

Two fixes:
- Replace the cancel/reconnect timer with a blocking session.get(),
  storing the session future so the destructor can cancel on shutdown.
- Always ack messages even when onNotification fails — permanent errors
  (bad protobuf, missing fields) will never succeed on retry and would
  otherwise poison the ordering key indefinitely.
2026-04-11 09:30:21 -07:00
Grant Limberg 4ca5c9b820 fix poison pill blocking proccessing 2026-04-11 07:40:11 -07:00
Grant Limberg 1f3a04f303 periodic queue size logging, and fix some db connection leaks 2026-04-03 10:28:28 -07:00
Grant Limberg af7eae5d9e Added a little bit more logging for the node checkin/bigtable write process 2026-04-03 09:52:55 -07:00
Grant Limberg ea5c91b0e9 Remove smee from CentralDB.
Now handled in CV1 on new member join via pubsub integration when a new member comes through
2026-04-02 10:04:23 -07:00
Grant Limberg 20f7311622 Skip redundant nonce sending with an expiry time of 0 2026-04-01 09:48:05 -07:00
Grant Limberg dd6e69f530 sso query fix in controller 2026-03-31 14:04:30 -07:00
Grant Limberg 78b25f4ae2 update settings to enable SSO networks 2026-03-31 13:24:03 -07:00
Grant Limberg 895b06033d temporary logging 2026-03-31 10:56:04 -07:00
Grant Limberg b047038ca1 print a message when the SSO PSK is configured 2026-03-31 08:48:00 -07:00
Grant Limberg 7ec42461d8 configure assigned central version in startup script 2026-03-19 11:57:35 -07:00
Grant Limberg e49b347a8f plumb through config changes for sso pubsub 2026-03-19 11:56:17 -07:00
Grant Limberg 7faf30d0cc another fix 2026-03-18 13:51:16 -07:00
Grant Limberg d9507dd895 Undo change to old migration that shouldn't have been made 2026-03-18 13:18:03 -07:00
Grant Limberg 2c57f85e25 add assigned_central_version column to controllers_ctl
Allow controllers to advertise which central version (cv1, cv2, or all)
they are assigned to handle via a new configurable field. The value is
persisted to the database on each heartbeat and validated at startup
against the DB CHECK constraint.
2026-03-17 16:30:25 -07:00
Grant Limberg a840b94e0d add SSO nonce/auth PubSub messaging with frontend routing
Publish CTL_NONCE_UPDATE to PubSub when nonces are created or reused in
getSSOAuthInfo(), with the network's frontend as a message attribute so
only the correct CV frontend receives it. Listen for ZT1_AUTH_UPDATE
messages and update sso_expiry.authentication_expiry_time accordingly,
with a network existence check before applying.

- Add sso_send_topic/sso_recv_topic to PubSubConfig
- Add PubSubWriter::publishSSONonceUpdate() with frontend param
- Add PubSubSSOListener class for inbound auth updates
- Rename CV1_AUTH_UPDATE to ZT1_AUTH_UPDATE in sso.proto
- Fix pre-existing connection pool leak in getSSOAuthInfo() catch block
2026-03-17 14:42:49 -07:00
Grant Limberg 03aa33bba7 set network member frontend based on the network its a member of 2026-03-12 09:20:05 -07:00
Grant Limberg a2340bf60c add --provenance false to avoid $IMAGE is a manifest list error 2026-03-04 11:58:43 -08:00
Grant Limberg e918ec44d5 one last fix 2026-03-04 11:47:09 -08:00
Grant Limberg 34777b6bb4 another fix for multi-arch builds 2026-03-04 11:35:56 -08:00
Grant Limberg 97db010112 fix multi-arch manifest 2026-03-04 11:12:19 -08:00
Grant Limberg e81053aed7 fix build 2026-03-04 10:57:46 -08:00
Grant Limberg 91428eacae add github action for creating CV1 controller images 2026-03-04 10:51:13 -08:00
Grant Limberg 936801a51b update gitignore 2026-03-02 14:08:07 -08:00
Grant Limberg 8f1b213994 still use use_redis column 2026-03-02 14:08:02 -08:00
Grant Limberg 7f47b2ba8f update dockerfile to get around go stdlib bug in controller build 2026-03-02 14:07:53 -08:00
Grant Limberg eac140aa73 Update use of ztc_controller table for changes in progress in CV1. 2026-03-02 13:14:16 -08:00
Dimitriy Dade d9a7f62a5c Merge pull request #2568 from zerotier/dimitriy-dev
Updating versions that were flagged as vulnerable by Dependabot
2026-02-26 13:44:04 -05:00
Grant Limberg 38f4d124b0 woops. out of order here 2026-02-25 15:04:40 -08:00
Grant Limberg 0ad6b19705 drop index 2026-02-25 14:37:27 -08:00
Grant Limberg ae7ee51b9d fix db migrations 2026-02-25 14:36:53 -08:00
dimitriy.dade 294af67370 Updating versions that were flagged as vulnerable by Dependabot 2026-02-25 17:00:20 -05:00
Grant Limberg 0f0e6b3b16 add a linked_id column to the oidc_config table.
Required to get the list of configs  for a particular org that the controller has.  Named it `linked_id` rather than `org_id` since we don't know what it will be linked to in CV2
2026-02-25 13:37:04 -08:00
Grant Limberg c653e764b8 WIP: Update sso info retrieval method 2026-02-24 14:01:33 -08:00
Grant Limberg 35f7bf2291 disable peer metrics in Central controller 2026-01-23 13:06:02 -08:00
Grant Limberg ccb9a45d21 Remove extra verbose logging from controller 2026-01-23 11:53:06 -08:00
Grant Limberg 68a96344ed Merge branch 'dev' into gl/ctl-pusub 2026-01-23 11:18:45 -08:00
Adam Ierymenko 67648579b5 Merge pull request #2549 from zerotier/1.16.1
1.16.1
2026-01-20 11:53:31 -05:00
Adam Ierymenko fa601636aa Merge branch 'dev' into 1.16.1 2025-12-22 18:20:59 -05:00
Adam Ierymenko d2b4b6e91d Add date to release notes. 2025-12-22 17:49:15 -05:00
Adam Ierymenko a77009e4f0 notes 2025-12-22 16:50:13 -05:00
Chris Spiegel 9c2bd25d86 Add a couple entries to the release notes
The date still needs to be updated when this is actually released.
2025-12-22 12:50:02 -08:00
Adam Ierymenko 22b47f851e 1.16.1 Windows bump 2025-12-12 14:43:40 -05:00
Adam Ierymenko 2342926442 All version bumps but Windows. 2025-12-12 14:17:21 -05:00
Joseph Henry 458c5c9709 Merge pull request #21 from zerotier/joseph-henry-disable-http-debug
Disable debug logging for the HTTP API library
2025-12-01 14:34:32 -08:00
Joseph Henry 4f6b9038f1 Disable debug logging for the HTTP API library
This just quiets things down a little since the HTTP library produces so much verbose text.
2025-12-01 14:32:11 -08:00
Grant Limberg 2ba50f4544 set --provenance false on docker build to try and fix docker image creation issue 2025-11-12 16:17:03 -08:00
Grant Limberg 50daf9537b controller build readme update 2025-11-11 18:40:58 -08:00
Chris Spiegel 20007a73df Merge pull request #12 from zerotier/erase-after-unique
Ensure erase() is called after std::unique()
2025-11-10 12:45:36 -08:00
Joseph Henry 7f5850a943 Merge pull request #11 from zerotier/snprintf-into-self
Avoid using the same source and destination in snprintf()
2025-11-10 09:50:22 -08:00
Joseph Henry 8e5d81728f Merge pull request #10 from zerotier/windows-bool-assign
Fix assignment vs comparison typo
2025-11-10 09:46:58 -08:00
Joseph Henry 300b05aaf0 Merge pull request #8 from zerotier/2152-disable-metrics
Allow metrics to be disabled
2025-11-10 09:39:43 -08:00
Joseph Henry 595a70c5ed Remove old multipathMode setting 2025-11-10 09:38:59 -08:00
Grant Limberg 00dca6a2c0 Merge branch 'dev' into gl/ctl-pubsub 2025-11-06 10:01:11 -08:00
Chris Spiegel 9e53fe4b12 Avoid using the same source and destination in snprintf()
It's undefined to write to a buffer you're reading from in snprintf().
On modern glibc and musl versions, this results in the string
"/zerotier_dump.txt" being generated, i.e. in the root directory. Use a
new variable to hold the string dump.

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

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

Also, remove the vestigial _rxThreadCount, which is no longer used.
2025-11-03 11:20:01 -08:00
Grant Limberg 5c27068b80 Enable cross-service propagation of otel trace metadata 2025-10-30 13:47:50 +01:00
Grant Limberg 30c4484731 Set ordering key on pubsub message publishing. 2025-10-27 11:01:36 +01:00
Grant Limberg c21ff23477 Added some more logging to the ctl around deauths 2025-10-27 09:44:36 +01:00
Grant Limberg 76ba89060b ensure change source is controller if otherwise unset 2025-10-09 16:29:43 -07:00
Grant Limberg 77aa8c7bf8 missed one 2025-10-09 15:47:34 -07:00
Grant Limberg bf0fe2c09a these should be empty json arrays, not just "[]".
Actually these *should* be structs, not filling out json.  Adding this to the tech debt backlog
2025-10-09 15:39:40 -07:00
Grant Limberg 19ccc98f91 more variations on checking json 2025-10-09 15:28:48 -07:00
Grant Limberg e3f65ff359 compiler fix 2025-10-09 15:02:16 -07:00
Grant Limberg 47367673f9 more robustifying incoming messages 2025-10-09 14:47:25 -07:00
Grant Limberg 46a8cd7b67 robustify the handling of tags/capabilities/rules which are strings of encoded json 2025-10-09 14:39:46 -07:00
Grant Limberg 946d96f482 dont NACK failed messages. That gets us into a loop of failing the same messages over and over again 2025-10-09 14:34:24 -07:00
Grant Limberg b92fb93f8f Merge branch 'dev' into gl/ctl-pubsub 2025-10-06 16:55:28 -07:00
Grant Limberg 6b74bf289a fix assign mode json 2025-10-06 15:10:42 -07:00
Grant Limberg fe221b9359 debug output for IP addressing & fixing order of operations in a couple of places. Only send notification of a change to pubsub after it's been written to the DB 2025-10-06 14:24:57 -07:00
Luke Souter ab75985766 Merge pull request #2511 from zerotier/update-readme
Shorten/clean README.md. Split README into a few separate, including BUILD. Correctly references licensing information.
2025-10-02 16:05:05 -07:00
Grant Limberg 6df7366753 no need for these timeouts 2025-10-02 16:00:08 -07:00
Grant Limberg 1ef7ea0fe6 Fixing more JSON issues 2025-10-02 15:04:57 -07:00
Grant Limberg 18714c7785 add explicit nack if there's an error processing a pubsub message 2025-10-02 11:56:44 -07:00
Grant Limberg a75d06ad64 cleaning up some gross JSON code 2025-10-02 11:35:03 -07:00
Grant Limberg 4861b7df1e one last json parsing fix. but really this time 2025-10-01 17:18:31 -07:00
Grant Limberg 0d21250b62 one last json parsing fix 2025-10-01 16:33:17 -07:00
Grant Limberg 3bbf194594 pubsub writer should work now 2025-10-01 16:25:27 -07:00
Grant Limberg fb75369597 throwing stuff at the wall cuz I can't actually debug this right now 2025-10-01 16:08:06 -07:00
Grant Limberg a8b5c89efa think this is where things are crashing, but I'm not sure why yet. Comment it out to make sure 2025-10-01 15:05:34 -07:00
Grant Limberg 80f82132dd fix tags/capabilities? 2025-10-01 14:00:17 -07:00
Grant Limberg 7faf705e10 make the default an empty array here 2025-10-01 13:33:02 -07:00
Grant Limberg 1f557b516f more debug output 2025-10-01 13:30:25 -07:00
Grant Limberg aecd7fdace more logging 2025-10-01 13:13:58 -07:00
Grant Limberg dad1a1eda6 more logging 2025-10-01 13:12:45 -07:00
Grant Limberg f028213c7f debug output 2025-10-01 12:40:50 -07:00
Grant Limberg b4f018b918 debug output from parsing pubsub messages 2025-10-01 09:07:08 -07:00
Grant Limberg 20a67ab1de fix attempted null -> string conversion 2025-10-01 08:06:40 -07:00
Grant Limberg 02908e5202 stray ` got in there 2025-09-30 10:52:00 -07:00
Grant Limberg 97d20a1155 more logging for errors on pubsub listener 2025-09-30 10:32:21 -07:00
Grant Limberg 315bf240fc json field fix 2025-09-25 16:34:08 -07:00
Grant Limberg c6b7c263d2 query fix for new networks 2025-09-25 16:09:57 -07:00
Grant Limberg e51e516f85 fix subscription creation 2025-09-25 15:38:28 -07:00
Grant Limberg 069d7c1862 set objtype on messages received via PubSub 2025-09-25 15:14:30 -07:00
Luke Souter 4b9724c8fa Merge branch 'update-readme' of https://github.com/zerotier/ZeroTierOne into update-readme 2025-09-23 10:20:58 -07:00
Luke Souter f2d4a882d9 removed duplicate title, added build link, fixed controller link 2025-09-23 10:20:49 -07:00
Grant Limberg 6196e87303 only create the subscription if pubsub emulator is being used. 2025-09-22 16:32:28 -07:00
Grant Limberg d96d3b27d2 try making the controller attach to an existing pubsub subscription if it already exists 2025-09-22 10:52:06 -07:00
Luke Souter 0cf5ab9375 Merge branch 'dev' into update-readme 2025-09-18 14:29:49 -07:00
Luke Souter 4f2717c244 added build.md
Drastically shortened main readme and linked out to build notes instead. Clarified licensing info to just match license.txt.
2025-09-18 14:29:09 -07:00
Grant Limberg 6113bad61e make pubsub topics configurable
Also for pubsub trips back to CV1/CV2, rather than having 2 queues for each service (networks & members), theres now only a single queue for each change type, and `frontend = (cv1|cv2)` attribute is set on the message for filtering.
2025-09-18 09:33:04 -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
Grant Limberg cb2de5aae1 fix migration 2025-09-13 10:29:45 -07:00
Grant Limberg ad1fc5fb3d add tables for the controller load log and sso nonces & expiry 2025-09-13 10:05:20 -07: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
Luke Souter b62b9e28b9 Merge branch 'update-readme' of https://github.com/zerotier/ZeroTierOne into update-readme 2025-09-12 14:14:11 -07:00
Luke Souter be5baa76b9 Update README.md 2025-09-12 14:14:06 -07:00
Luke Souter a6d2e80b08 Merge branch 'dev' into update-readme 2025-09-11 12:27:03 -07:00
Luke Souter b0ba0d7227 Update README.md 2025-09-11 12:16:33 -07:00
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 1ce37e7770 add use_for_new_networks column in controller table 2025-09-11 10:02:45 -07:00
Grant Limberg 3e6a22c3d8 Fix JNI after ZT_Node_New function signature change 2025-09-11 07:36:25 -07:00
Grant Limberg 493cc4fe4f fix version string 2025-09-10 08:13:56 -07:00
Grant Limberg 7aa451bec1 clean up deprecation warnings in pqxx 2025-09-10 07:43:21 -07:00
Grant Limberg 012443acfa wire up pubsub notifications from controller to frontend 2025-09-08 16:01:50 -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
Grant Limberg ee87eb3101 removing some log output 2025-09-08 11:34:03 -07:00
Grant Limberg facca364fb only update os, architecture and client version if they've changed (or don't exist) 2025-09-08 11:00:17 -07:00
Grant Limberg 1d65c1e43e back to bulk apply for status updates in BigTable 2025-09-08 10:50:10 -07:00
Grant Limberg 1ba4ccd98d pass version info to status writer 2025-09-08 10:46:01 -07:00
Grant Limberg 934aa93ef8 forgot a ; 2025-09-08 10:32:57 -07:00
Grant Limberg 88f08fa58c append 8 random hex chars to the subscription id 2025-09-08 10:29:30 -07:00
Grant Limberg f51bfdb666 delete pubsub subscription on shutdown 2025-09-08 10:25:32 -07:00
Adam Ierymenko ffd34a3e46 Add merged PRs. 2025-09-08 13:05:25 -04:00
Grant Limberg 190d836b42 alloc meatadata with new so pubsub can delete it 2025-09-08 09:49:26 -07:00
Adam Ierymenko fad7123417 Enable controller on production Windows builds. 2025-09-08 12:36:57 -04:00
Grant Limberg 006ced2900 more fixes 2025-09-08 09:05:00 -07:00
Grant Limberg ebf66b7920 fix typo in cmake file 2025-09-08 08:53:35 -07:00
Grant Limberg 71d68e9a60 fix stack corruption in DB::get 2025-09-08 08:49:23 -07:00
Grant Limberg a78ac17d10 fix compile & link on macOS 2025-09-06 15:02:59 -07:00
Grant Limberg 36219c59ae compiler on mac doesn't like this. not really needed though 2025-09-06 15:02:48 -07:00
Grant Limberg 69efa924e2 apply patch to libnatpmp repo so we can compile on macOS with CMake 2025-09-06 15:01:48 -07:00
Grant Limberg 3d72a43a19 misc bugfixes 2025-09-06 12:37:28 -07:00
Grant Limberg 7ad264df92 whoops. mesed up the migrate naming convention 2025-09-05 15:20:33 -07:00
Grant Limberg 024824c2fe wire up pubsub outgoing status changes from controller -> CV2 2025-09-05 14:52:16 -07: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
Grant Limberg 74f0525470 Add frontend column to networks & network_memberships tables so the controller knows which system owns the networks & members 2025-09-05 08:43:06 -07:00
Grant Limberg ba6200fb96 add a ChangeSource enum to the change protobuf messages 2025-09-05 08:19:32 -07:00
Grant Limberg 282d7c7f9d another fix 2025-09-04 17:45:38 -07:00
Grant Limberg 48ff61b392 fix 2025-09-04 17:28:14 -07:00
Grant Limberg a061c86594 fix 2025-09-04 17:00:15 -07:00
Grant Limberg a18e370d48 another query fix 2025-09-04 16:31:16 -07:00
Grant Limberg e9565cf97c another query fix 2025-09-04 16:12:21 -07:00
Grant Limberg 3b7958aec1 another query fix 2025-09-04 16:07:28 -07:00
Grant Limberg 20746b2754 query fix 2025-09-04 15:41:33 -07:00
Grant Limberg b16d9372b8 fix otel exporting 2025-09-04 15:11:57 -07:00
Grant Limberg f208007226 enable otel exporter 2025-09-04 14:48:04 -07:00
Grant Limberg dcd583f62b cleanup controller github action 2025-09-04 14:47:58 -07:00
Grant Limberg 3616c4026b move up the gcp auth step 2025-09-04 14:23:49 -07:00
Adam Ierymenko 03a198a1b5 bump rust versions per bot recommendation. 2025-09-04 17:16:23 -04:00
Grant Limberg 67526d494a move up docker auth 2025-09-04 14:15:51 -07: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
Grant Limberg 8bd96d360f build in containers 2025-09-04 14:14:59 -07: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
Grant Limberg 70d24fc7eb trying to build in a docker container 2025-09-04 14:02:58 -07:00
Grant Limberg 40f6508717 add conda builder dockerfile 2025-09-04 13:50:11 -07:00
Grant Limberg 7d5a60b44e will this make arm64 containers work? 2025-09-04 13:08:27 -07:00
Grant Limberg 2264452ad8 try to make this work on both x64 & arm64 2025-09-04 12:19:53 -07:00
Grant Limberg 73e3287fd6 debugging runtime link issues on arm64 2025-09-04 12:14:32 -07:00
Grant Limberg f33e706887 get a running controller in docker 2025-09-04 11:42:53 -07:00
Grant Limberg 686653509a debug printf 2025-09-04 11:27:59 -07:00
Grant Limberg ce84de605d and instead of or in postgres check 2025-09-04 11:24:01 -07:00
Grant Limberg 7e4e7ef753 fix case for redis: null 2025-09-04 11:19:22 -07:00
Grant Limberg b94fa2d95d . 2025-09-04 11:18:08 -07:00
Grant Limberg c9c8e95d60 debug output of main script 2025-09-04 11:16:48 -07:00
Grant Limberg d216a3739f run process in conda env directly from docker 2025-09-04 11:14:34 -07:00
Grant Limberg 092fc268d3 ok back to full path 2025-09-04 11:11:14 -07:00
Grant Limberg 1da9e24905 no absolute path for pg_isready 2025-09-04 11:03:30 -07:00
Grant Limberg 158d24545a also have to add postgres to the container for pg_isready 2025-09-04 10:30:08 -07:00
Grant Limberg 96aa893df4 stray backtick 2025-09-04 09:50:19 -07:00
Grant Limberg 4516e6a340 need a conda init here first apparently 2025-09-04 09:27:08 -07:00
Grant Limberg 2416c42df7 change tag to match existing 2025-09-04 08:48:54 -07:00
Grant Limberg 4f07599992 add jemalloc 2025-09-03 15:04:51 -07:00
Grant Limberg 6ceb8eac97 text alignment 2025-09-03 13:56:32 -07:00
Grant Limberg 3ad352c08e no trailing comma on bigtable block 2025-09-03 13:56:04 -07:00
Grant Limberg 9d73c346b7 new modified startup script for central controller docker images with support for configuring bigtable, pubsub, redis 2025-09-03 13:48:38 -07:00
Grant Limberg 4abf90247d update ld.so.conf for paths to libraries 2025-09-03 13:22:21 -07:00
Grant Limberg 594d227f92 fix multi-arch manifest creation 2025-09-03 12:18:21 -07:00
Grant Limberg 7fd112eb4f fix short hash 2025-09-03 11:50:09 -07:00
Grant Limberg 000f3d5a8c let's build a docker image 2025-09-03 11:37:26 -07:00
Grant Limberg 3f3e684811 only update conda env if cache was not hit 2025-09-03 10:42:22 -07:00
Grant Limberg a841e96bd2 put git branch ref into cache key name 2025-09-03 10:40:31 -07:00
Grant Limberg 3ff4d67d21 bump 2025-09-03 10:29:53 -07:00
Grant Limberg b09956ae59 fix run arg 2025-09-03 10:28:42 -07:00
Grant Limberg 4395574706 cache conda environment 2025-09-03 10:27:06 -07:00
Grant Limberg 1dae4c4c5f cache conda environment 2025-09-03 10:23:33 -07:00
Grant Limberg d31b3a08db set ZT_AES_NEON for arm64 2025-09-03 10:08:16 -07:00
Grant Limberg 0f3a5148b1 fix deps for selftest 2025-09-03 09:29:33 -07:00
Grant Limberg d3f1ec74ba fix arm64 build flag 2025-09-03 09:20:13 -07:00
Grant Limberg 3470ceb13d cmake --build args 2025-09-03 09:12:04 -07:00
Grant Limberg 648f0915e5 skip cmake action 2025-09-03 09:09:17 -07:00
Grant Limberg 21e20f2104 more conda 2025-09-03 09:04:40 -07:00
Grant Limberg f43bc3d10c more conda 2025-09-03 09:00:36 -07:00
Grant Limberg 3ad36c773d fix cmake options 2025-09-03 08:55:29 -07:00
Grant Limberg 22484c708f dependency juggling 2025-09-03 08:51:21 -07:00
Grant Limberg cab33dfc89 no linux/arm64 build available for google-cloud-cpp 2.39 :/. Downgrade to 2.38 2025-09-03 08:45:33 -07:00
Grant Limberg e1db40d932 test 2025-09-03 08:39:02 -07:00
Grant Limberg 97681b589e trying to get this working 2025-09-03 08:37:30 -07:00
Grant Limberg 09f1ee77e1 skip caching until this all works 2025-09-03 08:26:08 -07:00
Grant Limberg 0f13363895 runs-on matrix 2025-09-03 08:22:47 -07:00
Grant Limberg 7c1bfc97c4 setup github action for building 2025-09-03 08:18:56 -07:00
Grant Limberg 2a647d497a remove otel warning 2025-09-02 16:25:16 -07:00
Grant Limberg 70f9fe0412 update central controller readme with config block 2025-09-02 14:15:28 -07:00
Grant Limberg 0753556aa3 wire up configuration.
New config block in local.conf for controllers:

```
{
  "settings": {
    ...standard zt1 local.conf settings...
  },
  "controller": {
    "listenMode": (pgsql|redis|pubsub),
    "statusMode": (pgsql|redis|bigtable),
    "redis": {
      "hostname": ...,
      "port": 6379,
      "clusterMode": true
    },
    "pubsub": {
      "project_id": <gcp-project-id>
    },
    "bigtable": {
      "project_id": <gcp-project-id>,
      "instance_id": <bigtable-instance-id>,
      "table_id": <bigtable-table-id>
    }
  }
}
```
2025-09-02 14:06:24 -07:00
Grant Limberg a5bd262b3a Wiring through initialization of the CentralDB version of the controller
Still need to do the actual configuration from local.conf
2025-09-02 13:30:08 -07:00
Grant Limberg 4ddb1fbe58 Create the pubsub topic if it doesn't exist 2025-09-02 07:49:41 -07:00
Grant Limberg 195d5b47f0 Merge branch 'adam/1.16' into gl/ctl-pubsub 2025-09-01 16:47:55 -07:00
Grant Limberg 496e69e666 add def for new style controllers 2025-09-01 15:29:27 -07:00
Grant Limberg 0f63783592 remove rust-based pubsub 2025-09-01 14:55:16 -07:00
Grant Limberg db6e698245 rework the pubsub listener again so the subscription is set up on its own thread 2025-09-01 14:40:18 -07:00
Grant Limberg b114896e7b PubSub to gcloud-cpp library for simplicity's sake 2025-09-01 14:25:15 -07:00
Grant Limberg 17b48d78cb Merge branch 'dev' into gl/ctl-pubsub 2025-09-01 09:50:15 -07:00
Grant Limberg e347f895b8 add sleep at end of online notificaiton loop 2025-09-01 09:44:39 -07:00
Grant Limberg d119547a95 wire up status writers 2025-09-01 09:18:01 -07:00
Grant Limberg 85f23356a3 add a StatusWriter class hierarchy for writing member status updates
* Postgres Direct
* Redis
* BigTable
2025-08-28 17:03:59 -07:00
Grant Limberg 3187c2ffce clang format change (not applied project-wide yet) 2025-08-28 17:00:06 -07:00
Grant Limberg 9bdd564bdc spacing 2025-08-27 16:23:55 -07:00
Grant Limberg 7f3b15011e Update central controller build to use CMake + conda
Muuuuch easier to use external dependencies now

Also tried out conan and vcpkg.   Ran into dependency issues when solving for packages to install with conan.

vcpkg is just obtuse as all hell to install and not easy to integrate
2025-08-27 16:23:02 -07: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
Grant Limberg f8a4a5d6af rework protobuf messages
PubSub allows us to do schema validation, however it only allows one top level message at a time.  Move other sub-message declarations under the main message declaration so that we can enable schema validation in the pubsub stream directly
2025-08-25 15:09:10 -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 2833d0e4f4 make whether SSO is enabled a switchable config value 2025-08-20 17:07:56 -07:00
Grant Limberg 95224379aa Refactor Redis & Posgres notification listeners into listener subclass in new CentralDB class
This allows us to interchangeably use different listeners (pgsql, redis, pubsub) depending on configuration values passed into the constructor.
2025-08-20 17:04:28 -07: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 ebe8fdb08e rename classes 2025-08-20 10:07:13 -07:00
Grant Limberg c479cba71a Merge branch 'dev' into gl/cv1-os-arch 2025-08-20 09:38:09 -07:00
Grant Limberg 650fc0c74b Add C++ wrapper around pubsub listeners 2025-08-15 16:53:58 -07:00
Grant Limberg b90ad51723 more calling async from non-async changes 2025-08-15 08:22:55 -07:00
Grant Limberg 4237830a97 revert default feature list once again 2025-08-14 14:25:19 -07:00
Grant Limberg 4fab227c23 fix calling into async functions from non-async via the FFI 2025-08-14 14:20:34 -07:00
Grant Limberg e4147f7b80 fix build script 2025-08-14 13:00:11 -07:00
Grant Limberg d4ee95e445 feature cleanup 2025-08-14 12:51:22 -07:00
Grant Limberg a842ad8b61 remove ztcontroller from default feature list 2025-08-14 12:43:42 -07:00
Grant Limberg 3a209e2930 expose change_handler to C via FFI 2025-08-14 12:43:00 -07:00
Grant Limberg ccb0fa748f updates & tests.
Tests currently need to be run with --test-threads=1.  Seems like the instances of the pubsub emulator stomp on each other without that
2025-08-14 12:31:42 -07:00
Grant Limberg bf8c9d0124 function naming cleanup.
match other things already written
2025-08-13 12:25:36 -07:00
Grant Limberg 0e94891e5b plumb through callbacks 2025-08-13 12:17:03 -07:00
Grant Limberg 564d29e445 fix include 2025-08-12 10:52:25 -07:00
Grant Limberg 06b2ce9f30 WIP: pubsub wrapper in Rust 2025-08-12 10:42:07 -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
Grant Limberg f079f8bc82 cleanup warnings 2025-08-11 11:31:15 -07: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
Grant Limberg 837f15d01b tokio is needed by both temporal & gcloud pubsub, so make just one instance for the whole library, add init/shutdown functions for it exposed to C 2025-08-07 11:28:22 -07: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 4b3b847c7f fix windows bui ld 2025-08-05 16:38:57 -07:00
Grant Limberg a55216310a fix macos build 2025-08-05 16:18:21 -07:00
Grant Limberg 44d0e81572 gcloud-pubsub only if ztcontroller is flagged 2025-08-05 16:07:26 -07:00
Grant Limberg f9500ca5ff fix dependencies when temporal isn't needed 2025-08-05 16:05:51 -07:00
Grant Limberg e822811f29 reorganize rustybits into a single library with smeeclient behind the ztcontroller feature flag 2025-08-05 15:52:58 -07: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
464bca5d20 1.12.1 (#2112)
* 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.

---------

Co-authored-by: Joseph Henry <joseph.henry@zerotier.com>
Co-authored-by: Grant Limberg <grant.limberg@zerotier.com>
2023-08-25 19:03:03 -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
+6 0e5651f353 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>
2023-08-23 14:24:21 -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
a872cc3418 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>
2023-03-23 13:38:53 -04: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
1c5897895b 1.10.4 merge into main (#1893)
* 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

---------

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>
2023-03-07 16:50:34 -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
Grant Limberg dea47f601d more info on exception 2023-02-22 16:13:05 -08:00
travis laduke 67cf4c42d5 add note about forceTcpRelay 2023-02-21 09:15:18 -08:00
Adam Ierymenko dc762196dc 1.10.3 (#1875)
Version bumps and other release stuff to ship 1.10.3
2023-02-15 14:04:42 -05:00
Adam Ierymenko 0a900dc275 Add date to release notes
Add date
2023-02-15 14:04:02 -05:00
Joseph Henry 6f58510431 Update release notes (#1874) 2023-02-15 14:03:13 -05:00
Monica Moniot 666fb7ea2d eliminated duplicate paths (#1870) 2023-02-06 11:50:05 -08:00
dependabot[bot]andGrant Limberg f0778860e5 Bump tokio from 1.24.1 to 1.24.2 in /zeroidc (#1869)
* Bump tokio from 1.24.1 to 1.24.2 in /zeroidc

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>

* vendor tokio update

---------

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 <grant.limberg@zerotier.com>
2023-02-06 10:52:52 -08:00
dependabot[bot]andGrant Limberg 6aea546d6f Bump bumpalo from 3.10.0 to 3.12.0 in /zeroidc (#1857)
* Bump bumpalo from 3.10.0 to 3.12.0 in /zeroidc

Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.10.0 to 3.12.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.10.0...3.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* vendor bumpalo update to fix dependabot

---------

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 <grant.limberg@zerotier.com>
2023-01-30 09:03:01 -08:00
Joseph Henry e0a3291235 Fix setMtu() on Linux. Add error checking (#1860)
* Fix setMtu() on Linux. Add error checking

* Slightly tweak ioctl MTU error message
2023-01-26 10:26:12 -08:00
Joseph Henry b88d7091c8 Simplify dump command. Fix bond list command 2023-01-20 13:54:04 -08:00
zwf 15cfa3bf62 exclude static route with via ip in route helper (#1791)
When adding Routes to zerotier's Managed Routes, the helper will
add a route rule to the device that does not have a via ip,
so that the address of the Destination segment cannot be routed
correctly within the container.
Here, based on the contents of the routes key in
`zerotier-cli -j listnetworks`,
by determining whether the via key has an ip address,
if it is not null, helper will no longer add route rules.
2023-01-20 11:57:13 -08:00
Gleb Mazovetskiy 9c9d1650d1 Check for ARM Cryptography Extension support
ARM Cryptography Extension is optional and not all ARM CPUs support it.
For example, the CPU in Raspberry Pi 4 does not support it.

Check for `__ARM_FEATURE_CRYPTO` before attempting to use the optional
extension.

`__ARM_FEATURE_CRYPTO` is defined by both clang and gcc when the target
has the cryptography extension.

Fixes #1854.
2023-01-20 09:29:09 +01:00
Grant Limberg 0ae09577f6 Client & Central Controller updates to support additonal OIDC features (#1848)
Client side:
* Fix compatibility with OneLogin
* Requested scopes vary by OIDC provider. Different providers have different

Controller side:
*Update Postgres queries to latest Central schema
* Added Central Controller support for the different providers
* Base OIDC provider details are still attached to an org. Client ID & group/email lists are now associated with individual networks.
2023-01-19 15:39:15 -08:00
Brenton Bostick a59f82093a Fix Possible misuse of comma operator here (#1851)
Xcode warns about "Possible misuse of comma operator here".
Comma is a sequencing operator in C++ and original code does work, but
is highly non-idiomatic.
2023-01-17 12:38:10 -05:00
Brenton Bostick be95b56c10 fix typos (#1846) 2023-01-13 10:14:57 -05:00
Sean OMeara ea0f7dde95 removing pull_request builds from workflow 2023-01-13 14:15:02 +01:00
Grant Limberg a59626c971 Bump zeroidc dependencies (#1847)
openidconnect -> 2.5
base64 -> 0.21
url -> 2.3
bytes -> 1.3
2023-01-12 13:24:58 -08:00
Sean OMeara 67a7534c21 cargo update tokio >= 1.24 (#1842) 2023-01-12 12:41:29 -08:00
Joseph Henry 39f3f5b2d9 User-configurable physical MTU for individual links
This patch allows users to specify the physical layer MTU for individual links
when in multipath mode. For example:

{
  "settings":
  {
    "defaultBondingPolicy": "custom-balance-xor",
    "policies":
    {
      "custom-balance-xor":
      {
        "basePolicy": "balance-xor",
        "failoverInterval": 5000,
        "links": {
          "weird_5g_link": { "mtu": 1300 },
          "enp5s0": { "mtu": 1400  }
        }
      }
    }
  }
}
2023-01-12 07:12:19 +01:00
Joseph Henry eccc31a4b9 Add forced TCP relay mode
This patch implements a "TUNNELED" status indicator and "forceTcpRelay" setting for custom relays via local.conf.

For example:

{
  "settings":
  {
    "tcpFallbackRelay": "6.79.53.215/443",
    "forceTcpRelay":true
  }
}
2023-01-12 07:12:19 +01:00
Brenton Bostick d31f238be0 fix typos (#1843) 2023-01-11 19:42:30 +01:00
Sean OMeara 27c26a77a2 running build workflow on pull_requests 2023-01-07 21:28:12 +01:00
Adam Ierymenko ab503902c8 Merge pull request #1825 from zerotier/windows-allow-ping
enable ICMPv4 in windows firewall
2023-01-04 11:49:26 -05:00
Adam Ierymenko ed53b62f1b Merge pull request #1827 from zerotier/default-route-mac2
Prevent shadowing VM routes as default route (macOS)
2023-01-04 11:48:54 -05:00
Adam Ierymenko ad5ba54cd4 Merge pull request #1820 from zerotier/dev-low-bandwidth
Low Bandwidth Mode (for IoT)
2023-01-04 11:48:15 -05:00
travis laduke a6742b7f82 Prevent shadowing VM routes as default route (macOS)
If you have a VM host like parallels, sometimes you get these link-local
default routes:

```
netstat -nrfinet | grep "default\|\/1"
0/1                10.2.0.12          UGScg        feth4823
default            192.168.82.1       UGScg             en1
0/1                192.168.82.1       UGScIg            en1
default            link#22            UCSIg       bridge101      !
128.0/1            10.2.0.12          UGSc         feth4823
128.0/1            192.168.82.1       UGScI             en1
```

(the link#22 one)

The _getRTEs function inclused these routes in the list it makes as like:

device: bridge101, target: 0.0.0.0/0

If it happens to be first in the list, bridge101 gets
selected as the default route.

Then Full Tunnel Mode doesn't work.

The other routes in the list are like:
device: en1 target: 192.168.1.0/24 via:  metric: 0 ifscope: 0
device: en1 target: 192.168.1.1/32 via:  metric: 0 ifscope: 0

We only need the device name from this, so either one will work.
2022-12-23 16:18:00 -08:00
Joseph Henry 91bae4b1a8 Add missing default initialization of _lowBandwidthMode 2022-12-22 10:08:02 -08:00
travis laduke 4959d8079b enable ICMP in windows firewall 2022-12-21 15:38:46 -08:00
Sean OMeara a558bd9312 cache cago on github actions (#1819) 2022-12-14 19:10:08 +01:00
Sean OMeara 3e41163bbe fixing windows github builds (#1818) 2022-12-14 11:52:30 +01:00
Sean OMeara 10170b41c3 Revert "Improve default route on macOS (#1680)"
This reverts commit 117d7194af.
2022-12-13 18:32:07 +01:00
Sean OMeara e0e91e8397 disabling windows builds 2022-12-13 17:20:52 +01:00
Sean OMeara d2de0292cc mac and windows github builds (#1817) 2022-12-13 16:49:08 +01:00
Sean OMeara 0210ba9c13 enabling mac and windows github builds 2022-12-13 16:16:17 +01:00
Travis LaDuke 117d7194af Improve default route on macOS (#1680)
re: issue #1088
and probably: https://discuss.zerotier.com/t/default-route-issue-osx-monterey-m1/6974

// current zerotier.
// allow default adds two sets of routes.
```
netstat -rnfinet | grep "/1\|default" | sort
0/1                10.2.0.2           UGScg        feth4823
0/1                192.168.82.1       UGScIg            en7
128.0/1            10.2.0.2           UGSc         feth4823
128.0/1            192.168.82.1       UGScI             en7
default            192.168.82.1       UGScg             en7
```

Then, something chaotic happens eventually, and networking stops working.

// after patch
```
netstat -rnfinet | grep "/1\|default" | sort
0/1                10.2.0.2           UGScg        feth4823
128.0/1            10.2.0.2           UGSc         feth4823
default            192.168.82.1       UGScg             en7
```

After the change, I can still:
- use default route
- route to other subnets

I tested on high sierra through monterey
and on freebsd13.1
2022-12-13 11:52:21 +01:00
Sean OMeara 7587ef5136 basic builds on github (#1815)
Initial Github Actions build
2022-12-12 09:44:31 +01:00
Joseph Henry 087a797257 Merge pull request #1808 from zerotier/dev-tcp-proxy
Dig tcp-proxy out of the git history
2022-12-07 09:40:42 -08:00
Grant Limberg a02f42188c Merge pull request #1811 from zerotier/cleanup/typos
Cleanup/typos
2022-12-07 08:33:12 -08:00
Brenton Bostick 98e0bf22d3 fix actual typo in config key code 2022-12-07 10:23:11 -05:00
Brenton Bostick 1e2ff042b4 fix typos in docs, comments, and strings 2022-12-07 10:17:53 -05:00
travis laduke b8eb9196e8 update tcp-relay README 2022-12-06 11:49:12 -08:00
travis laduke db1df58955 resurrect tcp proxy 2022-12-06 11:49:12 -08:00
Brenton Bostick 2f5dc10399 Fix syntax error (#1806)
Similar previous fix:
https://github.com/zerotier/ZeroTierOne/commit/668ab8b85c169648141d961566f183cf71ae6fa6
2022-12-05 13:33:00 -08:00
Joseph Henry 4100615cd6 Merge branch 'dev' into dev-low-bandwidth 2022-12-05 13:26:57 -08:00
Joseph Henry e27c3edaba Merge branch 'dev' into dev-low-bandwidth 2022-12-05 13:23:04 -08:00
Joseph Henry 3c9ea2b667 Add low-bandwidth mode 2022-12-05 13:21:05 -08:00
Grant Limberg 065f42af1d Merge pull request #1807 from zerotier/cleanup/typos
fix typos
2022-12-05 08:34:53 -08:00
Grant Limberg 1d503f45ad Merge pull request #1805 from zerotier/update/bad-file-descriptor
Update/bad file descriptor
2022-12-05 08:33:12 -08:00
Brenton Bostick 5b5f9a069a fix typos 2022-12-05 11:29:21 -05:00
Brenton Bostick 77c7f9133f Migrate from ndk-build to CMake 2022-12-05 10:34:12 -05:00
Brenton Bostick 475281935e Remove unused flags for arm64-v8a
Through using ndk-build, -Wno-unused-command-line-argument is passed in
somewhere in the pipeline and hides this warning.

The warning can be turned on with:
APP_CPPFLAGS := -Wunused-command-line-argument ...

and then when building, you can see:
C/C++: clang++: warning: argument unused during compilation: '-mfloat-abi=softfp' [-Wunused-command-line-argument]
C/C++: clang++: warning: argument unused during compilation: '-mfpu=neon' [-Wunused-command-line-argument]
C/C++: clang++: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument]

These are unused because both floating-point and NEON are required in
all standard ARMv8 implementations. [1] [2]

[1] https://developer.arm.com/documentation/den0024/a/AArch64-Floating-point-and-NEON

[2] https://stackoverflow.com/a/29891469
2022-12-05 10:34:12 -05:00
Brenton Bostick cdf248b1e2 Fix build problem related to unified headers
Since NDKr15 (released 2017), unified headers are used by default [1]

Remove -isystem option that was passing bad values to command-line.

The actual value being passed to command-line was:
```
-isystem DK/sysroot/usr/include/RIPLE
```

because of using $NDK and $TRIPLE instead of $(NDK) and $(TRIPLE)

But regardless, $NDK and $TRIPLE were never actually defined values and were just
place-holders mentioned in [1]

[1] https://android.googlesource.com/platform/ndk/+/ndk-release-r16/docs/UnifiedHeaders.md
2022-12-05 10:34:12 -05:00
Joseph Henry 85c0322313 Fix TCP relay setting 2022-12-01 15:12:54 -08:00
Adam Ierymenko ebc1ed4015 Hide warning about readdir_r for now. 2022-12-01 11:07:20 -05:00
Adam Ierymenko a25da7f771 Merge pull request #1799 from zerotier/cleanup/suggest-braces
Fix warning: suggest braces around initialization of subobject
2022-12-01 11:03:26 -05:00
Adam Ierymenko c78f103ca6 Merge pull request #1800 from zerotier/cleanup/printf-z
Fix several warning: format specifies type 'XXX' but the argument has…
2022-12-01 11:03:11 -05:00
Brenton Bostick 4d50ed0b9d Fix several warning: format specifies type 'XXX' but the argument has type 'YYY'
Use %z for printing size_t and PRId64 etc. macros for printing
platform-specific widths, and remove now-redundant casts
2022-12-01 08:42:06 -05:00
Brenton Bostick 9ac2cfe611 Fix warning: suggest braces around initialization of subobject 2022-12-01 08:35:31 -05:00
Sean OMeara 85da0b419c drone config 2022-11-30 11:01:02 +01:00
Brenton Bostick 3ddaa60de9 prevent: warning: unused variable 'gotViaProc' (#1797) 2022-11-29 17:55:33 +01:00
Grant Limberg 25641d956e Merge pull request #1795 from zerotier/bugfix/typos
Bugfix/typos
2022-11-28 08:58:27 -08:00
Brenton Bostick 3b8c33d49a fix typos in code 2022-11-28 09:23:58 -05:00
Brenton Bostick f74a594e98 fix typos in comments and strings 2022-11-28 09:23:45 -05:00
Sean OMeara 668ab8b85c fixing Makefile for armv6k (#1790) 2022-11-19 22:59:55 +01:00
Joseph Henry 98b190c626 Minor adjustment to packaging README 2022-11-14 15:25:50 -08:00
Grant Limberg 9568a4f2b4 netinet6/in6_var.h not available in iOS 2022-11-10 11:35:34 -08:00
Grant Limberg b41e0910b0 Fun times in ~~cleveland~~ NDK-land 2022-11-09 11:11:10 -08:00
Joseph Henry 6448189d20 Update snap upload target 2022-11-09 08:52:55 -08:00
Joseph Henry 1694d510ec Update snap build target 2022-11-08 16:50:42 -08:00
Adam Ierymenko af7ccff846 Merge branch 'dev' of github.com:/zerotier/ZeroTierOne into dev 2022-11-04 11:15:13 -04:00
Adam Ierymenko 381460fd97 Merge pull request #1736 from visuve/dev
Fix service installation MAX_PATH bug on Windows
2022-11-04 11:14:49 -04:00
Joseph Henry b02a41751c Fix unresponsiveness when moving flows in balance-aware (See #1764) 2022-11-02 08:46:11 -07:00
Adam Ierymenko e0acccc3c9 release notes 2022-11-01 16:08:52 -04:00
Adam Ierymenko bcf27d78e5 Merge branch 'dev' of http://10.95.0.64/zerotier/ZeroTierOne into dev 2022-11-01 15:56:44 -04:00
Adam Ierymenko ad54d0ed52 1.10.2 bump in Advanced Installer 2022-11-01 15:56:36 -04:00
Joseph Henry 880a99adf8 Minor edits to comments 2022-10-25 14:17:23 -07:00
Joseph Henry 3b11915eab Merge remote-tracking branch 'origin/expose-surface-addresses' into dev 2022-10-25 13:55:21 -07:00
travis laduke 82c799b9d1 Expose surface addresses in info json
Surface Addresses are the addresses that
the roots report back to you.

This is helpful for trouble shooting.

If you're behind NAT, the source port is different
than what zerotier is bound to.
If the list of surface address ports is larger than the list of
bound addresses, you are probably behind symmetric NAT.

Anways this can be added to later with a more simple
"easy" or "hard" nat computed message somewhere.
2022-10-25 11:25:21 -07:00
Adam Ierymenko 99c0ca621b 1.10.2 bump 2022-10-13 09:01:14 -04:00
Joseph Henry e1f60e3f83 Behavioral changes to multipath balance modes (See: #1745 and #1753) 2022-10-09 23:07:16 -07:00
Adam Ierymenko 5a6c229b27 Merge branch 'dev' of github.com:/zerotier/ZeroTierOne into dev 2022-10-06 16:54:00 -04:00
Adam Ierymenko 86a436e9bf Small string fix. 2022-10-06 16:53:35 -04:00
Grant Limberg 7516fd03a3 central controller docker image updates 2022-10-06 09:00:55 -07:00
Grant Limberg 9826c20d1a set zeroidc.running = false on token exchange error 2022-10-06 09:00:51 -07:00
Sean OMeara 12392b5190 adding amzn2022 to rpm spec (#1761) 2022-10-02 09:58:23 +02:00
Grant Limberg 4e57abb159 Revert "modify sso queries for schema change"
This reverts commit 8b67d06272.
2022-09-28 13:26:41 -07:00
Grant Limberg 2b1ba60f24 Optimize member load query for Central controllers 2022-09-28 13:10:34 -07:00
Grant Limberg 638c868a07 Revert "query update for sso"
This reverts commit 3c343eb775.
2022-09-28 13:04:08 -07:00
Grant Limberg b909330518 Revert "bump min db version"
This reverts commit 802072ec17.
2022-09-28 13:03:41 -07:00
Grant Limberg 802072ec17 bump min db version 2022-09-27 14:21:20 -07:00
Grant Limberg 3c343eb775 query update for sso 2022-09-27 13:41:52 -07:00
Grant Limberg 8b67d06272 modify sso queries for schema change 2022-09-21 14:29:47 -07:00
Joseph Henry bc521504ca Improved multipath link monitoring 2022-09-20 14:27:34 -07:00
Joseph Henry 0797adf223 Improve output of bond list command 2022-09-16 13:43:34 -07:00
Joseph Henry 718039561e Merge branch 'grapexy-dev-1734-policy-defaults' into dev 2022-09-15 16:06:00 -07:00
Joseph Henry 85698860ae Merge branch 'dev-1734-policy-defaults' of https://github.com/grapexy/ZeroTierOne into grapexy-dev-1734-policy-defaults 2022-09-15 16:05:21 -07:00
Joseph Henry 50e131a4ff Partial fix for discrepancy between docs and implementation 2022-09-15 15:56:23 -07:00
grapexy b733bb8ead Fix sanity checks overwriting custom policy parameters 2022-09-16 00:18:05 +04:00
Joseph Henry e18d206248 Add warm spare feature for balance modes 2022-09-14 10:09:29 -07:00
Grant Limberg 2248b1f846 re-add ci failure notifications 2022-09-13 12:34:19 -07:00
Grant Limberg 58e19e86f4 update dockerfile.release 2022-09-13 12:23:51 -07:00
Sean OMeara 04d1862e3a using sid for push builds 2022-09-13 14:41:49 +02:00
Sean OMeara 7ecfc37854 using sid for push builds 2022-09-13 14:41:43 +02:00
Sean OMeara 21d7806064 untrying Amazon Linux 2022 2022-09-13 14:40:55 +02:00
Sean OMeara c5b2d6cbc8 untrying Amazon Linux 2022 2022-09-13 14:40:36 +02:00
Sean OMeara 75c7e501ef trying Amazon Linux 2022 2022-09-13 14:13:53 +02:00
Sean OMeara dba0931b58 trying Amazon Linux 2022 2022-09-13 14:13:35 +02:00
Sean OMeara e0a7d6bfb9 tweaking 2022-09-12 18:02:21 +02:00
Adam Ierymenko add854d31b Merge pull request #1750 from zerotier/dev-dont-re-armor
Prevent re-armoring of packets when in multipath broadcast mode
2022-09-09 16:56:05 -04:00
Joseph Henry 66b70a8043 Prevent re-armoring of packets when in multipath broadcast mode 2022-09-07 15:03:02 -07:00
Joseph Henry 1d1843bf3b Forget links if QoS verbs fail to arrive 2022-09-07 09:08:13 -07:00
Joseph Henry 0e23ba8f1a Add logic short-circuit to avoid unnecessary bond rebuild logic when appropriate 2022-09-01 15:16:21 -07:00
Joseph Henry b6074da498 Fix nonsensical equality comparison which may prevent certain links from being regarded as preferred in multipath scenarios 2022-08-29 16:03:48 -07:00
Anders Jenbo 7e92d478a1 Add missing <algorithm> include (#1709)
This is required for building under VS2017
2022-08-29 10:39:04 -07:00
Grant Limberg a9ec057b91 Modify Dockerfile.release to support multi-arch builds 2022-08-23 12:59:52 -07:00
Grant Limberg 64a5e0d93f sso error handling 2022-08-15 14:26:24 -07:00
visuve 378e4ea34e Fix service installation MAX_PATH bug on Windows
- On newer Windows, a path might hold up to 32,767 characters
  - https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
- The previous installation did not also check for ERROR_INSUFFICIENT_BUFFER which could lead to an ill formatted path
2022-08-10 17:08:51 +03:00
Joseph Henry ff670d044a Fix integer format specifier compiler warnings 2022-08-09 21:19:16 -07:00
DQandDaniel Quinlan fac212fafa Synology Docker: update entrypoint.sh (#1704)
* update entrypoint.sh

- propagate TERM/QUIT/INT signals
- add some basic logging
- check for unbound variables
- update "route helper"
   - run as subshell, exit if zerotier-one is unavailable so pod can be restarted
   - only call `zerotier-cli` once, avoids race conditions
   - only add default routes if allowDefault is enabled for that network
   - add some more error handling
   - sleep after all networks are processed

* switch to polling ZT service at startup

Co-authored-by: Daniel Quinlan <dq@chaosengine.net>
2022-07-15 11:03:20 -05:00
Adam Ierymenko e83c7e6691 Merge branch 'dev' of github.com:/zerotier/ZeroTierOne into dev 2022-07-05 19:38:03 -04:00
Adam Ierymenko e0c4877d76 Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev 2022-07-05 19:37:55 -04:00
Adam Ierymenko 457b5d2fe8 Windows build fixes, advanced installer upgrade 2022-07-05 19:37:33 -04:00
Grant Limberg 9cf8dacfbb don't crash out of the controller heartbeat loop here 2022-06-30 11:40:04 -07:00
Grant Limberg b5d7d71e1e use connection pool instead of new connection for member status writes
redis plus plus has an annoying feature where it will open a new
connection for each tx or pipeline by default, rather than just fetching
an existing connection from the pool.  Let's change that
2022-06-30 09:59:47 -07:00
Grant Limberg 6fdc7be502 redis connection pool tuning 2022-06-29 09:39:51 -07:00
Grant Limberg 8fe858c5c6 remove old unused CI stuff 2022-06-28 12:32:47 -07:00
Grant Limberg 0d7197381a exit here on error 2022-06-28 09:28:35 -07:00
Adam Ierymenko 651f45fe29 Merge branch 'dev' of http://10.95.0.64/zerotier/ZeroTierOne into dev 2022-06-27 17:13:57 -04:00
Adam Ierymenko 02270e0e3d Linux build fixes... may need to be reverted for new Drone CI but needed for old environment 2022-06-27 17:13:52 -04:00
Adam Ierymenko cb692d73c8 1.10.1 version bumps 2022-06-27 17:05:47 -04:00
Grant Limberg 1300cf23c5 Use fixed copy of JWT library until upstream merges 2022-06-27 10:44:33 -07:00
Grant Limberg 3cb24410a8 yay case insensitive filesystems 2022-06-24 10:21:13 -07:00
Grant Limberg be7ce4110e Revert "Delete and re-add libpqxx-7.7.3 due to weird corruption."
This reverts commit e96515433d.
2022-06-24 10:12:36 -07:00
Grant Limberg c07e4a8c01 Revert "Re-add..."
This reverts commit b1faebae4a.
2022-06-24 10:11:57 -07:00
Grant Limberg ff8da9d246 Play with online notification timing again 2022-06-24 10:03:30 -07:00
Adam Ierymenko b1faebae4a Re-add... 2022-06-23 13:24:33 -04:00
Adam Ierymenko e96515433d Delete and re-add libpqxx-7.7.3 due to weird corruption. 2022-06-23 13:21:13 -04:00
Grant Limberg 5a8d2c3cb4 Set running flag to false if falling out of oidc run loop 2022-06-22 17:36:24 -07:00
Grant Limberg 183a9d7088 update controller image and some dependencies 2022-06-22 15:03:19 -07:00
Grant Limberg c1384422c3 just sleep 1 second 2022-06-22 10:58:23 -07:00
Grant Limberg ccc0ebd0f9 don't spam the logs quite as much on first startup
sleep the thread 1 second every round until we're actually updating
members
2022-06-22 10:42:51 -07:00
Grant Limberg 9d4336d296 redis connection tuning 2022-06-22 10:30:58 -07:00
Grant Limberg 17bc9d3085 redis thread now uses this_thread::yield() 2022-06-22 10:07:55 -07:00
Grant Limberg 436f481a34 fix log line 2022-06-22 10:01:07 -07:00
Grant Limberg 9e8215b213 adjust sleep between onlineNotification runs. Added timer to output 2022-06-22 09:43:09 -07:00
Grant Limberg e958a83dd4 update central controller docker startup script 2022-06-22 09:25:15 -07:00
Grant Limberg f44b122262 pg_isready can use SSL 2022-06-21 14:40:24 -07:00
Adam Ierymenko 26d1cf9186 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-06-20 16:35:24 -04:00
Adam Ierymenko 895ee77c38 Commented out code to generates some AES-GMAC-SIV test vectors that are now part of the Rust code base to make sure it works right. 2022-06-20 16:35:17 -04:00
Grant Limberg caf8b15f6d Merge pull request #1701 from tossp/sql2
fix sql
2022-06-19 18:09:28 -07:00
TossPig bc7f18064f fix sql
bind message supplies 17 parameters, but prepared statement "" requires 16
2022-06-20 05:59:13 +08:00
Grant Limberg 355d3f44fb logging & redis standalone fix 2022-06-16 11:52:35 -07:00
Grant Limberg 9de863e68b update controller db record 2022-06-16 10:50:07 -07:00
Grant Limberg 64b7f8e445 quiet down logs more 2022-06-15 16:58:11 -07:00
Grant Limberg 626f488cb4 quiet down the controller logs a smidge 2022-06-15 16:58:07 -07:00
Grant Limberg 10212e376a more redis in the controller 2022-06-15 16:58:04 -07:00
Joseph Henry 81462cd530 Add snapcraft login step for future CI/CD 2022-06-15 11:06:16 -07:00
Joseph Henry 7d4e4ac646 Update snapcraft 2022-06-14 15:20:42 -07:00
Grant Limberg 0ed339f19d make sure value here is true, not just that the env var is set 2022-06-13 15:44:35 -07:00
Grant Limberg c6fc3560f2 Merge branch 'dev' into redisrection 2022-06-13 13:09:36 -07:00
Adam Ierymenko b4cec0b4a8 1.10.0 2022-06-13 14:18:54 -04:00
Grant Limberg d7030b6e9c html & unicode -> svg for sso logo 2022-06-08 16:17:28 -07:00
Joseph Henry 7ed5bde426 Fix for ab-mode link failure, QoS metrics (WIP) 2022-06-08 10:01:54 -07:00
Adam Ierymenko 75652ce667 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-06-08 12:43:57 -04:00
Adam Ierymenko 91f801ee72 Merge branch 'dev' of http://10.95.0.64/zerotier/ZeroTierOne into dev 2022-06-08 12:43:13 -04:00
Adam Ierymenko c6f567ae4a openssl11-devel does not exist on CentOS 7 2022-06-08 12:42:43 -04:00
Grant Limberg e1ca3c995d this should not be quoted 2022-06-08 09:26:37 -07:00
Adam Ierymenko addc327f17 More blanket ignores. 2022-06-08 12:21:11 -04:00
Adam Ierymenko f2c12d548d More blanket gitignores messing up vendored deps. 2022-06-08 12:19:40 -04:00
Adam Ierymenko ef36acb970 Fix vendored files. 2022-06-08 12:16:09 -04:00
Adam Ierymenko d5ca4e5f52 RPM build fix (reverted CI changes which will need to be un-reverted or made conditional) and vendor Rust dependencies to make builds much faster in any CI system. 2022-06-08 07:32:16 -04:00
Adam Ierymenko 373ca30269 1.10.0 release notes. 2022-06-07 13:53:12 -04:00
Adam Ierymenko 0d9d3a90de Revise README. 2022-06-07 13:10:34 -04:00
Adam Ierymenko 363481b0f1 1.10.0 installer for Windows 2022-06-07 12:52:50 -04:00
Adam Ierymenko 38058450ce Revise Windows build to VS2022. 2022-06-06 19:33:35 -04:00
Adam Ierymenko e672dc8094 Set version to correct 1.10.0. 2022-06-06 16:18:50 -04:00
Adam Ierymenko c6682f2a3f Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-06-03 16:12:40 -04:00
Adam Ierymenko 4508a6687e Version bump. 2022-06-03 15:42:06 -04:00
Joseph Henry a47c3cb16f Exclude temporary IPv6 check from SDK builds 2022-06-01 14:24:28 -07:00
Joseph Henry 9b42ced27f Tweak DSM7 docker build target 2022-05-31 12:48:52 -07:00
Joseph Henry 1a400d33fd Fix link creation bug in active-backup mode 2022-05-18 10:04:53 -07:00
Joseph Henry 96ee7252c2 Update README.md 2022-05-16 13:08:01 -07:00
Grant Limberg b0624d3fd1 Merge branch 'inja' into dev 2022-05-16 12:26:42 -07:00
Grant Limberg c329fab966 add isError to sso template variables 2022-05-16 09:25:36 -07:00
Sean OMeara 127c19fecd betterized rpm spec and ci scripts 2022-05-14 13:29:42 +02:00
Grant Limberg 4c22793850 Embed default template in service 2022-05-13 16:18:34 -07:00
Grant Limberg da74b9651c Wire up inja for html template processing 2022-05-13 15:55:48 -07:00
Grant Limberg ce23a8dd32 update bsd makefile 2022-05-13 11:51:01 -07:00
Grant Limberg 30d106766a Windows project changes for inja 2022-05-13 11:50:46 -07:00
Grant Limberg c4df88354b updates for macOS for inja support 2022-05-13 09:51:37 -07:00
Grant Limberg b65c1ed3a0 Add inja
Requries update to C++17 standard
2022-05-13 09:34:15 -07:00
Grant Limberg b329fb68a9 Cleanup rust-analyzer warnings 2022-05-12 21:04:16 -07:00
Grant Limberg da179d9930 Clean up error flow for sso
error messages can now propagate to the user's browser
2022-05-12 17:00:43 -07:00
Grant Limberg e7fee4c6ce code cleanup 2022-05-11 22:41:35 -07:00
Grant Limberg 4151749dc9 Handle sso token exchange errors in zerotier client 2022-05-11 19:59:58 -07:00
Grant Limberg aee9521c91 Add error handling for over sso seat limits 2022-05-11 19:43:29 -07:00
Adam Ierymenko 7e46c83592 1.8.10 2022-05-10 13:45:12 -04:00
Sean OMeara ba74abb753 pull latest sid builder 2022-05-10 18:31:09 +02:00
Grant Limberg 9ddc0327d4 enable redis member status again 2022-05-10 08:36:39 -07:00
Joseph Henry c34325fee7 Fix attribute placement for debugging functions (#1587) 2022-05-06 17:25:15 -07:00
Joseph Henry db8443ef7d Remove attributes causing build failures on various platforms (#1587) 2022-05-06 15:19:59 -07:00
Joseph Henry 6c85f8c7a7 Safely handle disappearing bonded interfaces (See issue #1587) 2022-05-06 14:59:34 -07:00
David Baird eea93d2607 Fix SEGV caused by format string on 32-bit platforms / armv7l, reported in #1587 (#1658)
Looks great. Thanks for this!
2022-05-06 09:11:47 -07:00
Joseph Henry e9f8ecbf7e Properly initialize active-backup path index as partial fix for #1587 2022-05-04 09:51:48 -07:00
Grant Limberg 48852e8cb4 add ZT_SSO_ENABLED=1 to preprocessor definition list in Visual Studio
fixes sso not working
2022-05-03 14:39:08 -07:00
Joseph Henry 55ec325961 Add localSocket to listpeers JSON output 2022-04-28 15:58:12 -07:00
Grant Limberg 59151fbf86 remove max count for xread 2022-04-28 13:10:07 -07:00
Grant Limberg 1c700b7b41 Fix redis cluster usage 2022-04-28 13:05:02 -07:00
Grant Limberg ff18bacd94 fix XREAD commands for redis message queue 2022-04-28 11:16:45 -07:00
Joseph Henry caf1de3bcf Allow TCP fallback when multipath is enabled 2022-04-28 11:12:04 -07:00
Joseph Henry a9ad2924ac Re-add user-configurable TCP fallback 2022-04-28 11:05:54 -07:00
Adam Ierymenko 7ea2354540 Merge branch 'master' of github.com:zerotier/ZeroTierOne 2022-04-27 17:10:19 -04:00
Adam Ierymenko 760bba67e7 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-04-27 14:12:10 -04:00
Adam Ierymenko 1fe3a4402d 1.8.9 Windows installer stuff 2022-04-27 14:11:48 -04:00
Adam Ierymenko 166c7978ee ALMOST compiles for ARM64 Windows, only remaining barrier is ring in zeroidc. 2022-04-27 12:19:42 -04:00
Joseph Henry 4f80e79886 Add QNAP build scripts 2022-04-26 15:04:19 -07:00
Adam Ierymenko b47a2c9ac5 Forgot to bump Debian version. 2022-04-26 17:38:57 -04:00
Joseph Henry 1a5274b86b Add Asustor build scripts 2022-04-26 08:33:48 -07:00
Joseph Henry 66236e91a2 Style fix 2022-04-26 08:26:45 -07:00
Joseph Henry 36475aebc7 Merge branch 'erikh-fix-cargo-root' 2022-04-25 20:39:22 -07:00
Joseph Henry acd1f24a3f Add Western Digital apkg build scripts 2022-04-25 17:47:58 -07:00
Joseph Henry a74532fa0b Move Snap and Synology packaging to new pkg dir 2022-04-25 17:47:15 -07:00
Erik Hollensbe 59d4aef7c2 Fix cargo home directory (was previously hard-coded to /root)
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-04-25 15:52:39 -07:00
Adam Ierymenko dfb291090d release notes 2022-04-25 17:09:14 -04:00
Grant Limberg dac32f863e fix deadlock on sso network leave 2022-04-25 14:00:04 -07:00
Adam Ierymenko f3b56d3d94 More simplification of Debian control 2022-04-25 15:21:29 -04:00
Adam Ierymenko eb95a427fa 1.8.9 version bump 2022-04-25 13:24:24 -04:00
Joseph Henry f16299b10b Add credit line to release notes 2022-04-21 09:50:18 -07:00
Adam Ierymenko 76bce44280 Build fix. 2022-04-19 21:30:36 -04:00
Adam Ierymenko ee0a194b25 Several more SSO/OIDC related fixes, and bump version to 1.8.9. 2022-04-19 21:29:11 -04:00
Adam Ierymenko ef08346a74 Fix a possible excessive memory use issue in controller and clean up a bunch of COM handling and other code in the normal node. 2022-04-19 19:59:54 -04:00
Adam Ierymenko fe0068da52 A bit more auth cleanup in the local node. 2022-04-19 16:34:46 -04:00
Adam Ierymenko cd70fefc5e Clean up some credential push stuff. 2022-04-19 16:06:53 -04:00
Adam Ierymenko 877f86a896 build fix 2022-04-19 12:44:18 -04:00
Adam Ierymenko 912036b260 Push credentials always if updated (client-side) and some controller-side cleanup that should be logically irrelevant but will prevent unnecessary DB lookups. 2022-04-19 12:41:38 -04:00
Adam Ierymenko a4e8847664 Restore sending of rejections but move it exclusively to a thread, widen netconf window to 30 minutes. 2022-04-19 10:37:58 -04:00
Adam Ierymenko c492bf7eea Forgot to send error on v0 auth expiry. 2022-04-18 16:36:09 -04:00
Adam Ierymenko cb086ff97f Simplify SSO logic. SSO should just normally expire when it expires. No full deauth needed. Deauth is for really giving someone the boot. 2022-04-18 16:32:05 -04:00
Joseph Henry 7e4da53c0b Check reference to failover path before use in active-backup scenario 2022-04-17 21:03:57 -07:00
Adam Ierymenko fe376f6a1e Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-04-15 14:23:40 -04:00
Adam Ierymenko 55a99f34d0 Tighten certificate window and deprecate sending of revocations for ordinary SSO timeouts. Revocations should only be for deliberate deauth to kick people off networks. Cert window should now stay within refresh window for SSO so normal cert expiration should handle it just fine. 2022-04-15 14:23:26 -04:00
Joseph Henry 99df637aae Improve relationship between QOS timers and bucket sizes 2022-04-15 09:55:00 -07:00
Adam Ierymenko d0c68096df Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-04-15 12:46:48 -04:00
Grant Limberg 1c464c2da1 fix potential cstring leaks 2022-04-15 09:16:02 -07:00
Adam Ierymenko 5b15da98b4 Start of 1.8.9 release notes. 2022-04-15 11:58:21 -04:00
Adam Ierymenko d5a95f9224 Add SSO enable def to macOS 2022-04-14 20:57:35 -04:00
Adam Ierymenko a7dcfa18a2 Oops forgot last part of that fix for MAC errors. 2022-04-14 20:13:57 -04:00
Adam Ierymenko 4389b9feff Likely fix for invalid MAC problem. 2022-04-14 20:10:20 -04:00
Adam Ierymenko cf03996bf2 clangd stuff 2022-04-14 12:00:36 -04:00
Adam Ierymenko e1a3bd3a92 ignore .nova 2022-04-14 11:50:47 -04:00
Adam Ierymenko 58119598ae comment out some new deauth code 2022-04-13 23:10:11 -04:00
Adam Ierymenko 42a2afaef9 This may improve controller behavior with SSO and mixed SSO, needs testing! 2022-04-13 21:39:56 -04:00
Grant Limberg c2cfb4d1dc remove stray #endif 2022-04-13 17:47:56 -07:00
Adam Ierymenko f0b0172434 Merge branch 'master' into dev 2022-04-13 19:55:22 -04:00
Adam Ierymenko 8217cadc08 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-04-13 19:55:08 -04:00
Grant Limberg 6ad047a8fc Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-04-13 13:54:03 -07:00
Grant Limberg 23ef742e08 Fix for #1626
Port used for PortMapping was not properly randomized causing multiple clients on the same lan to request the same UPnP port, and not all routers handle this gracefully.

Also fixes issue where the portmapper wasn't started at all if a secondary port wasn't specified, or if the tertiary port was manually specified.
2022-04-13 13:53:42 -07:00
Joseph Henry 1294767b44 Fix ZT_SSO_SUPPORTED flag behavior. Allow disabling for embedded targets. 2022-04-13 10:05:49 -07:00
Erik Hollensbe eca645fc52 Merge pull request #1625 from erikh/prettify-entrypoint-output
prettify the entrypoint log output
2022-04-13 00:17:07 -07:00
Erik Hollensbe 8598f34ebf prettify the entrypoint log output
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-04-13 00:09:46 -07:00
Erik Hollensbe cade483a00 Merge pull request #1624 from erikh/silence-entrypoint-errors
silence catting files that don't exist in docker entrypoint
2022-04-12 23:58:00 -07:00
Erik Hollensbe df46248a0c silence catting files that don't exist in docker entrypoint
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-04-12 23:56:16 -07:00
Joseph Henry 6cddb94509 Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2022-04-12 17:46:13 -07:00
Joseph Henry 0e658828fb Add Synology Docker target to Linux makefile 2022-04-12 17:45:54 -07:00
Sean McAvoy de04240ca6 update alpine linux release to current supported (#1599) 2022-04-11 21:24:57 -07:00
fuowang 40681328ec Add loongarch64 support (#1614)
* add loongarch64 support
2022-04-11 20:33:40 -07:00
Joseph Henry 4dbdfb6972 Fix missing symlink and high CPU usage of route watchdog on Synology 2022-04-11 15:22:13 -07:00
Adam Ierymenko bd9c8d65ef Release notes for 1.8.8 2022-04-11 12:46:12 -04:00
Adam Ierymenko 24ec634005 Possible fix for Ubuntu versioning issue on libstdc++6 2022-04-11 12:28:14 -04:00
Adam Ierymenko ff0e6a53fc Release notes for 1.8.8 2022-04-11 12:16:32 -04:00
Adam Ierymenko ffb444dbeb 1.8.8 bump 2022-04-11 12:15:41 -04:00
Adam Ierymenko d6f32516d8 Merge branch 'master' of github.com:zerotier/ZeroTierOne into dev 2022-04-11 11:11:13 -04:00
Joseph Henry 29566bfe7d Add Synology target to Linux makefile 2022-04-10 22:50:53 -07:00
Erik Hollensbe 16d2b85c71 Merge pull request #1619 from altano/master
Add `zerotier-cli info` output to Docker logs
2022-04-08 22:09:32 -07:00
Alan Norbauer 193b357a0c Add zerotier-cli info output to Docker logs
When I first bring up the container, I want to know I'm approving the join request for the right node. I can get the node's ZT address by manually executing `zerotier-cli info` in the node (e.g. with `docker-compose exec zerotier zerotier-cli info`) but just having it in the logs to start with is very convenient.
2022-04-08 21:56:13 -07:00
Joseph Henry 8ee8870c27 Add Docker image and build script for DSM 7 2022-04-05 16:38:20 -07:00
Joseph Henry 3c59de7c00 Change directory structure for DSM packages 2022-04-05 15:27:35 -07:00
Joseph Henry e87bf87046 Remove unnecessary packages from Synology Dockerfile 2022-04-05 14:20:51 -07:00
Joseph Henry b4f7a9a4f4 Temporarily disable certain arch builds on Synology 2022-04-05 09:52:25 -07:00
Joseph Henry a360416655 Move Synology home-dir to /var/packages/zerotier/var 2022-04-05 09:51:35 -07:00
Joseph Henry 26dbebbba7 Add Synology packaging 2022-04-05 08:54:16 -07:00
Joseph Henry 04b77773c4 Remove Synology-specific IP add block 2022-03-31 22:01:50 -07:00
Joseph Henry 6f4a69703b Fix ZT_SSO_SUPPORTED flag behavior. Allow disabling for embedded targets. 2022-03-31 21:45:38 -07:00
Joseph Henry d67f59f5b5 Fix ARMv6 arch moniker 2022-03-31 09:43:06 -07:00
Joseph Henry 00d9abb612 Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2022-03-31 09:40:45 -07:00
Adam Ierymenko c8920cff19 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-03-30 15:51:33 -04:00
Adam Ierymenko 7293ba7d71 Merge branch 'master' into dev 2022-03-30 15:51:18 -04:00
Adam Ierymenko e73d7d9349 Merge branch 'master' of http://git.int.zerotier.com/zerotier/ZeroTierOne 2022-03-30 15:51:01 -04:00
Adam Ierymenko 0e3be9b837 1.8.7 2022-03-30 15:50:26 -04:00
Adam Ierymenko c600590aa6 Windows 1.8.7 installer config. 2022-03-29 19:36:56 -04:00
Adam Ierymenko 1343f15a07 Merge branch 'master' of http://git.int.zerotier.com/zerotier/ZeroTierOne 2022-03-29 14:28:12 -04:00
Grant Limberg 5fcaed086d another at->idt for exp 2022-03-29 11:09:50 -07:00
Grant Limberg 130689d82b remove extraneous debug log line 2022-03-29 11:09:14 -07:00
Grant Limberg 1efceb86fc get exp time out of correct token 2022-03-29 11:08:59 -07:00
Grant Limberg 1d92974447 auth0 compatibility 2022-03-29 11:07:44 -07:00
Grant Limberg de56f571c7 enable rfc3339 timestamps in oidc library for auth0 2022-03-29 11:07:30 -07:00
Grant Limberg 3670b8cefd another at->idt for exp 2022-03-29 10:33:27 -07:00
Grant Limberg 425f5201a2 remove extraneous debug log line 2022-03-29 10:03:34 -07:00
Grant Limberg df3b29e6ff get exp time out of correct token 2022-03-29 10:01:02 -07:00
Grant Limberg 96a49bf476 auth0 compatibility 2022-03-29 09:11:55 -07:00
Grant Limberg 2d975f275c enable rfc3339 timestamps in oidc library for auth0 2022-03-29 09:11:25 -07:00
Erik Hollensbe 76e30cf165 Merge pull request #1596 from erikh/docker-image-fixes
Fix dockerfile & entrypoint:
2022-03-24 10:53:52 -07:00
Erik Hollensbe da603208b4 Dockerfile: Reduce healthcheck interval to 1s (it's cheap)
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-03-23 18:17:21 -07:00
Erik Hollensbe 6dc7bdf72e Fix ^C issue
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-03-23 18:09:04 -07:00
Erik Hollensbe d52ebaa412 HEALTHCHECK operation
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-03-23 18:08:46 -07:00
Erik Hollensbe c30a1f60ea Join networks by touching a file
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-03-23 17:56:09 -07:00
Erik Hollensbe 2388c9f4e4 added additional informational messages to argument usage in zerotier docker image
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-03-23 17:40:28 -07:00
Erik Hollensbe f41372680d Fix dockerfile & entrypoint:
- Resolve issue with join not being checked properly for success without
  using external tools
- Resolve issue where initial boot was not being checked properly
- Now output errors when zerotier fails to start

closes #1581

cc @altano for inspiration for this patch

Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-03-23 17:40:28 -07:00
Adam Ierymenko 7efb1cf7d3 Bundle Edge WebView dependency EXE and statically link MSVC DLLs 2022-03-22 17:43:43 -04:00
Joseph Henry 0547fd3593 Merge branch 'master' of https://github.com/zerotier/zerotierone into dev 2022-03-21 19:51:53 -07:00
Adam Ierymenko 2800534445 1.8.7 2022-03-21 17:34:52 -04:00
Adam Ierymenko e464050a40 Merge branch 'master' of http://git.int.zerotier.com/zerotier/ZeroTierOne 2022-03-21 17:30:18 -04:00
Grant Limberg 73ec8cddd7 Show sso errors on the last step of the oidc process 2022-03-21 17:30:03 -04:00
Joseph Henry 1c171b5d99 Merge pull request #1589 from hcwhan/patch-1
Dockerfile version bump to 1.8.6
2022-03-15 09:52:55 -07:00
Joseph Henry 32f49b44b0 Modify snap to use pre-compiled static binaries 2022-03-15 09:44:46 -07:00
hcwhan e2d4571ade Dockerfile version bump to 1.8.6 2022-03-14 10:34:26 +08:00
Grant Limberg 3f19e7d73c Show sso errors on the last step of the oidc process 2022-03-10 13:08:35 -08:00
Adam Ierymenko 93076dde56 Fix merged OneService. 2022-03-10 15:57:15 -05:00
Adam Ierymenko 3e78785dea Merge OneService changes from master. 2022-03-10 15:50:01 -05:00
Adam Ierymenko 68c9398f71 Merge branch 'master' into dev 2022-03-10 15:48:47 -05:00
Adam Ierymenko 4b3a13797a Windows Advanced Installer stuff for 1.8.6 2022-03-10 15:45:33 -05:00
Adam Ierymenko 4a2c75a609 Release notes 2022-03-10 13:36:31 -05:00
Adam Ierymenko 34a64f30de Bump the peer cache serialization version due to path changes, will cause peers to be re-learned. Technically the peer cache is optional anyway so it's not going to break anything and should guard against weird issues due to path learning changes on restart. 2022-03-09 09:13:26 -05:00
Adam Ierymenko 4bdf0317c3 Forgot to version bump RH. 2022-03-08 15:18:57 -05:00
Adam Ierymenko 8624972d01 More 1.8.6 bumps. 2022-03-08 09:17:14 -05:00
Adam Ierymenko 6bfaaaa557 1.8.6 bump and add AutoReqProv:no for GitHub issue #1575 2022-03-07 14:06:12 -05:00
Adam Ierymenko b42c998095 Merge branch 'master' of github.com:zerotier/ZeroTierOne 2022-03-07 13:58:51 -05:00
Adam Ierymenko 56357c077b Merge pull request #1110 from neheb/patch-1
LinuxNetLink: Add cerrno header for (str)errno
2022-03-07 13:53:14 -05:00
Adam Ierymenko 3def00370e Merge pull request #1187 from rjsocha/win-service-description
Add description for Windows service
2022-03-07 13:52:41 -05:00
Adam Ierymenko e1a3285273 Update ServiceInstaller.cpp
Some very minor changes to this PR
2022-03-07 13:52:05 -05:00
Joseph Henry 59b392af10 Merge pull request #1572 from zerotier/configurable-tcp-proxy
make TCP fallback relay address configurable
2022-03-07 09:17:43 -08:00
Grant Limberg a8dde7b89b update JNI to add new status code 2022-03-04 14:28:25 -08:00
Grant Limberg ecde26c823 fix http return value from one service when nework list is empty 2022-03-04 12:35:11 -08:00
Adam Ierymenko 567969d33c 1.8.6 with a UI non-responsiveness fix. 2022-03-04 14:54:51 -05:00
Adam Ierymenko 544a4de1e0 Merge branch 'master' into dev 2022-03-03 18:35:05 -05:00
Adam Ierymenko c341bf6d8c Merge 2022-03-03 18:32:54 -05:00
Adam Ierymenko 297869163e Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2022-03-03 18:30:19 -05:00
Joseph Henry 3ead6b67cd Dynamically scale bonded link monitor frequency according to aliveness 2022-03-02 14:58:31 -08:00
Grant Limberg 3cbea6c898 make TCP fallback relay address configurable 2022-03-02 11:44:04 -08:00
Adam Ierymenko 1f73ab4b05 Debian lowest common denominator dependency for libssl. 2022-03-02 14:11:39 -05:00
Joseph Henry 8148c658cf Remove bonds for peers that have fully expired. Remove notion of bond health 2022-03-02 09:55:23 -08:00
Adam Ierymenko 15ddf28c6a Makefile fix for Linux. 2022-02-28 19:08:13 -05:00
Adam Ierymenko 16b5274963 Fix to selinux fix. 2022-02-28 16:10:44 -05:00
Grant Limberg f8e24f4629 Fix issue where restarting a controller causes a DB write for each network member 2022-02-28 12:26:32 -08:00
Joseph Henry 1cf8a1f493 More accurate accounting of bond layer overhead traffic 2022-02-25 15:04:48 -08:00
Joseph Henry bc2c4cf80a Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2022-02-25 11:39:21 -08:00
Joseph Henry 9933d83cf8 Merge pull request #1564 from zerotier/dev-whoami
Proactively seek, and distribute external surface addresses

This patch introduces a new "self-awareness" behavior which proactively queries peers for external surface addresses and distributes them via PUSH_DIRECT_PATHS. This has the effect of making ZT more responsive to interface changes.

Current behavior:

Previously, this type of information was only mediated via RENDEZVOUS and was only triggered when the client detected that it no longer had a single alive path to a peer. While PUSH_DIRECT_PATHS would correctly (and often) send local addresses, this was not the case for external addresses collected from response HELLOs. This would lead to situations where only one physical address would be distributed to peers. Additionally, if a new physical interface were to be made available to the client, the client would correctly bind to it but never seek information about its external mapping from a peer, and thus the new physical interface would remain unavailable for other peers to learn about until all paths on the previous interface have expired which can take a couple of minutes. In traditional usage of ZT this is not usually a problem, but it becomes a problem in the following scenarios:

    Network interfaces go up and down while ZT is running (e.g. switching to LTE or WiFi from a wired connection)
    Network interfaces are added or removed in multipath setups

Proposed behavior:

I propose that normal full HELLOs are sent not only on the first interface in use, but all interfaces. This causes planets to respond with a HELLO containing the surface address for each interface. We then collect each address using SelfAwareness::whoami() and distribute them via the normal PUSH_DIRECT_PATHS mechanism.
2022-02-25 11:30:45 -08:00
Joseph Henry 1918c29fd7 Change ECHO divisor from 20 to 6 2022-02-25 11:29:07 -08:00
Joseph Henry 84705aafc7 Merge pull request #1569 from zerotier/dev-echo-rate-gate
Rate gate ECHO per Path instead of per Peer

In multipath scenarios user traffic is used to judge the aliveness of a path. If the user traffic is too infrequent to establish aliveness for a given time window (say 500 ms), the bonding layer will send extra ECHOs at a maximum rate of failoverInterval / 3 (or ~ 166 ms) per path. This patch relaxes the rate-limiting of ECHOs significantly in order to prevent a non-multipath node from dropping ECHOs causing multipath nodes to erroneously judge paths to that node to be dead.
Details

This patch decreases the rate limiting from 1000 ms per peer by a factor of 6 to ~166 ms and rate limits ECHOs per Path instead of per Peer. This allows rate limiting to scale with the number of established paths to a peer.

As a result, if all 64 path slots are used a total of 64 x 6 = 384 ECHOs per second will be allowed in the most aggressive case where failoverInterval is set to 500 ms.
2022-02-25 11:23:42 -08:00
Joseph Henry 618202d426 Increase min failover to 500 ms and probe period to 1/3rd of failover 2022-02-25 10:52:39 -08:00
Adam Ierymenko 8b9a7d2c8f 1.8.5 release notes 2022-02-22 13:15:39 -05:00
Joseph Henry d1335dca11 Change ECHO rate-limit divsor from 16 to 20 2022-02-21 16:22:33 -08:00
Joseph Henry 5e13b42abc Rate gate ECHO per Path instead of per Peer 2022-02-21 14:37:39 -08:00
Adam Ierymenko b4b5a70a03 Windows build update. 2022-02-21 13:53:55 -05:00
Joseph Henry 96aa1c30a6 Proactively seek, enumerate, and distribute external surface addresses 2022-02-17 15:39:17 -08:00
Joseph Henry 1b0c183913 Force non-leaf peers into local active-backup bond when multipath is enabled 2022-02-17 15:16:33 -08:00
Joseph Henry 5d4a9a4aa1 Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2022-02-17 09:48:15 -08:00
Grant Limberg 31c12aebb5 more fun with linux ethernet taps
older kernels: must set MTU before IFF_UP.
newer kernels: must set MTU *after* IFF_UP
2022-02-17 09:26:53 -08:00
Joseph Henry 40269c2a97 Comment out debug traces 2022-02-16 20:39:18 -08:00
Adam Ierymenko ed74ed6ed2 CentOS/RHEL 6 SELinux permissions. 2022-02-16 12:56:17 -05:00
Adam Ierymenko 26e684eb0e Add OpenSSL requirements to Linux package manifests. 2022-02-15 14:39:23 -05:00
Adam Ierymenko fc66f79988 1.8.5 Windows 2022-02-15 13:09:54 -05:00
Adam Ierymenko 3c85a7f074 Rev roots. 2022-02-15 09:13:58 -05:00
Adam Ierymenko 62d2a00e74 Merge pull request #1093 from keur/unit_after_network
systemd: fix zerotier hanging on shutdown
2022-02-11 18:03:18 -05:00
Adam Ierymenko bb2b109707 Merge pull request #1559 from zerotier/oldlinux
potential fix for 2.6.x kernels
2022-02-11 17:59:53 -05:00
Joseph Henry c5008031b9 Increase ifname size to accomodate Windows (issue #1560) 2022-02-11 10:08:56 -08:00
Joseph Henry 1d15d4e8d3 Add ZT_DEBUG to DEFS when specified 2022-02-09 14:32:10 -08:00
Joseph Henry da898d5a19 Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2022-02-08 15:47:43 -08:00
Joseph Henry f9c84c8c52 Remove stray debug trace 2022-02-08 15:32:25 -08:00
Grant Limberg 5d63ed6739 fix function call 2022-02-07 17:14:43 -08:00
Grant Limberg fdf4ebd43c potential fix for 2.6.x kernels
detect if the kernel is super old.  if so, do not execute the post IF_UP commands on the interface
2022-02-07 17:10:54 -08:00
Grant Limberg dc9fdb7da8 Merge branch 'notify' into dev 2022-02-07 13:59:22 -08:00
Grant Limberg 2652c71c9e remove tag one more time 2022-02-07 11:54:50 -08:00
Grant Limberg 806d1fff42 Merge branch 'notify' into dev 2022-02-07 11:46:23 -08:00
Grant Limberg c065e88e1e notify tags are back 2022-02-07 11:39:47 -08:00
Grant Limberg 4641a44029 does order matter? 2022-02-07 11:36:52 -08:00
Grant Limberg f544f75c36 notify all again 2022-02-07 11:32:19 -08:00
Grant Limberg 720168f0a0 only notify on failure for now 2022-02-07 11:27:03 -08:00
Grant Limberg 6dfecca91e poke 2022-02-07 11:23:38 -08:00
Grant Limberg 10b38b5b0a poke 2022-02-07 11:14:46 -08:00
Sean OMeara dbc5d5c453 Update .drone.yml
OCD made me do it
2022-02-07 19:54:56 +01:00
Grant Limberg a3e0ba16f5 poke 2022-02-07 10:43:56 -08:00
Grant Limberg 3c906102e1 update notify image 2022-02-07 10:26:29 -08:00
Joseph Henry 566ac113e4 Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2022-02-07 10:10:24 -08:00
Grant Limberg 5abc8bd2af specify tag 2022-02-07 10:09:01 -08:00
Joseph Henry 926b2e168e Add external listening addr/port pairs to status output (ticket #1555) 2022-02-07 10:08:02 -08:00
Grant Limberg e475e8151d set pull: always on notify image 2022-02-07 09:56:31 -08:00
Grant Limberg 440f10e353 max retires 3 2022-02-04 13:48:48 -08:00
Grant Limberg 30256c7106 set max retries 2022-02-04 13:44:00 -08:00
Grant Limberg 21946f38d0 oops 2022-02-04 13:35:44 -08:00
Grant Limberg 549673664d custom image 2022-02-04 13:34:28 -08:00
Sean OMeara b45d0c5a36 tweaking 2022-02-04 22:08:56 +01:00
Sean OMeara 4df05c2890 running s390x on xeons 2022-02-04 22:08:14 +01:00
Sean OMeara d886089091 running s390x on xeons 2022-02-04 22:05:29 +01:00
Grant Limberg 51158dde93 make it run on failure and succes 2022-02-04 12:58:12 -08:00
Grant Limberg 09fff7f1cb lets try this 2022-02-04 12:50:19 -08:00
Sean OMeara 91f435f32f trying s390 on a gravaton 2022-02-04 21:42:00 +01:00
Sean OMeara 726ffddce2 adding platform routing for arm64 2022-02-04 21:28:07 +01:00
Adam Ierymenko 4ecf692f46 Remove -j1 2022-02-04 14:51:13 -05:00
Adam Ierymenko 2a461a9aac Merge dev 2022-02-04 13:32:06 -05:00
Grant Limberg 211b1fc23c enable on x32 2022-02-03 12:52:35 -08:00
Grant Limberg df6bbb0b0c more fun with makefiles 2022-02-03 11:47:03 -08:00
Grant Limberg cfae20e0df LDFLAGS fix on non-supported platforms 2022-02-03 11:30:39 -08:00
Grant Limberg 3c0adde0c7 don't build on unsupported platforms 2022-02-03 11:26:10 -08:00
Grant Limberg f511c9c938 fix compile errors on non-sso platforms 2022-02-03 10:07:25 -08:00
Sean OMeara 20f88b37ef adding drone config 2022-02-03 14:19:06 +01:00
Sean OMeara 269501eaa0 adding drone config 2022-02-03 14:18:36 +01:00
Adam Ierymenko 330e1de3d1 Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev 2022-02-01 16:04:06 -05:00
Adam Ierymenko 25e14e2164 Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev 2022-02-01 16:03:04 -05:00
Grant Limberg aa97aabb4e for now, only enable sso on certain platforms
mac, windows, linux x86/x86_64/aarch64
2022-02-01 11:07:37 -08:00
Travis LaDuke 59cd2766e3 Shorten issue template. Add docs site to it. 2022-01-31 13:52:38 -08:00
Grant Limberg b7952d7f39 no longer need direct import of serde here either 2022-01-31 12:13:30 -08:00
Grant Limberg c380a4e4bd cleanup 2022-01-31 12:02:14 -08:00
Grant Limberg 9c487cbfb8 Remove jsonwebtoken package dependency
Replaced with rust-jwt.  `jsonwebtoken` relies on the ring package which explodes on non-x86/x64 architectures
2022-01-31 11:58:51 -08:00
Adam Ierymenko 6fc636535f Merge branch 'dev-enlarge-netconf-limits' into dev 2022-01-31 10:52:34 -05:00
Joseph Henry 4190318c85 Fix typo in constant name 2022-01-28 10:41:21 -08:00
Joseph Henry 2f554fd6f8 Merge pull request #1552 from Shawn8410/master
FIX: fix wrong flag usage of rateGateCredentialsReceived
2022-01-28 10:12:16 -08:00
Shawn ae93cccde6 FIX: fix wrong flag usage of rateGateCredentialsReceived 2022-01-27 11:59:21 +08:00
Joseph Henry 46e955e3a1 Split bond logs into two categories to reduce logging size 2022-01-26 15:14:02 -08:00
Joseph Henry 60057d7072 Fix SSL-related linker errors on Linux 2022-01-26 14:02:42 -08:00
Joseph Henry 2850f131e2 Fix code style 2022-01-25 18:03:36 -08:00
Adam Ierymenko 440568a516 Enlarge maximum routes and maximum assigned addresses. 2022-01-24 14:26:15 -08:00
Adam Ierymenko e31088aaf9 Debian build tweaks, and deparallelize Rust for higher order build parallelization. 2022-01-21 17:27:07 -05:00
Grant Limberg 63b36e8569 . 2022-01-20 15:36:29 -08:00
Grant Limberg 726d359335 part 2 2022-01-20 15:35:18 -08:00
Grant Limberg fc0858a4a3 fix the fix cargo build on mac
--debug isn't a cargo option at all
2022-01-20 15:32:58 -08:00
Grant Limberg f80103778a Merge branch 'dev' into central-controller 2022-01-20 15:15:59 -08:00
Grant Limberg c09010c25a handle nonce rotation in controller better
Won't generate new nonces until there are no active ones.
2022-01-20 15:14:29 -08:00
Grant Limberg 9cd1466e6b Merge branch 'dev' into central-controller 2022-01-20 11:12:21 -08:00
Grant Limberg 801be64ed3 Merge branch 'zeroidc' into dev 2022-01-20 09:46:22 -08:00
Grant Limberg d719137565 temp workaround for oidc auth dropping issue
Add a method to "kick" the refresh thread and re-post the tokens in the case where the thread is somehow still running & controller pushes out an AUTH_REQUIRED.  This situation happens in a corner case still under investigation where the controller pushes out many copies of the network config repeatedly
2022-01-20 09:44:56 -08:00
Adam Ierymenko 58aba96494 Mac Rust build fix. 2022-01-20 11:16:26 -05:00
Adam Ierymenko f8d7796099 Merge branch 'zeroidc' into dev 2022-01-20 10:43:37 -05:00
Adam Ierymenko 241c41267b Merge branch 'master' into dev 2022-01-20 08:23:12 -05:00
Adam Ierymenko 2ac1ff9be2 Merge pull request #1451 from channelbeta/update-pgp-url
Update PGP keyserver URL
2022-01-20 08:22:52 -05:00
Adam Ierymenko cb31b3987f Merge pull request #1539 from khng300/getdefaultgateway-rtm-fix
ext/libnatpmp: Set sa_len properly in getdefaultgateway()
2022-01-20 08:21:24 -05:00
Adam Ierymenko c256398095 Merge pull request #1541 from khng300/fbsd-osdep-PortMapper
Build osdep/PortMapper on FreeBSD
2022-01-20 08:21:08 -05:00
Ka Ho Ng 7bb8703bf9 Build osdep/PortMapper on FreeBSD
This enables NAT-PMP and UPnP supports on FreeBSD.
2022-01-12 13:52:46 -05:00
Sean OMeara 0da00bf546 Merge pull request #1535 from zerotier/linux-route-metric
Set a high metric on linux routes that have a via.
2022-01-12 18:41:54 +01:00
Sean OMeara 4866490cdf Merge pull request #1533 from zerotier/tl-linux-route-if
Prevent adding routes to non-zerotier interfaces in rare cases.
2022-01-12 18:41:45 +01:00
Grant Limberg 1547b1a581 Merge branch 'zeroidc' into central-controller
# Conflicts:
#	node/NetworkConfig.cpp
#	node/NetworkConfig.hpp
2022-01-11 12:09:57 -08:00
Ka Ho Ng 511c77aa99 ext/libnatpmp: Set sa_len properly in getdefaultgateway()
In USE_SOCKET_ROUTE's implementation, sa_len of the sockaddrs need to be
set as well.

Sponsored by:	The FreeBSD Foundation
2022-01-10 20:42:34 -05:00
Travis LaDuke 692a0e7ac2 Set a high metric on linux routes that have a via.
See issue #750.

zerotier doesn't currently set a metric on routes. Linux
takes this to mean "0", the highest priority.

Every comment in the issue is about routing between zerotier
and lan and how they conflict.

This quick change could fix this problem for most people.

The subnet route for the zerotier network, the one with no
via, is still 0 in this patch. Just the "via" routes get
higher metrics.
If for some reason, you needed your via routes to have
higher priority, you could use a prefix work-around:

192.168.1.0/25 via 10.147.17.1
192.168.1.128/25 via 10.147.17.1
2022-01-07 13:10:36 -08:00
Travis LaDuke fa25b45198 Keep interface name on via routes on linux
See issue #1498
2022-01-07 11:58:42 -08:00
Grant Limberg cdd25c389e Merge branch 'dev' into zeroidc 2022-01-06 14:55:40 -08:00
Grant Limberg 133a6ff7b3 fix env var 2022-01-06 14:55:20 -08:00
Grant Limberg 96add0ba65 Merge branch 'dev' into zeroidc 2022-01-06 14:54:09 -08:00
Grant Limberg f5096a1f26 add wait for docker in controller startup script 2022-01-06 14:51:56 -08:00
Grant Limberg 3d4d087f07 make some impl functions pub 2022-01-05 15:43:45 -08:00
Grant Limberg 953e62f103 Clean up some extraneous output in release mode 2022-01-05 11:55:47 -08:00
Grant Limberg 084727c54a link zeroidc to selftest 2022-01-05 11:55:25 -08:00
Grant Limberg 8ea192fcab update dependency specs 2022-01-05 08:44:01 -08:00
Grant Limberg dceba1f2f1 Merge branch 'dev' into zeroidc 2022-01-05 08:35:15 -08:00
Grant Limberg 73878fbdc4 Merge pull request #1531 from StephenCWills/mingw32-disable-salsasse
Disable Salsa20 SSE on MinGW 32-bit compiler
2022-01-04 17:42:40 -08:00
staphen 87d17088cc Disable Salsa20 SSE on MinGW 32-bit compiler 2022-01-04 20:39:08 -05:00
Grant Limberg cc6c48fca8 Merge pull request #1525 from StephenCWills/lowercase-windows-headers
Use lowercase when including Windows headers
2022-01-04 17:11:51 -08:00
Grant Limberg e556a2ee23 Merge pull request #1528 from StephenCWills/android-miniupnpc
[Android] Fix include for miniupnpc
2022-01-04 16:56:05 -08:00
Grant Limberg 50b866c5cf clean up & pass along errors from ZeroIDC::new() method 2022-01-03 17:25:30 -08:00
staphen f83eed9ef9 [Android] Fix include for miniupnpc 2022-01-03 12:15:21 -05:00
Grant Limberg cb9313a454 Merge branch 'dev' into zeroidc 2022-01-03 08:37:10 -08:00
Grant Limberg cf411efd1d a little cleanup 2022-01-03 08:36:16 -08:00
staphen 1c956494a4 Use lowercase when including Windows headers 2021-12-29 16:29:08 -05:00
Adam Ierymenko dbe3aa1efc Merge branch 'master' into dev 2021-12-17 17:41:03 -05:00
Adam Ierymenko 4128d80974 1.8.5 version bump. 2021-12-17 17:40:00 -05:00
Grant Limberg 057356a725 Just some comments 2021-12-16 22:07:17 -08:00
Grant Limberg a69e91c541 Fix hash verification on refresh 2021-12-16 19:49:15 -08:00
Grant Limberg 8fccf3136c Enable validation of token hashes as part of the oidc process 2021-12-16 18:44:36 -08:00
Grant Limberg 2435ab70ab remove some extra verbose logging
... and baby you got a full flow goin on
2021-12-16 12:37:22 -08:00
Grant Limberg f489862500 update final page text a smidge 2021-12-16 12:20:31 -08:00
Grant Limberg 2642fa1ee2 Return HTML instead of blank page when auth is successful! 2021-12-16 12:06:16 -08:00
Grant Limberg 2293b0703f Can get Central JSON bundle back to zerotier-one window 2021-12-16 11:37:58 -08:00
Grant Limberg 1375e3e2f5 allow debug & release builds of Rust 2021-12-15 15:53:48 -08:00
Grant Limberg 0ab5cce878 TIL: Its not as hard as I thought to make Rust deadlock 2021-12-15 14:37:06 -08:00
Grant Limberg b567e91f68 fix 2021-12-15 14:36:50 -08:00
Grant Limberg eee31605b1 Merge branch 'dev' into zeroidc 2021-12-15 14:17:26 -08:00
Grant Limberg df9a7497b1 refactor out the separate AuthInfo struct
consolidated everything into the single IDC struct.  Should help keep from rotating the pkce token as often & causing issues with the login window flapping
2021-12-15 14:16:17 -08:00
Joseph Henry c6adb6df12 Merge pull request #1513 from andrejbinder/dev 2021-12-15 13:25:12 -08:00
Andrej Binder aeec7dae36 Prevent arithmetic error on interface change. 2021-12-15 22:22:02 +01:00
Adam Ierymenko fa58909d44 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-12-15 12:32:41 -05:00
Adam Ierymenko 06ed114fb6 Release notes and GitHub issue #1512 2021-12-15 12:32:28 -05:00
Joseph Henry bdef9d3bd7 Fix situation where too many ECHOs are sent to multipath peer 2021-12-14 21:20:58 -08:00
Joseph Henry b154b7296c Improve multipath logging output 2021-12-14 21:13:19 -08:00
Joseph Henry 8019f13479 Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2021-12-14 15:31:29 -08:00
Joseph Henry 1c6fd4125d Fix custom policy parsing bug mentioned in issue #1507 2021-12-14 11:49:43 -08:00
Travis LaDuke 1f99f1d5f4 Merge pull request #1488 from zerotier/macos-ipv6-config
Convince macOS to do ipv6 dns lookups
2021-12-14 08:54:45 -08:00
Sean OMeara 30c77cfee5 Merge pull request #1510 from zerotier/nolint
removing commit linter
2021-12-13 21:35:36 +01:00
Travis LaDuke afdc91f21f Convince macOS to do ipv6 dns lookups
Puts a value into System Config, similar to how DNS push works.

closes #1466

https://apple.stackexchange.com/questions/309430/ipv6-dns-resolution-on-macos-high-sierra
2021-12-13 12:34:41 -08:00
Sean OMeara 3470c5314d removing commit linter 2021-12-13 21:25:17 +01:00
Adam Ierymenko f0e824416b Merge pull request #1509 from zerotier/dev-antiflap
Proposed fix for "path amnesia"
2021-12-13 15:17:40 -05:00
Joseph Henry 52ff67fb2c Merge pull request #1504 from capruro/patch-1
Version bump to 1.8.4
2021-12-13 11:56:51 -08:00
Joseph Henry e9375b50b0 Prevent path-amnesia 2021-12-13 11:54:23 -08:00
Joseph Henry 1f43a736b2 Fix active-backup path selection bug 2021-12-09 13:43:52 -08:00
Joseph Henry 05a0a20197 Fix multipath flow reallocation. Prevent allocation to dead paths 2021-12-08 14:32:58 -08:00
Grant Limberg 2ee595553a Merge branch 'dev' into zeroidc 2021-12-08 12:35:36 -08:00
Grant Limberg 2d4fe9e6d0 Get oidc lib compiled into main binary on Windows 2021-12-08 12:14:15 -08:00
Grant Limberg dc12bde068 add vs makefile project to build oidc rust library 2021-12-08 09:49:29 -08:00
Grant Limberg b3fbbd3124 refresh tokens now working
Still investigating the best way to do a couple things, but we have something working
2021-12-07 16:29:50 -08:00
Joseph Henry 983336911c Remove obsolete documentation 2021-12-07 09:14:54 -08:00
Grant Limberg 48b39ab005 removing comments 2021-12-03 17:46:37 -08:00
Grant Limberg 5095d73de3 moar better error handling 2021-12-03 16:32:27 -08:00
Grant Limberg 1192b1b422 refresh token run loop
Need central-side work to complete
2021-12-03 15:44:04 -08:00
Grant Limberg 43c528fdb6 Get expiry time out of access token & propagate 2021-12-03 11:32:29 -08:00
Grant Limberg da4b9922d4 Merge branch 'dev' into zeroidc 2021-12-03 09:58:04 -08:00
Grant Limberg 7a8c89be9d Post ID token to Central 2021-12-03 09:57:39 -08:00
capruro 3b37db1a36 Version bump to 1.8.4 2021-12-03 14:30:05 +01:00
Joseph Henry 5ae0f9d03f Add a few more Snap targets to Linux makefile 2021-12-02 10:54:43 -08:00
Joseph Henry 1dd1bf8bac Add Snap targets to Linux makefile 2021-12-02 10:07:41 -08:00
Grant Limberg 8966002685 Merge branch 'dev' into zeroidc 2021-12-01 16:59:06 -08:00
Grant Limberg 4ce810b421 On our way to processing tokens 2021-12-01 16:57:18 -08:00
Grant Limberg 730482e62f encode network ID into sso state param 2021-12-01 15:02:21 -08:00
Adam Ierymenko eac56a2e25 Build fix in ARM flags for Snap builds. 2021-12-01 17:27:55 -05:00
Adam Ierymenko 5c3a2357ef VERSION 1.8.4 2021-12-01 17:01:57 -05:00
Grant Limberg 663a09b38d oidc stuff coming across the wire properly and generating a working login URL 2021-12-01 13:01:32 -08:00
Grant Limberg eaccce743f moar plumbing progress 2021-12-01 12:07:05 -08:00
Grant Limberg 7cce23ae79 wip 2021-12-01 10:44:29 -08:00
Grant Limberg 73c186b111 add network_id extra param to auth flow 2021-12-01 09:27:30 -08:00
Adam Ierymenko 5ce0019ee5 ARM wrestling. 2021-12-01 10:40:01 -05:00
Grant Limberg ca8d315924 Merge branch 'dev' into zeroidc 2021-11-30 18:42:45 -08:00
Grant Limberg dfdac7adbd iomanip 2021-11-30 17:31:46 -08:00
Grant Limberg a33d7c64fe more fixin 2021-11-30 17:27:13 -08:00
Adam Ierymenko e37c9055b3 ARM flags 2021-11-30 19:54:17 -05:00
Grant Limberg d15516f0ef query fix & controller build fix 2021-11-30 16:18:34 -08:00
Grant Limberg 4a1d6f4cc8 get central controller docker builds working again 2021-11-30 15:22:31 -08:00
Grant Limberg 6393a4beec progress 2021-11-30 14:22:25 -08:00
Adam Ierymenko 06125c48bc Another build speedup. 2021-11-30 15:35:18 -05:00
Adam Ierymenko 8cda04cc98 Use nproc to get the number of cores on Linux to speed up bounds. 2021-11-30 13:14:38 -05:00
Adam Ierymenko f20b7e8cee ARM32 flags update. 2021-11-30 12:35:22 -05:00
Adam Ierymenko 19dded141a Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-11-30 12:27:15 -05:00
Adam Ierymenko d19cf1eaac Merge branch 'dev' of http://10.95.0.64/zerotier/ZeroTierOne into dev 2021-11-30 09:10:14 -05:00
Adam Ierymenko d6b00bcd40 Fix Windows 32-bit installation. 2021-11-30 09:10:07 -05:00
Joseph Henry 1b1fe61fd0 Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2021-11-29 19:44:51 -08:00
Joseph Henry 3bce783cbc Add minor help tip to Snap instructions 2021-11-29 19:44:34 -08:00
Adam Ierymenko 5966f7d9d2 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-11-29 22:03:58 -05:00
Adam Ierymenko aed0b4941f GUID bump for Windows 2021-11-29 22:03:40 -05:00
Grant Limberg 9ef75c0e13 Merge branch 'dev' into zeroidc 2021-11-29 14:12:10 -08:00
Grant Limberg 5f548705dd lots more refactoring 2021-11-29 14:11:29 -08:00
Joseph Henry 39d3c8402e Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2021-11-26 11:00:48 -08:00
Joseph Henry 5cb6265547 Re-word Snap package description 2021-11-26 10:59:42 -08:00
Adam Ierymenko 03dd537ea4 1.8.4 in Windows 2021-11-23 17:36:24 -05:00
Adam Ierymenko 4af8f1bf03 1.8.4 🦃 2021-11-23 16:39:20 -05:00
Adam Ierymenko ae8df648d5 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-11-23 15:44:54 -05:00
Adam Ierymenko 5e24166318 Remove unused but shipped curl dependency in ext/ 2021-11-23 15:44:08 -05:00
Joseph Henry 4e10b4e017 Modify snap command aliases 2021-11-19 08:16:14 -08:00
Grant Limberg 87fdd644d4 cleanup some ifdef'd things 2021-11-18 13:36:09 -08:00
Grant Limberg 2e356613ec Refactor NetworkState into object with accessor methods 2021-11-18 12:39:55 -08:00
Grant Limberg 91e9b736dd make service objs dependent on zeroidc 2021-11-18 10:42:12 -08:00
Adam Ierymenko 7f4cc1a239 VERSION 1.8.3 2021-11-16 13:27:27 -05:00
Adam Ierymenko 3e3d46e72e Windows 1.8.3 2021-11-16 12:04:10 -05:00
Adam Ierymenko 460c2552a8 Merge branch 'master' of github.com:zerotier/ZeroTierOne 2021-11-16 11:24:08 -05:00
Adam Ierymenko 1a7fb83882 Release notes. 2021-11-16 11:23:57 -05:00
Adam Ierymenko dfac6303bc Version bump (all but Windows) and limit .pkg to MacOS 10.13 2021-11-15 19:55:58 -05:00
Adam Ierymenko 8b77a93d60 release notes 2021-11-15 19:51:56 -05:00
Adam Ierymenko fabfb10b97 Remove managed routes in destructor (regression fix). 2021-11-15 19:48:07 -05:00
Adam Ierymenko 65549cb0da Fix the FD leak fix, and release notes. 2021-11-15 18:27:14 -05:00
Adam Ierymenko bee137c6d9 Set shell for ZeroTier service user account on Debian to /usr/sbin/nologin for GitHub issue #1492 2021-11-15 17:27:16 -05:00
Adam Ierymenko a2a7122da9 release notes 2021-11-15 17:18:04 -05:00
Adam Ierymenko 0e798222a7 Fix FD leak on MacOS. 2021-11-15 17:17:05 -05:00
Adam Ierymenko c890f1762a This code is obsolete but remove vfork anyway. 2021-11-15 14:09:52 -05:00
Adam Ierymenko ea4d7ae92f Add spinlock removal to release notes. 2021-11-15 12:16:22 -05:00
Adam Ierymenko 1ef385b685 Spinlock removed, causes long standing issues on single core machines. 2021-11-12 16:44:54 -05:00
Grant Limberg 0875fb5fe0 have this make an rlib too for the future 2021-11-11 16:29:14 -08:00
Grant Limberg b5186f7293 Merge branch 'dev' into zeroidc
# Conflicts:
#	.gitignore
2021-11-11 16:20:43 -08:00
Grant Limberg fa21fdc1cc rename stuff for clarity
authenticationURL will still be used by the client for v1 and v2 of sso
2021-11-11 16:19:26 -08:00
Joseph Henry 3f4cd7f5a2 Merge pull request #1489 from capruro/master
removing source-type from snapcraft
2021-11-11 13:53:43 -08:00
Adam Ierymenko 272fb2ca96 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-11-10 22:19:59 -05:00
Adam Ierymenko a7116bc971 VERSION 1.8.2 2021-11-10 22:19:11 -05:00
Adam Ierymenko 502cbc2175 Merge branch 'master' of github.com:zerotier/ZeroTierOne 2021-11-10 22:18:48 -05:00
Adam Ierymenko 953d22de14 VERSION 1.8.2 2021-11-10 22:18:35 -05:00
Adam Ierymenko cacfc294d9 Windows package version bump and PATH fix. 2021-11-10 20:04:36 -05:00
capruro f8ca7002c2 removing source-type
Unnecessary
2021-11-10 23:15:41 +01:00
Joseph Henry 6c728313f5 Merge branch 'master' into dev 2021-11-10 13:09:56 -08:00
Joseph Henry 1a2dc67702 Merge pull request #1487 from capruro/master
Adding snapcraft
2021-11-10 13:07:07 -08:00
capruro f7dbd050af snapcraft 2021-11-09 19:33:11 +01:00
Adam Ierymenko c16b03c8b8 Set MAC address twice, once before and once after bringing interface up, since different kernels behave differently (Linux). 2021-11-09 13:28:15 -05:00
Adam Ierymenko 357e1aca54 Likely MAC fix for Linux. 2021-11-09 13:24:03 -05:00
Adam Ierymenko c15890b4db Version bump to 1.8.2. 2021-11-09 09:31:52 -05:00
Grant Limberg f268237372 add FORCE tag to cargo step 2021-11-08 09:32:15 -08:00
Grant Limberg 4d021e16a5 update field lengths 2021-11-08 09:30:13 -08:00
Joseph Henry 62ce6e6a60 Disable faster x64 crypto mode for IA32 builds 2021-11-05 19:38:11 -07:00
Joseph Henry c7109c646a Add IA32 build flag 2021-11-05 16:52:16 -07:00
Grant Limberg 43433cdb5a integrate rust build of zeroidc to linux 2021-11-04 17:16:23 -07:00
Grant Limberg 8d39c9a861 plumbing full flow from controller -> client network 2021-11-04 15:40:08 -07:00
Grant Limberg f8bf91426b . 2021-11-02 16:30:09 -07:00
Grant Limberg f7934972ea gitignore 2021-11-02 15:56:40 -07:00
Grant Limberg 4cadfd736f move ffi code into its own file 2021-11-02 15:55:26 -07:00
Grant Limberg c46309ea8a Merge pull request #1478 from zerotier/fix-linux-multicast
Fix multicast flag on linux interfaces.
2021-11-02 11:38:33 -07:00
Travis LaDuke 37f26beb50 Fix multicast flag on linux interfaces.
When we re-ordered the way the interfaces come up, this flag
stopped getting set automatically.

see 9374e45449
and github issue #1477
2021-11-02 11:28:13 -07:00
Grant Limberg 1c7a5439d5 expose AuthInfo struct to external code
also get the auth URL
2021-10-29 16:04:19 -07:00
Grant Limberg ebc4c898ff pass in csrf token & nonce (generated externally) 2021-10-29 15:43:39 -07:00
Grant Limberg 56cf874d99 slow progress 2021-10-29 15:31:23 -07:00
Grant Limberg 079ff50622 Merge branch 'dev' into zeroidc 2021-10-29 09:44:11 -07:00
Grant Limberg 31888f5ef8 provide issuer URL, client ID and local web port to constructor
also construct the oidc client
2021-10-29 09:43:14 -07:00
Grant Limberg 7a626abf15 remove BondController.cpp from android makefile 2021-10-28 12:37:36 -07:00
Adam Ierymenko 3c7bd65bc9 Merge branch 'master' of github.com:zerotier/ZeroTierOne 2021-10-28 14:46:58 -04:00
Adam Ierymenko 01bf3b8245 1.8.1 merge of changes in master 2021-10-28 14:46:38 -04:00
Adam Ierymenko a6c1998c81 VERSION 1.8.1 -- see RELEASE-NOTES.md 2021-10-28 14:24:27 -04:00
Grant Limberg 0069b1bac3 we can start & stop a thread. so that's nice. 2021-10-28 09:29:33 -07:00
Adam Ierymenko 25c5cad1d1 Advanced Installer for Windows. 2021-10-28 08:52:31 -04:00
Grant Limberg c689c0bd8c integrate with mac build system and add skeleton 2021-10-27 17:09:01 -07:00
Grant Limberg 271dfc0d2b initial rust oidc lib 2021-10-27 16:11:06 -07:00
Grant Limberg 0032df3bf1 Merge branch 'dev' into zeroidc 2021-10-27 15:02:46 -07:00
Grant Limberg 993e58773a needed in 2 more spots 2021-10-27 14:58:17 -07:00
Grant Limberg 8f4c038e23 fix ifdef
wasn't running IPv6 temporary address detection for binding
2021-10-27 14:48:07 -07:00
Adam Ierymenko 81f2c57656 Properly launch the app on post-install restart. 2021-10-27 16:17:57 -04:00
Adam Ierymenko 594853e251 Remove deprecated vfork call on Mac, and make Mac route application more robust. 2021-10-26 22:15:06 -04:00
Adam Ierymenko cce8411c22 Make debian parallelism sane. 2021-10-20 20:51:01 -07:00
Adam Ierymenko 786906b0f7 Version bump to 1.8.1 2021-10-20 19:33:32 -07:00
Adam Ierymenko aed37a391d Windows installer updates for 1.8, install dependencies. 2021-10-20 21:33:20 -04:00
Joseph Henry cc6de583be Prevent balance-xor from de-allocating from bad paths 2021-10-20 10:48:07 -07:00
Joseph Henry b277e04efa Remove vestigial bonding parameters 2021-10-18 20:52:49 -07:00
Grant Limberg 95032cc74d add sso version to network config object 2021-10-14 11:40:48 -07:00
Grant Limberg 3818351287 use pqxx::pipeline for online update thread 2021-10-06 09:39:30 -07:00
Grant Limberg 4d26b5a868 no reason for this to be a pointer 2021-10-05 17:02:50 -07:00
Grant Limberg ac0dc7844f rework commit thread & some connection pool borrowing issues 2021-10-05 09:25:24 -07:00
Grant Limberg 27e3597d5e Merge branch 'dev' into central-controller 2021-10-01 11:30:23 -07:00
Joseph Henry 9e8de2a702 Compilation fix 2021-10-01 11:19:04 -07:00
Joseph Henry 165757176a Potential fix fro deadlock bug 2021-10-01 11:11:20 -07:00
Grant Limberg a411b83a65 remove strip calls from linux makefile 2021-10-01 09:05:35 -07:00
rjsocha 12900d914a Merge branch 'zerotier:master' into win-service-description 2021-09-29 15:47:55 +02:00
Sean OMeara 190e9464ce adding commit message linter 2021-09-28 17:15:44 +02:00
Sean OMeara 57dd26baa9 adding commit linter 2021-09-28 17:06:50 +02:00
Adam Ierymenko 19f3a97a8d More reverting of dumb PR 2021-09-23 19:02:38 -04:00
Adam Ierymenko 375e5ee7dd Revert stupid spam PR AGAIN 2021-09-23 18:59:48 -04:00
Grant Limberg 05df378dce clear variables between gets for dump 2021-09-22 16:13:54 -07:00
Adam Ierymenko f1efea6800 Merge branch 'master' of github.com:zerotier/ZeroTierOne 2021-09-22 13:26:45 -04:00
Adam Ierymenko eb1cafcd01 Windows installer. 2021-09-22 10:43:53 -04:00
Adam Ierymenko 81de6d2dfa Merge branch 'dev' of http://10.95.0.64/zerotier/ZeroTierOne into dev 2021-09-22 10:31:17 -04:00
Adam Ierymenko 9e38c31b64 Windows installer fun. 2021-09-22 10:31:07 -04:00
Adam Ierymenko 7d1f447458 Build fix. 2021-09-22 09:20:53 -04:00
Adam Ierymenko 1b66a1cd2f Version bump. 2021-09-21 14:26:00 -04:00
Adam Ierymenko eabe091038 Backport only the COM mitigation instead of everything from 1.8 2021-09-21 14:14:34 -04:00
Adam Ierymenko b403f106fb Revert "Use a faster method of fingerprinting identities."
This reverts commit b72e5e8386.
2021-09-21 09:57:08 -07:00
Adam Ierymenko 75a45eeb27 Revert "Backport guts of 1.8 to 1.6 tree so we can point release without waiting for UI quirks to be fixed."
This reverts commit 48ce7632fa.
2021-09-21 11:51:26 -04:00
Adam Ierymenko 452b1e806b Revert "Version bump, backport one more fix."
This reverts commit 9f9a870399.
2021-09-21 11:51:10 -04:00
Adam Ierymenko 9f9a870399 Version bump, backport one more fix. 2021-09-21 11:31:25 -04:00
Adam Ierymenko 48ce7632fa Backport guts of 1.8 to 1.6 tree so we can point release without waiting for UI quirks to be fixed. 2021-09-21 11:20:15 -04:00
Adam Ierymenko 30d5d5a892 Revert "Don't assume roots validated the identity, just in case they did not."
This reverts commit 39b97f9163.
2021-09-20 19:27:01 -07:00
Adam Ierymenko 9bc79f94df Revert "Don't assume roots validated the identity, just in case they did not."
This reverts commit 39b97f9163.
2021-09-20 22:05:49 -04:00
Adam Ierymenko a0239e17e9 Revert "Use a faster method of fingerprinting identities."
This reverts commit b72e5e8386.
2021-09-20 22:05:39 -04:00
Adam Ierymenko c8a58b4b04 Use a faster method of fingerprinting identities. 2021-09-20 17:05:23 -07:00
Adam Ierymenko b72e5e8386 Use a faster method of fingerprinting identities. 2021-09-20 20:02:39 -04:00
Adam Ierymenko 565885a4c0 Remove ancient controller support.
# Conflicts:
#	RELEASE-NOTES.md
2021-09-20 15:41:57 -07:00
Adam Ierymenko 134d33c218 Add a bit of hardening in the network certificate of membership by incorporating a full hash of the identity to which it is issued. This means the recipient need not depend entirely on the root verifying identities properly to make sure impersonation is not occurring. 2021-09-20 15:40:55 -07:00
Adam Ierymenko 9cfb807fcb Don't assume roots validated the identity, just in case they did not. 2021-09-20 15:40:44 -07:00
Grant Limberg 46adc1f059 ifdef this out 2021-09-20 15:39:53 -07:00
Grant Limberg 9002555596 ensure count > 0 2021-09-20 15:39:44 -07:00
Grant Limberg 3b375b55c2 fix central docker launch without redis 2021-09-20 15:39:14 -07:00
Adam Ierymenko 3f49570f45 Remove ancient controller support. 2021-09-20 18:38:29 -04:00
Adam Ierymenko 7c3166e9be Add a bit of hardening in the network certificate of membership by incorporating a full hash of the identity to which it is issued. This means the recipient need not depend entirely on the root verifying identities properly to make sure impersonation is not occurring. 2021-09-20 18:26:49 -04:00
Adam Ierymenko 39b97f9163 Don't assume roots validated the identity, just in case they did not. 2021-09-20 16:15:59 -04:00
channelbeta af79be5002 Update PGP keyserver URL 2021-09-20 13:51:41 -03:00
Grant Limberg a20a290836 ifdef this out 2021-09-15 15:27:29 -07:00
Adam Ierymenko e822463916 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-09-15 13:31:22 -04:00
Adam Ierymenko d2c3ea6901 Another route fix on BSD. 2021-09-15 13:31:18 -04:00
Grant Limberg 83265768c1 ensure count > 0 2021-09-15 09:45:10 -07:00
Grant Limberg 27ce787fbd fix central docker launch without redis 2021-09-15 09:21:41 -07:00
Adam Ierymenko 9c6ec2c52e Version bump. 2021-09-15 11:55:07 -04:00
Adam Ierymenko 3a4425fd4e Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-09-15 11:51:09 -04:00
Adam Ierymenko 6bb1598fa3 Another fix for routing and interface issues on MacOS 2021-09-15 11:50:54 -04:00
Sean OMeara 4eb6a4286e using json.hpp 3.10.2 2021-09-15 08:21:45 +02:00
Sean OMeara a9942ca412 more RELEASE-NOTES 2021-09-15 08:12:25 +02:00
Joseph Henry 8d21ae9813 Merge branch 'dev' of https://github.com/zerotier/zerotierone into dev 2021-09-10 13:26:54 -07:00
Joseph Henry ff8044f0c0 Improve multipath startup time 2021-09-10 13:26:29 -07:00
Adam Ierymenko 1b8917a57c Fix for MacOS interface setup and config timing bugs. 2021-09-09 09:30:48 -04:00
Adam Ierymenko a91c49fa52 Advanced installer changes and build fixes for Windows. 2021-09-08 17:51:42 -04:00
Joseph Henry e607348c7e Fix bad index bug (during switching) in balance-rr 2021-09-07 21:41:54 -07:00
Joseph Henry b6ed919fbc Call recordOutgoingPacket regardless of policy to generate sufficient entropy for bond layer 2021-09-07 13:44:02 -07:00
Joseph Henry 109252be4e Remove debug trace 2021-09-06 20:13:13 -07:00
Joseph Henry a4b98518e3 Nominate newly-learned paths to bond 2021-09-06 15:29:03 -07:00
Grant Limberg c3a42bf590 remove heartbeat log 2021-09-02 16:46:42 -07:00
Grant Limberg 8b95afa96a logging 2021-09-02 16:32:40 -07:00
Grant Limberg 6a49a766ca logging 2021-09-02 16:22:59 -07:00
Adam Ierymenko 932584f8fc Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-09-02 17:56:18 -04:00
Adam Ierymenko d7ba2957cd Tear down routes before devices when leaving a network or shutting down. 2021-09-02 17:56:06 -04:00
Grant Limberg 16ff14bda7 identify controller in pool stats 2021-09-02 13:48:08 -07:00
Grant Limberg 57c1d96b71 math 2021-09-02 12:48:49 -07:00
Grant Limberg 40f376e2b9 print db pool stats periodically 2021-09-02 12:45:26 -07:00
Adam Ierymenko 1a1d7d9ada Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-09-02 15:23:38 -04:00
Adam Ierymenko d1c88971ae Possible Mac route borking fix. 2021-09-02 15:23:26 -04:00
Grant Limberg dc61f78916 set psql application_name in startup script 2021-09-02 11:24:07 -07:00
Grant Limberg a2ffe8c05e dont generate nonce for deleted members 2021-09-02 11:24:04 -07:00
Joseph Henry e1af003e4f Consolidation of multipath logic. Better system separation 2021-09-01 21:37:49 -07:00
Adam Ierymenko 19391858d4 Version 1.7.2, almost 1.8.0 2021-09-01 22:01:41 -04:00
Adam Ierymenko 5005244d1b Mac install fixes, remove obsolete stuff, and write local.conf via API for new UI integration. 2021-09-01 21:55:54 -04:00
Joseph Henry 15380cfc14 Merge pull request #1400 from rollcat/openbsd
Use clang on OpenBSD
2021-09-01 14:08:23 -07:00
Adam Ierymenko 11b352458e Pick a new random secondary port if we are offline for more than path-timeout seconds (COMA problem workaround). 2021-08-31 16:47:00 -04:00
Joseph Henry b6680b18e7 Merge pull request #1304 from skunkwerks/dev
BSD: add debug fprintf for all external commands
2021-08-30 10:11:53 -07:00
Adam Ierymenko ec4c2aa12f versions 2021-08-26 11:13:13 -04:00
Adam Ierymenko 0e8c43cfdd Merge branch 'dev' of http://10.95.0.64/zerotier/ZeroTierOne into dev 2021-08-23 11:58:06 -04:00
Adam Ierymenko 958420ee44 Fix Windows slowness on API query bug. 2021-08-23 11:58:02 -04:00
Adam Ierymenko 2d8a54f05d Version bump -- still pre1.8 2021-08-23 11:57:12 -04:00
Grant Limberg d0f4cfe6b4 print load status messages a little less often now that things go brrrrrrrrr 2021-08-20 10:34:00 -07:00
Grant Limberg 3ec23f92ec helps to add part of the query 2021-08-20 10:30:37 -07:00
Grant Limberg 6baac1b4e0 more query optimizations 2021-08-20 10:27:45 -07:00
Grant Limberg 1d8b8d8e9c optimize the controller build & ship workflow a bit 2021-08-20 09:22:44 -07:00
Grant Limberg 50b0b2e2e9 query optimization 2021-08-19 17:55:30 -07:00
Grant Limberg 20721491e8 kill some noisy logs 2021-08-19 13:03:56 -07:00
Grant Limberg eec46a137e optimize data loading from psql on startup 2021-08-19 12:44:02 -07:00
Grant Limberg 9eae444104 kill some verbose logs 2021-08-19 09:21:52 -07:00
Adam Ierymenko 576b4f03a5 Adjust deauth time window and send revocation when SSO members expire. 2021-08-18 12:17:40 -04:00
Adam Ierymenko 2d0f76bb9c Make desktop UI project when making official release. 2021-08-13 21:40:22 -04:00
Adam Ierymenko 6492f4487b Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev 2021-08-13 15:12:23 -04:00
Adam Ierymenko 126669b718 MTU fix 2021-08-13 15:12:07 -04:00
Adam Ierymenko 6fd45c1f9d Throw old WinUI in attic 2021-08-12 18:51:45 -04:00
Adam Ierymenko 4eb3b762d4 MacOS pkg update to reference DesktopUI project and add hostArchitecture flags to not require Rosetta even though the binaries are multiarch. 2021-08-11 15:05:51 -04:00
Adam Ierymenko f24afca1ba Put old school MacUI in the attic. 2021-08-11 13:19:49 -04:00
Adam Ierymenko 461810b06a Move return so record gets created before URL. 2021-08-10 11:22:29 -04:00
Grant Limberg 20050662b2 Merge pull request #1430 from zerotier/mac-managed-route-issue-1104
Don't use v6 source addresses for v4 routes
2021-08-04 13:14:10 -07:00
Joseph Henry 2053415418 Fix erroneous listpeers last send and receive values 2021-08-04 12:16:26 -07:00
Grant Limberg 613d7b5ece fix backwards logic 2021-08-04 09:16:04 -07:00
Travis LaDuke db29c3ac13 Don't use v6 source addresses for v4 routes
and vice versa.

For issue #1104

With some printf debugging, I was seeing:

here, src fe80::3c7a:2dff:fe0c:21ed, target 10.147.20.0, matchingPrefixBits 0, mostMatchingPrefixBits 0
here, src fd8b:d512:4fd6:255:3c99:932f:2fda:6eff, target 10.147.20.0, matchingPrefixBits 0, mostMatchingPrefixBits 0

and (matchingPrefixBits >= mostMatchingPrefixBits) would be true

Then on mac, somewhere downstream from there, the default route would
get messed up:

default via 92:29:f1:6f:2f:76 dev en0
2021-08-03 16:21:18 -07:00
Adam Ierymenko c101d71d7c Tweak auth timeout notify. 2021-07-30 18:44:34 -04:00
Adam Ierymenko 63a44c9268 Fix feth max MTU sysctl. 2021-07-30 18:44:23 -04:00
Grant Limberg 5623a0b420 fix central controller build from linux 2021-07-27 10:18:48 -07:00
Adam Ierymenko 663e748b8d Deauth expiring members right away. 2021-07-26 23:45:18 -04:00
Adam Ierymenko 0cf62d334d Remove pointless check. 2021-07-26 13:38:35 -04:00
Adam Ierymenko 0872012cd9 small fix 2021-07-26 13:11:01 -04:00
Adam Ierymenko c2d8fe46d5 About ready to test notify of SSO timeout... 2021-07-23 19:20:10 -04:00
Adam Ierymenko 0310bfa3e3 Include authentication URL in config 2021-07-23 19:17:42 -04:00
Adam Ierymenko efe0e8aa7b Notification of about-to-expire status... almost there. 2021-07-23 19:05:59 -04:00
Adam Ierymenko 5c7e51feaf Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-07-23 18:49:05 -04:00
Adam Ierymenko 34de579c91 Handling of soon-to-expire members 2021-07-23 18:49:00 -04:00
Joseph Henry 0ed9db05d2 Restore original ECHO rate limiting (changed for multipath) 2021-07-20 19:06:47 -07:00
Travis LaDuke 46387e2f2b Minor Readme updates
People with support issues still commonly say "9993 is open. why doesn't
work?"
Trying to improve this across all of our docs.
2021-07-16 15:17:54 -07:00
Travis LaDuke 8913f13b36 Add website links to top of readme 2021-07-16 14:46:53 -07:00
Travis LaDuke e5007f1290 Delete outdated 2021-07-16 14:20:43 -07:00
Travis LaDuke 740c77a488 Add more help for local.conf 2021-07-16 14:20:30 -07:00
Grant Limberg 73ddea8864 use network ID, not controller ID for looking up network data 2021-07-06 14:15:01 -07:00
Grant Limberg 10215af96d whoops 2021-07-06 13:18:08 -07:00
Grant Limberg e67fee0264 debug logging 2021-07-06 13:08:21 -07:00
Grant Limberg 5ece4f734a fix error message 2021-07-06 13:08:16 -07:00
Travis LaDuke 27409b615a Merge branch 'thoradia-bind' into dev 2021-06-29 11:44:35 -07:00
Travis LaDuke 8866fbd618 Merge branch 'bind' of https://github.com/thoradia/ZeroTierOne into thoradia-bind 2021-06-29 11:22:46 -07:00
Adam Ierymenko 8885149cd3 Revert "Revert "Revert a change to LinuxEthernetTap threading to eliminate out of order packet issues on some systems.""
This reverts commit 89ddf2991b.
2021-06-28 19:29:53 -04:00
Adam Ierymenko 89ddf2991b Revert "Revert a change to LinuxEthernetTap threading to eliminate out of order packet issues on some systems."
This reverts commit 0461b24db3.
2021-06-28 17:59:28 -04:00
Adam Ierymenko 547b0de8a5 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-06-28 17:15:59 -04:00
Adam Ierymenko 0461b24db3 Revert a change to LinuxEthernetTap threading to eliminate out of order packet issues on some systems. 2021-06-28 17:15:34 -04:00
Sean OMeara c698e9c122 Merge pull request #1420 from zerotier/someara/dev-json-hpp
updating json.hpp to 3.9.1
2021-06-24 23:30:58 +02:00
Sean OMeara 8f84a968de updating json.hpp to 3.9.1 2021-06-24 20:33:45 +02:00
Grant Limberg f8ea7fdc2b Fix for GitHub #859
Wrong DB::get() method being called to look up the network member for deletes
2021-06-24 10:32:21 -07:00
Travis LaDuke 7b0d11b187 Merge pull request #1408 from erikh/docker-release-fixes
Small dockerfile release fixes
2021-06-08 08:44:53 -07:00
Grant Limberg 8dd3639576 set ssoEnabled = true on network config if we get ERROR_NETWORK_AUTHENTICATION_REQUIRED 2021-06-05 14:00:03 -07:00
Grant Limberg 364ad87e2b add ssoEnabled flag to network config 2021-06-05 13:44:45 -07:00
Grant Limberg 9380ef708a debug strings & query fixes 2021-06-05 13:44:07 -07:00
Grant Limberg fd174b3459 fix auth time lookup 2021-06-04 20:55:22 -07:00
Grant Limberg 21d27c314c HMACSHA384 the nonce bytes, not the hex encoded nonce bytes 2021-06-04 20:06:04 -07:00
Grant Limberg 0b89a49201 typo 2021-06-04 16:56:28 -07:00
Grant Limberg de718d9743 handle ZT_SSO_REDIRECT_URL env file in docker 2021-06-04 16:32:02 -07:00
Grant Limberg e6b4fb5af7 add "ssoRedirectURL" to local.conf
plumbed it through to the central controller code
2021-06-04 16:29:03 -07:00
Grant Limberg c227330d09 fix redirect_uri substitution 2021-06-04 15:58:38 -07:00
Adam Ierymenko c769e282fb Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-06-04 18:52:23 -04:00
Adam Ierymenko 98722ed7ea Increase URL buffer sizes 2021-06-04 18:52:10 -04:00
Grant Limberg b16f40c0de . 2021-06-04 15:18:18 -07:00
Grant Limberg fd85f87ade handle null in result set 2021-06-04 15:15:42 -07:00
Grant Limberg add33f1ab3 cast to bigint in query 2021-06-04 14:48:41 -07:00
Grant Limberg 3bfc438ae8 null handling 2021-06-04 14:40:14 -07:00
Adam Ierymenko 1dfe909bab Increase authentication URL sizes. 2021-06-04 16:46:56 -04:00
Grant Limberg 75d17ea3c8 Helps to commit when trying to write a change to the db 2021-06-04 13:20:03 -07:00
Grant Limberg 96d15337bb default 0 2021-06-04 13:19:39 -07:00
Grant Limberg 74a678c1e1 chicken or egg problem.
member must exist in the database before we can generate a nonce & SSO URL
2021-06-04 12:49:26 -07:00
Grant Limberg fed1846c6f need tres commas 2021-06-04 12:19:52 -07:00
Grant Limberg f27d193cf6 . 2021-06-04 11:56:12 -07:00
Grant Limberg 7941b63543 another typo 2021-06-04 11:43:42 -07:00
Grant Limberg 21965ac8e8 yet another query fix 2021-06-04 11:40:03 -07:00
Grant Limberg 7ca2ecb421 put expiry time back on nc object 2021-06-04 11:39:52 -07:00
Grant Limberg 1dcfc03cbc another query fix 2021-06-04 11:22:30 -07:00
Grant Limberg 0702e581a1 remove some noisy log lines & fix a query error 2021-06-04 11:06:54 -07:00
Grant Limberg c78792a705 moar temporary debug printfs 2021-06-04 11:00:51 -07:00
Grant Limberg 287c19e822 move this outside the auth block. If SSO is enabled, it should be checked whether authorized or not 2021-06-04 09:46:31 -07:00
Grant Limberg bc901d613d check for nulls 2021-06-04 09:20:39 -07:00
Grant Limberg 2192a8b0ec do the ld.so dance in the docker container 2021-06-04 08:31:34 -07:00
Grant Limberg 6cb4c58d9a linux docker build 2021-06-03 18:30:32 -07:00
Grant Limberg 4f521baafd Big SSO update
make things hopefully work
2021-06-03 14:38:26 -07:00
Grant Limberg 81fda3f5b8 set a default and goes boom 🤦‍♂️ 2021-06-02 15:07:53 -07:00
Grant Limberg 91c4dfc7c0 database version 2021-06-02 14:49:12 -07:00
Erik Hollensbe 788296ea29 Expand links in a few spots since this'll be used in the docker image
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
2021-06-02 14:36:55 -07:00
Erik Hollensbe 60c1fcbc48 Docker usage README
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
2021-06-02 14:31:34 -07:00
Grant Limberg fc6d90a04a set the correct default 2021-06-02 14:27:58 -07:00
Grant Limberg faf0c6bbfa make sure to commit on online notification thread 2021-06-02 14:08:09 -07:00
Grant Limberg 79f1e81745 debug printf typo & line break 2021-06-02 13:51:47 -07:00
Grant Limberg 7427961fcf bug fixes & debug code 2021-06-02 13:46:54 -07:00
Grant Limberg d2f1d05a06 handle cases where authenticationURL and authenticationExpiryTime don't exist 2021-06-02 13:46:43 -07:00
Grant Limberg 19f4146aca make DB::_memberChanged and _networkChanged virtual 2021-06-02 13:46:11 -07:00
Grant Limberg 47154fa623 transiton to libpqxx & connection pool for central controllers 2021-06-02 11:44:00 -07:00
Erik Hollensbe 5c508515c4 Fix issue requiring CAP_SYS_PTRACE
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
2021-06-01 12:30:01 -07:00
Erik Hollensbe 2824139510 Small dockerfile release fixes
- Activate zerotier-one.port file (we'll do more with this later)
- Add a better process trap

Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
2021-06-01 09:27:05 -07:00
Grant Limberg c2efdcabc5 fix 2021-05-28 15:01:42 -07:00
Grant Limberg 6f622e4551 no idea why these lines needed to be broken up
docker gonna docker
2021-05-28 15:00:54 -07:00
Grant Limberg 6d8c96b89f formatting 2021-05-28 14:19:13 -07:00
Adam Ierymenko bf4bb414dd Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-05-28 17:08:44 -04:00
Adam Ierymenko dee3361c1d Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev 2021-05-28 17:08:35 -04:00
Adam Ierymenko c470c6255e Postgres code for SSO (almost certainly needs work) 2021-05-28 17:08:24 -04:00
joseph-henry 6faca86bb4 Update bugs-and-issues.md
Add troubleshooting tip
2021-05-27 19:48:01 -07:00
Grant Limberg 4fed56443e secondary ports are no longer based on the node ID and fully randomized instead 2021-05-27 15:41:11 -07:00
Grant Limberg 1859365f9d same IPv6 temp address detection code for macOS works on FreeBSD.
update ifdefs & go
2021-05-27 16:43:12 -04:00
Grant Limberg ab87b8f881 Don't bind to temporary IPv6 addresses (linux) 2021-05-26 15:50:14 -07:00
Grant Limberg b8b65da51c Don't bind temporary IPv6 addresses (macOS) 2021-05-26 11:01:44 -07:00
Grant Limberg 198e6f765c Don't bind to temporary Ipv6 addresses (windows) 2021-05-26 09:15:24 -07:00
Adam Ierymenko 810e2a761f Fix authentication URL... 2021-05-25 14:49:06 -04:00
Adam Ierymenko 6ce71c1bc3 Fix reporting of status. 2021-05-25 14:45:49 -04:00
Adam Ierymenko 6b3a7ec827 Fix a few things... 2021-05-25 14:40:40 -04:00
Adam Ierymenko ed2360d9f7 Version bump. 2021-05-25 13:31:40 -04:00
Adam Ierymenko 1ce71f9dc0 Build fix. 2021-05-25 13:05:06 -04:00
Adam Ierymenko 18508b5a2e Build fix. 2021-05-25 13:04:14 -04:00
Adam Ierymenko 621898f3c5 Forgot to set auth info in NetworkConfig. 2021-05-25 13:02:06 -04:00
Adam Ierymenko 2c1d7f3dcc CLI printing of URL. 2021-05-25 12:58:33 -04:00
Adam Ierymenko 8bb5bc736d Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-05-24 22:58:36 -04:00
Adam Ierymenko b270d527f4 Basic plumbing for authentication requirement and piping through of URL information. 2021-05-24 22:58:17 -04:00
Grant Limberg 1bd9e9078e libhiredis++ multi-arch binary 2021-05-21 15:48:19 -07:00
Grant Limberg a3361a7d97 libhiredis + arm64 for controller 2021-05-21 15:35:26 -07:00
Grant Limberg ca1715118f force mac native central controller builds to be x64 only for now 2021-05-21 15:29:35 -07:00
Joseph Henry 27ecb7c7b6 Merge branch 'xumng123-master' into dev 2021-05-18 00:26:17 -07:00
Joseph Henry be7fca254f Merge branch 'master' of https://github.com/xumng123/ZeroTierOne into xumng123-master
Remove unnecessary include
2021-05-18 00:24:19 -07:00
Joseph Henry b64ae8c8a5 Fix for bug #1403 2021-05-18 00:05:46 -07:00
Kamil Cholewinski b984eb2808 Use clang on OpenBSD 2021-05-06 13:04:58 +02:00
joseph-henry 15905b2fe3 Merge pull request #1397 from zerotier/bugfix-bad-traces
Fix erroneous cast of verb to double that causes invalid tracing output
2021-05-04 10:33:10 -07:00
Joseph Henry 24615ed24b Fix erroneous cast of verb to double that causes invalid tracing output 2021-05-04 08:59:52 -07:00
Joseph Henry 13481cea18 Fix (some) compile-time warnings on Windows 2021-05-03 21:12:45 -07:00
Joseph Henry 7faaa55436 Merge branch 'dev' of https://github.com/zerotier/ZeroTierOne into dev-multipath 2021-05-03 19:41:41 -07:00
Joseph Henry 11ddbc6f30 Fix (some) compile-time warnings on Linux 2021-05-03 19:35:28 -07:00
Joseph Henry 29e5880d8b Match formatting of Bond-related sources to ZeroTier standard (no functional changes) 2021-05-03 17:59:31 -07:00
Joseph Henry 63fd2cbaeb Add ZeroTier standard .clang-format -- Keeping tabs for 1.X line. Mostly based on LLVM format. 2021-05-03 13:00:30 -07:00
Grant Limberg 9c58308e6a Merge pull request #1383 from erikh/docker-image-fixes
Multiple image fixes:
2021-04-28 13:26:37 -07:00
Grant Limberg 5fb814a04f Merge pull request #1388 from emundo/fix/1387-dns-issue
Fix macOS DNS issue
2021-04-28 13:19:09 -07:00
Grant Limberg c69d2df0a2 Merge pull request #1390 from jonathonf/linux-tap-link-ordering
Set MAC address before bringing up Linux TAP link
2021-04-28 13:17:38 -07:00
Adam Ierymenko 46a7136b0d Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-04-28 16:16:17 -04:00
Adam Ierymenko d2974f2e60 Do not inherit open file descriptors on fork() in MacEthernetTapAgent 2021-04-28 16:16:02 -04:00
Adam Ierymenko ed8fe8990b Revert "Removed language from comments"
This reverts commit 1bd1923964.
2021-04-21 18:54:59 -04:00
Adam Ierymenko 50703534b1 Revert "Removed language from comments"
This reverts commit 57a225cb39.
2021-04-21 18:54:43 -04:00
Adam Ierymenko 4a7c156bf8 Revert "Removed language from comments"
This reverts commit 0a18e66a83.
2021-04-21 18:54:27 -04:00
Adam Ierymenko 54680a6edc Revert "Update zttap300.inf"
This reverts commit 3af693af34.
2021-04-21 18:54:11 -04:00
Jonathon Fernyhough bac57e355d Set MAC address before bringing up Linux TAP link
This corrects the flow for bringing up a TAP device under Linux by
setting the device MAC address prior to bringing up the device.

Closes #1314
2021-04-21 20:46:13 +01:00
Jonathon Fernyhough b8b1f64959 Revert "Reorder Linux TAP link sequence"
This reverts commit 9374e45449.
2021-04-21 20:45:17 +01:00
Grant Limberg cdcd6c4886 Merge pull request #1389 from jonathonf/linux-tap-link-ordering
Reorder Linux TAP link sequence
2021-04-21 09:27:26 -07:00
Robert.Schreib 4e8640b380 Handle case where no old DNS servers exist 2021-04-21 13:49:55 +02:00
Jonathon Fernyhough 9374e45449 Reorder Linux TAP link sequence
This corrects the flow for bringing up a TAP device under Linux.

Closes #1314
2021-04-21 12:30:51 +01:00
Robert.Schreib 31ffe4403c Check if DNS servers need to be Applied on macOS 2021-04-21 12:02:31 +02:00
Adam Ierymenko e8f7d5ef9e VERSION 1.6.5
This is a minor release that fixes some path stability issues and an issue with Windows interface enumeration.
2021-04-20 18:49:10 -04:00
Adam Ierymenko ee0e306685 Windows version bump. 2021-04-20 14:56:33 -04:00
Dave Cottlehuber b37e9de24d BSD: add debug fprintfs for external commands 2021-04-15 06:37:01 +00:00
Adam Ierymenko df0007d532 Update hard-coded default planet to latest. 2021-04-14 12:25:35 -04:00
Adam Ierymenko b70c5b94bd 1.6.5 version bump 2021-04-13 16:59:47 -04:00
Erik Hollensbe 23f9baa9f2 Multiple image fixes:
- Can now provide the following environment variables to populate
secrets (nice for kubernetes, other situations)
  - ZEROTIER_API_SECRET: authtoken.secret
  - ZEROTIER_IDENTITY_PUBLIC: identity.public
  - ZEROTIER_IDENTITY_SECRET: identity.secret
- Joining networks by providing them as a part of docker's "command"
array should now work properly

Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
2021-04-13 13:18:21 -07:00
xumng123 537ce83498 yes 2021-04-13 16:12:11 +00:00
Joseph Henry 1732f7371c Minor bonding CLI fix 2021-04-07 15:15:35 -07:00
Adam Ierymenko 5262a2f753 Merge branch 'dev' of github.com:zerotier/ZeroTierOne into dev 2021-03-16 13:50:12 -04:00
Adam Ierymenko 79e2fd4586 Automatically detect Ethernet tap friendly name in Windows shouldBind stuff. 2021-03-16 10:12:55 -04:00
Joseph Henry 353905394e Fix interface blacklisting in shouldBindInterface 2021-03-09 12:34:01 -08:00
Joseph Henry 3870f7af27 Improve missing authtoken error message 2021-03-08 21:45:38 -08:00
Joseph Henry b8e23e6fcc Merge branch 'master' into dev 2021-03-08 18:13:00 -08:00
joseph-henry a7f652781f Merge pull request #1364 from Pablohn26/master
Show the port number which is not able to connect
2021-03-08 18:12:12 -08:00
Pablo Hinojosa d3fd0d3916 Show the port number which is not able to connect 2021-03-09 02:25:41 +01:00
joseph-henry 1beacf3000 Merge pull request #1347 from showipintbri/patch-1
Patch 1 - Language suggestion
2021-03-08 17:23:26 -08:00
joseph-henry 88a1170966 Merge pull request #1354 from contrun/fix-sprintf-overflow
fix sprintf overflow
2021-03-08 17:07:54 -08:00
Joseph Henry 315a5cfd58 Fix ZT_SANITIZE flag handling in Linux makefile 2021-03-08 15:11:55 -08:00
Sean OMeara a5a94e3c49 Merge pull request #1355 from erikh/docker-release-tooling
Initial docker release image tooling
2021-02-27 14:28:26 +01:00
Erik Hollensbe ef784611b7 Initial docker release image tooling
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2021-02-24 03:43:45 -08:00
YI d526dca1bb fix sprintf overflow 2021-02-19 23:42:38 +08:00
Adam Ierymenko e8390afad5 VERSION 1.6.4
This version just fixes the "connection coma" bug some users have
experienced in 1.6.
2021-02-17 11:35:28 -05:00
Adam Ierymenko 9fdf83be60 Version bumpity bumpity bump. 2021-02-15 19:37:46 -05:00
Adam Ierymenko 147945d20f Lets try always supplying the AES keys to Packet dearmor() and see if that prevents the coma problem. 2021-02-13 00:01:49 -05:00
showipintbri 3af693af34 Update zttap300.inf 2021-02-03 22:31:16 -05:00
showipintbri 0a18e66a83 Removed language from comments 2021-02-03 22:30:34 -05:00
showipintbri 57a225cb39 Removed language from comments 2021-02-03 22:29:42 -05:00
showipintbri 1bd1923964 Removed language from comments 2021-02-03 22:26:41 -05:00
Adam Ierymenko 7c2066c258 VERSION 1.6.3 2021-02-03 22:06:34 -05:00
Adam Ierymenko ac808d51d6 Crash fix 2021-02-03 18:56:07 -05:00
Adam Ierymenko 378bc73bf8 Clean up some peer path learning logic, use a cheaper data structure. 2021-02-03 14:30:03 -05:00
Adam Ierymenko 8430db4dc7 Windows 1.6.3 version bump. 2021-02-02 17:52:27 -05:00
Adam Ierymenko 0f049da84f Dockerfile version bump to 1.6.3 2021-02-02 17:18:58 -05:00
Adam Ierymenko a1b6cc44fc Revert wireguard blacklist by default... turns out we have people who depend on that. may revisit. 2021-02-02 17:09:35 -05:00
Adam Ierymenko 201fd7c421 Revert "Revert "GitHub issue #1317""
This reverts commit 89efd09e20.
2021-02-02 17:08:33 -05:00
Adam Ierymenko 89efd09e20 Revert "GitHub issue #1317"
This reverts commit c14d1047d2.
2021-02-02 17:08:07 -05:00
Adam Ierymenko 3eccb5a6f0 Merge branch 'master' into dev 2021-02-02 17:07:35 -05:00
Adam Ierymenko 191b802c50 docs 2021-02-02 17:07:28 -05:00
Adam Ierymenko f4703905b9 docs 2021-02-02 17:05:30 -05:00
Adam Ierymenko 41a85b1de7 Merge pull request #1322 from capruro/patch-1
Update Dockerfile to 1.6.2
2021-02-02 17:05:19 -05:00
Adam Ierymenko 9021302578 Merge pull request #1330 from liweitianux/readme
README: Minor format fixes
2021-02-02 17:05:04 -05:00
Adam Ierymenko e1aec2cb03 Merge pull request #1339 from dnadlinger/patch-1
.github: Fix typo in bug report template
2021-02-02 17:04:41 -05:00
Adam Ierymenko 3aa0390dba Merge branch 'master' into dev 2021-02-02 17:04:03 -05:00
Adam Ierymenko d3770eeccc Merge branch 'master' of github.com:zerotier/ZeroTierOne 2021-02-02 17:03:48 -05:00
Adam Ierymenko 1d6b8393e3 Merge pull request #1341 from bradleydiggs/master
blacklist wg# (WireGuard) interfaces by default
2021-02-02 17:03:36 -05:00
Adam Ierymenko c14d1047d2 GitHub issue #1317 2021-02-02 17:00:56 -05:00
Adam Ierymenko 343ccd911b Version bumps to 1.6.3 2021-02-02 16:51:02 -05:00
Adam Ierymenko 697c8c9882 Delete old code. 2021-02-02 16:17:53 -05:00
Adam Ierymenko 72d48da210 Fix duplicate paths and reduce thrashing issues. 2021-02-02 16:11:13 -05:00
Adam Ierymenko b2b3271a96 Possible fix for path issues in 1.6.2 2021-02-02 14:55:47 -05:00
Adam Ierymenko 717e9238fe Merge branch 'master' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev 2021-02-02 14:46:15 -05:00
Adam Ierymenko 12c77459d0 Merge branch 'master' into dev 2021-02-02 14:45:58 -05:00
bradleydiggs 5b1c55023f Merge pull request #1 from bradleydiggs/wireguard-blacklist-default
blacklists wg# (WireGuard) interfaces by default
2021-01-14 02:49:25 -06:00
bradleydiggs a401b21f3d blacklists wg# (WireGuard) interfaces by default
On certain OSes (Linux & Apple) tun#, tap#, and of course zt# are blacklisted by default, this adds wg# to the list as WireGuard is a similar popular service with wg# being the default adapter name(s) by convention.
2021-01-14 02:45:42 -06:00
David Nadlinger 3a6cc1d8b7 .github: Fix typo in bug report template 2021-01-13 18:07:58 +01:00
Aaron LI 4944d044ce README: Minor format fixes 2020-12-20 17:12:34 +08:00
Grant Limberg b3228ab307 update issue templates 2020-12-16 14:50:26 -08:00
capruro 68b0e13991 Update to 1.6.2 2020-12-13 13:54:43 +01:00
Adam Ierymenko 70d81277e0 1.6.2-2 for Debian. 2020-12-01 16:05:16 -05:00
Adam Ierymenko 48814c1bfe Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne 2020-12-01 16:02:53 -05:00
Adam Ierymenko 0587e432c0 ARM wrestling. 2020-12-01 13:02:19 -08:00
Rosen Penev 2aecb547d9 LinuxNetLink: Add cerrno header for (str)errno
Fixes compilation under libcxx.
2020-11-30 01:38:45 -08:00
thoradia f2734dc3d8 add ports to addresses specified by the bind setting 2020-09-08 01:49:19 +02:00
Robert Socha bfe5c758ba Add description for Windos service 2020-04-18 18:56:28 +02:00
Kevin Kuehler c9f07e855e systemd: fix zerotier hanging on shutdown
On system shutdown, zerotier is stopped after the network and gets
itself into a connection timeout loop. It hits the TimeoutStopUSec= and
is forcibly killed by SIGKILL. Order zerotier after network.target so it
can shutdown gracefully while the network is still up.

From systemd.special(7):

at shutdown, a unit that is ordered after network.target will be stopped
before the network — to whatever level it might be set up then — is shut
down. It is hence useful when writing service files that require network
access on shutdown, which should order themselves after this target, but
not pull it in
2019-11-27 16:29:39 -08:00
1710 changed files with 339074 additions and 64710 deletions

No files matched your search

+74
View File
@@ -0,0 +1,74 @@
---
BasedOnStyle: LLVM
BreakBeforeBraces: Stroustrup
IndentWidth: 4
TabWidth: 4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: "true"
AlignConsecutiveAssignments: "false"
AlignConsecutiveDeclarations: "false"
AlignEscapedNewlines: Right
AlignOperands: "true"
AlignTrailingComments: "true"
AllowAllArgumentsOnNextLine: "false"
AllowAllConstructorInitializersOnNextLine: "false"
AllowAllParametersOfDeclarationOnNextLine: "false"
AllowShortBlocksOnASingleLine: "true"
AllowShortCaseLabelsOnASingleLine: "false"
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AlwaysBreakAfterReturnType: None
BinPackArguments: "true"
BinPackParameters: OnePerLine
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: "true"
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
CompactNamespaces: "false"
ConstructorInitializerAllOnOneLineOrOnePerLine: "true"
ConstructorInitializerIndentWidth: "4"
ContinuationIndentWidth: "4"
Cpp11BracedListStyle: "false"
FixNamespaceComments: "true"
IncludeBlocks: Regroup
IndentCaseLabels: "true"
IndentPPDirectives: None
IndentWrappedFunctionNames: "false"
KeepEmptyLinesAtTheStartOfBlocks: "false"
MaxEmptyLinesToKeep: "1"
NamespaceIndentation: None
PointerAlignment: Left
ReflowComments: "true"
SortIncludes: "true"
SortUsingDeclarations: "true"
SpaceAfterCStyleCast: "false"
SpaceAfterLogicalNot: "true"
SpaceAfterTemplateKeyword: "true"
SpaceBeforeAssignmentOperators: "true"
SpaceBeforeCpp11BracedList: "true"
SpaceBeforeCtorInitializerColon: "true"
SpaceBeforeInheritanceColon: "true"
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: "true"
SpaceInEmptyParentheses: "false"
SpacesBeforeTrailingComments: "3"
SpacesInAngles: "false"
SpacesInCStyleCastParentheses: "false"
SpacesInContainerLiterals: "true"
SpacesInParentheses: "false"
SpacesInSquareBrackets: "false"
UseTab: "Always"
---
Language: Cpp
Standard: Cpp03
ColumnLimit: "120"
---
Language: ObjC
ColumnLimit: "120"
---
Language: Java
ColumnLimit: "120"
---
Language: CSharp
ColumnLimit: "120"
+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"
+10
View File
@@ -1,2 +1,12 @@
.git/
workspace/
# Local from-source dependency builds (scripts/bootstrap-deps.sh) and CMake output;
# never ship these into an image -- they are host-specific and large.
.deps/
.deps-build/
build/
build-*/
out/
# Dockerfiles are supplied via -f; keeping them out of the context means editing
# them does not invalidate the COPY layers (and the heavy build cache).
ext/central-controller-docker/Dockerfile*
+9 -28
View File
@@ -11,40 +11,21 @@ assignees: ''
_Using these will ensure you get quicker support, and make this space available for code-related issues. Thank you!_
- [Knowledge Base](https://zerotier.atlassian.net/wiki/spaces/SD/overview) => Guides and documentation on how to use ZeroTier.
- [Discuss Forum](https://discuss.zerotier.com/) => Our discussion forum for users and support to mutally resolve issues & suggest ideas.
- [Docs Site](https://docs.zerotier.com/zerotier/troubleshooting) => Troubleshooting, quickstarts, and more advanced topics.
- [Discuss Forum](https://discuss.zerotier.com/) => Our discussion forum for users and support to mutually resolve issues & suggest ideas.
- [Reddit](https://www.reddit.com/r/zerotier/) => Our subreddit, which we monitor regularly and is fairly active.
- https://www.zerotier.com/contact/ => Sales and licensing queries
- https://zerotier.atlassian.net/servicedesk/customer/portals => Customer Support Portal
- [Knowledge Base](https://zerotier.atlassian.net/wiki/spaces/SD/overview) => Older wiki.
If you are having a connection issue, it's much easier to diagnose through the discussion forum or the ticket system.
# If you still want to file a Bug Report
## Required
## Please let us know
- What you expect to be happening.
- What is actually happening?
- Any steps to reproduce the error.
- Any screenshots that would help us out.
- Any relevant console output or screenshots.
- What operating system and ZeroTier version. Please try the latest ZeroTier release.
## Additional information
**Desktop (please complete the following information):**
- OS: [e.g. Mac, Linux, Windows, BSD]
- OS/Distribution Version
- ZeroTier Version [e.g. 1.4.6]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- ZeroTier Version [e.g. 1.4.6]
**Embedded & NAS (please complete the following information):**
- Device: [e.g. Synology, Pi4]
- OS/Distribution (if applicable)
- ZeroTier Version [e.g. 1.4.6]
**Additional context**
- ZeroTier Network Configuration: IPv4 & IPv6 networks defined on your ZeroTier Central
- Router Config: are you permitting port 9993, uPnP, and NAT-PMP?
- Firewall Config: are you permitting port 9993 on your OS; setting it to "Private" on Windows?
- Are you using this at home, in an office, college, etc?
@@ -12,4 +12,4 @@ Are you having trouble connecting to a game on your virtual network after instal
- [ ] Yes
- [ ] No
If you answered yes, then it is very likely that your question would be better answered on our [Discuss ](https://discuss.zerotier.com) forum or [Reddit](https://www.reddit.com/r/zerotier/) community; we monitor both regularly. We also have extensive documentation on our [Knowledge Base](https://zerotier.atlassian.net/wiki/spaces/SD/overview). Thank you!
If you answered yes, then it is very likely that your question would be better answered on our [Community Forums](https://discuss.zerotier.com) or [Reddit](https://www.reddit.com/r/zerotier/) community; we monitor both regularly. We also have extensive documentation on our [Knowledge Base](https://zerotier.atlassian.net/wiki/spaces/SD/overview). Thank you!
+126
View File
@@ -0,0 +1,126 @@
on:
pull_request:
push:
workflow_dispatch:
jobs:
build_ubuntu:
runs-on: ubuntu-latest
steps:
- name: gitconfig
run: |
git config --global core.autocrlf input
# git config --global core.eol lf
- name: checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
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('rustybits//Cargo.lock') }}
shared-key: ${{ runner.os }}-cargo-
workspaces: |
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-ubuntu-x64
path: zerotier-one.tar
retention-days: 7
build_macos:
runs-on: macos-latest
steps:
- name: gitconfig
run: |
git config --global core.autocrlf input
# git config --global core.eol lf
- name: checkout
uses: actions/checkout@v4
- name: Install Rust aarch64
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: aarch64-apple-darwin
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('rustybits//Cargo.lock') }}
shared-key: ${{ runner.os }}-cargo-
workspaces: |
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-2022
steps:
- name: gitconfig
run: |
git config --global core.autocrlf true
# git config --global core.eol lf
- name: checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: x86_64-pc-windows-msvc
components: rustfmt, clippy
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
continue-on-error: false
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
shared-key: ${{ runner.os }}-cargo-
workspaces: |
rustybits/
- name: setup msbuild
uses: microsoft/setup-msbuild@v2
- name: msbuild
run: |
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
+104
View File
@@ -0,0 +1,104 @@
# on:
# workflow_dispatch:
on:
push:
workflow_dispatch:
jobs:
central_controller:
name: Central Controller Build
strategy:
matrix:
runner: [gha-runner-x64, gha-runner-arm64]
runs-on: ${{ matrix.runner }}
steps:
- name: checkout
uses: actions/checkout@v6
- name: GCP Auth
uses: google-github-actions/auth@v3
with:
credentials_json: ${{ secrets.DOCKER_REGISTRY_WRITER}}
- name: Set up GCloud CLI
uses: google-github-actions/setup-gcloud@v3
with:
# v3 no longer uses the tool cache by default; restore the prior caching
# behavior on these self-hosted runners (perf: avoids re-fetching the SDK).
cache: true
- name: Docker Auth
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: Get branch name and sanitize
id: branch
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
SANITIZED_BRANCH="${BRANCH_NAME//\//-}"
echo "branch_name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT
- name: Get short git commit SHA
id: sha
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build & Push Docker Image
# Registry layer cache (mode=max) so the expensive builder stage -- which
# builds opentelemetry-cpp + google-cloud-cpp from source -- is reused across
# runs and fresh runners. The cache invalidates automatically when the
# bootstrap inputs change. Cache is per-arch (the deps layer is arch-specific).
run: |
CACHE=us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller-buildcache:${{ runner.arch }}
docker buildx build \
-t us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-${{ runner.arch }} \
-f ext/central-controller-docker/Dockerfile \
--cache-from type=registry,ref=$CACHE \
--cache-to type=registry,ref=$CACHE,mode=max \
--provenance false \
--push .
multi-arch-docker:
runs-on: gha-runner-x64
needs: central_controller
steps:
- name: Checkout
uses: actions/checkout@v6
- name: GCP Auth
uses: google-github-actions/auth@v3
with:
credentials_json: ${{ secrets.DOCKER_REGISTRY_WRITER}}
- name: Set up GCloud CLI
uses: google-github-actions/setup-gcloud@v3
with:
# v3 no longer uses the tool cache by default; restore the prior caching
# behavior on these self-hosted runners (perf: avoids re-fetching the SDK).
cache: true
- name: Docker Auth
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: Get branch name and sanitize
id: branch
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
SANITIZED_BRANCH="${BRANCH_NAME//\//-}"
echo "branch_name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT
- name: Get short git commit SHA
id: sha
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Create and push multi-arch manifest
run: |
docker manifest create us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }} \
--amend us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-X64 \
--amend us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-ARM64
docker manifest push us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}
+497
View File
@@ -0,0 +1,497 @@
#!/bin/bash
# This test script joins Earth and pokes some stuff
TEST_NETWORK=8056c2e21c000001
RUN_LENGTH=30
TEST_FINISHED=false
ZTO_VER=$(git describe --tags $(git rev-list --tags --max-count=1))
ZTO_COMMIT=$(git rev-parse HEAD)
ZTO_COMMIT_SHORT=$(git rev-parse --short HEAD)
TEST_DIR_PREFIX="$ZTO_VER-$ZTO_COMMIT_SHORT-test-results"
TEST_OK=0
TEST_FAIL=1
echo "Performing test on: $ZTO_VER-$ZTO_COMMIT_SHORT"
TEST_FILEPATH_PREFIX="$TEST_DIR_PREFIX/$ZTO_COMMIT_SHORT"
mkdir $TEST_DIR_PREFIX
# How long we will wait for ZT to come online before considering it a failure
MAX_WAIT_SECS=30
ZT_PORT_NODE_1=9996
ZT_PORT_NODE_2=9997
################################################################################
# Multi-node connectivity and performance test #
################################################################################
test() {
echo -e "\nPerforming pre-flight checks"
check_exit_on_invalid_identity
echo -e "\nRunning test for $RUN_LENGTH seconds"
export NS1="ip netns exec ns1"
export NS2="ip netns exec ns2"
export ZT1="$NS1 ./zerotier-cli -p9996 -D$(pwd)/node1"
# Specify custom port on one node to ensure that feature works
export ZT2="$NS2 ./zerotier-cli -p9997 -D$(pwd)/node2"
echo -e "\nSetting up network namespaces..."
echo "Setting up ns1"
ip netns add ns1
$NS1 ip link set dev lo up
ip link add veth0 type veth peer name veth1
ip link set veth1 netns ns1
ip addr add 192.168.0.1/24 dev veth0
ip link set dev veth0 up
$NS1 ip addr add 192.168.0.2/24 dev veth1
$NS1 ip link set dev veth1 up
# Add default route
$NS1 ip route add default via 192.168.0.1
iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 \
-o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o veth0 -j ACCEPT
iptables -A FORWARD -o eth0 -i veth0 -j ACCEPT
echo "Setting up ns2"
ip netns add ns2
$NS2 ip link set dev lo up
ip link add veth2 type veth peer name veth3
ip link set veth3 netns ns2
ip addr add 192.168.1.1/24 dev veth2
ip link set dev veth2 up
$NS2 ip addr add 192.168.1.2/24 dev veth3
$NS2 ip link set dev veth3 up
$NS2 ip route add default via 192.168.1.1
iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 \
-o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o veth2 -j ACCEPT
iptables -A FORWARD -o eth0 -i veth2 -j ACCEPT
# Allow forwarding
sysctl -w net.ipv4.ip_forward=1
################################################################################
# Memory Leak Check #
################################################################################
export FILENAME_MEMORY_LOG="$TEST_FILEPATH_PREFIX-memory.log"
echo -e "\nStarting a ZeroTier instance in each namespace..."
export time_test_start=$(date +%s)
# Spam the CLI as ZeroTier is starting
spam_cli 100
echo "Starting memory leak check"
$NS1 sudo valgrind --demangle=yes --exit-on-first-error=yes \
--error-exitcode=1 \
--xml=yes \
--xml-file=$FILENAME_MEMORY_LOG \
--leak-check=full \
./zerotier-one node1 -p$ZT_PORT_NODE_1 -U >>node_1.log 2>&1 &
# Second instance, not run in memory profiler
# Don't set up internet access until _after_ zerotier is running
# This has been a source of stuckness in the past.
$NS2 ip addr del 192.168.1.2/24 dev veth3
$NS2 sudo ./zerotier-one node2 -U -p$ZT_PORT_NODE_2 >>node_2.log 2>&1 &
sleep 10; # New HTTP control plane is a bit sluggish, so we delay here
check_bind_to_correct_ports $ZT_PORT_NODE_1
check_bind_to_correct_ports $ZT_PORT_NODE_2
$NS2 ip addr add 192.168.1.2/24 dev veth3
$NS2 ip route add default via 192.168.1.1
echo -e "\nPing from host to namespaces"
ping -c 3 192.168.0.1
ping -c 3 192.168.1.1
echo -e "\nPing from namespace to host"
$NS1 ping -c 3 192.168.0.1
$NS1 ping -c 3 192.168.0.1
$NS2 ping -c 3 192.168.0.2
$NS2 ping -c 3 192.168.0.2
echo -e "\nPing from ns1 to ns2"
$NS1 ping -c 3 192.168.0.1
echo -e "\nPing from ns2 to ns1"
$NS2 ping -c 3 192.168.0.1
################################################################################
# Online Check #
################################################################################
echo "Waiting for ZeroTier to come online before attempting test..."
node1_online=false
node2_online=false
both_instances_online=false
time_zt_node1_start=$(date +%s)
time_zt_node2_start=$(date +%s)
for ((s = 0; s <= $MAX_WAIT_SECS; s++)); do
node1_online="$($ZT1 -j info | jq '.online' 2>/dev/null)"
node2_online="$($ZT2 -j info | jq '.online' 2>/dev/null)"
echo "Checking for online status: try #$s, node1:$node1_online, node2:$node2_online"
if [[ "$node2_online" == "true" && "$node1_online" == "true" ]]; then
export both_instances_online=true
export time_to_both_nodes_online=$(date +%s)
break
fi
sleep 1
done
echo -e "\n\nContents of ZeroTier home paths:"
ls -lga node1
tree node1
ls -lga node2
tree node2
echo -e "\n\nRunning ZeroTier processes:"
echo -e "\nNode 1:\n"
$NS1 ps aux | grep zerotier-one
echo -e "\nNode 2:\n"
$NS2 ps aux | grep zerotier-one
echo -e "\n\nStatus of each instance:"
echo -e "\n\nNode 1:\n"
$ZT1 status
echo -e "\n\nNode 2:\n"
$ZT2 status
if [[ "$both_instances_online" != "true" ]]; then
exit_test_and_generate_report $TEST_FAIL "one or more nodes failed to come online"
fi
echo -e "\nJoining networks"
$ZT1 join $TEST_NETWORK
$ZT2 join $TEST_NETWORK
sleep 10
node1_ip4=$($ZT1 get $TEST_NETWORK ip4)
node2_ip4=$($ZT2 get $TEST_NETWORK ip4)
echo "node1_ip4=$node1_ip4"
echo "node2_ip4=$node2_ip4"
echo -e "\nPinging each node"
PING12_FILENAME="$TEST_FILEPATH_PREFIX-ping-1-to-2.txt"
PING21_FILENAME="$TEST_FILEPATH_PREFIX-ping-2-to-1.txt"
$NS1 ping -c 16 $node2_ip4 >$PING12_FILENAME
$NS2 ping -c 16 $node1_ip4 >$PING21_FILENAME
ping_loss_percent_1_to_2=$(cat $PING12_FILENAME |
grep "packet loss" | awk '{print $6}' | sed 's/%//')
ping_loss_percent_2_to_1=$(cat $PING21_FILENAME |
grep "packet loss" | awk '{print $6}' | sed 's/%//')
# Normalize loss value
export ping_loss_percent_1_to_2=$(echo "scale=2; $ping_loss_percent_1_to_2/100.0" | bc)
export ping_loss_percent_2_to_1=$(echo "scale=2; $ping_loss_percent_2_to_1/100.0" | bc)
################################################################################
# CLI Check #
################################################################################
echo "Testing basic CLI functionality..."
spam_cli 10
$ZT1 join $TEST_NETWORK
$ZT1 -h
$ZT1 -v
$ZT1 status
$ZT1 info
$ZT1 listnetworks
$ZT1 peers
$ZT1 listpeers
$ZT1 -j status
$ZT1 -j info
$ZT1 -j listnetworks
$ZT1 -j peers
$ZT1 -j listpeers
$ZT1 dump
$ZT1 get $TEST_NETWORK allowDNS
$ZT1 get $TEST_NETWORK allowDefault
$ZT1 get $TEST_NETWORK allowGlobal
$ZT1 get $TEST_NETWORK allowManaged
$ZT1 get $TEST_NETWORK bridge
$ZT1 get $TEST_NETWORK broadcastEnabled
$ZT1 get $TEST_NETWORK dhcp
$ZT1 get $TEST_NETWORK id
$ZT1 get $TEST_NETWORK mac
$ZT1 get $TEST_NETWORK mtu
$ZT1 get $TEST_NETWORK name
$ZT1 get $TEST_NETWORK netconfRevision
$ZT1 get $TEST_NETWORK nwid
$ZT1 get $TEST_NETWORK portDeviceName
$ZT1 get $TEST_NETWORK portError
$ZT1 get $TEST_NETWORK status
$ZT1 get $TEST_NETWORK type
# Test an invalid command
$ZT1 get $TEST_NETWORK derpderp
# TODO: Validate JSON
# Performance Test
export FILENAME_PERF_JSON="$TEST_FILEPATH_PREFIX-iperf.json"
echo -e "\nBeginning performance test:"
echo -e "\nStarting server:"
echo "$NS1 iperf3 -s &"
sleep 1
echo -e "\nStarting client:"
sleep 1
echo "$NS2 iperf3 --json -c $node1_ip4 > $FILENAME_PERF_JSON"
cat $FILENAME_PERF_JSON
# Let ZeroTier idle long enough for various timers
echo -e "\nIdling ZeroTier for $RUN_LENGTH seconds..."
sleep $RUN_LENGTH
echo -e "\nLeaving networks"
$ZT1 leave $TEST_NETWORK
$ZT2 leave $TEST_NETWORK
sleep 5
exit_test_and_generate_report $TEST_OK "completed test"
}
################################################################################
# Generate report #
################################################################################
exit_test_and_generate_report() {
echo -e "\nStopping memory check..."
sudo pkill -15 -f valgrind
sleep 10
time_test_end=$(date +%s)
echo "Exiting test with reason: $2 ($1)"
# Collect ZeroTier dump files
echo -e "\nCollecting ZeroTier dump files"
node1_id=$($ZT1 -j status | jq -r .address)
node2_id=$($ZT2 -j status | jq -r .address)
$ZT1 dump
mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node1_id.txt"
$ZT2 dump
mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node2_id.txt"
# Copy ZeroTier stdout/stderr logs
cp node_1.log "$TEST_FILEPATH_PREFIX-node-log-$node1_id.txt"
cp node_2.log "$TEST_FILEPATH_PREFIX-node-log-$node2_id.txt"
# Generate report
cat $FILENAME_MEMORY_LOG
DEFINITELY_LOST=$(xmlstarlet sel -t -v '/valgrindoutput/error/xwhat' \
$FILENAME_MEMORY_LOG | grep "definitely" | awk '{print $1;}')
POSSIBLY_LOST=$(xmlstarlet sel -t -v '/valgrindoutput/error/xwhat' \
$FILENAME_MEMORY_LOG | grep "possibly" | awk '{print $1;}')
# Generate coverage report artifact and summary
FILENAME_COVERAGE_JSON="$TEST_FILEPATH_PREFIX-coverage.json"
FILENAME_COVERAGE_HTML="$TEST_FILEPATH_PREFIX-coverage.html"
echo -e "\nGenerating coverage test report..."
gcovr -r . --exclude ext --json-summary $FILENAME_COVERAGE_JSON \
--html >$FILENAME_COVERAGE_HTML
cat $FILENAME_COVERAGE_JSON
COVERAGE_LINE_COVERED=$(cat $FILENAME_COVERAGE_JSON | jq .line_covered)
COVERAGE_LINE_TOTAL=$(cat $FILENAME_COVERAGE_JSON | jq .line_total)
COVERAGE_LINE_PERCENT=$(cat $FILENAME_COVERAGE_JSON | jq .line_percent)
COVERAGE_LINE_COVERED="${COVERAGE_LINE_COVERED:-0}"
COVERAGE_LINE_TOTAL="${COVERAGE_LINE_TOTAL:-0}"
COVERAGE_LINE_PERCENT="${COVERAGE_LINE_PERCENT:-0}"
# Default values
DEFINITELY_LOST="${DEFINITELY_LOST:-0}"
POSSIBLY_LOST="${POSSIBLY_LOST:-0}"
ping_loss_percent_1_to_2="${ping_loss_percent_1_to_2:-100.0}"
ping_loss_percent_2_to_1="${ping_loss_percent_2_to_1:-100.0}"
time_to_both_nodes_online="${time_to_both_nodes_online:--1}"
# Summarize and emit json for trend reporting
FILENAME_SUMMARY="$TEST_FILEPATH_PREFIX-summary.json"
time_length_test=$((time_test_end - time_test_start))
if [[ $time_to_both_nodes_online != -1 ]];
then
time_to_both_nodes_online=$((time_to_both_nodes_online - time_test_start))
fi
#time_length_zt_join=$((time_zt_join_end-time_zt_join_start))
#time_length_zt_leave=$((time_zt_leave_end-time_zt_leave_start))
#time_length_zt_can_still_ping=$((time_zt_can_still_ping-time_zt_leave_start))
summary=$(
cat <<EOF
{
"version":"$ZTO_VER",
"commit":"$ZTO_COMMIT",
"arch_m":"$(uname -m)",
"arch_a":"$(uname -a)",
"binary_size":"$(stat -c %s zerotier-one)",
"time_length_test":$time_length_test,
"time_to_both_nodes_online":$time_to_both_nodes_online,
"num_possible_bytes_lost": $POSSIBLY_LOST,
"num_definite_bytes_lost": $DEFINITELY_LOST,
"num_bad_formattings": $POSSIBLY_LOST,
"coverage_lines_covered": $COVERAGE_LINE_COVERED,
"coverage_lines_total": $COVERAGE_LINE_TOTAL,
"coverage_lines_percent": $COVERAGE_LINE_PERCENT,
"ping_loss_percent_1_to_2": $ping_loss_percent_1_to_2,
"ping_loss_percent_2_to_1": $ping_loss_percent_2_to_1,
"test_exit_code": $1,
"test_exit_reason":"$2"
}
EOF
)
echo $summary >$FILENAME_SUMMARY
cat $FILENAME_SUMMARY
exit 0
}
################################################################################
# CLI Check #
################################################################################
spam_cli() {
echo "Spamming CLI..."
# Rapidly spam the CLI with joins/leaves
MAX_TRIES="${1:-10}"
for ((s = 0; s <= MAX_TRIES; s++)); do
$ZT1 status
$ZT2 status
sleep 0.1
done
SPAM_TRIES=128
for ((s = 0; s <= SPAM_TRIES; s++)); do
$ZT1 join $TEST_NETWORK
done
for ((s = 0; s <= SPAM_TRIES; s++)); do
$ZT1 leave $TEST_NETWORK
done
for ((s = 0; s <= SPAM_TRIES; s++)); do
$ZT1 leave $TEST_NETWORK
$ZT1 join $TEST_NETWORK
done
}
################################################################################
# Check for proper exit on load of invalid identity #
################################################################################
check_exit_on_invalid_identity() {
echo "Checking ZeroTier exits on invalid identity..."
mkdir -p $(pwd)/exit_test
ZT1="sudo ./zerotier-one -p9999 $(pwd)/exit_test"
echo "asdfasdfasdfasdf" > $(pwd)/exit_test/identity.secret
echo "asdfasdfasdfasdf" > $(pwd)/exit_test/authtoken.secret
echo "Launch ZeroTier with an invalid identity"
$ZT1 &
my_pid=$!
echo "Waiting 5 seconds"
sleep 5
# check if process is running
kill -0 $my_pid
if [ $? -eq 0 ]; then
exit_test_and_generate_report $TEST_FAIL "Exit test FAILED: Process still running after being fed an invalid identity"
fi
}
################################################################################
# Check that we're binding to the primary port for TCP/TCP6/UDP #
################################################################################
check_bind_to_correct_ports() {
PORT_NUMBER=$1
echo "Checking bound ports:"
sudo netstat -anp | grep "$PORT_NUMBER" | grep "zerotier"
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "zerotier" | grep "tcp") ]];
then
:
else
exit_test_and_generate_report $TEST_FAIL "ZeroTier did not bind to tcp/$1"
fi
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "zerotier" | grep "tcp6") ]];
then
:
else
exit_test_and_generate_report $TEST_FAIL "ZeroTier did not bind to tcp6/$1"
fi
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "zerotier" | grep "udp") ]];
then
:
else
exit_test_and_generate_report $TEST_FAIL "ZeroTier did not bind to udp/$1"
fi
}
test "$@"
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
################################################################################
# Set exit code depending on tool reports #
################################################################################
DEFINITELY_LOST=$(cat *test-results/*summary.json | jq .num_definite_bytes_lost)
EXIT_CODE=$(cat *test-results/*summary.json | jq .exit_code)
EXIT_REASON=$(cat *test-results/*summary.json | jq .exit_reason)
cat *test-results/*summary.json
echo -e "\nBytes of memory definitely lost: $DEFINITELY_LOST"
if [[ "$DEFINITELY_LOST" -gt 0 ]]; then
exit 1
fi
# Catch-all for other non-zero exit codes
if [[ "$EXIT_CODE" -gt 0 ]]; then
echo "Test failed: $EXIT_REASON"
exit 1
fi
+56
View File
@@ -0,0 +1,56 @@
on:
pull_request:
push:
workflow_dispatch:
jobs:
build_ubuntu:
runs-on: ubuntu-latest
steps:
- name: gitconfig
run: |
git config --global core.autocrlf input
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
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('rustybits//Cargo.lock') }}
shared-key: ${{ runner.os }}-cargo-
workspaces: |
rustybits/
- name: validate-1m-linux
env:
CC: 'gcc'
CXX: 'g++'
BRANCH: ${{ github.ref_name }}
run: |
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@v4
with:
name: ${{github.sha}}-test-results
path: "*test-results*"
- name: final-report
run: |
sudo chmod +x ./.github/workflows/validate-report.sh
sudo ./.github/workflows/validate-report.sh
+34 -5
View File
@@ -6,11 +6,19 @@
/zerotier
/nltest
# 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
@@ -30,7 +38,6 @@ Thumbs.db
/windows/WebUIWrapper/obj
/windows/lib
/ext/installfiles/windows/ZeroTier One-SetupFiles
/ext/installfiles/windows/Prerequisites
/ext/installfiles/windows/*-cache
/ZeroTier One.msi
*.vcxproj.backup
@@ -54,11 +61,13 @@ zt1-src.tar.gz
/MacEthernetTapAgent
# Miscellaneous temporaries, build files, etc.
ext/installfiles/windows/*.back*.aip
tcp-proxy/tcp-proxy
rustybits/target
*.log
*.opensdf
*.user
*.cache
*.obj
*.tlog
*.pid
*.pkg
@@ -82,6 +91,7 @@ debian/zerotier-one*.debhelper
debian/*.log
debian/zerotier-one.substvars
root-watcher/config.json
build/
# Java/Android/JNI build droppings
java/obj/
@@ -97,13 +107,12 @@ windows/WinUI/bin/
windows/ZeroTierOne/Debug/
/ext/installfiles/windows/chocolatey/zerotier-one/*.nupkg
# Miscellaneous mac/Xcode droppings
.DS_Store
.Trashes
*.swp
*~.nib
DerivedData/
build/
*.pbxuser
*.mode1v3
*.mode2v3
@@ -114,7 +123,6 @@ build/
!default.perspectivev3
*.xccheckout
xcuserdata/
ext/librethinkdbxx/build
.vscode
__pycache__
*~
@@ -122,3 +130,24 @@ attic/world/*.c25519
attic/world/mkworld
workspace/
workspace2/
zeroidc/target/
tcp-proxy/target
# Snapcraft Linux build stuff
/parts/
/stage/
/prime/
*.snap
.snapcraft
__pycache__
*.pyc
*_source.tar.bz2
snap/.snapcraft
build/
# Local dependency bootstrap output (scripts/bootstrap-deps.sh): the install
# prefix and the build/clone scratch dir. Large + host-specific; never commit.
.deps/
.deps-build/
.claude/*.local.*
-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
+28
View File
@@ -0,0 +1,28 @@
# Central Controller build dependencies for macOS development.
#
# brew bundle # install the deps below
# ZT_CONTROLLER_DEPS=1 scripts/bootstrap-deps.sh # build the two pinned controller deps (full OTel + google-cloud-cpp)
#
# The two version-sensitive C++ libraries (opentelemetry-cpp, google-cloud-cpp)
# are NOT taken from Homebrew -- they are pinned and built from source by
# scripts/bootstrap-deps.sh so every dev/CI machine uses the same versions
# (the role conda previously filled). Everything below is stable enough to take
# from Homebrew.
brew "cmake"
brew "ninja"
brew "pkg-config"
brew "rustup-init" # then: rustup-init -y && rustup default stable
brew "libpqxx"
brew "libpq" # keg-only; add $(brew --prefix libpq) to CMAKE_PREFIX_PATH so find_package(PostgreSQL) resolves
brew "hiredis"
brew "jemalloc"
brew "nlohmann-json"
brew "openssl@3"
brew "abseil"
brew "protobuf"
brew "grpc"
brew "googletest" # google-cloud-cpp requires GTest/GMock at configure (builds its *_mocks libs)
brew "curl"
brew "inja"
+676 -7
View File
File diff suppressed because it is too large. Load diff
+167
View File
@@ -0,0 +1,167 @@
{
"version": 3,
"cmakeMinimumRequired": { "major": 3, "minor": 21, "patch": 0 },
"configurePresets": [
{
"name": "unix-base",
"hidden": true,
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build-${presetName}",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "${sourceDir}/.deps",
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "linux-base",
"hidden": true,
"inherits": "unix-base",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" }
},
{
"name": "macos-base",
"hidden": true,
"inherits": "unix-base",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" },
"cacheVariables": {
"CMAKE_PREFIX_PATH": "${sourceDir}/.deps;$env{HOMEBREW_PREFIX};$env{HOMEBREW_PREFIX}/opt/openssl@3;$env{HOMEBREW_PREFIX}/opt/libpq"
}
},
{ "name": "linux-release", "inherits": "linux-base", "displayName": "Linux daemon (Release)" },
{ "name": "linux-debug", "inherits": "linux-base", "displayName": "Linux daemon (Debug)", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "linux-controller-release", "inherits": "linux-base", "displayName": "Linux Central Controller (Release)", "cacheVariables": { "ZT1_CENTRAL_CONTROLLER": "ON" } },
{ "name": "linux-controller-debug", "inherits": "linux-base", "displayName": "Linux Central Controller (Debug)", "cacheVariables": { "ZT1_CENTRAL_CONTROLLER": "ON", "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "linux-free-release", "inherits": "linux-base", "displayName": "Linux daemon, free / no controller (Release)", "cacheVariables": { "ZT_NONFREE": "OFF" } },
{ "name": "linux-free-debug", "inherits": "linux-base", "displayName": "Linux daemon, free / no controller (Debug)", "cacheVariables": { "ZT_NONFREE": "OFF", "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "macos-release", "inherits": "macos-base", "displayName": "macOS daemon (Release)" },
{ "name": "macos-debug", "inherits": "macos-base", "displayName": "macOS daemon (Debug)", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "macos-controller-release", "inherits": "macos-base", "displayName": "macOS Central Controller (Release)", "cacheVariables": { "ZT1_CENTRAL_CONTROLLER": "ON" } },
{ "name": "macos-controller-debug", "inherits": "macos-base", "displayName": "macOS Central Controller (Debug)", "cacheVariables": { "ZT1_CENTRAL_CONTROLLER": "ON", "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "macos-free-release", "inherits": "macos-base", "displayName": "macOS daemon, free / no controller (Release)", "cacheVariables": { "ZT_NONFREE": "OFF" } },
{ "name": "macos-free-debug", "inherits": "macos-base", "displayName": "macOS daemon, free / no controller (Debug)", "cacheVariables": { "ZT_NONFREE": "OFF", "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "macos-universal-release", "inherits": "macos-base", "displayName": "macOS universal daemon (arm64 + x86_64, Release)", "cacheVariables": { "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64" } },
{ "name": "macos-universal-debug", "inherits": "macos-base", "displayName": "macOS universal daemon (arm64 + x86_64, Debug)", "cacheVariables": { "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64", "CMAKE_BUILD_TYPE": "Debug" } },
{
"name": "freebsd-base",
"hidden": true,
"inherits": "unix-base",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "FreeBSD" }
},
{
"name": "openbsd-base",
"hidden": true,
"inherits": "unix-base",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "OpenBSD" }
},
{
"name": "netbsd-base",
"hidden": true,
"inherits": "unix-base",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "NetBSD" }
},
{ "name": "freebsd-release", "inherits": "freebsd-base", "displayName": "FreeBSD daemon (Release)" },
{ "name": "freebsd-debug", "inherits": "freebsd-base", "displayName": "FreeBSD daemon (Debug)", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "freebsd-free-release", "inherits": "freebsd-base", "displayName": "FreeBSD daemon, free / no controller (Release)", "cacheVariables": { "ZT_NONFREE": "OFF" } },
{ "name": "freebsd-free-debug", "inherits": "freebsd-base", "displayName": "FreeBSD daemon, free / no controller (Debug)", "cacheVariables": { "ZT_NONFREE": "OFF", "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "openbsd-release", "inherits": "openbsd-base", "displayName": "OpenBSD daemon (Release)" },
{ "name": "openbsd-debug", "inherits": "openbsd-base", "displayName": "OpenBSD daemon (Debug)", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "openbsd-free-release", "inherits": "openbsd-base", "displayName": "OpenBSD daemon, free / no controller (Release)", "cacheVariables": { "ZT_NONFREE": "OFF" } },
{ "name": "openbsd-free-debug", "inherits": "openbsd-base", "displayName": "OpenBSD daemon, free / no controller (Debug)", "cacheVariables": { "ZT_NONFREE": "OFF", "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "netbsd-release", "inherits": "netbsd-base", "displayName": "NetBSD daemon (Release)" },
{ "name": "netbsd-debug", "inherits": "netbsd-base", "displayName": "NetBSD daemon (Debug)", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } },
{ "name": "netbsd-free-release", "inherits": "netbsd-base", "displayName": "NetBSD daemon, free / no controller (Release)", "cacheVariables": { "ZT_NONFREE": "OFF" } },
{ "name": "netbsd-free-debug", "inherits": "netbsd-base", "displayName": "NetBSD daemon, free / no controller (Debug)", "cacheVariables": { "ZT_NONFREE": "OFF", "CMAKE_BUILD_TYPE": "Debug" } },
{
"name": "windows-x64",
"displayName": "Windows x64 daemon (MSVC + vcpkg)",
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"binaryDir": "${sourceDir}/build-${presetName}",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" },
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows-static",
"CMAKE_PREFIX_PATH": "${sourceDir}/.deps/x64"
}
},
{
"name": "windows-arm64",
"inherits": "windows-x64",
"displayName": "Windows ARM64 daemon (MSVC + vcpkg)",
"architecture": "ARM64",
"cacheVariables": { "VCPKG_TARGET_TRIPLET": "arm64-windows-static", "CMAKE_PREFIX_PATH": "${sourceDir}/.deps/ARM64" }
},
{
"name": "windows-x86",
"inherits": "windows-x64",
"displayName": "Windows x86 daemon (MSVC + vcpkg)",
"architecture": "Win32",
"cacheVariables": { "VCPKG_TARGET_TRIPLET": "x86-windows-static", "CMAKE_PREFIX_PATH": "${sourceDir}/.deps/Win32" }
},
{
"name": "windows-x64-free",
"inherits": "windows-x64",
"displayName": "Windows x64 daemon (free / ZT_NONFREE=OFF, no bundled controller)",
"cacheVariables": { "ZT_NONFREE": "OFF" }
},
{
"name": "windows-arm64-free",
"inherits": "windows-arm64",
"displayName": "Windows ARM64 daemon (free / ZT_NONFREE=OFF, no bundled controller)",
"cacheVariables": { "ZT_NONFREE": "OFF" }
},
{
"name": "windows-x86-free",
"inherits": "windows-x86",
"displayName": "Windows x86 daemon (free / ZT_NONFREE=OFF, no bundled controller)",
"cacheVariables": { "ZT_NONFREE": "OFF" }
}
],
"buildPresets": [
{ "name": "linux-release", "configurePreset": "linux-release" },
{ "name": "linux-debug", "configurePreset": "linux-debug" },
{ "name": "linux-controller-release", "configurePreset": "linux-controller-release" },
{ "name": "linux-controller-debug", "configurePreset": "linux-controller-debug" },
{ "name": "linux-free-release", "configurePreset": "linux-free-release" },
{ "name": "linux-free-debug", "configurePreset": "linux-free-debug" },
{ "name": "macos-release", "configurePreset": "macos-release" },
{ "name": "macos-debug", "configurePreset": "macos-debug" },
{ "name": "macos-controller-release", "configurePreset": "macos-controller-release" },
{ "name": "macos-controller-debug", "configurePreset": "macos-controller-debug" },
{ "name": "macos-free-release", "configurePreset": "macos-free-release" },
{ "name": "macos-free-debug", "configurePreset": "macos-free-debug" },
{ "name": "macos-universal-release", "configurePreset": "macos-universal-release" },
{ "name": "macos-universal-debug", "configurePreset": "macos-universal-debug" },
{ "name": "freebsd-release", "configurePreset": "freebsd-release" },
{ "name": "freebsd-debug", "configurePreset": "freebsd-debug" },
{ "name": "freebsd-free-release", "configurePreset": "freebsd-free-release" },
{ "name": "freebsd-free-debug", "configurePreset": "freebsd-free-debug" },
{ "name": "openbsd-release", "configurePreset": "openbsd-release" },
{ "name": "openbsd-debug", "configurePreset": "openbsd-debug" },
{ "name": "openbsd-free-release", "configurePreset": "openbsd-free-release" },
{ "name": "openbsd-free-debug", "configurePreset": "openbsd-free-debug" },
{ "name": "netbsd-release", "configurePreset": "netbsd-release" },
{ "name": "netbsd-debug", "configurePreset": "netbsd-debug" },
{ "name": "netbsd-free-release", "configurePreset": "netbsd-free-release" },
{ "name": "netbsd-free-debug", "configurePreset": "netbsd-free-debug" },
{ "name": "windows-x64-release", "configurePreset": "windows-x64", "configuration": "Release" },
{ "name": "windows-x64-debug", "configurePreset": "windows-x64", "configuration": "Debug" },
{ "name": "windows-arm64-release", "configurePreset": "windows-arm64", "configuration": "Release" },
{ "name": "windows-arm64-debug", "configurePreset": "windows-arm64", "configuration": "Debug" },
{ "name": "windows-x86-release", "configurePreset": "windows-x86", "configuration": "Release" },
{ "name": "windows-x86-debug", "configurePreset": "windows-x86", "configuration": "Debug" },
{ "name": "windows-x64-free-release", "configurePreset": "windows-x64-free", "configuration": "Release" },
{ "name": "windows-x64-free-debug", "configurePreset": "windows-x64-free", "configuration": "Debug" },
{ "name": "windows-arm64-free-release", "configurePreset": "windows-arm64-free", "configuration": "Release" },
{ "name": "windows-arm64-free-debug", "configurePreset": "windows-arm64-free", "configuration": "Debug" },
{ "name": "windows-x86-free-release", "configurePreset": "windows-x86-free", "configuration": "Release" },
{ "name": "windows-x86-free-debug", "configurePreset": "windows-x86-free", "configuration": "Debug" }
]
}
-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 :
+28
View File
@@ -0,0 +1,28 @@
# vim: ft=dockerfile
FROM ubuntu:21.04 as stage
RUN apt-get update -qq && apt-get -qq install make clang
COPY . .
RUN /usr/bin/make
RUN echo $PWD
RUN cp zerotier-one /usr/sbin
FROM ubuntu:21.04
COPY --from=stage /zerotier-one /usr/sbin
RUN ln -sf /usr/sbin/zerotier-one /usr/sbin/zerotier-idtool
RUN ln -sf /usr/sbin/zerotier-one /usr/sbin/zerotier-cli
RUN echo "${VERSION}" > /etc/zerotier-version
RUN rm -rf /var/lib/zerotier-one
RUN apt-get -qq update
RUN apt-get -qq install iproute2 net-tools fping 2ping iputils-ping iputils-arping
COPY entrypoint.sh.release /entrypoint.sh
RUN chmod 755 /entrypoint.sh
CMD []
ENTRYPOINT ["/entrypoint.sh"]
+23
View File
@@ -0,0 +1,23 @@
# vim: ft=dockerfile
FROM debian:bookworm
ARG VERSION
RUN apt-get update -qq && apt-get install curl gpg -y
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/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 libssl3 -y
RUN rm -rf /var/lib/zerotier-one
COPY entrypoint.sh.release /entrypoint.sh
RUN chmod 755 /entrypoint.sh
HEALTHCHECK --interval=1s CMD bash /healthcheck.sh
CMD []
ENTRYPOINT ["/entrypoint.sh"]
Vendored
-365
View File
@@ -1,365 +0,0 @@
pipeline {
options {
disableConcurrentBuilds()
preserveStashes(buildCount: 10)
timestamps()
}
parameters {
booleanParam(name: "BUILD_ALL", defaultValue: false, description: "Build all supported platform/architecture combos. Defaults to x86/x64 only")
}
agent none
stages {
stage ("Build") {
steps {
script {
def tasks = [:]
tasks << buildStaticBinaries()
tasks << buildDebianNative()
tasks << buildCentosNative()
parallel tasks
}
}
}
stage ("Package Static") {
steps {
script {
parallel packageStatic()
}
}
}
}
}
def buildStaticBinaries() {
def tasks = [:]
def dist = ["alpine"]
def archs = []
if (params.BUILD_ALL == true) {
archs = ["arm64", "amd64", "i386", "armhf", "armel", "ppc64le", "s390x"]
} else {
archs = ["amd64", "i386"]
}
tasks << getTasks(dist, archs, { distro, platform ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
sh "echo ${distro}-${platform}"
def runtime = docker.image("ztbuild/${distro}-${platform}:latest")
runtime.inside {
dir("build") {
sh 'make -j8 ZT_STATIC=1 all'
sh "file ./zerotier-one"
sh "mv zerotier-one zerotier-one-static-${platform}"
stash includes: 'zerotier-one-static-*', name: "static-${platform}"
}
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
}
return myNode
})
return tasks
}
def getTasks(axisDistro, axisPlatform, task) {
def tasks = [:]
for(int i=0; i< axisDistro.size(); i++) {
def axisDistroValue = axisDistro[i]
for(int j=0; j< axisPlatform.size(); j++) {
def axisPlatformValue = axisPlatform[j]
tasks["${axisDistroValue}/${axisPlatformValue}"] = task(axisDistroValue, axisPlatformValue)
}
}
return tasks
}
def packageStatic() {
def tasks = [:]
def centos6 = ["centos6"]
def centos6Arch = ["i386", "amd64"]
tasks << getTasks(centos6, centos6Arch, { distro, arch ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
runtime.inside {
dir("build") {
unstash "static-${arch}"
sh "mv zerotier-one-static-${arch} zerotier-one && chmod +x zerotier-one"
sh "make redhat"
sh "mkdir -p ${distro}"
sh "cp -av `find ~/rpmbuild/ -type f -name \"*.rpm\"` ${distro}/"
archiveArtifacts artifacts: "${distro}/*.rpm", onlyIfSuccessful: true
}
}
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
return myNode
})
def centos7 = ["centos7"]
def centos7Arch = ["i386"]
tasks << getTasks(centos7, centos7Arch, { distro, arch ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
runtime.inside {
dir("build") {
unstash "static-${arch}"
sh "mv zerotier-one-static-${arch} zerotier-one && chmod +x zerotier-one"
sh "make redhat"
sh "mkdir -p ${distro}"
sh "cp -av `find ~/rpmbuild/ -type f -name \"*.rpm\"` ${distro}/"
archiveArtifacts artifacts: "${distro}/*.rpm", onlyIfSuccessful: true
}
}
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
return myNode
})
if (params.BUILD_ALL == true) {
def clefos7 = ["clefos"]
def clefos7Arch = ["s390x"]
tasks << getTasks(clefos7, clefos7Arch, { distro, arch ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
runtime.inside {
dir("build/") {
unstash "static-${arch}"
sh "mv zerotier-one-static-${arch} zerotier-one && chmod +x zerotier-one"
sh "make redhat"
sh "mkdir -p ${distro}"
sh "cp -av `find ~/rpmbuild/ -type f -name \"*.rpm\"` ${distro}/"
archiveArtifacts artifacts: "${distro}/*.rpm", onlyIfSuccessful: true
}
}
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
return myNode
})
}
def debianJessie = ["debian-jessie"]
def debianJessieArchs = []
if (params.BUILD_ALL == true) {
debianJessieArch = ["armhf", "armel", "amd64", "i386"]
} else {
debianJessieArch = ["amd64", "i386"]
}
tasks << getTasks(debianJessie, debianJessieArch, { distro, arch ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
runtime.inside {
sh "ls -la ."
dir('build/') {
sh "ls -la ."
unstash "static-${arch}"
sh "pwd"
sh "mv zerotier-one-static-${arch} zerotier-one && chmod +x zerotier-one && file ./zerotier-one"
sh "mv -f debian/rules.static debian/rules"
sh "make debian"
}
sh "mkdir -p ${distro}"
sh "mv *.deb ${distro}"
archiveArtifacts artifacts: "${distro}/*.deb", onlyIfSuccessful: true
}
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
return myNode
})
def ubuntuTrusty = ["ubuntu-trusty"]
def ubuntuTrustyArch = []
if (params.BUILD_ALL == true) {
ubuntuTrustyArch = ["i386", "amd64", "armhf", "arm64", "ppc64le"]
} else {
ubuntuTrustyArch = ["i386", "amd64"]
}
tasks << getTasks(ubuntuTrusty, ubuntuTrustyArch, { distro, arch ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
runtime.inside {
sh "ls -la ."
dir('build/') {
sh "ls -la ."
unstash "static-${arch}"
sh "pwd"
sh "mv zerotier-one-static-${arch} zerotier-one && chmod +x zerotier-one && file ./zerotier-one"
sh "mv -f debian/rules.static debian/rules"
sh "make debian"
}
sh "mkdir -p ${distro}"
sh "mv *.deb ${distro}"
archiveArtifacts artifacts: "${distro}/*.deb", onlyIfSuccessful: true
}
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
return myNode
})
def debianWheezy = ["debian-wheezy"]
def debianWheezyArchs = []
if (params.BUILD_ALL == true) {
debianWheezyArchs = ["armhf", "armel", "amd64", "i386"]
} else {
debianWheezyArchs = ["amd64", "i386"]
}
tasks << getTasks(debianJessie, debianJessieArch, { distro, arch ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
runtime.inside {
dir('build/') {
unstash "static-${arch}"
sh "mv zerotier-one-static-${arch} zerotier-one && chmod +x zerotier-one && file ./zerotier-one"
sh "mv -f debian/rules.wheezy.static debian/rules"
sh "mv -f debian/control.wheezy debian/control"
sh "make debian"
}
sh "mkdir -p ${distro}"
sh "mv *.deb ${distro}"
archiveArtifacts artifacts: "${distro}/*.deb", onlyIfSuccessful: true
}
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
return myNode
})
return tasks
}
def buildDebianNative() {
def tasks = [:]
def buster = ["debian-buster", "debian-stretch", "debian-bullseye", "debian-sid"]
def busterArchs = []
if (params.BUILD_ALL) {
busterArchs = ["s390x", "ppc64le", "i386", "armhf", "armel", "arm64", "amd64"]
} else {
busterArchs = ["amd64", "i386"]
}
def build = { distro, arch ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
runtime.inside {
dir("build") {
sh 'make debian'
}
sh "mkdir -p ${distro}"
sh "mv *.deb ${distro}"
archiveArtifacts artifacts: "${distro}/*.deb", onlyIfSuccessful: true
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
}
return myNode
}
tasks << getTasks(buster, busterArchs, build)
// bash is broken when running under QEMU-s390x on Xenial
def xenial = ["ubuntu-xenial"]
def xenialArchs = []
if (params.BUILD_ALL == true) {
xenialArchs = ["i386", "amd64", "armhf", "arm64", "ppc64le"]
} else {
xenialArchs = ["i386", "amd64"]
}
tasks << getTasks(xenial, xenialArchs, build)
def ubuntu = ["ubuntu-bionic", "ubuntu-eoan"]
def ubuntuArchs = []
if (params.BUILD_ALL == true) {
ubuntuArchs = ["i386", "amd64", "armhf", "arm64", "ppc64le", "s390x"]
} else {
ubuntuArchs = ["i386", "amd64"]
}
tasks << getTasks(ubuntu, ubuntuArchs, build)
def kali = ["kali-rolling"]
def kaliArchs = ["amd64"]
tasks << getTasks(kali, kaliArchs, build)
return tasks
}
def buildCentosNative() {
def tasks = [:]
def build = { distro, arch ->
def myNode = {
node ('linux-build') {
dir ("build") {
checkout scm
}
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
runtime.inside {
dir("build") {
sh 'make -j4'
sh 'make redhat'
sh "mkdir -p ${distro}"
sh "cp -av `find ~/rpmbuild/ -type f -name \"*.rpm\"` ${distro}/"
archiveArtifacts artifacts: "${distro}/*.rpm", onlyIfSuccessful: true
}
cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
}
}
}
return myNode
}
def centos8 = ["centos8"]
def centos8Archs = []
if (params.BUILD_ALL == true) {
centos8Archs = ["amd64", "arm64", "ppc64le"]
} else {
centos8Archs = ["amd64"]
}
tasks << getTasks(centos8, centos8Archs, build)
def centos7 = ["centos7"]
def centos7Archs = ["amd64"]
tasks << getTasks(centos7, centos7Archs, build)
return tasks
}
+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.
Loaded 20 of 1710 files, more files were not shown because too many files have changed in this diff. Show more