Compare commits

..
928 Commits
Author SHA1 Message Date
Adam Ierymenko fe5257df81 VERSION 1.2.4: Bug fixes and performance improvements
* Managed routes are now only bifurcated for the default route. This is a change in behavior, though few people will probably notice. Bifurcating all managed routes was causing more trouble than it was worth for most users.
 * Up to 2X crypto speedup on x86-64 (except Windows, which will take some porting) and 32-bit ARM platforms due to integration of fast assembly language implementations of Salsa20/12 from the [supercop](http://bench.cr.yp.to/supercop.html) code base. These were written by Daniel J. Bernstein and are in the public domain. My Macbook Pro (Core i5 2.8ghz) now does almost 1.5GiB/sec Salsa20/12 per core and a Raspberry Pi got a 2X boost. 64-bit ARM support and Windows support will take some work but should not be too hard.
 * Refactored code that manages credentials to greatly reduce memory use in most cases. This may also result in a small performance improvement.
 * Reworked and simplified path selection and priority logic to fix path instability and dead path persistence edge cases. There have been some sporadic reports of persistent path instabilities and dead paths hanging around that take minutes to resolve. These have proven difficult to reproduce in house, but hopefully this will fix them. In any case it seems to speed up path establishment in our tests and it makes the code simpler and more readable.
 * Eliminated some unused cruft from the code around path management and in the peer class.
 * Fixed an issue causing build problems on some MIPS architecture systems.
 * Fixed Windows forgetting routes on sleep/wake or in some other circumstances. (GitHub issue #465)
2017-04-24 11:41:23 -07:00
Adam Ierymenko 9161424c97 Version bumps. 2017-04-24 11:41:01 -07:00
Adam Ierymenko cdda0dd043 Windows version bump. 2017-04-24 11:37:54 -07:00
Adam Ierymenko f4feccc626 Do not serve controller requests until init is done. 2017-04-24 09:09:04 -07:00
Adam Ierymenko 44cb2f4efd ++version 2017-04-21 15:32:00 -07:00
Adam Ierymenko cacb8fae0d GitHub issue #463 -- fix MacOS uninstall script. 2017-04-21 13:55:44 -07:00
Adam Ierymenko fa99a5cf12 docs 2017-04-21 13:27:34 -07:00
Adam Ierymenko e700165eba GitHub issue #465 - Windows route amnesia 2017-04-21 13:26:02 -07:00
Adam Ierymenko 8542ee59db Windows crash fix. 2017-04-21 12:42:51 -07:00
Adam Ierymenko 76108671f6 BSD makefile fix for OpenBSD. 2017-04-21 08:42:45 -07:00
Adam Ierymenko 8b0ce1cc00 More BSD make fixes. 2017-04-21 08:09:18 -07:00
Adam Ierymenko 0e88c73f68 Mirror over some arch rules from Linux to BSD make, and enable fast crypto there. 2017-04-21 08:04:33 -07:00
Adam Ierymenko ba0d73d102 Windows build fixes. 2017-04-20 10:21:40 -07:00
Adam Ierymenko d3ecd1d670 docs 2017-04-20 10:21:08 -07:00
Adam Ierymenko f9ae5938d0 Makefile fix, only bifurcate routes for default, and release notes. 2017-04-20 10:08:46 -07:00
Adam Ierymenko a8ced184dc Some code cleanup and make sure any type punning is guarded with ZT_NO_TYPE_PUNNING. 2017-04-20 09:33:35 -07:00
Adam Ierymenko e7a2c6ecef Integrate ARM/NEON crypto. 2017-04-19 17:11:56 -07:00
Adam Ierymenko a376bcc654 ARM NEON Salsa20/12 in build and selftest. Almost 2X speedup on a Raspberry Pi. 2017-04-19 23:49:26 +00:00
Adam Ierymenko 8e1ac9fb0c ARM NEON Salsa20/12. 2017-04-19 15:58:20 -07:00
Adam Ierymenko bc61357a44 HTTP backend support for JSONDB 2017-04-18 17:37:44 -07:00
Adam Ierymenko f6d92eb737 JSONDB fix. 2017-04-18 13:48:19 -07:00
Adam Ierymenko 48cadcd2fc More build fixes. 2017-04-18 12:48:56 -07:00
Adam Ierymenko bd63a840c7 Mac build fix. 2017-04-18 12:44:27 -07:00
Adam Ierymenko aaf597f020 Cleanup, Windows fixes, Self test fix 2017-04-18 12:22:44 -07:00
Adam Ierymenko 72bd3064a2 Windows build fixes, self test cleanup. 2017-04-18 11:00:29 -07:00
Adam Ierymenko a1c316b940 Makefile cruft. 2017-04-18 09:19:39 -07:00
Adam Ierymenko 02f84b225c Add MIPS architectures to Linux Makefile and add an error if architecture cannot be determined. 2017-04-18 09:14:33 -07:00
Adam Ierymenko 6551c20005 Enable x64 ASM Salsa20/12 on Linux. 2017-04-18 08:57:32 -07:00
Adam Ierymenko a1e94154be Just incorporate the X64 ASM version of Salsa20/12 for X64 platforms. This gives us (for example) 1.5gb/sec encryption on a Core i5 2.8ghz. 2017-04-18 08:45:37 -07:00
Adam Ierymenko 4938e82795 Delete junk. 2017-04-17 18:01:51 -07:00
Adam Ierymenko 7a94f63058 Back out NaCl since the old one with xmm6 salsa2012 does not support multi-block use and the new one is slower. 2017-04-17 17:54:12 -07:00
Adam Ierymenko db0edf154c Use right deployment target in OSX bin. 2017-04-17 16:54:41 -07:00
Adam Ierymenko a1cd94a61d Actually include .a 2017-04-17 16:43:36 -07:00
Adam Ierymenko df48738ac9 Enable use of NaCl for faster X64 Salsa20 implementations. Also include binary for OSX for easy build. Blazingly fast. 2017-04-17 16:43:03 -07:00
Adam Ierymenko d8f5cfdee4 Windows profile build target (CPU profiling), and a little bit of optimization revealed by such. 2017-04-17 15:45:49 -07:00
Adam Ierymenko 95e5345cc3 Cluster build fix. 2017-04-17 10:12:13 -07:00
Adam Ierymenko ba5d0cc2f9 Silence some TRACE noise. 2017-04-17 09:31:07 -07:00
Adam Ierymenko 1d8ded3293 Tiny largely non-consequential credential fix. 2017-04-17 09:30:28 -07:00
Adam Ierymenko 2487a8bede Fix for 100% cpu issue. 2017-04-17 09:14:21 -07:00
Adam Ierymenko f1c0563c40 Fix for cluster handoff. 2017-04-14 18:02:04 -07:00
Adam Ierymenko 139c4b5633 Significant simplification to path logic. 2017-04-14 17:53:32 -07:00
Adam Ierymenko 645bf4a764 Resurrect zerotier-containerized. 2017-04-14 13:30:12 -07:00
Adam Ierymenko 88a4a3b1ba Pass tptr on leave. 2017-04-11 08:47:02 -07:00
Adam Ierymenko 6fabaae736 Add simple root server watcher (for our own new dashboard, but also for user use). 2017-04-04 16:47:14 -07:00
Adam Ierymenko 1b2cfd63e5 add libstdc++ dependency 2017-04-04 14:10:38 -07:00
Adam Ierymenko ff2b219abd root-watcher code 2017-04-04 12:39:14 -07:00
Adam Ierymenko 33c3af752b Need to just have a make option for soft float ARM. 2017-04-04 11:26:50 -07:00
Adam Ierymenko f73a1d2d56 Linux ARM flags. 2017-04-04 09:41:34 -07:00
Adam Ierymenko 470ad39d0d More Linux ARM stuff. 2017-04-04 09:15:38 -07:00
Adam Ierymenko 5ad120208f Small fix, should filter by temporal validity. 2017-04-04 08:46:12 -07:00
Adam Ierymenko b48a70db2e Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-04-04 08:39:22 -07:00
Adam Ierymenko cd050b3423 Performance improvement in controller. 2017-04-04 08:39:19 -07:00
Adam Ierymenko eddbc7e757 Logic simplification, cleanup, and memory use improvements in Membership. Also fix an issue that may cause network instability in some cases. 2017-04-04 08:07:38 -07:00
Adam Ierymenko 8a62ba07e5 Membership cleanup work in progress. 2017-04-04 06:47:01 -07:00
Adam Ierymenko b3298a8f57 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-03-30 09:54:10 -07:00
Adam Ierymenko e5284771e4 Add ping/pong to API so controller supervisor in Central can do a full-path check of controller uptime, etc. 2017-03-30 09:54:04 -07:00
Grant Limberg 5f611dad51 added orbit/deorbit methods to java Node implementation 2017-03-29 13:29:02 -07:00
Grant Limberg 1c5fdb8a0a fix path checker initialization 2017-03-29 13:28:06 -07:00
Grant Limberg de4b9e9a16 Added path checking interface for Java 2017-03-29 12:52:52 -07:00
Adam Ierymenko 57b5a33fbb Fix bug preventing default from being set to null if already set to an integer. 2017-03-29 12:32:59 -07:00
Adam Ierymenko 3f4f7145a3 Another rule compiler fix. 2017-03-28 22:25:24 -07:00
Adam Ierymenko b959148447 Small rule compiler fix with tag defaults. 2017-03-28 21:50:44 -07:00
Grant Limberg 855361b5b8 fix native end of JNI code for new thread data ptr 2017-03-28 17:49:00 -07:00
Adam Ierymenko 91c9f4cb20 Fix TRACE and CLUSTER builds. 2017-03-27 17:33:25 -07:00
Adam Ierymenko e4896b257f Add thread PTR that gets passed through the entire ZT core call stack and then passed to handler functions resulting from a call. 2017-03-27 17:03:17 -07:00
Adam Ierymenko 592cac5815 Remove from a few other places. 2017-03-27 12:09:37 -07:00
Adam Ierymenko 4244cca48c Delete comically named SSL gateway code, which is going elsewhere. 2017-03-27 12:08:38 -07:00
Grant Limberg 179ab5220a Set macOS deployment target to 10.10 for UI applet
Must use CLI for older versions of macOS
2017-03-27 11:36:11 -07:00
Grant Limberg d6bb1b72c3 Fix some text colors to work on old OS X versions 2017-03-27 11:15:36 -07:00
Grant Limberg 3d9a5a4f91 Popovers now appear to work 2017-03-27 10:55:47 -07:00
Joseph Henry 683ba79ff0 Added ButtFlare stub code 2017-03-24 17:00:14 -07:00
Grant Limberg 0c69fc719f Windows UI will attempt to re-copy the auth token if a 401 error is received 2017-03-22 10:48:42 -07:00
Grant Limberg 03b48a4ad4 add lock around [ServiceCom key] and remove some debug code 2017-03-22 10:22:15 -07:00
Grant Limberg aa71292265 A couple more places we should check HTTP status 2017-03-22 10:18:12 -07:00
Grant Limberg d72eee6cf7 If we get a 401 error from the ZeroTier service in the macOS UI, try re-copying the auth token 2017-03-22 09:58:13 -07:00
Adam Ierymenko 6bb19e7947 build fix 2017-03-21 09:08:32 -07:00
Adam Ierymenko 3d2518f799 crazy formatting fix 2017-03-21 08:21:11 -07:00
Adam Ierymenko 5268909075 Add a facility for full flow-through uptime test of controller by Central. 2017-03-21 06:31:15 -07:00
Adam Ierymenko c62141fd98 Make controller do a simple write-through cache without revalidating. Means you must restart if files change on disk, but will decrease I/O considerably. 2017-03-21 06:15:49 -07:00
Adam Ierymenko ae303ee902 dev is now 1.2.3 2017-03-20 16:17:11 -07:00
Adam Ierymenko cfe0d0971f VERSION 1.2.2
Version 1.2.2 fixes a few bugs discovered after the 1.2.0 release. These are:

 * A bug causing unreliable multicast propagation (GitHub issue #461).
 * A crash in ARM binaries due to a build chain and flags problem.
 * A bug in the network controller preventing members from being listed (GitHub issue #460).
2017-03-17 21:13:41 -07:00
Adam Ierymenko c5c8facc2d Windows installer version bump and a build fix. 2017-03-17 20:20:47 -07:00
Adam Ierymenko f78d6a8a93 docs 2017-03-17 20:04:25 -07:00
Adam Ierymenko 78ef2c5f16 Windows build fixes, app about text revisions. 2017-03-17 20:01:58 -07:00
Adam Ierymenko ec8e1178e5 Version bumps, and fix Debian so default is to build normally and .static files are used in our builds. 2017-03-17 19:16:34 -07:00
Adam Ierymenko 4f3f471b4c GitHub issue #460 2017-03-17 18:19:51 -07:00
Adam Ierymenko e10325e133 GitHub issue #461 -- plus a bit of cleanup and optimization 2017-03-17 17:15:23 -07:00
Adam Ierymenko ef46d3c97d LZ4 cleanup 2017-03-17 23:09:18 +00:00
Adam Ierymenko a9c08c5975 . 2017-03-17 22:35:56 +00:00
Adam Ierymenko c467c3b7e4 ARM tweaks 2017-03-17 22:26:08 +00:00
Adam Ierymenko cdc0eaec3a Fix attempt to WHOIS self. 2017-03-17 22:13:34 +00:00
Adam Ierymenko a7cb738175 . 2017-03-17 14:25:54 -07:00
Adam Ierymenko d1bb22a583 . 2017-03-17 14:09:30 -07:00
Adam Ierymenko 553d972de5 bump that version. bump it good. 2017-03-17 13:56:45 -07:00
Adam Ierymenko cc883cc3d8 Merge branch 'master' of http://10.6.6.2/zerotier/ZeroTierOne 2017-03-17 13:56:01 -07:00
Adam Ierymenko c6a39ed927 Fixes for possible ARM issues, cleanup, fix for spurious meaningless exceptions on NETWORK_CONFIG_REQUEST 2017-03-17 13:55:26 -07:00
Adam Ierymenko df30255542 Merge branch 'master' into dev 2017-03-17 12:37:23 -07:00
Adam Ierymenko d5102539dd Merge pull request #457 from skunkwerks/master
build: use clang on FreeBSD
2017-03-17 12:18:54 -07:00
Adam Ierymenko e3feaf3f5d Warning removal, and dev is now 1.2.1 2017-03-16 16:45:11 -07:00
Dave Cottlehuber 25dc596397 build: use clang on FreeBSD
this avoids a whopping 500+Mb dependency on gcc and friends at runtime
2017-03-16 12:58:04 +01:00
Adam Ierymenko 0daff26fba Version 1.2.0 is a major milestone release representing almost nine months of work. It includes our rules engine for distributed network packet filtering and security monitoring, federated roots, and many other architectural and UI improvements and bug fixes.
The largest new feature in 1.2.0, and the product of many months of work, is our advanced network rules engine. With this release we achieve traffic control, security monitoring, and micro-segmentation capability on par with many enterprise SDN solutions designed for use in advanced data centers and corporate networks.

Rules allow you to filter packets on your network and vector traffic to security observers. Security observation can be performed in-band using REDIRECT or out of band using TEE.

Tags and capabilites provide advanced methods for implementing fine grained permission structures and micro-segmentation schemes without bloating the size and complexity of your rules table.

See the [rules engine announcement blog post](https://www.zerotier.com/blog/?p=927) for an in-depth discussion of theory and implementation. The [manual](https://www.zerotier.com/manual.shtml) contains detailed information on rule, tag, and capability use, and the `rule-compiler/` subfolder of the ZeroTier source tree contains a JavaScript function to compile rules in our human-readable rule definition language into rules suitable for import into a network controller. (ZeroTier Central uses this same script to compile rules on [my.zerotier.com](https://my.zerotier.com/).)

It's now possible to create your own root servers and add them to the root server pool on your nodes. This is done by creating what's called a "moon," which is a signed enumeration of root servers and their stable points on the network. Refer to the [manual](https://www.zerotier.com/manual.shtml) for instructions.

Federated roots achieve a number of things:

 * You can deploy your own infrastructure to reduce dependency on ours.
 * You can deploy roots *inside your LAN* to ensure that network connectivity inside your facility still works if the Internet goes down. This is the first step toward making ZeroTier viable as an in-house SDN solution.
 * Roots can be deployed inside national boundaries for countries with data residency laws or "great firewalls." (As of 1.2.0 there is still no way to force all traffic to use these roots, but that will be easy to do in a later version.)
 * Last but not least this makes ZeroTier somewhat less centralized by eliminating any hard dependency on ZeroTier, Inc.'s infrastructure.

Our roots will of course remain and continue to provide zero-configuration instant-on deployment, a secure global authority for identities, and free traffic relaying for those who can't establish peer to peer connections.

An element of our design philosophy is "features are bugs." This isn't an absolute dogma but more of a guiding principle. We try as hard as we can to avoid adding features, especially "knobs" that must be tweaked by a user.

As of 1.2.0 we've decided that certain knobs are unavoidable, and so there is now a `local.conf` file that can be used to configure them. See the ZeroTier One documentation for these. They include:

 * Blacklisting interfaces you want to make sure ZeroTier doesn't use for network traffic, such as VPNs, slow links, or backplanes designated for only certain kinds of traffic.
 * Turning uPnP/NAT-PMP on or off.
 * Configuring software updates on Windows and Mac platforms.
 * Defining trusted paths (the old trusted paths file is now deprecated)
 * Setting the ZeroTier main port so it doesn't have to be changed on the command line, which is very inconvenient in many cases.

A good software update system for Windows and Mac clients has been a missing feature in previous versions. It does exist but we've been shy about using it so far due to its fragility in some environments.

We've greatly improved this mechanism in 1.2.0. Not only does it now do a better job of actually invoking the update, but it also transfers updates in-band using the ZeroTier protocol. This means it can work in environments that do not allows http/https traffic or that force it through proxies. There's also now an update channel setting: `beta` or `release` (the default).

Software updates are authenticated three ways:

 1. ZeroTier's own signing key is used to sign all updates and this signature is checked prior to installation. ZeroTier, Inc.'s signatures are performed on an air-gapped machine.

 2. Updates for Mac and Windows are signed using Apple and Microsoft (DigiCert EV) keys and will not install unless these signatures are also valid.

 3. The new in-band update mechanism also authenticates the source of the update via ZeroTier's built-in security features. This provides transport security, while 1 and 2 provide security of the update at rest.

Updates are now configurable via `local.conf`. There are three options: `disable`, `download`, and `apply`. The third (apply) is the default for official builds on Windows and Mac, making updates happen silently and automatically as they do for popular browsers like Chrome and Firefox. Updates are disabled by default on Linux and other Unix-type systems as these are typically updated through package managers.

Version 1.2.0 is now aware of the link quality of direct paths with other 1.2.0 nodes. This information isn't used yet but is visible through the JSON API. (Quality always shows as 100% with pre-1.2.0 nodes.) Quality is measured passively with no additional overhead using a counter based packet loss detection algorithm.

This information is visible from the command line via `listpeers`:

    200 listpeers XXXXXXXXXX 199.XXX.XXX.XXX/9993;10574;15250;1.00 48 1.2.0 LEAF
    200 listpeers XXXXXXXXXX 195.XXX.XXX.XXX/45584;467;7608;0.44 290 1.2.0 LEAF

The first peer's path is at 100% (1.00), while the second peer's path is suffering quite a bit of packet loss (0.44).

Link quality awareness is a precursor to intelligent multi-path and QoS support, which will in future versions bring us to feature parity with SD-WAN products like Cisco iWAN.

Version 1.2.0 adds anti-DOS (denial of service) rate limits and other hardening for improved resiliency against a number of denial of service attack scenarios.

It also adds a mechanism for instantaneous credential revocation. This can be used to revoke certificates of membership instantly to kick a node off a network (for private networks) and also to revoke capabilities and tags. The new controller sends revocations by default when a peer is de-authorized.

Revocations propagate using a "rumor mill" peer to peer algorithm. This means that a controller need only successfully send a revocation to at least one member of a network with connections to other active members. At this point the revocation will flood through the network peer to peer very quickly. This helps make revocations more robust in the face of poor connectivity with the controller or attempts to incapacitate the controller with denial of service attacks, as well as making revocations faster on huge networks.

The Mac has a whole new UI built natively in Objective-C. It provides a pulldown similar in appearance and operation to the Mac WiFi task bar menu.

The Windows UI has also been improved and now provides a task bar icon that can be right-clicked to manage networks. Both now expose managed route and IP permissions, allowing nodes to easily opt in to full tunnel operation if you have a router configured on your network.

A special kind of public network called an ad-hoc network may be accessed by joining a network ID with the format:

    ffSSSSEEEE000000
    | |   |   |
    | |   |   Reserved for future use, must be 0
    | |   End of port range (hex)
    | Start of port range (hex)
    Reserved ZeroTier address prefix indicating a controller-less network

Ad-hoc networks are public (no access control) networks that have no network controller. Instead their configuration and other credentials are generated locally. Ad-hoc networks permit only IPv6 UDP and TCP unicast traffic (no multicast or broadcast) using 6plane format NDP-emulated IPv6 addresses. In addition an ad-hoc network ID encodes an IP port range. UDP packets and TCP SYN (connection open) packets are only allowed to desintation ports within the encoded range.

For example `ff00160016000000` is an ad-hoc network allowing only SSH, while `ff0000ffff000000` is an ad-hoc network allowing any UDP or TCP port.

Keep in mind that these networks are public and anyone in the entire world can join them. Care must be taken to avoid exposing vulnerable services or sharing unwanted files or other resources.

The network controller has been largely rewritten to use a simple in-filesystem JSON data store in place of SQLite, and it is now included by default in all Windows, Mac, Linux, and BSD builds. This means any desktop or server node running ZeroTier One can now be a controller with no recompilation needed.

If you have data in an old SQLite3 controller we've included a NodeJS script in `controller/migrate-sqlite` to migrate data to the new format. If you don't migrate, members will start getting `NOT_FOUND` when they attempt to query for updates.

 * **The Windows HyperV 100% CPU bug is FINALLY DEAD**: This long-running problem turns out to have been an issue with Windows itself, but one we were triggering by placing invalid data into the Windows registry. Microsoft is aware of the issue but we've also fixed the triggering problem on our side. ZeroTier should now co-exist quite well with HyperV and should now be able to be bridged with a HyperV virtual switch.
 * **Segmenation faults on musl-libc based Linux systems**: Alpine Linux and some embedded Linux systems that use musl libc (a minimal libc) experienced segmentation faults. These were due to a smaller default stack size. A work-around that sets the stack size for new threads has been added.
 * **Windows firewall blocks local JSON API**: On some Windows systems the firewall likes to block 127.0.0.1:9993 for mysterious reasons. This is now fixed in the installer via the addition of another firewall exemption rule.
 * **UI crash on embedded Windows due to missing fonts**: The MSI installer now ships fonts and will install them if they are not present, so this should be fixed.

 * **Improved dead path detection**: ZeroTier is now more aggressive about expiring paths that do not seem to be active. If a path seems marginal it is re-confirmed before re-use.
 * **Minor performance improvements**: We've reduced unnecessary memcpy's and made a few other performance improvements in the core.
 * **Linux static binaries**: For our official packages (the ones in the download.zerotier.com apt and yum repositories) we now build Linux binaries with static linking. Hopefully this will stop all the bug reports relating to library inconsistencies, as well as allowing our deb packages to run on a wider variety of Debian-based distributions. (There are far too many of these to support officially!) The overhead for this is very small, especially since we built our static versions against musl-libc. Distribution maintainers are of course free to build dynamically linked versions for inclusion into distributions; this only affects our official binaries.

Merge branch 'master' of github.com:zerotier/ZeroTierOne
2017-03-14 22:08:48 -07:00
Adam Ierymenko 94ba5b3fbe Version 1.2.0 is a major milestone release representing almost nine months of work. It includes our rules engine for distributed network packet filtering and security monitoring, federated roots, and many other architectural and UI improvements and bug fixes.
The largest new feature in 1.2.0, and the product of many months of work, is our advanced network rules engine. With this release we achieve traffic control, security monitoring, and micro-segmentation capability on par with many enterprise SDN solutions designed for use in advanced data centers and corporate networks.

Rules allow you to filter packets on your network and vector traffic to security observers. Security observation can be performed in-band using REDIRECT or out of band using TEE.

Tags and capabilites provide advanced methods for implementing fine grained permission structures and micro-segmentation schemes without bloating the size and complexity of your rules table.

See the [rules engine announcement blog post](https://www.zerotier.com/blog/?p=927) for an in-depth discussion of theory and implementation. The [manual](https://www.zerotier.com/manual.shtml) contains detailed information on rule, tag, and capability use, and the `rule-compiler/` subfolder of the ZeroTier source tree contains a JavaScript function to compile rules in our human-readable rule definition language into rules suitable for import into a network controller. (ZeroTier Central uses this same script to compile rules on [my.zerotier.com](https://my.zerotier.com/).)

It's now possible to create your own root servers and add them to the root server pool on your nodes. This is done by creating what's called a "moon," which is a signed enumeration of root servers and their stable points on the network. Refer to the [manual](https://www.zerotier.com/manual.shtml) for instructions.

Federated roots achieve a number of things:

 * You can deploy your own infrastructure to reduce dependency on ours.
 * You can deploy roots *inside your LAN* to ensure that network connectivity inside your facility still works if the Internet goes down. This is the first step toward making ZeroTier viable as an in-house SDN solution.
 * Roots can be deployed inside national boundaries for countries with data residency laws or "great firewalls." (As of 1.2.0 there is still no way to force all traffic to use these roots, but that will be easy to do in a later version.)
 * Last but not least this makes ZeroTier somewhat less centralized by eliminating any hard dependency on ZeroTier, Inc.'s infrastructure.

Our roots will of course remain and continue to provide zero-configuration instant-on deployment, a secure global authority for identities, and free traffic relaying for those who can't establish peer to peer connections.

An element of our design philosophy is "features are bugs." This isn't an absolute dogma but more of a guiding principle. We try as hard as we can to avoid adding features, especially "knobs" that must be tweaked by a user.

As of 1.2.0 we've decided that certain knobs are unavoidable, and so there is now a `local.conf` file that can be used to configure them. See the ZeroTier One documentation for these. They include:

 * Blacklisting interfaces you want to make sure ZeroTier doesn't use for network traffic, such as VPNs, slow links, or backplanes designated for only certain kinds of traffic.
 * Turning uPnP/NAT-PMP on or off.
 * Configuring software updates on Windows and Mac platforms.
 * Defining trusted paths (the old trusted paths file is now deprecated)
 * Setting the ZeroTier main port so it doesn't have to be changed on the command line, which is very inconvenient in many cases.

A good software update system for Windows and Mac clients has been a missing feature in previous versions. It does exist but we've been shy about using it so far due to its fragility in some environments.

We've greatly improved this mechanism in 1.2.0. Not only does it now do a better job of actually invoking the update, but it also transfers updates in-band using the ZeroTier protocol. This means it can work in environments that do not allows http/https traffic or that force it through proxies. There's also now an update channel setting: `beta` or `release` (the default).

Software updates are authenticated three ways:

 1. ZeroTier's own signing key is used to sign all updates and this signature is checked prior to installation. ZeroTier, Inc.'s signatures are performed on an air-gapped machine.

 2. Updates for Mac and Windows are signed using Apple and Microsoft (DigiCert EV) keys and will not install unless these signatures are also valid.

 3. The new in-band update mechanism also authenticates the source of the update via ZeroTier's built-in security features. This provides transport security, while 1 and 2 provide security of the update at rest.

Updates are now configurable via `local.conf`. There are three options: `disable`, `download`, and `apply`. The third (apply) is the default for official builds on Windows and Mac, making updates happen silently and automatically as they do for popular browsers like Chrome and Firefox. Updates are disabled by default on Linux and other Unix-type systems as these are typically updated through package managers.

Version 1.2.0 is now aware of the link quality of direct paths with other 1.2.0 nodes. This information isn't used yet but is visible through the JSON API. (Quality always shows as 100% with pre-1.2.0 nodes.) Quality is measured passively with no additional overhead using a counter based packet loss detection algorithm.

This information is visible from the command line via `listpeers`:

    200 listpeers XXXXXXXXXX 199.XXX.XXX.XXX/9993;10574;15250;1.00 48 1.2.0 LEAF
    200 listpeers XXXXXXXXXX 195.XXX.XXX.XXX/45584;467;7608;0.44 290 1.2.0 LEAF

The first peer's path is at 100% (1.00), while the second peer's path is suffering quite a bit of packet loss (0.44).

Link quality awareness is a precursor to intelligent multi-path and QoS support, which will in future versions bring us to feature parity with SD-WAN products like Cisco iWAN.

Version 1.2.0 adds anti-DOS (denial of service) rate limits and other hardening for improved resiliency against a number of denial of service attack scenarios.

It also adds a mechanism for instantaneous credential revocation. This can be used to revoke certificates of membership instantly to kick a node off a network (for private networks) and also to revoke capabilities and tags. The new controller sends revocations by default when a peer is de-authorized.

Revocations propagate using a "rumor mill" peer to peer algorithm. This means that a controller need only successfully send a revocation to at least one member of a network with connections to other active members. At this point the revocation will flood through the network peer to peer very quickly. This helps make revocations more robust in the face of poor connectivity with the controller or attempts to incapacitate the controller with denial of service attacks, as well as making revocations faster on huge networks.

The Mac has a whole new UI built natively in Objective-C. It provides a pulldown similar in appearance and operation to the Mac WiFi task bar menu.

The Windows UI has also been improved and now provides a task bar icon that can be right-clicked to manage networks. Both now expose managed route and IP permissions, allowing nodes to easily opt in to full tunnel operation if you have a router configured on your network.

A special kind of public network called an ad-hoc network may be accessed by joining a network ID with the format:

    ffSSSSEEEE000000
    | |   |   |
    | |   |   Reserved for future use, must be 0
    | |   End of port range (hex)
    | Start of port range (hex)
    Reserved ZeroTier address prefix indicating a controller-less network

Ad-hoc networks are public (no access control) networks that have no network controller. Instead their configuration and other credentials are generated locally. Ad-hoc networks permit only IPv6 UDP and TCP unicast traffic (no multicast or broadcast) using 6plane format NDP-emulated IPv6 addresses. In addition an ad-hoc network ID encodes an IP port range. UDP packets and TCP SYN (connection open) packets are only allowed to desintation ports within the encoded range.

For example `ff00160016000000` is an ad-hoc network allowing only SSH, while `ff0000ffff000000` is an ad-hoc network allowing any UDP or TCP port.

Keep in mind that these networks are public and anyone in the entire world can join them. Care must be taken to avoid exposing vulnerable services or sharing unwanted files or other resources.

The network controller has been largely rewritten to use a simple in-filesystem JSON data store in place of SQLite, and it is now included by default in all Windows, Mac, Linux, and BSD builds. This means any desktop or server node running ZeroTier One can now be a controller with no recompilation needed.

If you have data in an old SQLite3 controller we've included a NodeJS script in `controller/migrate-sqlite` to migrate data to the new format. If you don't migrate, members will start getting `NOT_FOUND` when they attempt to query for updates.

 * **The Windows HyperV 100% CPU bug is FINALLY DEAD**: This long-running problem turns out to have been an issue with Windows itself, but one we were triggering by placing invalid data into the Windows registry. Microsoft is aware of the issue but we've also fixed the triggering problem on our side. ZeroTier should now co-exist quite well with HyperV and should now be able to be bridged with a HyperV virtual switch.
 * **Segmenation faults on musl-libc based Linux systems**: Alpine Linux and some embedded Linux systems that use musl libc (a minimal libc) experienced segmentation faults. These were due to a smaller default stack size. A work-around that sets the stack size for new threads has been added.
 * **Windows firewall blocks local JSON API**: On some Windows systems the firewall likes to block 127.0.0.1:9993 for mysterious reasons. This is now fixed in the installer via the addition of another firewall exemption rule.
 * **UI crash on embedded Windows due to missing fonts**: The MSI installer now ships fonts and will install them if they are not present, so this should be fixed.

 * **Improved dead path detection**: ZeroTier is now more aggressive about expiring paths that do not seem to be active. If a path seems marginal it is re-confirmed before re-use.
 * **Minor performance improvements**: We've reduced unnecessary memcpy's and made a few other performance improvements in the core.
 * **Linux static binaries**: For our official packages (the ones in the download.zerotier.com apt and yum repositories) we now build Linux binaries with static linking. Hopefully this will stop all the bug reports relating to library inconsistencies, as well as allowing our deb packages to run on a wider variety of Debian-based distributions. (There are far too many of these to support officially!) The overhead for this is very small, especially since we built our static versions against musl-libc. Distribution maintainers are of course free to build dynamically linked versions for inclusion into distributions; this only affects our official binaries.
2017-03-14 22:07:26 -07:00
Adam Ierymenko 002f9bb105 . 2017-03-14 22:05:39 -07:00
Adam Ierymenko e86b1146a6 Windows version bump. 2017-03-14 21:35:41 -07:00
Adam Ierymenko d44fb3a2f6 bump bump bump that version 2017-03-14 21:23:47 -07:00
Adam Ierymenko 1ef3069a7e 1.2.0 release notes and a few final tweaks and cleanup. 2017-03-14 21:21:12 -07:00
Adam Ierymenko f99b62c48d fix stupid thing. 2017-03-14 15:38:24 -07:00
Adam Ierymenko 0fd45a640b Allow multiple architectures in software update dist .json file arch fields. 2017-03-14 15:19:16 -07:00
Adam Ierymenko 0b0d03dbe2 Merge branch 'dev' of http://10.187.63.16/zerotier/ZeroTierOne into dev 2017-03-14 14:40:27 -07:00
Adam Ierymenko 533baf921f Software update cleanup, and a fix for updates on Windows. 2017-03-14 14:40:17 -07:00
Adam Ierymenko 8e9767f3c6 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-03-14 13:17:16 -07:00
Adam Ierymenko 27d4bedd73 Wait a minute (literally) before doing software update check on startup. 2017-03-14 13:17:10 -07:00
Adam Ierymenko c1c26ec73a Version 1.2.0 bump 2017-03-13 15:41:42 -07:00
Adam Ierymenko 8f592ff6e8 Controller performance tweaks. 2017-03-13 13:58:29 -07:00
Adam Ierymenko 37629aaf87 Use cache on requests to decrease DB load. 2017-03-13 12:22:06 -07:00
Adam Ierymenko d09d193715 release notes, and delete MANUAL from this repo for now since it isn't quite done and will take shape on the web site 2017-03-13 09:37:24 -07:00
Adam Ierymenko 010d0a7d56 Docs and a bit of cleanup. In particular ALL makes no sense for revocations because they have IDs. In that case you would just revoke the COM. 2017-03-13 06:53:23 -07:00
Adam Ierymenko 902807ea50 Software update check every 10min. 2017-03-10 22:03:07 -08:00
Adam Ierymenko d0224b3623 Software update fix. 2017-03-10 22:02:08 -08:00
Adam Ierymenko 0f3148bda2 Roots need to respond to lots of WHOISes 2017-03-10 20:08:07 -08:00
Adam Ierymenko e3b1fc2ac0 Tweak WHOIS path for federation. 2017-03-10 19:52:08 -08:00
Adam Ierymenko 6194d2af3d Return 200 from JSON API when moon is POSTed. 2017-03-10 19:37:03 -08:00
Adam Ierymenko db87d95c1d getUpstreamPeer issue with interim federated roots 2017-03-10 19:31:51 -08:00
Adam Ierymenko 47166c9614 Sigh. Another thinko. 2017-03-10 17:54:14 -08:00
Adam Ierymenko ecacdf27a9 Build fix (typo) 2017-03-10 17:45:05 -08:00
Adam Ierymenko aad6f79efa Also must mask off counter bits in IV in cryptField. 2017-03-10 17:44:25 -08:00
Adam Ierymenko 0c00b83702 cryptField() used to obscure extended fields in HELLO cannot use mangleKey() 2017-03-10 17:34:41 -08:00
Adam Ierymenko 7320e26730 Merge branch 'edge' of http://10.6.6.2/zerotier/ZeroTierOne into edge 2017-03-10 11:34:00 -08:00
Grant Limberg 1520534660 fix some rediculousness in NDK-14
Apparently having -fPIC on the command line multiple times turns it back off
2017-03-09 17:48:40 -08:00
Adam Ierymenko 6d6719da27 Clarify key semantics. 2017-03-08 17:03:32 -08:00
Adam Ierymenko 20085cd15b No need to put time in .moon filename. 2017-03-08 16:51:12 -08:00
Adam Ierymenko 9b001823f6 Add ifdef for synology around synology-only code in Linux Ethernet tap. 2017-03-08 16:12:54 -08:00
Grant Limberg ed4f84cc57 Fix exception thrown in NetworkMonitor thread that can cause the UI to stop polling service for updates 2017-03-08 14:54:58 -08:00
Grant Limberg c8e66a2b45 Don't crash when attempting to join a network while the zerotier service isn't running 2017-03-08 14:50:37 -08:00
Adam Ierymenko 6eb2e3ffa9 forgot to add prereq for adduser getent on fedora 2017-03-08 13:13:12 -08:00
Adam Ierymenko 748ad8a978 create zerotier-one user via rpm 2017-03-08 12:26:16 -08:00
Adam Ierymenko d2f897f8de add dependency on adduser 2017-03-08 12:26:16 -08:00
Adam Ierymenko 4b511d80a1 Windows directory cleanup and a Windows build fix. 2017-03-08 10:38:43 -08:00
Adam Ierymenko a74e9e1dd3 remove debug line 2017-03-08 10:27:13 -08:00
Adam Ierymenko 9c1a9f984b Clean iddb.d periodically. 2017-03-08 10:18:12 -08:00
Adam Ierymenko 04c7adea07 cleanup 2017-03-08 08:58:07 -08:00
Adam Ierymenko 5249ce8fb4 Small amount of cleanup. 2017-03-08 08:45:04 -08:00
Adam Ierymenko ebd865dbda Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-03-07 18:25:44 -08:00
Adam Ierymenko d377ef01af Windows build process updates, and repackage everything using new EV certificate and SHA256. 2017-03-07 18:25:06 -08:00
Adam Ierymenko 393aa3c527 fix debuild comand 2017-03-07 14:20:06 -08:00
Adam Ierymenko d7b6de57c5 update debian build files 2017-03-07 14:20:06 -08:00
Adam Ierymenko 05d4b0cd94 Update RPM spec file 2017-03-07 14:20:06 -08:00
Adam Ierymenko 5dbafc2eeb Add config to status in JSON API. 2017-03-07 14:17:51 -08:00
Adam Ierymenko a97918f812 Windows build fixes. 2017-03-07 13:57:31 -08:00
Adam Ierymenko 22f86df606 Merge ControlPlane into OneService to make variable access simpler. 2017-03-07 13:53:11 -08:00
Adam Ierymenko 712e8e828b use .exe naming convention 2017-03-07 11:58:17 -08:00
Adam Ierymenko 7d3846bc49 Bump version to 1.1.19 in prep for release and software update testing. 2017-03-07 10:26:36 -08:00
Adam Ierymenko 9980526aaf Consistent field names. 2017-03-07 10:12:05 -08:00
Adam Ierymenko 1d2cb867b2 Close all open FDs before exec in Unix software update code. 2017-03-07 09:26:27 -08:00
Adam Ierymenko 3859533e73 Minor software updater cleanup. 2017-03-07 09:18:00 -08:00
Adam Ierymenko 7ea7e1898a Fix a bug that could cause duplicate IP address assignment on networks if many new members join the controller at once. 2017-03-06 16:21:49 -08:00
Adam Ierymenko 5e6a4e5f5e Send revocations automatically on deauth for instant kill, also fix some issues with the RP. 2017-03-06 15:12:28 -08:00
Adam Ierymenko 66dfc33de9 Fix circuit test post in controller. 2017-03-06 11:23:46 -08:00
Adam Ierymenko d56f740dc6 Now with less bugs. 2017-03-03 13:49:21 -08:00
Adam Ierymenko a109d341ef Send timestamp with new circuit test response. 2017-03-02 14:35:38 -08:00
Adam Ierymenko 87b53d67c5 Fix selftest build. 2017-03-02 10:02:29 -08:00
Adam Ierymenko a577b8d381 Update how controller handles circuit tests -- save results to filesystem. 2017-03-01 16:33:34 -08:00
Adam Ierymenko 136fddc7f1 Fix FILTER_TRACE breakage. 2017-03-01 15:14:57 -08:00
Adam Ierymenko ce0c87f8ff Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-03-01 15:12:26 -08:00
Adam Ierymenko d79585d44d Circuit tests now report link quality. Also fixed a little thing in revocation propagation. 2017-03-01 15:12:17 -08:00
Grant Limberg 592b628523 comment broken TRACE message 2017-03-01 14:50:28 -08:00
Adam Ierymenko 39f886ad88 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-03-01 14:37:01 -08:00
Adam Ierymenko 1d39be61b2 ZeroTier now has link quality measurement. We are not using this yet but decided to put it in to prep for future QoS support and SD-WAN stuff. 2017-03-01 14:36:52 -08:00
Adam Ierymenko 2bf9145ae6 Outgoing side of packet counter for link quality reporting. Also some cleanup and a cluster mode build fix. 2017-03-01 10:22:57 -08:00
Adam Ierymenko 127bcb02ff Save space in expecting-reply-to tracking. 2017-03-01 09:41:37 -08:00
Joseph Henry 4430fc47c6 Added HTTP authorization block for synology builds 2017-02-28 16:30:20 -08:00
Adam Ierymenko 2b10a982e9 Match on tag sender equals or tag recipient equals. 2017-02-28 09:22:10 -08:00
Adam Ierymenko 31bece7fa0 Add ipauth handling of IPv6 NDP neighbor solicitations and advertisements. IPv6 works well now with ipauth. 2017-02-28 07:43:40 -08:00
Adam Ierymenko 4436824faf ipauth characteristic now works with ARP 2017-02-27 17:51:58 -08:00
Adam Ierymenko dd92f1d03d . 2017-02-23 17:56:36 -08:00
Adam Ierymenko b6f87565a9 Add wake on LAN (wol) to rules language ethertype shorthand. 2017-02-23 16:03:43 -08:00
Adam Ierymenko 0b909997b8 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-02-23 14:27:48 -08:00
Adam Ierymenko 9d7ff26f25 Helps if you actually add the ipauth mask to the characteristics mask. 2017-02-23 14:27:31 -08:00
Grant Limberg 06c866ceb4 Android JNI fix 2017-02-23 12:47:07 -08:00
Adam Ierymenko fe19ad328c Windows build fix. 2017-02-23 12:40:21 -08:00
Adam Ierymenko 010dbc8b2b Merge. 2017-02-23 12:35:20 -08:00
Adam Ierymenko 72653e54f9 Finish wiring up ipauth and macauth to Network filter. 2017-02-23 12:34:17 -08:00
Grant Limberg 93ec86a26e iOS fixes 2017-02-23 12:26:11 -08:00
Adam Ierymenko 10185e92fa Certificate of ownership -- used to secure against IP address spoofing, especially for IPv4 and regular IPv6. 2017-02-23 11:47:36 -08:00
Grant Limberg 33b94e8478 fixed double firing of the leave network API call causing an error popup on windows 2017-02-22 16:54:57 -08:00
Adam Ierymenko 2ee53b0e75 Fix bug in default capability flag in rule parser. 2017-02-22 15:52:55 -08:00
Adam Ierymenko fb00f0f94c Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-02-22 15:34:49 -08:00
Adam Ierymenko b679ebde3b Ad-hoc networks, a cool and easy to implement little feature that allows controllerless networks. These only allow IPv6 6plane, no multicast, and the network ID encodes the allowed port range. 2017-02-22 15:32:55 -08:00
Joseph Henry f3ca08b0f1 Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev 2017-02-21 17:55:07 -08:00
Joseph Henry 946e413997 properly fill out ifcfg files. also removed route re-add code for synology 2017-02-21 17:55:00 -08:00
Adam Ierymenko b475bf4a21 . 2017-02-21 15:28:01 -08:00
Adam Ierymenko 54fa73844c Fix crash. 2017-02-21 13:48:29 -08:00
Adam Ierymenko 32f5a0ab18 Add default tag values and default set capabilities for new members. 2017-02-21 13:27:20 -08:00
Joseph Henry e4135ffb35 Decreased ZT_BINDER_REFRESH_PERIOD for Synology build 2017-02-16 16:56:23 -08:00
Joseph Henry b5b335a6f8 Route re-add patch for linux build on Synology devices 2017-02-16 16:41:26 -08:00
Joseph Henry 57ef31d51c Route re-add patch for linux build on Synology devices 2017-02-16 16:06:04 -08:00
Adam Ierymenko 61b413b57f Found it in a few other places. 2017-02-16 09:54:52 -08:00
Adam Ierymenko d2c0203dc9 Fix stupid inverted sense bug. 2017-02-16 09:53:39 -08:00
Adam Ierymenko afba19e01c When deciding whether to send PUSH_DIRECT_PATHS we should check global trust flag, not the one passed into receive(). 2017-02-16 09:44:04 -08:00
Adam Ierymenko b989c03416 Fix build on Linux if PR_CAP_AMBIENT is not defined, which is the case for some libc-dev installs. 2017-02-16 00:57:33 +00:00
Adam Ierymenko 3361b4030b Integrate and test linux privilege drop code (from contributor PR). It works now if a "zerotier-one" user is present on a Linux system. Does everything automagically. 2017-02-15 16:25:49 -08:00
Adam Ierymenko bdadd50251 . 2017-02-14 16:49:10 -08:00
Adam Ierymenko d01f31197a Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-02-14 16:43:29 -08:00
Adam Ierymenko 8b82f1c609 Add rules compiler script. 2017-02-14 16:43:22 -08:00
Grant Limberg de7e8a1ca4 fix About view on Mac so that it opens links in the system web browser 2017-02-14 16:39:15 -08:00
Grant Limberg aa2ee3f7be Right and left click both will now open the context menu on Windows 2017-02-14 16:31:11 -08:00
Adam Ierymenko af4e79735c Fix "orbit" semantics. Federation works. 2017-02-13 16:38:21 -08:00
Adam Ierymenko 969e09210d Fix loading of existing moons. 2017-02-13 16:14:48 -08:00
Adam Ierymenko cd7b571da0 Add a local.conf option to set the port. 2017-02-13 15:55:38 -08:00
Adam Ierymenko 0052877d2f Add CLI shortcuts for adding federated roots. 2017-02-13 15:41:53 -08:00
Adam Ierymenko 23bb44f2d6 Fix small typo. 2017-02-13 14:28:17 -08:00
Adam Ierymenko 16f11e91d1 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-02-13 14:27:14 -08:00
Adam Ierymenko 4b11566505 Integrate moon concept into http config bus, and clean up that code quite a bit. 2017-02-13 14:27:08 -08:00
Grant Limberg 9ae49b5b85 Update JNI with new root terminology 2017-02-13 10:51:36 -08:00
Adam Ierymenko c95bae2d73 Small fixes to moon-management code in CLI. 2017-02-13 10:05:00 -08:00
Adam Ierymenko e4b6611201 Only accept world updates from upstreams. 2017-02-13 09:46:34 -08:00
Adam Ierymenko e6840a1863 Can't erase from vector using const_iterator on some C++ compilers.' 2017-02-13 09:26:05 -08:00
Adam Ierymenko 78d5f1a803 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-02-13 09:03:54 -08:00
Adam Ierymenko 42f28bce52 Cleanup and make moons (federated roots) a little easier to deal with. 2017-02-13 09:03:48 -08:00
Grant Limberg 9a6c3e05ad Fix for deleted networks not being removed from the network details list on macOS 2017-02-10 16:10:23 -08:00
Adam Ierymenko cdc289fa9c Tags work. 2017-02-07 14:06:40 -08:00
Adam Ierymenko 672f17c6e9 Add a mask and value range to the IP tos rule field. This allows TOS to be matched more usefully. This will break anyone using tos in the beta, but nobody seems to be and its pre-release so now is the time. 2017-02-07 09:33:39 -08:00
Adam Ierymenko 723a9a6e9a Small additional efficiency improvement. 2017-02-06 17:20:22 -08:00
Adam Ierymenko 59ba7c8bf5 Improve efficiency of pushCredentials() method since it gets called a lot. 2017-02-06 17:10:20 -08:00
Adam Ierymenko 78d548458b Capabilities basically work but need to refactor a bit for performance reasons. 2017-02-06 16:38:48 -08:00
Adam Ierymenko ac3e883c05 One more place to add "break". 2017-02-06 14:07:30 -08:00
Adam Ierymenko 9ddc2a4331 Add a break action to rules engine to make capabilities easier to use. 2017-02-06 14:00:49 -08:00
Adam Ierymenko 435e4c4695 Fix HELLO parse bug. 2017-02-06 12:06:10 -08:00
Adam Ierymenko 21f4a97c35 CSPRNG performance improvement, self test build fix. 2017-02-06 11:49:41 -08:00
Adam Ierymenko e0d63c50db One more tweak after thinking about related keys and key stream reuse. Just a precaution. 2017-02-06 07:45:57 -08:00
Adam Ierymenko 803f74634a Tweak how we do crypto of the masked portions of HELLO just to be more "boring" in the DJB sense. 2017-02-06 07:39:38 -08:00
Adam Ierymenko f85a630a64 Docs and a small build fix in debug mode. 2017-02-06 07:17:45 -08:00
Adam Ierymenko 43182f8f57 Docs, code cleanup, and protect the extra new fields of HELLO with encryption as a precaution. 2017-02-05 16:19:03 -08:00
Adam Ierymenko 594cb1fad8 Small fix for duplicates in world definitions. 2017-02-04 19:29:39 -08:00
Adam Ierymenko 5eab6c2e5d More docs. 2017-02-04 19:19:30 -08:00
Adam Ierymenko 3587aa1ea7 Add and send certificates of representation to tell people what our valid upstreams are. These are not used yet but will be needed for future privacy modes, etc. Also some cleanup. 2017-02-04 13:17:00 -08:00
Adam Ierymenko beb642faa5 Stub out CAN_REACH. 2017-02-04 10:21:31 -08:00
Adam Ierymenko 31db768e4d A bit of code cleanup. 2017-02-04 00:23:31 -08:00
Adam Ierymenko d9e4ba1280 Eliminate a little copypasta. 2017-02-04 00:04:44 -08:00
Adam Ierymenko dcb1233b0d Slight refactor to RENEDEZVOUS sending code for federation. 2017-02-03 23:54:02 -08:00
Adam Ierymenko 8a2ff0b31e Actual documentation. 2017-02-03 19:47:00 -08:00
Adam Ierymenko be2881ae8d . 2017-02-02 16:53:27 -08:00
Adam Ierymenko 88cba48f45 Eliminate warning. 2017-02-01 15:24:41 -08:00
Adam Ierymenko 9284e4edfe agree() must be called on our identity, the one with the secret 2017-02-01 15:22:14 -08:00
Adam Ierymenko 62a705af1c Eliminate another check in cluster frontplane mode. 2017-02-01 14:35:07 -08:00
Adam Ierymenko 29ec7bf3a2 Add more specific check in source==self case instead of dumping it. 2017-02-01 14:18:56 -08:00
Adam Ierymenko fc3f4fb988 Yeah that could never have worked (normal packets in cluster mode). 2017-02-01 14:05:13 -08:00
Adam Ierymenko 60ff280dcb Another tweak to cluster I/O rules. 2017-02-01 13:52:53 -08:00
Adam Ierymenko b378f5dcd7 Take 3 2017-02-01 13:20:51 -08:00
Adam Ierymenko e778d45128 Still want to send WANT_PEER under two failure modes. 2017-02-01 12:51:52 -08:00
Adam Ierymenko 5e11cf6378 Can't armor() a packet until all flags are set. 2017-02-01 12:32:06 -08:00
Adam Ierymenko 5dbebc513a Minor send path refactor to make packet I/O work on clusters if they are members of networks. Also fix a crash if compiled in cluster mode but no cluster is enabled. 2017-02-01 12:00:25 -08:00
Adam Ierymenko 6d5a3cd2e2 Remove debug code. Cluster network config sharing seems to work. 2017-01-30 16:23:38 -08:00
Adam Ierymenko f9ad80aa13 . 2017-01-30 16:15:47 -08:00
Adam Ierymenko ed31cb76d6 Fix to cluster network configs. 2017-01-30 16:04:05 -08:00
Adam Ierymenko eebd271bb1 Implement cross cluster sharing of network configs to make clusters able to actually join networks. 2017-01-30 15:40:22 -08:00
Adam Ierymenko ff74ec2482 Cluster build fix. 2017-01-30 21:39:44 +00:00
Grant Limberg 49e31ca647 InetAddress.hpp needs to be included in OneService.hpp 2017-01-30 09:16:16 -08:00
Adam Ierymenko 471108f2e4 Slightly increase thread stack size for safety (primary Alpine related) possibly GitHub #443 2017-01-30 08:01:36 -08:00
Adam Ierymenko 2ceb162df0 Merge pull request #442 from zielmicha/allow-managed
allow user to specify arbitrary allowed IP networks in allowManaged
2017-01-30 06:54:49 -08:00
Adam Ierymenko 915206405c docs 2017-01-27 17:41:07 -08:00
Adam Ierymenko 5fa1d9796c zerotier-idtool commands to init and generate moons 2017-01-27 17:34:39 -08:00
Adam Ierymenko 77a1dd4737 Dead code removal, fix minor issue in upstream endpoint check. 2017-01-27 16:25:53 -08:00
Adam Ierymenko 9e7c778cc8 Fix deadlock. 2017-01-27 16:16:06 -08:00
Adam Ierymenko 1d775af34a Fix moon persistence. 2017-01-27 15:35:21 -08:00
Adam Ierymenko 9f7919f71f Add comments to join ("orbit") moons. 2017-01-27 15:27:26 -08:00
Adam Ierymenko 0b3b994241 Relay policy can now be computed. 2017-01-27 14:05:09 -08:00
Adam Ierymenko bc218f9414 little fix 2017-01-27 13:52:29 -08:00
Adam Ierymenko f102fd7f92 Extend in-band world updates to handle moons too. 2017-01-27 13:50:56 -08:00
Adam Ierymenko 64774d0d4f Replace piecemeal designation of upstreams with the concept of moons, which is simpler and easier to use and inherits all the cool live update stuff of worlds (now called planets) and global roots. 2017-01-27 13:27:52 -08:00
Adam Ierymenko b88f573733 tap-windows-ndis5 is definitely dead 2017-01-27 07:29:42 -08:00
Adam Ierymenko b211e61671 debian rules 2017-01-26 16:12:50 -08:00
Adam Ierymenko 871cacf040 Remove junk. 2017-01-26 15:02:52 -08:00
Adam Ierymenko 7c3984413e Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-01-26 15:02:20 -08:00
Adam Ierymenko 967ce78a57 Add static build option so we can build a static Linux binary for ancient distros (wheezy, etc.) 2017-01-26 15:02:03 -08:00
Grant Limberg 923d3f1fe8 remove references to deleted source files in Android NDK build files 2017-01-26 15:01:45 -08:00
Grant Limberg e11f42a089 remove reference to BackgroundResolver.cpp/.hpp on Windows 2017-01-26 14:29:39 -08:00
Grant Limberg 9b8d9b7042 fix copy stage for paths with spaces 2017-01-26 14:27:39 -08:00
Adam Ierymenko 902e03bccc build fix 2017-01-26 14:23:22 -08:00
Adam Ierymenko ec0e8a9a43 Rip out resolver and use anycast address instead. In the long term existing TCP proxy dies anyway. Fixes static build problem for old Linux versions. 2017-01-26 13:59:20 -08:00
Adam Ierymenko 9e488ce322 delete binary 2017-01-26 21:55:35 +00:00
Adam Ierymenko c111bf3080 Fix tcp-proxy build. 2017-01-26 21:54:55 +00:00
Michał Zieliński 8f2a42d1ad allow user to specify arbitrary allowed IP networks in allowManaged 2017-01-23 12:16:40 +01:00
Adam Ierymenko 9a475eeff9 Windows build fix, warning removal. 2017-01-20 12:00:18 -08:00
Adam Ierymenko 91a37ec639 docs 2017-01-20 11:02:54 -08:00
Adam Ierymenko db1e2aae41 docs 2017-01-20 11:00:18 -08:00
Adam Ierymenko 4a7c76a11b docs, cleanup, temporarily put cli in attic since it is not done. 2017-01-20 10:51:55 -08:00
Adam Ierymenko f1ed57c62d Update nlohmann/json (header only lib). 2017-01-20 10:09:47 -08:00
Adam Ierymenko 3b0969e3a5 Fix build on G++ 4.9 on FreeBSD-11. 2017-01-20 10:07:25 -08:00
Adam Ierymenko 35174a8766 Basic BSD gmake install/uninstall. 2017-01-19 15:15:31 -08:00
Adam Ierymenko d79f792e6f OpenBSD fixes, workaround for apparent libstdc++ bug. 2017-01-19 15:05:26 -08:00
Adam Ierymenko 7b231b38b0 Now builds on OpenBSD, but segfaults. So not yet but close. GitHub issue #439 2017-01-19 10:39:42 -08:00
Adam Ierymenko 13263b8401 docs 2017-01-19 16:23:25 -08:00
Adam Ierymenko a604294b1b local.conf docs 2017-01-19 16:10:36 -08:00
Adam Ierymenko 89d74cd293 Add a portMappingEnabled flag to local.conf to allow uPnP/NAT-PMP to be disabled. 2017-01-19 15:57:50 -08:00
Adam Ierymenko 56e5b34934 Bump bundled miniupnpc to 20161216 2017-01-19 15:52:39 -08:00
Adam Ierymenko f43365e4ba Take LZ4 out of Debian depends. 2017-01-19 15:44:16 -08:00
Adam Ierymenko 4d071081bb docs 2017-01-19 15:22:43 -08:00
Adam Ierymenko b67b370dba docs 2017-01-19 15:20:55 -08:00
Adam Ierymenko 0995c1dcaa Encapsulate LZ4 in Packet.cpp to eliminate dependency. 2017-01-19 15:16:04 -08:00
Adam Ierymenko 7612bf3302 Fix LZ4 warning. 2017-01-19 14:54:39 -08:00
Adam Ierymenko ba158d8dc6 Include LZ4 README and LICENSE. 2017-01-19 14:48:40 -08:00
Adam Ierymenko a90f2249e8 Upgrade LZ4. 2017-01-19 14:48:01 -08:00
Adam Ierymenko d8f36db5dd Fix FreeBSD build in dev. 2017-01-19 12:11:49 -08:00
Adam Ierymenko fd460d93c4 docs 2017-01-19 10:53:44 -08:00
Adam Ierymenko 989cbb4d8d Merge pull request #434 from zielmicha/fix-ip
Binder.hpp: gather all IPv4 interface addresses
2017-01-19 10:47:47 -08:00
Adam Ierymenko e9007b1f56 NodeJS migration script for old Sqlite controller.db to new controller data format. 2017-01-19 10:44:26 -08:00
Adam Ierymenko 0fb3d1d582 Add a build version for software update use so we can do very minor updates within a version. 2017-01-18 09:16:23 -08:00
Adam Ierymenko 81910c1d92 Replace update signing key with real key generated on air-gapped system. 2017-01-13 16:07:57 -08:00
Adam Ierymenko d150f9b2bd Windows update build in Advanced Installer, and warning removal. 2017-01-13 15:19:59 -08:00
Adam Ierymenko 1346e31a8e Windows build fixes, Software update fix, warning removal. 2017-01-13 14:22:36 -08:00
Adam Ierymenko 54f25b14ee Software updater log for distributors (does not affect real users much). 2017-01-13 14:03:06 -08:00
Adam Ierymenko 0e4d3244b2 "make official" for Mac now builds update image as well as pkg (update image is just PKG + SFX script) 2017-01-13 13:09:42 -08:00
Adam Ierymenko 87e3b5f076 Mac updater SFX code. 2017-01-13 12:42:49 -08:00
Adam Ierymenko f8e18f2098 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-01-13 12:13:20 -08:00
Adam Ierymenko f81c67c0f0 Make sure to respond to GET_LATEST with the actual latest. 2017-01-13 12:13:14 -08:00
Grant Limberg 4f4dd3446c Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev 2017-01-13 11:36:53 -08:00
Grant Limberg f149dd9401 fix Android NDK build 2017-01-13 11:36:48 -08:00
Adam Ierymenko 3a730c4a5c Remove debug printfs in software updater. It works! At least for unix. Now to test Windows. 2017-01-13 11:24:00 -08:00
Adam Ierymenko b03247ec3c SoftwareUpdate::apply() 2017-01-13 10:46:16 -08:00
Adam Ierymenko 8ebb49e972 Cache downloaded updates to disk. 2017-01-12 15:21:14 -08:00
Adam Ierymenko 84bfec8329 . 2017-01-12 14:35:52 -08:00
Adam Ierymenko e1727d6297 Fix to software update repeat downloads. 2017-01-12 14:34:52 -08:00
Adam Ierymenko e7bab66d29 Auto-apply updates if enabled. 2017-01-12 13:54:08 -08:00
Adam Ierymenko ab25c96821 Build fixes. 2017-01-12 13:51:06 -08:00
Adam Ierymenko c6b0b07605 More software update work, and settings in local.conf. 2017-01-12 13:18:11 -08:00
Adam Ierymenko b5b583c397 . 2017-01-11 18:10:42 -08:00
Adam Ierymenko 56d969c709 . 2017-01-11 17:59:51 -08:00
Adam Ierymenko 3fedf16f35 . 2017-01-11 17:57:12 -08:00
Adam Ierymenko 5da56776d6 . 2017-01-11 17:54:43 -08:00
Adam Ierymenko d58870a92d . 2017-01-11 17:53:19 -08:00
Adam Ierymenko 15ed7423ac . 2017-01-11 17:50:02 -08:00
Adam Ierymenko d7e7ad4f88 Can't send a user message to self. 2017-01-11 17:46:52 -08:00
Adam Ierymenko 823a1963f6 init fix. 2017-01-11 17:45:09 -08:00
Adam Ierymenko 6513b21426 debug code. 2017-01-11 17:42:57 -08:00
Adam Ierymenko d4321cdd41 Wire up user message handling in OneService event handler. 2017-01-11 17:20:43 -08:00
Adam Ierymenko d301540d92 Software update stuff for test. 2017-01-11 16:58:37 -08:00
Adam Ierymenko af5a3376f3 Should fix Windows build. 2017-01-11 16:56:16 -08:00
Adam Ierymenko 4aa52ffc77 Software update stuff. 2017-01-11 16:47:42 -08:00
Adam Ierymenko 47b62ece18 Software update integration. 2017-01-11 16:34:33 -08:00
Adam Ierymenko 2aab26a08e Software update work. 2017-01-11 15:22:16 -08:00
Adam Ierymenko 565842b5ec Software updater work. 2017-01-11 14:37:31 -08:00
Adam Ierymenko a064e19b8a Refactor some JSON stuff for performance, and fix a build error. 2017-01-10 13:51:10 -08:00
Adam Ierymenko 6fb49f68fc Comment out and disable old auto-update code. 2017-01-10 12:20:29 -08:00
Adam Ierymenko ef7faa7291 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2017-01-09 15:55:13 -08:00
Adam Ierymenko d5528e4e9a Wire up VERB_USER_MESSAGE in core. 2017-01-09 15:55:07 -08:00
Grant Limberg f730f65aaf bring window to front if already open 2017-01-09 14:23:37 -08:00
Grant Limberg dbd577c6b0 Merge branch 'winroute' into dev 2017-01-09 12:41:45 -08:00
Grant Limberg 7ebb207005 Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev 2017-01-05 13:56:15 -08:00
Grant Limberg e41d71cd19 add implementations of compareTo() and equals() for VirtualNetworkRoute().
Android app was relying on these, but since they didn't exist, they didn't function properly
2017-01-05 13:56:07 -08:00
Grant Limberg 0f6c53589e remove commented out function declaration 2017-01-05 11:46:33 -08:00
Grant Limberg e2b1a7157e Potential fix for routing issue on Windows
Move setting _initialized = true until after WindowsEthernetTap::threadMain() has actually created and brought up the adapter.  Also in OneService::nodeVirtualNetworkConfigFunction(), wait up to 5 seconds for WindowsEthernatTap::isInitialized() to return true before attempting to configure the interface and managed routes.  Without this, the adapter doesnt actually exist yet when trying to add routes
2017-01-05 11:43:26 -08:00
Grant Limberg aaf69d1aff properly quote string arguments to copyutil in case there are spaces in the path 2017-01-03 14:03:50 -08:00
Michał Zieliński 203b7e17de Binder.hpp: gather all IPv4 interface addresses 2017-01-01 23:57:15 +01:00
Adam Ierymenko 9a2b766aad Windows installer updates. 2016-12-23 15:57:21 -08:00
Adam Ierymenko 24017659df Update installer, etc., for Mac. 2016-12-23 15:25:04 -08:00
Adam Ierymenko c175a5fcd7 Change org names, add makefile rule for Mac to build new UI. 2016-12-23 15:11:44 -08:00
Adam Ierymenko 5ec8465374 Remove dead Mac stuff. 2016-12-23 14:38:36 -08:00
Adam Ierymenko 6b5d6efe6c Retire old build farm (something new is coming) and update makefile for linux to not auto-build doc. 2016-12-23 14:33:04 -08:00
Adam Ierymenko 5bff70194b Ship pre-build man pages. We stopped doing this for a bit due to nit-picky Debian craziness but since we are not targeting core Debian at the moment bring it back. 2016-12-23 14:30:27 -08:00
Adam Ierymenko d94d04d7d5 Bump to 1.1.17 for pre-1.2.0 beta. 2016-12-23 13:52:41 -08:00
Adam Ierymenko bf2b9e3692 Auto-authorize new members on public networks properly. 2016-12-22 18:52:34 -08:00
Adam Ierymenko c8554504f3 . 2016-12-22 18:37:46 -08:00
Adam Ierymenko 0d066e3b08 Fix JSON parse bug in REDIRECT target. 2016-12-22 18:26:43 -08:00
Adam Ierymenko 6b12d86209 Add a workaround for an edge case in TEE/REDIRECT if we are the inbound destination and teeing is only being done on the outbound side. 2016-12-22 18:06:35 -08:00
Adam Ierymenko fe530548bb Fix MATCH_RANDOM in controller. 2016-12-22 16:57:45 -08:00
Adam Ierymenko 2eaff6d484 Fix to characteristcs in rules engine. 2016-12-22 16:36:38 -08:00
Adam Ierymenko a54c2b438c Basic support for streaming of changes via stdout from controller. 2016-12-15 15:08:47 -08:00
Adam Ierymenko 890f6f0d35 Make allow management from a local.conf parameters. 2016-12-12 16:25:41 -08:00
Adam Ierymenko bad4b72f82 Remove debug printf. 2016-12-12 14:44:21 -08:00
Adam Ierymenko 4702c5b4ee Add local.conf option to blacklist interfaces by name. 2016-12-12 14:43:09 -08:00
Adam Ierymenko 4459d5ad54 Remove debug printf 2016-12-12 12:58:39 -08:00
Adam Ierymenko 39fb4b1b42 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-12-12 12:55:14 -08:00
Adam Ierymenko 3864a2e111 Use an alternative method for enumerating interface addresses on Linux to avoid poor performance of getifaddrs() when there are many network namespaces. 2016-12-12 12:53:51 -08:00
Grant Limberg 697520f1f5 Dont write IPv6 addresses to IPv4 sections of registry TCPIP settings.
Also, dont add the prefix length to the IP addresses in there.

Appears to fix Github Issue #357.  Still waiting on some info from Microsoft for confirmation of a few things.
2016-12-09 11:36:01 -08:00
Adam Ierymenko 244f37179c Minor security: lock roots to only be reachable via World IPs. 2016-12-05 16:09:42 -08:00
Grant Limberg 4b3a47849d Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev 2016-11-30 15:21:33 -08:00
Grant Limberg 56faf774ff Store MTU as String instead of DWORD
WindowsEthernetTap was storing the MTU for the ZeroTier Adapter as a
DWORD.  When changing the value from the network adapter settings UI, it
was stored as a string.  Updated the call when creating the adapter to
store it as a string as windows expects.
2016-11-30 15:18:38 -08:00
Adam Ierymenko fa2bb91ae5 Kill some old debug code. 2016-11-30 10:48:09 -08:00
Grant Limberg 32478845b2 Merge branch 'dev' into systemtray 2016-11-30 10:21:19 -08:00
Adam Ierymenko 44f0e3097e docs 2016-11-29 10:56:16 -08:00
Grant Limberg 289917e2b3 use msbuild instead of devenv 2016-11-28 15:30:52 -08:00
Grant Limberg 14fcb5867f rethrow windows build error 2016-11-28 14:57:37 -08:00
Grant Limberg cf59362c4a add windows build to Jenkinsfile 2016-11-28 13:06:28 -08:00
Grant Limberg 8472918559 Change 'localhost' to 127.0.0.1
@makerspherehq reported it not working as 'localhost' via Twitter
2016-11-28 09:40:34 -08:00
Adam Ierymenko ae8f51d608 . 2016-11-23 16:27:15 -08:00
Adam Ierymenko 4a7ee5472d Small fixes. 2016-11-23 16:23:44 -08:00
Adam Ierymenko 8718b33a66 docs 2016-11-23 15:57:06 -08:00
Adam Ierymenko 27f1155f1b docs and API stuff 2016-11-23 15:53:53 -08:00
Adam Ierymenko 84732fcb12 Wire through external path lookup. Static paths should now work. 2016-11-22 14:23:13 -08:00
Grant Limberg c6c578ce1d Fixes to allow usage of ZeroTierOne.h with a C compiler 2016-11-22 13:18:52 -08:00
Grant Limberg 3c5e28a27d use new ZT_Node_Callbacks struct in JNI 2016-11-22 13:03:36 -08:00
Grant Limberg a39f6e9b4c clear cached window positions when display settings change 2016-11-22 12:02:49 -08:00
Grant Limberg adb7a88836 cache window positions so we only have to move after open once. 2016-11-22 11:53:06 -08:00
Adam Ierymenko 9892f7bb47 Upgrade nlohmann::json 2016-11-22 11:06:58 -08:00
Adam Ierymenko 42ba70e79e Replace long callback arg list with struct, and implement path whitelisting, path blacklisting, and local.conf support for roles. 2016-11-22 10:54:58 -08:00
Adam Ierymenko cbaef66e82 Fix a deadlock in federation/upstream code. 2016-11-21 16:04:01 -08:00
Adam Ierymenko 97d915b06c Expose relay policy in node settings. 2016-11-21 15:35:18 -08:00
Grant Limberg 3a3a23db34 hacky way to set window position but it works 2016-11-21 15:31:32 -08:00
Adam Ierymenko d159e5ca44 Allow relay policy setting in local.conf 2016-11-21 15:21:24 -08:00
Grant Limberg d3bd10952e hyperlinks in the about page are clickable 2016-11-21 14:32:25 -08:00
Adam Ierymenko 40078a99de Make parse failure of local.conf non-fatal in case people have ancient files sitting around. 2016-11-21 14:14:43 -08:00
Grant Limberg 0142c0d339 fill out the about view 2016-11-21 13:25:10 -08:00
Adam Ierymenko 2e5de46584 local.conf and support for virtual role definition 2016-11-21 13:20:56 -08:00
Grant Limberg 1be55d6182 Merge branch 'dev' into systemtray 2016-11-21 12:59:43 -08:00
Grant Limberg 8ebcd44405 dont close the network list. just hide it so its reusable 2016-11-21 12:54:27 -08:00
Adam Ierymenko ccdd4ffda7 Move split() to OSUtils since it is not used in core. 2016-11-18 15:49:28 -08:00
Grant Limberg a6ed711492 wired up the startup registry key to the registry 2016-11-18 15:44:41 -08:00
Grant Limberg 3fb224cb22 add a checkbox for startup option in preferences 2016-11-18 15:23:07 -08:00
Grant Limberg 5ca5af619d Merge branch 'systemtray' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into systemtray 2016-11-18 14:58:01 -08:00
Grant Limberg f61c5836b2 copy node ID by clicking on node ID menu item 2016-11-18 14:57:14 -08:00
Grant Limberg 535b33b46e copy node ID by clicking on node ID menu item 2016-11-18 14:52:04 -08:00
Grant Limberg a8847de910 proper shutdown 2016-11-18 14:23:22 -08:00
Grant Limberg 2231e878d5 Merge branch 'dev' into systemtray 2016-11-18 14:00:25 -08:00
Grant Limberg 299a7cab20 fixed an issue where sometimes network data wouldnt be updated 2016-11-18 13:59:31 -08:00
Grant Limberg e48d6880c9 Wired up connected checkbox and delete button. just something not working with refresh. 2016-11-18 13:52:48 -08:00
Adam Ierymenko 673c0c811e Wire through upstream stuff and add setRole(). 2016-11-18 13:48:49 -08:00
Adam Ierymenko 6e1da35c12 Remove debug. 2016-11-18 13:15:58 -08:00
Adam Ierymenko 25f9c294dc Small bug fix and warning removal. 2016-11-18 13:01:45 -08:00
Adam Ierymenko 2ea9f516e1 Rate gate expensive validation of new identities in HELLO. 2016-11-18 12:59:04 -08:00
Grant Limberg dbe1461886 wire up the quit button 2016-11-18 12:17:57 -08:00
Grant Limberg 7bea709747 wire up the rest of the views to the menu. views not implemented yet tho. 2016-11-18 12:03:21 -08:00
Grant Limberg 6536474b94 moved stuff around again. WPF didnt like things once they were moved. Also wired up Join dialog. 2016-11-18 11:33:46 -08:00
Adam Ierymenko ab4021dd0e Do packet MAC check before locallyValidate(), and add timing measurement in selftest. 2016-11-18 11:09:19 -08:00
Adam Ierymenko 1fcbb1fbed Proactively auto-load designated upstreams. 2016-11-18 10:39:26 -08:00
Adam Ierymenko 39333c9e8e Modify unite() to deal with a second layer of upstreams. 2016-11-17 16:59:04 -08:00
Adam Ierymenko 1615ef1114 Rename getBestRoot() etc. 2016-11-17 16:31:58 -08:00
Adam Ierymenko bf8d71e82c Add notion of upstream that is separate from root in Topology, etc. 2016-11-17 16:20:41 -08:00
Grant Limberg a4c2740852 added skeletons for join and about windows. moving things around a little bit too 2016-11-17 14:25:55 -08:00
Grant Limberg afa1b8cb2d add timeouts to requests to the json api 2016-11-17 14:23:04 -08:00
Grant Limberg 5447c01e1f can finally join/leave networks by clicking on them in the context menu 2016-11-17 14:13:05 -08:00
Grant Limberg b4bacd50a1 Merge branch 'dev' into systemtray 2016-11-16 16:23:56 -08:00
Grant Limberg 3c248ec61a handle removing of networks we are no longer connected to from the UI 2016-11-16 15:50:56 -08:00
Grant Limberg 78a8ceda0e IP addresses now selectable in Windows UI 2016-11-16 15:11:28 -08:00
Grant Limberg 14bf326de2 make device ID selectable 2016-11-16 14:50:25 -08:00
Grant Limberg dc549b7f3c add JSONDB.cpp 2016-11-16 14:50:03 -08:00
Grant Limberg 456c7ca661 only changed items in the full network list are updated now 2016-11-15 16:55:24 -08:00
Grant Limberg bab75186f5 make some fields in the network list selectable 2016-11-15 15:51:25 -08:00
Adam Ierymenko 07b2a3818c Fix TTL scaling in cert. 2016-11-15 14:26:05 -08:00
Adam Ierymenko 15c6e2ec70 Fix member deauthorization time threshold bug. 2016-11-15 14:06:25 -08:00
Adam Ierymenko 5bd8968eb8 Add rules engine debugging switch to make-linux.mk 2016-11-15 11:50:53 -08:00
Adam Ierymenko 4ad942522b Kill unnecessary check in another spot. 2016-11-14 15:57:46 -08:00
Adam Ierymenko b6c99ba3ef Add (currently undocumented) option to allow management from certain networks. 2016-11-14 15:47:06 -08:00
Adam Ierymenko ee5bd57d40 We don't bind to non-local IP for TCP yet, but eliminate double check. 2016-11-14 15:29:36 -08:00
Grant Limberg 6445337a32 looks like a garbage file got committed. deleting 2016-11-14 15:02:40 -08:00
Grant Limberg f20c7303e8 remove timer thats no longer needed 2016-11-14 14:58:57 -08:00
Grant Limberg c4c8ea62e2 Added network monitor pub/sub class 2016-11-14 14:56:36 -08:00
Grant Limberg 71aadcbecb fix serialization issue.
Apparently the JSON parser uses this same serialization method under the hood to create objects from JSON.
2016-11-10 15:21:54 -08:00
Grant Limberg fd71ceeab5 menu now dynamically populates the network list 2016-11-10 14:17:57 -08:00
Adam Ierymenko e26bee45fb Multithreading in network controller. Threads are only started if controller is used. 2016-11-10 13:57:01 -08:00
Adam Ierymenko 1b10d3413a Use circuit breaker only for requests. 2016-11-10 13:08:43 -08:00
Adam Ierymenko f0fcd222a1 Actually push updates when things change. 2016-11-10 12:54:43 -08:00
Adam Ierymenko 298e4a9f14 Also avoid sending tags and caps to old members since there is no point. 2016-11-10 12:33:09 -08:00
Adam Ierymenko 12d32b9311 Small fix to send pushes if not a reply. 2016-11-10 11:57:45 -08:00
Adam Ierymenko 226123ca08 Refactor controller to permit sending of pushes as well as just replies to config requests. 2016-11-10 11:54:47 -08:00
Adam Ierymenko 5ebf5077f5 Log last meta-data in controller, and ease up just a bit on keepalives. 2016-11-09 17:11:10 -08:00
Grant Limberg e1c930f1b7 update JNI wrapper to reflect removal of lastMulticastFrame and lastUnicastFrame from ZT_Peer struct 2016-11-09 16:33:01 -08:00
Adam Ierymenko c61ca1dea2 Keep connections up for netconf stuff as well as frames. 2016-11-09 16:04:08 -08:00
Adam Ierymenko eea712a1ae Field in wrong place fixed. 2016-11-09 13:26:14 -08:00
Adam Ierymenko 1ebfca666d Memo-ize some computed stuff to control CPU utilization. 2016-11-09 12:34:20 -08:00
Grant Limberg 005b5aacaf rename 2016-11-09 10:32:18 -08:00
Grant Limberg 7cf3d2caa1 Network list window opens with click on the menu item 2016-11-08 16:31:07 -08:00
Grant Limberg e1f9f7b6dc turn APIHandler into a singleton 2016-11-08 15:50:08 -08:00
Grant Limberg 6b0543ba27 starts up to a toolbar icon with context menu. still much more to do 2016-11-08 14:54:55 -08:00
Adam Ierymenko 3d948a930e Send a blanket rule to old versions. New versions will still bidirecitonally enforce on the inbound side. 2016-11-08 14:24:30 -08:00
Adam Ierymenko 6f3595bfd2 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-11-08 12:41:32 -08:00
Adam Ierymenko 4524899e4d Update LM time on members on request. 2016-11-08 12:41:27 -08:00
Grant Limberg 54206fd44d add NotifyIcon NuGet package for tray icon support 2016-11-08 11:24:12 -08:00
Grant Limberg 6d8c8f9fd1 update JSON library to latest 2016-11-08 11:23:15 -08:00
Grant Limberg 00e1b0ed10 added docs for allowManaged, allowGlobal, allowDefault 2016-11-08 11:00:48 -08:00
Grant Limberg 4f8feaa530 update JSON API docs for OneService 2016-11-08 10:23:25 -08:00
Adam Ierymenko 0324e6ca3d Merge pull request #402 from bobberb/patch-1
Typo fix line 77
2016-11-08 08:32:47 -08:00
Adam Ierymenko d773ab2806 Merge pull request #407 from misuzu/chownfix
Chown fix
2016-11-08 08:32:31 -08:00
Tsukasa Hiiragi 8e76363ccf Fix chown on /var/lib/zerotier-one 2016-11-08 16:50:32 +02:00
Adam Ierymenko 360c84e035 Minor fixes. 2016-11-08 00:05:18 +00:00
Adam Ierymenko 4868d21526 Bug fixes in controller refactor. 2016-11-07 23:49:03 +00:00
Grant Limberg c802811ad2 Added a file copy util for Windows UI
Copies the authtoken.secret file into a private local folder for the user so that the UI doesnt have to be run with Admin privileges.
2016-11-07 14:09:01 -08:00
Adam Ierymenko 5f63d5039b Bug fixes, self test of JSONDB disabled by default. 2016-11-07 14:01:23 -08:00
Adam Ierymenko a454a37a6e Self test JSONDB. 2016-11-07 13:27:17 -08:00
Adam Ierymenko a78d7311a6 Fix network list API call. 2016-11-04 16:23:41 -07:00
Adam Ierymenko 08ff666e99 . 2016-11-04 16:14:58 -07:00
Adam Ierymenko 0d108d37f6 . 2016-11-04 16:12:44 -07:00
Adam Ierymenko cae9041c2a . 2016-11-04 15:52:01 -07:00
Adam Ierymenko 330a07a554 cleanup 2016-11-04 15:48:23 -07:00
Adam Ierymenko 7729cbe313 Fix ambiguous error on some compilers. 2016-11-04 15:34:49 -07:00
Adam Ierymenko 3e865067be Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-11-04 15:18:35 -07:00
Adam Ierymenko b03c7b2f30 Refactor controller to use split-out DB for better performance and less ugly. 2016-11-04 15:18:31 -07:00
Grant Limberg 1ab9c43135 wire up allowDefault, allowManaged, allowGlobal, allowDefault options 2016-11-04 14:50:07 -07:00
Grant Limberg efcc24a76b increase window width so IPv6 addreses don't wrap 2016-11-04 14:49:15 -07:00
Grant Limberg 4762311977 work in progress windows UI update 2016-11-04 12:39:57 -07:00
Adam Ierymenko ab2ccb094a Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-11-03 14:44:49 -07:00
Adam Ierymenko 3c00cd0f88 Separate out JSON store from controller code. 2016-11-03 14:17:46 -07:00
Grant Limberg a7718bae39 link in notelemetry.obj even though Microsoft said CRT telemetry would be disabled in VS2015 Update 3. Just in case. 2016-11-03 12:25:09 -07:00
Grant Limberg 8ffae313fd add new files & remove old ones from VS project. Now builds & runs on Windows again 2016-11-03 12:10:50 -07:00
Grant Limberg 8cced06a2d upgraded vcxprojs to VS2015. got the tap driver building. 2016-11-03 10:04:50 -07:00
Grant Limberg 965399ba0c fix a few warnings 2016-10-31 15:16:42 -07:00
Grant Limberg 231cc11a62 Update path to nkd-build 2016-10-27 14:28:42 -07:00
Grant Limberg 1afa9e992c add color to success output in slack 2016-10-27 14:01:00 -07:00
Grant Limberg be543c4039 use internal changelog library 2016-10-25 15:51:30 -07:00
Grant Limberg 7e7462b39e attempting #2 2016-10-25 15:01:59 -07:00
Grant Limberg d2ee37a3e0 attempting to add the changelog to the starting build slack message 2016-10-25 14:58:27 -07:00
Grant Limberg 1fcedb8d16 fix duplicate branch name in slack 2016-10-25 14:38:57 -07:00
Grant Limberg 5c476391da fixed build number in slack messages 2016-10-25 14:37:19 -07:00
Grant Limberg 6cb23e7069 added slack notifications 2016-10-25 14:35:31 -07:00
Grant Limberg c976b87ac7 -scheme -> -target 2016-10-25 13:33:50 -07:00
Grant Limberg af2bdfc421 dir directive appears to create a tmpdir rather than just cd 2016-10-25 13:14:28 -07:00
Grant Limberg b01c551197 fix directory directive in jenkinsfile 2016-10-25 13:04:24 -07:00
Grant Limberg df6d3ca66b add stage for building the new macOS UI in Jenkins 2016-10-25 12:58:54 -07:00
Grant Limberg 5be7374f56 added macOS build for jenkins 2016-10-25 12:40:03 -07:00
Grant Limberg 7300005398 fixed one more stage syntax for jenkins build 2016-10-25 11:21:39 -07:00
Grant Limberg 6cd36edf45 Update stages 2016-10-25 11:18:26 -07:00
Grant Limberg 604a0b1fe6 added Jenkinsfile for jenkins build config 2016-10-25 11:10:21 -07:00
bobberb 046d5bb9ff Typo fix line 77 2016-10-23 15:45:45 -04:00
Adam Ierymenko 0e8442064e Merge pull request #376 from siigna/debian
Move debian/format to debian/source/format
2016-10-21 13:39:55 -07:00
Adam Ierymenko ea1f2762cf Merge pull request #401 from zielmicha/dev
Run as nonroot user on Linux (with CAP_NET_ADMIN and CAP_NET_RAW added).
2016-10-21 13:37:27 -07:00
Grant Limberg 0f3095f130 Merge remote-tracking branch 'macui/master' into macui-merge
# Conflicts:
#	.gitignore
2016-10-17 14:50:18 -07:00
Grant Limberg 7b7ec13349 Prepare for merging into main ZeroTier repo 2016-10-17 14:44:32 -07:00
Grant Limberg 7025c7090b set proper copyright/license in code files 2016-10-17 14:43:24 -07:00
Grant Limberg 7c12991f57 wasn't setting the Connected checkbox to off if the network wasn't connected 2016-10-17 13:48:25 -07:00
Grant Limberg f444da80bc Add a 2 second delay before the About window shows up on the first run 2016-10-17 13:43:44 -07:00
Grant Limberg ed58467d12 Clicking "Join" to join a new network now properly closes the popover 2016-10-17 13:43:27 -07:00
Grant Limberg c44c3b0530 cleanup 2016-10-17 12:31:59 -07:00
Grant Limberg 46e9c1195c more removal of NSMenuDelegate 2016-10-17 12:29:28 -07:00
Grant Limberg 4730111492 updated project settings for Xcode 8.0 2016-10-17 12:27:07 -07:00
Grant Limberg a813e29491 Don't need AppDelegate to be a NSMenuDelegate 2016-10-17 12:26:48 -07:00
Michał Zieliński 344a25c133 Run as nonroot user on Linux (with CAP_NET_ADMIN and CAP_NET_RAW added).
- ZT will only drop root privileges if zerotier-one user exists. It is created by
Debian postinst script - in other cases the user has to be created by administrator.
- Linux >=4.3 with ambient capabilities is required, otherwise ZT will silently
- "-U" option now also disables privileges dropping
2016-10-16 13:53:44 +02:00
Grant Limberg 772599a6fc Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev 2016-10-13 15:18:12 -07:00
Grant Limberg 3a3fe272bb add Revocation.cpp to android build 2016-10-13 15:18:07 -07:00
Adam Ierymenko 88e3fe699c Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-10-13 15:17:27 -07:00
Adam Ierymenko 27d997a2e5 . 2016-10-13 15:17:17 -07:00
Grant Limberg 8809c6d122 link atomic library. seems to be required in the latest Android NDK 2016-10-13 14:34:54 -07:00
Adam Ierymenko 6469aa9df9 typo 2016-10-13 14:28:39 -07:00
Adam Ierymenko ce6b5bc6f5 . 2016-10-13 14:21:24 -07:00
Adam Ierymenko 4f3775bb86 Fix ICMP match. 2016-10-13 14:21:00 -07:00
Adam Ierymenko 2cb760e0ac Fix ICMP json. 2016-10-13 14:14:46 -07:00
Adam Ierymenko 8850a8610a Fix filter trace. 2016-10-13 13:59:17 -07:00
Adam Ierymenko 2d6a4e5974 cleanup 2016-10-13 13:52:45 -07:00
Adam Ierymenko 93b4ac5cb2 Remove unused POW code, will revisit later. 2016-10-13 13:17:30 -07:00
Adam Ierymenko e2509af163 Fix bug in default rules init in new networks. 2016-10-12 12:30:32 -07:00
Adam Ierymenko 3f4c166861 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-10-11 12:00:38 -07:00
Adam Ierymenko e53f63ca87 Broke down and added an OR to the rules engine. It is now possible to have a series of MATCHes that are ORed. 2016-10-11 12:00:16 -07:00
Grant Limberg 6a50291aa2 Fix the case for InetAddress::containsAddress for IPv6 route of :: 2016-10-07 14:29:06 -07:00
Grant Limberg e59ed3e68f Fix size of neighbor solicitation struct 2016-10-07 10:03:07 -07:00
Adam Ierymenko 45c4ccb153 Add a tags both equal match. 2016-10-05 16:38:42 -07:00
Adam Ierymenko adeb7e7da0 Make capability flags match more user-friendly and appropriate since "match any flag" is generally what we want. 2016-10-05 12:54:46 -07:00
Adam Ierymenko f1c8706485 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-10-05 10:12:16 -07:00
Adam Ierymenko d5f4d381d0 Go ahead and loop back packets whose destination is self. Some OSes require this since they aactually follow the full network path even for local IPs. 2016-10-05 10:12:06 -07:00
Grant Limberg 69c5976775 fix typo in assert size 2016-10-04 17:35:52 -07:00
Adam Ierymenko 988049f39b Add new rule to rules engine: random match. 2016-09-30 14:07:00 -07:00
Adam Ierymenko 6651b8310e Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-09-30 13:47:40 -07:00
Adam Ierymenko 0843ed62fa Network delete fix. 2016-09-30 13:47:30 -07:00
Grant Limberg d817039f79 Add IPv6 Neighbor Discovery code. Not yet tested. 2016-09-30 13:18:17 -07:00
Adam Ierymenko f0794e09b7 Controller cleanup. 2016-09-30 13:04:26 -07:00
Adam Ierymenko 9eaa3756f8 Fix deadlock-causing regression in Network. 2016-09-30 12:22:54 -07:00
Adam Ierymenko 1eeebba2f7 Drop old /active path from network. 2016-09-29 17:59:27 -07:00
Adam Ierymenko 2fc3d12fb6 Minor tweaks to member code in controller, and fix Linux build. 2016-09-29 14:48:39 -07:00
Adam Ierymenko 4fe9a4fe83 Fix memory leak. 2016-09-28 16:13:59 -07:00
Adam Ierymenko 01129d02b3 hashCode() for InetAddress 2016-09-28 13:45:25 -07:00
Adam Ierymenko e1fbf7b34c Check multicast limit on send after NDP emulation code. 2016-09-28 12:21:08 -07:00
Adam Ierymenko 7e90ab3534 TRACE verbosity increase on exceptions in NETWORK_CREDENTIALS. 2016-09-28 11:06:44 -07:00
Adam Ierymenko 5ee1ccd659 Send need credential error on more cases. 2016-09-27 16:41:08 -07:00
Adam Ierymenko 0b44919ba2 Clusters can send multiple OKs so we must allow this. 2016-09-27 16:33:37 -07:00
Adam Ierymenko 9f550292fe Simply network auth logic and always sent error on auth failure even for unknown networks to prevent forensics. 2016-09-27 13:49:43 -07:00
Adam Ierymenko 5ba7ca91c0 TRACE build fix. 2016-09-27 12:44:44 -07:00
Adam Ierymenko cc4bacc199 Cleanup, and implement compression disable flag for networks. 2016-09-27 12:22:25 -07:00
Adam Ierymenko 15c07c58b6 Refactored network config chunking to sign every chunk to prevent stupid DOS attack potential, and implement network config fast propagate (though we probably will not use this for a bit). 2016-09-27 11:33:48 -07:00
Adam Ierymenko 236fdb450c cleanup attic 2016-09-27 07:02:16 -07:00
Adam Ierymenko 7e4b6b594b It now builds. 2016-09-26 17:05:39 -07:00
Adam Ierymenko eac3667ec1 Bunch more refactoring and work on revocations, etc. 2016-09-26 16:17:02 -07:00
siigna e35bca2c3c Move debian/format to debian/source/format
Fixes the following error during package building:
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)

Reference:
https://www.debian.org/doc/manuals/maint-guide/dother.en.html#sourcef
2016-09-23 20:13:37 -07:00
Adam Ierymenko 46049a1ef6 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-09-23 16:08:44 -07:00
Adam Ierymenko 1f74dd4589 Revocation work in progress, add WATCH which is TEE with implicit rate sync (thanks JG@DCVC!), and clean up some cruft in Network. 2016-09-23 16:08:38 -07:00
Grant Limberg 40d3993ceb java code still needed to reflect PEER_ROLE_RELAY rename to PEER_ROLE_UPSTREAM 2016-09-21 14:12:20 -07:00
Grant Limberg 0564bb3b35 added missing copyright/license info from ZT_jniutils 2016-09-21 14:09:46 -07:00
Adam Ierymenko 29711e123f Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-09-20 21:21:43 -07:00
Adam Ierymenko d3524f3609 Refactor COM stuff a bit, and respond to COM requests a bit more readily for rapid setup. Will need to revisit later. 2016-09-20 21:21:34 -07:00
Grant Limberg d87f0293e3 Don't print a few error messages when they don't matter. 2016-09-19 13:40:53 -07:00
Grant Limberg 5fadd8bdd2 ZT_PEER_ROLE_RELAY -> ZT_PEER_ROLE_UPSTREAM in JNI glue 2016-09-19 12:54:19 -07:00
Grant Limberg 3366b53247 Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev 2016-09-18 18:10:03 -07:00
Adam Ierymenko 68e549233d Revise bearer token code in controller, and add relay policy as a meta-data item presented to controller by nodes (to facilitate future meshiness). 2016-09-15 13:17:37 -07:00
Adam Ierymenko 24fce0be86 No, definitely have to back out GitHub issue #385 (non-bisected routes) since this breaks IPv6 on OSX and probably IPv4 too if you were to encounter a 6-only situation. 2016-09-14 22:23:56 -07:00
Adam Ierymenko 740b34124f Naming... 2016-09-14 17:35:50 -07:00
Adam Ierymenko 15402933bc Add physical MTU recommendation hint to network config via API. 2016-09-14 16:55:25 -07:00
Adam Ierymenko 8d0b2b781e Route management bug fixes. 2016-09-13 16:25:48 -07:00
Adam Ierymenko 83abc00aae docs 2016-09-13 14:58:59 -07:00
Adam Ierymenko 5b6d27e659 Implement relay policy, and setting multicast limit to 0 now disables multicast on the network as would be expected. 2016-09-13 14:27:18 -07:00
Adam Ierymenko ced8dfc639 Try a version of GitHub issue #385 (non-bifurcated default if not present) on Mac. This version adds the bifurcated routes always but also adds a device-specific non-bifurcated route. Will have to see if this still interferes with OSX route settings, since by definition device specific routes should not conflict with general routes. 2016-09-13 11:07:59 -07:00
Adam Ierymenko 8ef0e4bbaf Get rid of HELLO rate gate on path since its basically worthless. There are 65535 ports per IP. 2016-09-13 10:46:36 -07:00
Adam Ierymenko 0da9a9a3e0 Set trustEstablished in a few more places. 2016-09-13 10:33:03 -07:00
Adam Ierymenko cba37c6107 Add a few more rate limit gates for anti-DOS hardening. 2016-09-13 10:13:23 -07:00
Adam Ierymenko ea1da3321a Rate gate requests for COM. 2016-09-12 15:19:21 -07:00
Adam Ierymenko 34b146f28b Back out of GitHub issue #385 for now and maybe for this release. Would be nice but it is non-critical and rules are the priority. Current implementation bangs heads with OSX route assignment on WiFi join, etc. 2016-09-12 14:56:18 -07:00
Adam Ierymenko fb46a546db Just always do route bifurcation on Linux for now... basically the old behavior. 2016-09-09 12:53:44 -07:00
Adam Ierymenko debc4c45ee Set trust established flag in MULTICAST_GATHER. 2016-09-09 11:45:34 -07:00
Adam Ierymenko ab9afbc749 (1) Public networks now get COMs even though they do not gate with them since they will need them to push auth for multicast stuff, (2) added a bunch of rate limit circuit breakers for anti-DOS, (3) cleanup. 2016-09-09 11:36:10 -07:00
Adam Ierymenko ef87069957 Fix gating of multicast GATHER replies since these can come from upstream, etc., and fix an issue with sending ECHO to recheck marginal paths. 2016-09-09 09:32:00 -07:00
Adam Ierymenko 0d4109a9f1 More refactoring to clean up code, and add a gate function to make sure we do not handle OK packets we did not expect. This hardens up a few potential edge cases around security, since such messages might be used to e.g. pollute a cache and DOS under certain conditions. 2016-09-09 08:43:58 -07:00
Adam Ierymenko 16df2c3363 Clean up handling of COMs, network access control, and fix a backward compatiblity issue. 2016-09-08 19:48:05 -07:00
Grant Limberg 5ed5b22525 Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev 2016-09-08 17:45:46 -07:00
Grant Limberg dccca7df1a another couple of missing semicolons 2016-09-08 17:45:40 -07:00
Adam Ierymenko 1f6b13b7fd Fix bug causing null addresses to get in memberships[] hash. 2016-09-08 16:09:56 -07:00
Adam Ierymenko d23ade879b Do not bifurcate if not replacing an existing route. (Still need to tie up Linux and Windows.) 2016-09-08 15:42:46 -07:00
Adam Ierymenko 8afdb0aa65 GitHub issue #346 2016-09-07 17:07:06 -07:00
Adam Ierymenko daf8a66ced More correct and efficient to initialize member relationship push stuff lazily when member is learned. 2016-09-07 15:47:20 -07:00
Adam Ierymenko 20278bb9e4 Also send MULTICAST_LIKEs to controllers. 2016-09-07 15:34:34 -07:00
Adam Ierymenko c7a4da3dd3 Turns out we do not need to pass network to receive(). 2016-09-07 15:24:53 -07:00
Adam Ierymenko 1908aa55f5 Refactor MULTICAST_LIKE pushing to eliminate redundant and unnecessary pushes and simplify code. 2016-09-07 15:15:52 -07:00
Adam Ierymenko 1c08f5e857 Tweak some expire times. 2016-09-07 12:25:19 -07:00
Adam Ierymenko c9ee8612e4 Credential TTL (tags/capabilities) should be credential time max delta, since we could get pushed one that is newer. 2016-09-07 12:12:52 -07:00
Adam Ierymenko a7d988745b Use ECHO instead of HELLO where possible. 2016-09-07 12:01:03 -07:00
Adam Ierymenko a9f404aac3 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-09-07 11:20:47 -07:00
Adam Ierymenko ff9f8b1c2b Typo fix. 2016-09-07 11:15:36 -07:00
Adam Ierymenko b5c86b6ba4 Bunch more path refactoring. Peers no longer forget paths, but do not normally use expired paths. Expired paths might still be tried if nothing else is reachable. 2016-09-07 11:13:17 -07:00
Grant Limberg 407ad659ea Reflect changes to strut ZT_PeerPhysicalPath 2016-09-06 17:59:01 -07:00
Adam Ierymenko f2d2df2b11 Cluster build fix. 2016-09-06 15:06:07 -07:00
Adam Ierymenko 48a374c82c (1) fix crazy bug introduced in doRENDEZVOUS(), (2) reclaim Paths after paths[] condense, (3) fix an edge case around symmetric NAT and external IP change detection. 2016-09-06 14:05:58 -07:00
Adam Ierymenko deee39343e Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-09-06 12:45:37 -07:00
Adam Ierymenko 8a2e8bd585 Rework how paths are set as remote cluster preferred. The code is now clearer and cluster preference indications are now very sticky as they should be. 2016-09-06 12:45:28 -07:00
Adam Ierymenko 43780742b0 comments, docs 2016-09-06 11:10:04 -07:00
Grant Limberg 68a966fa55 Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev 2016-09-05 16:19:10 -07:00
Grant Limberg 43b3ec4b1a forgot a semicolon in a JNI java type specifier. 2016-09-05 16:19:04 -07:00
Grant Limberg dcf1f70868 re-adding file 2016-09-05 16:12:29 -07:00
Grant Limberg 598ca48ed6 Attempting to fix VirtualNetworkRoute having 2 entries in git. Yay non case sensitive filesystems 2016-09-05 16:12:06 -07:00
Adam Ierymenko 3790ebe77a Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-09-05 15:49:07 -07:00
Adam Ierymenko d7f2287ce9 More tweaks to path behavior. 2016-09-05 15:47:22 -07:00
Grant Limberg 9f717e79ea Fixing filename again.... 2016-09-05 14:42:36 -07:00
Grant Limberg 26d43c9b06 fix capitalization on file 2016-09-05 14:27:44 -07:00
Grant Limberg 8682c90c7d ensure routes are also equal when checking for equality on VirtualNetworkConfig objects 2016-09-05 14:10:07 -07:00
Grant Limberg d063f583ee Added VirtualNetworkRoute class and added it to VirtualNetworkConfig 2016-09-05 13:52:29 -07:00
Adam Ierymenko eebcf08084 Tweaks to new Path code for dual-stack operation, and other fixes. 2016-09-03 15:39:05 -07:00
Adam Ierymenko 01aa469591 Remove debug line. 2016-09-02 14:26:04 -07:00
Adam Ierymenko 4992ac2d9f Cluster sub-optimal is in fact necessary... 2016-09-02 14:20:55 -07:00
Adam Ierymenko 412979ba8f Attempt to reactivate dead paths. 2016-09-02 13:55:33 -07:00
Adam Ierymenko 4f8253dcdb Tweaks to path handling... 2016-09-02 13:33:56 -07:00
Adam Ierymenko 4931e44998 Implement "weak pointer" behavior on Topology Path canonicalization hash table. 2016-09-02 12:34:02 -07:00
Adam Ierymenko d1101441b3 Tweak some timings. 2016-09-02 11:54:59 -07:00
Adam Ierymenko e8f6b4b5d3 Rest of big Path canonicalization refactor. 2016-09-02 11:51:33 -07:00
Grant Limberg 94263ffcc1 Added error handling messages 2016-09-01 19:02:27 -07:00
Adam Ierymenko a3bdae9735 Work in progress: Path canonicalization refactor. 2016-09-01 15:43:07 -07:00
Adam Ierymenko d5e6f59004 . 2016-09-01 13:45:32 -07:00
Adam Ierymenko 22271f2a49 Cleanup. 2016-09-01 13:36:41 -07:00
Adam Ierymenko 8b6d23b9f6 Optimize filter code a bit, and add a network-level setting for what should happen if an unsupported or unknown MATCH is encountered in a rules table. 2016-09-01 12:07:17 -07:00
Adam Ierymenko 25056de5d3 Also need to send credentials when TEEing and REDIRECTing. 2016-08-31 17:56:59 -07:00
Adam Ierymenko 994b25af4e Simplify some logic. 2016-08-31 17:45:55 -07:00
Adam Ierymenko 74afef8eb1 Think through and refine a few things in rules, especially edge case TEE and REDIRECT behavior and semantics. 2016-08-31 16:50:22 -07:00
Adam Ierymenko 54489a7f61 rename SAMENESS to DIFFERENCE which is less confusing 2016-08-31 14:14:58 -07:00
Adam Ierymenko 8e3004591b Add overlooked MATCH_ICMP to rule set. 2016-08-31 14:01:15 -07:00
Adam Ierymenko 2ff2a8fd9a Cluster build fixes and warning elimination. 2016-08-31 09:38:21 -07:00
Grant Limberg c2a01f6db4 Added a path for error handling when fetching data from the ZeroTier daemon
Still need to wire up error messages to the user.
2016-08-30 20:28:52 -07:00
Adam Ierymenko 7a00036954 Tweak log length to fit JSON for members within two 4096-kb blocks. 2016-08-29 18:10:02 -07:00
Adam Ierymenko 914c42537c Type fixes. 2016-08-29 17:48:36 -07:00
Adam Ierymenko cb63babac4 Debug output fixes. 2016-08-29 16:38:10 -07:00
Adam Ierymenko ac1c127b68 Debug output fixes. 2016-08-29 16:24:08 -07:00
Adam Ierymenko cb82193333 Debug output fixes. 2016-08-29 16:19:26 -07:00
Adam Ierymenko f0636ffd4a EXT_FRAME messages should always be accepted if we are the destination for a matching TEE or REDIRECT rule. 2016-08-29 15:54:06 -07:00
Adam Ierymenko 51a420671f Make rules engine debug a bit more verbose. 2016-08-29 15:17:34 -07:00
Adam Ierymenko 77c2bf3ad9 Kill dead field from network JSON. 2016-08-29 14:47:19 -07:00
Adam Ierymenko 7223685b96 . 2016-08-26 15:30:20 -07:00
Adam Ierymenko e7dff1c785 Change logic a little for self-as-destination in TEE and REDIRECT. 2016-08-26 15:28:31 -07:00
Adam Ierymenko a5383d83d8 Do not TEE or REDIRECT to self. 2016-08-26 15:25:00 -07:00
Adam Ierymenko a3c7627acf Push more than one packet for credentials if we happen to have a whole lot. Should not happen often but might if a member has tons of tags. 2016-08-26 14:43:16 -07:00
Adam Ierymenko 297b1b4258 Another tiny API bug fix. 2016-08-26 14:16:55 -07:00
Adam Ierymenko 35ac995d05 Fix setting of v6AssignMode in controller. 2016-08-26 14:04:27 -07:00
Adam Ierymenko 6bd5aba4fa fix frame size range bug 2016-08-26 13:26:26 -07:00
Adam Ierymenko fb5217761b Add missing names in filter debug code. 2016-08-26 13:20:55 -07:00
Adam Ierymenko 90f3e94565 Always output trace info when debugging rules. 2016-08-26 12:21:44 -07:00
Adam Ierymenko ded5a53a6c Documentation updates, add rules engine revision to network config request meta-data. 2016-08-26 10:38:43 -07:00
Adam Ierymenko d637988ccf Fix chicken or egg problem in tags, and better filter debug instrumentation. 2016-08-25 18:21:20 -07:00
Adam Ierymenko 858e8c5217 one more... 2016-08-25 16:28:54 -07:00
Adam Ierymenko df1ce856c9 A little bit more controller code cleanup. 2016-08-25 16:25:28 -07:00
Adam Ierymenko b5e0d014ab Controller bug fixes 2016-08-25 16:08:40 -07:00
Adam Ierymenko 5eaf397a94 Add a debug log feature in the filter, which only works if enabled in Network.cpp. 2016-08-25 13:31:23 -07:00
Adam Ierymenko 1814016eb7 Add daemon thread to controller and move network member cache refreshes there. 2016-08-25 11:26:45 -07:00
Adam Ierymenko 6ecb42b031 docs and null check in controller code 2016-08-25 10:46:03 -07:00
Adam Ierymenko 584228b2b5 Dead code removal, and get rid of reliable() because we will no longer make that distinction. 2016-08-24 17:56:35 -07:00
Adam Ierymenko cd3683f2ba Fix a missing receive(). 2016-08-24 17:50:51 -07:00
Adam Ierymenko 347ebcd899 Set trust flag in network controllers if remote query is accepted to allow NATed network controllers to better traverse. 2016-08-24 17:48:13 -07:00
Adam Ierymenko e52c2c41ec Add a circuit breaker to prevent too many credentials from being stored per member. 2016-08-24 17:24:35 -07:00
Adam Ierymenko 95ff057e04 Increase rule limits a little since chunking in netconf can accomodate this. 2016-08-24 17:16:26 -07:00
Adam Ierymenko 60bc291414 Add noAutoAssignIps for member of networks. 2016-08-24 17:05:43 -07:00
Adam Ierymenko c476285bd6 Harden PUSH_DIRECT_PATHS and simplify things by only doing it on receive when hops>0 and trust has been established. 2016-08-24 16:16:39 -07:00
Adam Ierymenko 63e8ad4cc3 TRACE stuff. 2016-08-24 15:45:37 -07:00
Adam Ierymenko 2cdda38dc4 It basically works... at least on current controllers. 2016-08-24 15:26:18 -07:00
Adam Ierymenko ccea3d04d6 Push NETWORK_CONFIG_REFRESH on POSTs to /member/... in controller. 2016-08-24 14:28:16 -07:00
Adam Ierymenko 90bd3e07a0 Remove http-parser from RPM spec. 2016-08-24 13:53:24 -07:00
Adam Ierymenko 8e3463d47a Add length limit to TEE and REDIRECT, and completely factor out old C json-parser to eliminate a dependency. 2016-08-24 13:37:57 -07:00
Adam Ierymenko 8d594f8b53 cleanup 2016-08-23 16:05:10 -07:00
Adam Ierymenko 5f4df0c6a9 Controller cleanup and perf improvements. 2016-08-23 15:30:36 -07:00
Adam Ierymenko 0ee4d3554a Stub out USER_MESSAGE. 2016-08-23 14:38:20 -07:00
Adam Ierymenko 0a7a33ef8f Instantaneous blacklisting and credential revocation. 2016-08-23 13:46:36 -07:00
Adam Ierymenko 32fa061700 Compute credential TTL et al. 2016-08-23 13:02:59 -07:00
Adam Ierymenko 7036831203 Sign Dictionary in doNETWORK_CONFIG_REQUEST. 2016-08-23 11:57:56 -07:00
Adam Ierymenko 68b4ca9b31 Cleanup. 2016-08-23 11:52:10 -07:00
Adam Ierymenko 0dfc08b317 Tidy up a few minor protocol things, improve documentation in Packet.hpp. 2016-08-23 11:29:02 -07:00
Adam Ierymenko 77f7dcf40a Obsolete "test network" removal. 2016-08-23 09:39:38 -07:00
Adam Ierymenko 9a3c652a51 Get rid of expiration in Capability and Tag and move this to NetworkConfig so it can be set network-wide and reset if needed. Also add NetworkConfig field for this and centralize checking of credential time validity. 2016-08-22 18:06:46 -07:00
Adam Ierymenko 6db47de25e Merge branch 'edge' of http://10.6.6.2/zerotier/ZeroTierOne into edge 2016-08-22 14:26:17 -07:00
Adam Ierymenko b0d888d235 Signing of Capability and Tag objects. 2016-08-22 14:25:59 -07:00
Joseph Henry af53e63ae2 Kube tut update 2016-08-22 11:33:10 -07:00
Grant Limberg 35d5ed9c2b version bump i forgot to commit 2016-08-19 18:13:00 -07:00
Adam Ierymenko 9827b8991d Merge branch 'edge' of http://10.6.6.2/zerotier/ZeroTierOne into edge 2016-08-18 18:18:56 -07:00
Adam Ierymenko 4dce71879f . 2016-08-18 18:18:50 -07:00
Joseph Henry 727fb197d8 kube tutorial update 2016-08-18 15:32:26 -07:00
Joseph Henry c2f10a52de zt-kubernetes tutorial update 2016-08-18 15:16:24 -07:00
Joseph Henry cf2ec0797e zt-kubernetes tutorial update 2016-08-18 15:15:38 -07:00
Joseph Henry 6443049f86 Merge branch 'edge' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into edge 2016-08-18 15:13:49 -07:00
Joseph Henry 44bee4e3ff zt-kubernetes tutorial update 2016-08-18 15:13:43 -07:00
Adam Ierymenko 212a5af9a5 Capabilities and tags in POST JSON. 2016-08-18 14:37:56 -07:00
Adam Ierymenko 1cadbfb4d1 Little fixes. 2016-08-18 13:47:02 -07:00
Adam Ierymenko 4729fec2eb Merge branch 'edge' of http://10.6.6.2/zerotier/ZeroTierOne into edge 2016-08-18 13:00:00 -07:00
Adam Ierymenko f119c4a456 Cache network members for performance, add network non-persisted fields. 2016-08-18 12:59:48 -07:00
Joseph Henry 3e261fb999 updated entrypoint 2016-08-17 18:33:49 -07:00
Joseph Henry 0fd3afe2c8 examples files for kube int 2016-08-17 18:03:34 -07:00
Joseph Henry 9dc507c9ae examples files for kube int 2016-08-17 17:52:19 -07:00
Joseph Henry 5d37eabb59 Merge branch 'edge' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into edge 2016-08-17 17:43:44 -07:00
Joseph Henry 169664ffc2 examples files for kube int 2016-08-17 17:43:34 -07:00
Adam Ierymenko 4c0a7c0fb2 Merge branch 'edge' of http://10.6.6.2/zerotier/ZeroTierOne into edge 2016-08-17 17:37:48 -07:00
Adam Ierymenko faa9a06bf5 Controller fixes... 2016-08-17 17:37:37 -07:00
Joseph Henry 183434d30e examples files for kube int 2016-08-17 17:29:14 -07:00
Joseph Henry c84ce76c59 examples files for kube int 2016-08-17 17:22:05 -07:00
Joseph Henry 1833c61556 kubernetes tutorial update 2016-08-17 15:35:00 -07:00
Joseph Henry ba78676ace kubernetes tutorial update 2016-08-17 15:28:48 -07:00
Joseph Henry 0d37b7b665 zt-kubernetes tutorial outline 2016-08-17 15:12:48 -07:00
Adam Ierymenko 1254dece5b Linux build fixes, and build controller. 2016-08-17 14:19:29 -07:00
Adam Ierymenko b7ebf6edbf Cleanup and log how member was authorized. 2016-08-17 13:54:32 -07:00
Adam Ierymenko b72847d504 Finally implement network join auth tokens, at least at the protocol level. 2016-08-17 13:41:45 -07:00
Adam Ierymenko 168b86fdcd Controller docs and API fix. 2016-08-17 12:27:07 -07:00
Adam Ierymenko a13f4d8353 We now always build the controller in ZeroTier One, at least for desktop and server targets. Also means that ZeroTier One now requires C++11. (Still keeping C++11 out of the core in node/ though.) 2016-08-17 10:42:32 -07:00
Adam Ierymenko cc808cc2dd Rules parsing stuff. 2016-08-17 10:25:25 -07:00
Adam Ierymenko ce001198d8 . 2016-08-16 16:57:45 -07:00
Adam Ierymenko c0639ccd37 Just about ready to test. 2016-08-16 16:46:08 -07:00
Adam Ierymenko 58701c1ca8 . 2016-08-16 14:08:08 -07:00
Adam Ierymenko 402d99ea8d C++11 mode build fix. 2016-08-16 14:07:11 -07:00
Adam Ierymenko b08ca49580 More controller work -- it builds! 2016-08-16 14:05:17 -07:00
Adam Ierymenko bd15262e54 Bunch of rule JSON stuff. 2016-08-15 18:49:50 -07:00
Adam Ierymenko 3cb2e1197f . 2016-08-12 15:32:45 -07:00
Adam Ierymenko 7762cd680b fix json include path in cli 2016-08-12 11:30:50 -07:00
Adam Ierymenko c30f74987f Starting refactor of controller... 2016-08-12 11:30:27 -07:00
Grant Limberg 628ef14d80 added more spacing at the bottom of each network info cell 2016-08-11 17:50:15 -07:00
Grant Limberg bc48a097f8 add @2x versions of menu bar icon 2016-08-11 17:41:54 -07:00
Adam Ierymenko dd21c8a577 Rev nlohmann/json 2016-08-10 17:27:46 -07:00
Adam Ierymenko 7d906df805 Better instrumentation for filter, and filter bug fixes. 2016-08-10 14:27:52 -07:00
Adam Ierymenko d166b494ee Rule parse fix. 2016-08-10 13:41:22 -07:00
Adam Ierymenko 81959f14af Refactor and redesign symmetric NAT predictor. This is cleaner. 2016-08-10 10:28:54 -07:00
Grant Limberg 2300f3c92b bump build number 2016-08-09 20:04:33 -07:00
Grant Limberg 73fd934fec * Fixed menu icon size
* Added icon for dark mode
* Added detection for interface mode changing from light to dark and adjusting the icon accordingly
2016-08-09 20:02:12 -07:00
Grant Limberg a7b635a980 add border around About web view. added padding to text div in the about page 2016-08-09 19:03:09 -07:00
Grant Limberg 91b8d6f34f [pasteboard declareTypes] needs to be called before every time you set a string to the pasteboard. 2016-08-09 18:03:48 -07:00
Adam Ierymenko c9d7845fea Minor bug fix and some instrumentation stuff for testing. 2016-08-09 17:00:01 -07:00
Adam Ierymenko 0b0cda2be4 ZT_TRACE fix. 2016-08-09 15:55:41 -07:00
Adam Ierymenko e1310a764a More cleanup and removal of cruft due to obsolete network-specific relays (will be replaced with federation stuff). 2016-08-09 15:45:26 -07:00
Adam Ierymenko dbf3e6c3c9 Dead code removal. 2016-08-09 15:01:46 -07:00
Adam Ierymenko dee7f75f7e Minor cleanup. 2016-08-09 14:46:11 -07:00
Adam Ierymenko 774c7e0ea5 Put CONFIG_REFRESH back. 2016-08-09 13:52:08 -07:00
Adam Ierymenko 4d498b3765 Handling of multi-part chunked network configs on the inbound side. 2016-08-09 13:14:38 -07:00
Adam Ierymenko bcd05fbdfa Chunking of network config replies. 2016-08-09 09:34:13 -07:00
Adam Ierymenko 2ba9343607 Encode and decode of tags and capabilities in NetworkConfig. 2016-08-09 08:32:42 -07:00
Grant Limberg 8ae07fb9c9 build number bump 2016-08-08 19:04:50 -07:00
Grant Limberg 13682bd919 Change Deployment Target to 10.7. Apparently going below 10.10 was only an issue with Swift 2016-08-08 19:02:09 -07:00
Grant Limberg b5cab8afaa update build number 2016-08-08 17:46:01 -07:00
Grant Limberg c15c9775bd explicitly link to WebKit framework 2016-08-08 17:45:52 -07:00
Adam Ierymenko 51cf49a24f cleanup 2016-08-08 17:40:22 -07:00
Adam Ierymenko 00fd9c3a15 It builds... almost ready to test some rules engine stuff. 2016-08-08 17:33:26 -07:00
Adam Ierymenko 8007ca56aa Refactor and tie-up of capabilities and tags and packet evaluation points. Some optimization is possible here but it is minor and we will make it work first. 2016-08-08 16:50:00 -07:00
Grant Limberg 8d7f851b4e Now translated. One minor crash to figure out. 2016-08-07 20:19:36 -07:00
Grant Limberg 5b13b282ed Replace JoinNetworkViewController with obj-c 2016-08-07 19:13:12 -07:00
Grant Limberg d965768004 Replaced the network list with Obj-C 2016-08-07 18:19:47 -07:00
Grant Limberg a91187e60e Convert NetworkMonitor to obj-c 2016-08-07 17:25:34 -07:00
Grant Limberg 179324e44a Replace Preferences view. Removed LaunchAtLoginController and replaced with simpler code 2016-08-07 16:34:54 -07:00
Grant Limberg c6dba50e35 replace AboutViewController 2016-08-07 15:18:32 -07:00
Grant Limberg b51d68a419 replace ServiceCom with objc class 2016-08-06 19:45:58 -07:00
Grant Limberg a0db48571d Convert Network to OBJC 2016-08-06 18:50:50 -07:00
Adam Ierymenko 4d7f625aa1 . 2016-08-05 15:55:38 -07:00
Adam Ierymenko e2f783ebbd . 2016-08-05 15:02:01 -07:00
Grant Limberg 7a12d8193b Replace NodeStatus object with Obj-C Class 2016-08-04 17:55:57 -07:00
Adam Ierymenko 4d9b74b171 . 2016-08-04 15:27:20 -07:00
Adam Ierymenko 37d139177d Integrate Filter into OutboundMulticast properly. 2016-08-04 13:01:14 -07:00
Adam Ierymenko 8a7753cfe3 Filter cleanup, prep for filter integration in a few places. 2016-08-04 12:35:25 -07:00
Adam Ierymenko 331382cf2f More cleanup and a tiny federation prep item. 2016-08-04 12:14:13 -07:00
Adam Ierymenko 98152d974a More cleanup and removal of DeferredPackets, will do the latter in a more elegant way. 2016-08-04 11:40:38 -07:00
Adam Ierymenko 56febbf2ba . 2016-08-04 10:39:28 -07:00
Adam Ierymenko 5cf410490e . 2016-08-04 10:18:33 -07:00
Adam Ierymenko 404a0bbddd ... 2016-08-04 09:51:15 -07:00
Adam Ierymenko f057bb63cd More work on tags and capabilities. 2016-08-04 09:02:35 -07:00
Adam Ierymenko 7e6e56e2bc Bunch of work on pushing and replication of tags and capabilities, and protocol cleanup. 2016-08-03 18:04:08 -07:00
Adam Ierymenko 67cb03742e Add tag rules and split out rule serialize/deserialize so the code can be reused. 2016-08-03 14:12:38 -07:00
Grant Limberg a08246ce5d update build number 2016-08-02 20:30:49 -07:00
Grant Limberg f54d5e9e8f the quest for leaks is over.
Why a singleton doesn't leak, vs calling static methods on a class is beyond me
2016-08-02 20:30:09 -07:00
Adam Ierymenko 91940cbcf5 Kill network preferred relays -- this feature is gone (and was seldom used anyway) in favor of federation. 2016-08-02 14:40:26 -07:00
Joseph Henry 77bd8aacd1 merge cli from edge 2016-08-02 13:50:09 -07:00
Adam Ierymenko ecc1324bb0 Rules engine work: capability based security model with tags and capabilities, and some cleanup across other places. 2016-08-02 13:36:17 -07:00
Adam Ierymenko d3b0081447 Cleanup... 2016-07-28 12:09:58 -07:00
Adam Ierymenko 22e44c762b More rules engine work: key/value pair matching for microsegmentation. 2016-07-28 10:58:10 -07:00
Grant Limberg 78e5a00a68 Only poll the ZeroTier service when the menu or Network List are visible. Reduces CPU idle prevention by a a LOT 2016-07-26 20:31:06 -07:00
Grant Limberg b9a4d138fc only update the network list view if it's visible 2016-07-26 20:05:33 -07:00
Grant Limberg 36a9aff283 Show "About" view on first run.
Still needs some work to show up in the right place
2016-07-26 20:04:59 -07:00
Grant Limberg e1755e569e build number bump 2016-07-26 19:16:33 -07:00
Grant Limberg ae374a78fc add some non Lorem Ipsum content to the about page 2016-07-26 19:15:12 -07:00
Grant Limberg 62befe006d Route clicked links in the web view to the default web browser 2016-07-26 18:21:39 -07:00
Adam Ierymenko 1e6e112806 Dockerfile for building zerotier/zerotier-containerized for CoreOS et al. 2016-07-26 17:08:09 -07:00
Adam Ierymenko 830250759c Fix for running under MUSL libc (e.g. Alpine Linux) 2016-07-26 16:39:02 -07:00
Adam Ierymenko 13100b245c Fix for running under MUSL libc (e.g. Alpine Linux) 2016-07-26 16:36:20 -07:00
Adam Ierymenko 4929be08f7 Cleanup and stub out new object transfer messages. 2016-07-26 12:33:51 -07:00
Adam Ierymenko 088bbd1c08 Filter fixes. 2016-07-25 17:03:26 -07:00
Adam Ierymenko 7404eb46c4 Integration of Filter into inbound and outbound packet path. 2016-07-25 16:51:10 -07:00
Adam Ierymenko eaf6d6c938 Basic L2/L3 filter for rules engine (not integrated yet) and some cleanup. 2016-07-25 15:52:16 -07:00
Adam Ierymenko 02d288e9d4 Merge branch 'dev' of Y:/ZeroTier/ZeroTierOne into dev 2016-07-21 20:45:17 -07:00
Adam Ierymenko 6f15c4a561 1.1.14 Windows version stuff 2016-07-21 20:45:05 -07:00
Adam Ierymenko ae491c277e VERSION 1.1.14: bug fixes!
This version fixes two bugs: a possible infinite loop when using network-specific relays,
and a bug causing a crash on Android.
2016-07-21 20:29:15 -07:00
Adam Ierymenko ebe7e15475 sys/sysctl.h is required on OSX and probably other BSD 2016-07-21 19:21:51 -07:00
Adam Ierymenko dced40361b Bump version in most places to 1.1.14 2016-07-21 19:15:03 -07:00
Adam Ierymenko faf864b8a2 Merge branch 'master' into dev 2016-07-21 19:07:50 -07:00
Adam Ierymenko 8a23d764de Merge branch 'master' of http://10.6.6.2/zerotier/ZeroTierOne 2016-07-21 19:06:31 -07:00
Adam Ierymenko f21af60a13 Init trusted path count to zero. Meh. 2016-07-21 19:06:18 -07:00
Adam Ierymenko 10564d8e14 Init trusted path count to zero. Meh. 2016-07-21 19:05:14 -07:00
Adam Ierymenko 095aef5f30 Merge pull request #348 from the-maldridge/remove-sysctl
Remove explicit sys/sysctl.h includes
2016-07-21 15:16:22 -07:00
Adam Ierymenko 145ac31c8a Merge pull request #362 from mwarning/space-between-literal-and-string-macro
C++11 requires a space between literal and string macro
2016-07-21 15:16:05 -07:00
Adam Ierymenko b7a5f783ba Merge pull request #364 from mwarning/fortify-source-needs-optimization-flag
fix _FORTIFY_SOURCE warning
2016-07-21 15:15:42 -07:00
Adam Ierymenko 3d25a2ea02 Merge pull request #363 from mwarning/move-declaration-out-of-scope
move sourceAddress out of scope
2016-07-21 15:15:27 -07:00
Moritz Warning 76b785c90f fix _FORTIFY_SOURCE warning
warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
2016-07-21 23:08:58 +02:00
Moritz Warning b3073f44a2 move sourceAddress out of scope
sourceAddress is used in the catch block
2016-07-21 23:03:04 +02:00
Moritz Warning bcdd158ad8 C++11 requires a space between literal and string macro 2016-07-21 22:41:02 +02:00
Grant Limberg 693ac4e86c add web view and placeholder about page with ZT logo and lorem ipsum 2016-07-19 19:12:41 -07:00
Adam Ierymenko 6320879fe1 Fix for GitHub issue #358 and bump version to 1.1.13 (dev) 2016-07-18 10:56:33 -07:00
Grant Limberg 2afe3d89d0 Merge branch 'master' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne 2016-07-14 19:29:10 -07:00
Grant Limberg 8a15b42dab switch to GCC for Android 2016-07-14 19:29:00 -07:00
Adam Ierymenko 4b9e84f42f docs 2016-07-14 17:47:32 -07:00
Adam Ierymenko ba87640e4c Release howto for internal use. 2016-07-14 17:46:22 -07:00
Adam Ierymenko a5400e0162 Windows installer now installs a batch file and Path variable settings to make zerotier-cli work in the Windows CLI (1.1.12 MSI updated on web for this too) and a Chocolatey packaging job for ZeroTier One. 2016-07-14 17:09:40 -07:00
Adam Ierymenko bdc3b0834b VERSION 1.1.12: yet another minor fix to managed routes
This version just contains another minor fix to managed routes for
GitHub issue #352.
2016-07-12 15:09:44 -07:00
Adam Ierymenko 1a285e5342 Version bump again. Slack has updated their client twice in one day so its okay. 2016-07-12 15:03:06 -07:00
Adam Ierymenko 8912515011 Fix to fix to GitHub issue #352 2016-07-12 15:00:30 -07:00
Adam Ierymenko 6ec3464ee9 JSON fix for trusted paths (does not affect normal op) 2016-07-12 13:58:15 -07:00
Adam Ierymenko 4b5e43ab0d VERSION 1.1.10: minor managed route fixes
Version 1.1.10 is a minor bug fix release. It fixes the following two issues:

 * Routes are no longer added 'via' IP addresses of the current node's ZT interface.
 * IPv6 default route is now fixed on Mac.
 * IP addresses are now deleted before new ones are added to allow changes to netmask
   on Mac and some other platforms.

This version also quietly introduces a feature called trusted paths. We'll be
documenting this in our community section soon. This is an experimental feature
for in-LAN SDN use.
2016-07-12 13:37:38 -07:00
Adam Ierymenko a6d9ae3a36 Man page fix on fedora-22 2016-07-12 13:30:15 -07:00
Adam Ierymenko 34e7c8652a Version bumps. 2016-07-12 12:30:35 -07:00
Adam Ierymenko 1861f67fa7 Version bump to 1.1.10 2016-07-12 12:21:36 -07:00
Adam Ierymenko b5e9d3f6f4 Rename file to be intuitive. 2016-07-12 11:41:19 -07:00
Adam Ierymenko 9785fde32a Trusted paths work! 2016-07-12 11:40:45 -07:00
Adam Ierymenko 9657675755 Plumbing through trusted path stuff to OneService. 2016-07-12 11:30:22 -07:00
Adam Ierymenko 5d7174b162 Go back to bundling libhttp-parser on Debian, at least for our own internally-created packages, since this library has a massively unstable ABI and causes nothing but problems if referenced from the distro. 2016-07-12 10:11:00 -07:00
Adam Ierymenko cdb5ceac7b Should remove old IPs before trying to add new ones. 2016-07-12 09:43:12 -07:00
Adam Ierymenko 23391ff9da More OSX IPv6 fixes. 2016-07-12 09:22:04 -07:00
Adam Ierymenko 3f2b21ce71 Do not shadow our own route twice on Mac if there is no default route. (Fix for issue found during IPv6 default route override testing.) 2016-07-12 08:55:57 -07:00
Adam Ierymenko 6535730255 GitHub issue #352 2016-07-12 08:42:36 -07:00
Adam Ierymenko 765082fdb6 Trusted path support, and version bump to 1.1.9 2016-07-12 08:29:50 -07:00
Adam Ierymenko aff62e9e10 Version bump in Mac pkg. 2016-07-08 14:28:34 -07:00
Adam Ierymenko 2d598dd433 Automatically add symlinks to redhat distro. 2016-07-08 14:25:25 -07:00
Adam Ierymenko f86e9b7df2 Bump version in RPM spec and DEB. 2016-07-08 13:57:16 -07:00
Adam Ierymenko 898d889537 VERSION 1.1.8: minor Linux bug fix, controller fixes, controller doc improvements
1.1.8 is a very minor update. It contains a small fix to IP address management
on Linux but other than that there are no changes to the regular ZeroTier One
code.

The 1.1.8 controller contains several fixes and improvements:

 * Network authorizedMemberCount works again
 * Managed IP addresses are pushed as long as they fall within a LAN-local managed
   route. The v4AssignMode and v6AssignMode settings only control automatic IP
   assignment from pools. In previous versions v4AssignMode had to be on for IPs
   to be pushed at all, making it impossible to just manually assign IPs.
 * IPv6 now has an auto-assign mode ('zt' to match V4) that can work alongside the
   special RFC4193 and 6PLANE modes (though it is not NDP emulated). If this is
   enabled IPv6 addresses will be auto-assigned from IPv6 ranges in the assignment
   pool list.
 * Controller documentation is MUCH better! See controller/README.md for actual
   useful information!

Finally 1.1.8 has several improvements to linux-build-farm including Debian wheezy
support.
2016-07-08 13:53:37 -07:00
Adam Ierymenko 0e2964261f docs 2016-07-08 13:42:04 -07:00
Adam Ierymenko ffe7d8d024 docs 2016-07-08 13:40:21 -07:00
Adam Ierymenko c01ebbcbde docs 2016-07-08 13:38:47 -07:00
Adam Ierymenko a6e5914aa7 docs 2016-07-08 13:37:51 -07:00
Adam Ierymenko 6d8de214eb Docs and controller API version 2016-07-08 13:10:02 -07:00
Adam Ierymenko 5bf3c54cd3 Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev 2016-07-08 10:08:06 -07:00
Adam Ierymenko 959b64777f 1.1.8 bump 2016-07-08 10:08:01 -07:00
Grant Limberg be0af135bc update JNI code for 1.1.6 2016-07-07 20:07:07 -07:00
Adam Ierymenko 2d7c58540f v6AssignMode bug fix 2016-07-07 17:05:12 -07:00
Adam Ierymenko 951038a304 Ignore /bits in IP assignments and just copy it from the corresponding LAN-local route. Having each managed IP assignment have its own bits field was just a source of user error and poor UX and was completely worthless. 2016-07-07 16:28:43 -07:00
Adam Ierymenko 912ee199ed Tiny fixes to LinuxEthernetTap 2016-07-07 16:10:36 -07:00
Adam Ierymenko b9329dc49a Fix to IPv6 picking for small ranges. 2016-07-07 15:55:40 -07:00
Adam Ierymenko 6e08e1ae97 A few controller changes: (1) assign managed IPs that are assigned regardless of "assign mode" which now only controls auto-assignment or special addressing, (2) support proper issuing of managed IPv6 IPs, (3) support IPv6 auto-assign ranges 2016-07-07 15:42:10 -07:00
Adam Ierymenko dd1d2b4d00 GitHub issue #343 -- fix authorizedMemberCount 2016-07-07 14:49:54 -07:00
Adam Ierymenko f6d53cc568 . 2016-07-06 18:12:31 -07:00
Adam Ierymenko b6cc815447 . 2016-07-06 18:07:42 -07:00
Adam Ierymenko ddbbb8afec Wheezy stuff 2016-07-06 18:04:13 -07:00
Adam Ierymenko a8a497c621 Debian wheezy work. 2016-07-06 17:59:08 -07:00
Michael Aldridge 1a89694980 Remove explicit sys/sysctl.h includes
Explicitly including sys/sysctl.h breaks the ability to build
against muslc.
2016-07-06 02:38:23 -05:00
Adam Ierymenko 5c03416e84 Actually remove http-parser-devel 2016-07-05 14:28:58 -07:00
Adam Ierymenko b732c445b8 Xenial fix (clang broken) and bundle http-parser even in Fedora because it is so version sensitive. 2016-07-05 14:09:33 -07:00
Adam Ierymenko 97ec88e346 . 2016-07-05 12:30:58 -07:00
Adam Ierymenko 192bc4fcf0 More repo work. 2016-07-05 10:54:07 -07:00
Grant Limberg 0e6065e3d5 another build number bump 2016-06-30 21:25:14 -07:00
Grant Limberg a156fec25a put node ID into the main menu.
Clicking on the menu item copies the node ID into the clipboard.
2016-06-30 21:24:45 -07:00
Grant Limberg fe725f9995 fix a case where the "Allow Default" checkbox would be enabled when a network wasn't connected. 2016-06-30 20:35:32 -07:00
Grant Limberg 58207b30d1 now that the network details list uses the default background color of the pane its embedded in, we don't have to force to the "Light" theme, even if the user has selected the "dark" theme for the top menu bar. 2016-06-30 20:28:04 -07:00
Grant Limberg f4192d7b9e added separator between items in the network detail list 2016-06-30 20:17:33 -07:00
Grant Limberg e747692727 remove background from network details view 2016-06-30 20:07:22 -07:00
Grant Limberg d786c5265f bump version number 2016-06-30 19:46:59 -07:00
Grant Limberg ba0a45365c Work around for several strange corner cases in Automatic Reference Counting in Apple's runtime 2016-06-30 19:42:23 -07:00
Adam Ierymenko fc4ea57a9c debian-stretch 2016-06-30 18:03:06 -07:00
Adam Ierymenko 751497a748 aptly script 2016-06-30 16:44:22 -07:00
Adam Ierymenko c714e8baa6 Get rid of broken test code for controller so selftest build works with controller enabled. 2016-06-30 08:30:45 -07:00
Adam Ierymenko 2331a00555 Fedora-22 32-bit fix. 2016-06-29 18:53:31 -07:00
Grant Limberg decb4261d4 wire up control to launch at startup in preferences 2016-06-27 19:14:15 -07:00
Grant Limberg b0971e3a01 setup launch at login on first start 2016-06-27 19:04:55 -07:00
Grant Limberg 583cd25506 slightly resize icons 2016-06-27 18:05:17 -07:00
Grant Limberg 1beacc8c32 wire up network delete again 2016-06-27 17:54:54 -07:00
Grant Limberg 9f880d07ab build number change 2016-06-26 18:21:26 -07:00
Grant Limberg 3fc11e2278 misc bug fixes related to default routes 2016-06-26 18:18:59 -07:00
Grant Limberg 1756e8b0f2 Wire up checkboxes for allowGlobal, allowDefault, allowManaged to set the proper state in zerotier daemon
checkboxes are disabled if the network is not currently connected.
2016-06-26 17:33:46 -07:00
Grant Limberg d57e343245 add UI elements in network details for allowDefault, allowGlobal, allowManaged 2016-06-26 17:21:45 -07:00
Grant Limberg 7e17a2072c add allowManaged, allowGlobal, allowDefault to Network object 2016-06-26 16:41:52 -07:00
Grant Limberg 9c94d6527a add allowGlobal, allowDefault, allowManaged options to joining a network 2016-06-26 16:11:30 -07:00
Grant Limberg 5da4fd2aef Added "..." to menu items to signify it pops up in a window 2016-06-24 15:24:29 -07:00
Grant Limberg e621058cfd build number 5 2016-06-24 15:24:03 -07:00
Grant Limberg f2e2632ae7 Added About view
also not yet populated
2016-06-23 20:22:03 -07:00
Grant Limberg 35d1736c97 add preferences view
not populated yet
2016-06-23 20:04:57 -07:00
Grant Limberg 3c534abc99 "Show Networks" -> "Network Details" 2016-06-23 19:48:48 -07:00
Grant Limberg c3deedd6fd Fix menu bar icon. Add app icon. 2016-06-23 19:44:00 -07:00
Grant Limberg b256111a17 misc cleanup 2016-06-21 20:02:18 -07:00
Grant Limberg b5a90a437b update build number 2016-06-21 19:45:08 -07:00
Grant Limberg 6d114b7480 dynamically generate the menu so that networks are listed
can join/leave networks directly from the menu
2016-06-21 19:44:59 -07:00
Grant Limberg c8f85ffec9 Factored network updates into its own class. Delivered via notification 2016-06-16 20:53:55 -07:00
Grant Limberg bae0060552 add a timer to retrieve the network list every second. 2016-06-14 19:59:45 -07:00
Grant Limberg c8750e5812 more error checking when parsing JSON for network list
remove "multicastSubscriptions" field as it isn't used anyway
2016-06-14 18:09:30 -07:00
Grant Limberg 89cb0e260a Set deployment target to 10.10 for the minimum OS X version for this app
I'm currently using features only available in 10.10 or above.  We'll have to discuss this and see what can be done for OS X 10.7 through 10.9.
2016-06-13 19:58:21 -07:00
Grant Limberg 2c1a8524f0 remove unused variables 2016-06-13 19:56:43 -07:00
Grant Limberg b085329bca Base functionality complete. Can join/leave/list networks. Can disconnect from networks without removing them from the network list. 2016-06-13 19:46:54 -07:00
Grant Limberg 188f8021f8 Joining/Deleting networks now implemented.
Still need to implement known networks cache so we can join/leave networks without deleting them from the UI
2016-06-09 19:59:05 -07:00
Grant Limberg 975bcb8aff some OS X Authentication Services wizardry to get /Library/Application Support/ZeroTier/One/authtoken.secret and copy it to ~/Library/Application Support/ZeroTier/One/authtoken.secret 2016-05-31 17:23:11 -07:00
Grant Limberg 51e74f8d4f remove some extra logging 2016-05-31 15:01:42 -07:00
Grant Limberg b4f3dfc347 look up authtoken in user's app support directory 2016-05-31 13:50:43 -07:00
Grant Limberg 41328eef94 . 2016-05-27 15:25:32 -07:00
Grant Limberg 59cf2ea341 add proper border around the network list 2016-05-27 15:21:23 -07:00
Grant Limberg 67d472424d make the view show up light instead of dark 2016-05-27 15:07:20 -07:00
Grant Limberg 1d27adb102 Finished wiring up the view 2016-05-27 13:48:22 -07:00
Grant Limberg 940c0f2b93 WIP. Mac UI 2016-05-27 13:28:32 -07:00
Grant Limberg d5620288d5 Parse JSON network list into Network objects for the view 2016-05-17 19:41:54 -07:00
Grant Limberg da30d2898e beginning of communicating with the zero tier service 2016-05-16 19:58:24 -07:00
Grant Limberg 40198d6c13 call super functions on a few overrides 2016-05-16 19:25:20 -07:00
Grant Limberg 4653ebc97f add table view to show networks view 2016-05-16 19:08:00 -07:00
Grant Limberg acd6978a30 set the combo box to use a data source and remember the last 20 networks input 2016-05-16 18:26:33 -07:00
Grant Limberg ccbd6f97cd remove some mistakenly committed files and add .gitignore for Xcode projects 2016-05-16 18:02:26 -07:00
Grant Limberg b4a8057994 limit the join network combobox to hex characters.
Join only clickable when a valid network is entered
2016-05-16 17:51:14 -07:00
Grant Limberg 225c2b095b Initial start of the menu bar app.
Has menu items to join/leave networks which currently displays an empty popover from the icon (icon needs to be made still)
2016-05-14 15:42:45 -07:00
Grant Limberg 0582338015 Initial Commit 2016-05-14 13:54:49 -07:00
406 changed files with 39452 additions and 25104 deletions

No files matched your search

+33 -4
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
# Main binaries created in *nix builds
/zerotier-one
/zerotier-idtool
@@ -9,6 +10,7 @@
.DS_Store
.Apple*
Thumbs.db
@eaDir
# Windows build droppings
/windows/ZeroTierOne.sdf
@@ -29,6 +31,15 @@ Thumbs.db
/ext/installfiles/windows/Prerequisites
/ext/installfiles/windows/*-cache
/ZeroTier One.msi
/windows/.vs
*.vcxproj.backup
/windows/TapDriver6/Win7Debug
/windows/TapDriver6/win7Release
/windows/*.db
/windows/*.opendb
enc_temp_folder
/windows/copyutil/bin
/windows/copyutil/obj
# *nix/Mac build droppings
/build-*
@@ -49,7 +60,7 @@ zt1-src.tar.gz
*.pid
*.pkg
*.o
*.a
/*.a
*.dylib
*.so
*.so.*
@@ -59,16 +70,15 @@ zt1-src.tar.gz
*.rpm
*.autosave
*.tmp
doc/*.1
doc/*.2
doc/*.8
.depend
node_modules
zt1_update_*
debian/files
debian/zerotier-one
debian/zerotier-one*.debhelper
debian/*.log
debian/zerotier-one.substvars
root-watcher/config.json
# Java/Android/JNI build droppings
java/obj/
@@ -82,3 +92,22 @@ java/build_win32/
windows/WinUI/obj/
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
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
*.xccheckout
xcuserdata/
+12 -19
View File
@@ -25,13 +25,13 @@
## Third-Party Code
These are included in ext/ for platforms that do not have them available in common repositories. Otherwise they may be linked and the package may ship with them as dependencies.
ZeroTier includes the following third party code, either in ext/ or incorporated into the ZeroTier core.
* LZ4 compression algorithm by Yann Collet
* Files: ext/lz4/*
* Files: node/Packet.cpp (bundled within anonymous namespace)
* Home page: http://code.google.com/p/lz4/
* License grant: BSD attribution
* License grant: BSD 2-clause
* http-parser by Joyent, Inc. (many authors)
@@ -39,11 +39,11 @@ These are included in ext/ for platforms that do not have them available in comm
* Home page: https://github.com/joyent/http-parser/
* License grant: MIT/Expat
* json-parser by James McLaughlin
* C++11 json (nlohmann/json) by Niels Lohmann
* Files: ext/json-parser/*
* Home page: https://github.com/udp/json-parser/
* License grant: BSD attribution
* Files: ext/json/*
* Home page: https://github.com/nlohmann/json
* License grant: MIT
* TunTapOSX by Mattias Nissler
@@ -55,26 +55,19 @@ These are included in ext/ for platforms that do not have them available in comm
* tap-windows6 by the OpenVPN project
* Files: windows/TapDriver6/*
* Home page:
https://github.com/OpenVPN/tap-windows6/
* 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
* Salsa20 stream cipher, Curve25519 elliptic curve cipher, Ed25519 digital signature algorithm, and Poly1305 MAC algorithm, all by Daniel J. Bernstein
* Files:
node/Salsa20.hpp
node/C25519.hpp
node/Poly1305.hpp
* 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/*
* Files: ext/libnatpmp/* ext/miniupnpc/*
* Home page: http://miniupnp.free.fr/
* License grant: BSD attribution no-endorsement
Vendored
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env groovy
node('master') {
def changelog = getChangeLog currentBuild
slackSend "Building ${env.JOB_NAME} #${env.BUILD_NUMBER} \n Change Log: \n ${changelog}"
}
parallel 'centos7': {
node('centos7') {
try {
checkout scm
stage('Build Centos 7') {
sh 'make -f make-linux.mk'
}
}
catch (err) {
currentBuild.result = "FAILURE"
slackSend color: '#ff0000', message: "${env.JOB_NAME} broken on Centos 7 (<${env.BUILD_URL}|Open>)"
throw err
}
}
}, 'android-ndk': {
node('android-ndk') {
try {
checkout scm
stage('Build Android NDK') {
sh "/android/android-ndk-r13b/ndk-build -C $WORKSPACE/java ZT1=${WORKSPACE}"
}
}
catch (err) {
currentBuild.result = "FAILURE"
slackSend color: '#ff0000', message: "${env.JOB_NAME} broken on Android NDK (<${env.BUILD_URL}|Open>)"
throw err
}
}
}, 'macOS': {
node('macOS') {
try {
checkout scm
stage('Build macOS') {
sh 'make -f make-mac.mk'
}
stage('Build macOS UI') {
sh 'cd macui && xcodebuild -target "ZeroTier One" -configuration Debug'
}
}
catch (err) {
currentBuild.result = "FAILURE"
slackSend color: '#ff0000', message: "${env.JOB_NAME} broken on macOS (<${env.BUILD_URL}|Open>)"
throw err
}
}
}, 'windows': {
node('windows') {
try {
checkout scm
stage('Build Windows') {
bat '''CALL "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" amd64
git clean -dfx
msbuild windows\\ZeroTierOne.sln
'''
}
}
catch (err) {
currentBuild.result = "FAILURE"
slackSend color: '#ff0000', message: "${env.JOB_NAME} broken on Windows (<${env.BUILD_URL}|Open>)"
throw err
}
}
}
slackSend color: "#00ff00", message: "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"
+8 -2
View File
@@ -11,8 +11,14 @@ ifeq ($(OSTYPE),Linux)
endif
ifeq ($(OSTYPE),FreeBSD)
include make-freebsd.mk
CC=clang
CXX=clang++
ZT_BUILD_PLATFORM=7
include make-bsd.mk
endif
ifeq ($(OSTYPE),OpenBSD)
include make-freebsd.mk
CC=egcc
CXX=eg++
ZT_BUILD_PLATFORM=9
include make-bsd.mk
endif
+64
View File
@@ -0,0 +1,64 @@
ZeroTier Official Release Steps
======
This is mostly for ZeroTier internal use, but others who want to do builds might find it helpful.
Note: Many of these steps will require GPG and other signing keys that are kept in cold storage and must be mounted.
# Bumping the Version and Preparing Installers
The version must be incremented in all of the following files:
/version.h
/zerotier-one.spec
/debian/changelog
/ext/installfiles/mac/ZeroTier One.pkgproj
/ext/installfiles/windows/chocolatey/zerotier-one.nuspec
/ext/installfiles/windows/ZeroTier One.aip
/windows/WinUI/AboutView.xaml
The final .AIP file can only be edited on Windows with [Advanced Installer Enterprise](http://www.advancedinstaller.com/). In addition to incrementing the version be sure that a new product code is generated. (The "upgrade code" GUID on the other hand must never change.)
# Building for Supported Platforms
## Macintosh
Mac's easy. Just type:
make official
You will need [Packages](http://s.sudre.free.fr/Software/Packages/about.html) and our release signing key in the keychain.
## Linux
Mount the GPG key for *contact@zerotier.com* and then on an x86_64 box with a recent version of Docker and an Internet connection run:
make distclean
cd linux-build-farm
./build.sh
This will build i386 and x86_64 packages. Now ssh into our build Raspberry Pi and type `make debian` there to build the Raspbian armhf package. Copy it to `debian-jessie/` inside `linux-build-farm` so that it will be included in the repositories we generate. Now generate the YUM and APT repos:
rm -rf ~/.aptly*
rm -rf /tmp/zt-rpm-repo
./make-apt-repos.sh
./make-rpm-repos.sh
This will require the passphrase for *contact@zerotier.com*.
The contents of ~/.aptly/public must be published as `debian/` on `download.zerotier.com`. The contents of /tmp/zt-rpm-repo are published as `redhat/` on same.
## Windows
First load the Visual Studio solution and rebuild the UI and ZeroTier One in both x64 and i386 `Release` mode. Then load [Advanced Installer Enterprise](http://www.advancedinstaller.com/), check that the version is correct, and build. The build will fail if any build artifacts are missing, and Windows must have our product singing key (from DigiCert) available to sign the resulting MSI file. The MSI must then be tested on at least a few different CLEAN Windows VMs to ensure that the installer is valid and properly signed.
*After the MSI is published to download.zerotier.com in the proper RELEASE/#.#.#/dist subfolder for its version* the Chocolatey package must be rebuilt and published. Open a command prompt, change to `ext/installfiles/windows/chocolatey`, and type `choco pack`. Then use `choco push` to push it to Chocolatey (API key required).
choco pack
choco push zerotier-one.#.#.#.nupkg -s https://chocolatey.org/
Note that this does not cover rebuilding the drivers or their containing MSI projects, as this is typically not necessary and they are shipped in binary form in the repository for convenience.
## iOS, Android
... no docs here yet since this is done entirely out of band with regular installs.
+46 -22
View File
@@ -1,52 +1,76 @@
ZeroTier - A Planetary Ethernet Switch
======
ZeroTier is a software-based managed Ethernet switch for planet Earth.
ZeroTier is an enterprise Ethernet switch for planet Earth.
It erases the LAN/WAN distinction and makes VPNs, tunnels, proxies, and other kludges arising from the inflexible nature of physical networks obsolete. Everything is encrypted end-to-end and traffic takes the most direct (peer to peer) path available.
This repository contains ZeroTier One, a service that provides ZeroTier network connectivity to devices running Windows, Mac, Linux, iOS, Android, and FreeBSD and makes joining virtual networks as easy as joining IRC or Slack channels. It also contains the OS-independent core ZeroTier protocol implementation in [node/](node/).
Visit [ZeroTier's site](https://www.zerotier.com/) for more information and [pre-built binary packages](https://www.zerotier.com/download.shtml). Apps for Android and iOS are available for free in the Google Play and Apple app stores.
### Getting Started
ZeroTier's basic operation is easy to understand. Devices have 10-digit *ZeroTier addresses* like `89e92ceee5` and networks have 16-digit network IDs like `8056c2e21c000001`. All it takes for a device to join a network is its 16-digit ID, and all it takes for a network to authorize a device is its 10-digit address. Everything else is automatic.
A "device" can be anything really: desktops, laptops, phones, servers, VMs/VPSes, containers, and even (soon) apps.
A "device" in our terminology is any "unit of compute" capable of talking to a network: desktops, laptops, phones, servers, VMs/VPSes, containers, and even user-space applications via our [SDK](https://github.com/zerotier/ZeroTierSDK).
For testing we provide a public virtual network called *Earth* with network ID `8056c2e21c000001`. On Linux and Mac you can do this with:
For testing purposes we provide a public virtual network called *Earth* with network ID `8056c2e21c000001`. You can join it with:
sudo zerotier-cli join 8056c2e21c000001
Now wait about 30 seconds and check your system with `ip addr list` or `ifconfig`. You'll see a new interface whose name starts with *zt* and it should quickly get an IPv4 and an IPv6 address. Once you see it get an IP, try pinging `earth.zerotier.net` at `29.209.112.93`. If you've joined Earth from more than one system, try pinging your other machine.
*(IPv4 addresses for Earth are assigned from the block 28.0.0.0/7, which is not a part of the public Internet but is non-standard for private networks. It's used to avoid IP conflicts during testing. Your networks can run any IP addressing scheme you want.)*
If you don't want to belong to a giant Ethernet party line anymore, just type:
Now wait about 30 seconds and check your system with `ip addr list` or `ifconfig`. You'll see a new interface whose name starts with *zt* and it should quickly get an IPv4 and an IPv6 address. Once you see it get an IP, try pinging `earth.zerotier.net` at `29.209.112.93`. If you've joined Earth from more than one system, try pinging your other machine. If you don't want to belong to a giant Ethernet party line anymore, just type:
sudo zerotier-cli leave 8056c2e21c000001
The *zt* interface will disappear. You're no longer on the network.
To create networks of your own you'll need a network controller. You can use [our hosted controller at my.zerotier.com](https://my.zerotier.com) which is free for up to 100 devices on an unlimited number of networks, or you can build your own controller and run it through its local JSON API. See [README.md in controller/](controller/) for more information.
To create networks of your own, you'll need a network controller. ZeroTier One (for desktops and servers) includes controller functionality in its default build that can be configured via its JSON API (see [README.md in controller/](controller/)). ZeroTier provides a hosted solution with a nice web UI and SaaS add-ons at [my.zerotier.com](https://my.zerotier.com/). Basic controller functionality is free for up to 100 devices.
### Building from Source
### Project Layout
For Mac, Linux, and BSD, just type "make" (or "gmake" on BSD). You won't need much installed; here are the requirements for various platforms:
- `artwork/`: icons, logos, etc.
- `attic/`: old stuff and experimental code that we want to keep around for reference.
- `controller/`: the reference network controller implementation, which is built and included by default on desktop and server build targets.
- `debian/`: files for building Debian packages on Linux.
- `doc/`: manual pages and other documentation.
- `ext/`: third party libraries, binaries that we ship for convenience on some platforms (Mac and Windows), and installation support files.
- `include/`: include files for the ZeroTier core.
- `java/`: a JNI wrapper used with our Android mobile app. (The whole Android app is not open source but may be made so in the future.)
- `macui/`: a Macintosh menu-bar app for controlling ZeroTier One, written in Objective C.
- `node/`: the ZeroTier virtual Ethernet switch core, which is designed to be entirely separate from the rest of the code and able to be built as a stand-alone OS-independent library. Note to developers: do not use C++11 features in here, since we want this to build on old embedded platforms that lack C++11 support. C++11 can be used elsewhere.
- `osdep/`: code to support and integrate with OSes, including platform-specific stuff only built for certain targets.
- `service/`: the ZeroTier One service, which wraps the ZeroTier core and provides VPN-like connectivity to virtual networks for desktops, laptops, servers, VMs, and containers.
- `tcp-proxy/`: TCP proxy code run by ZeroTier, Inc. to provide TCP fallback (this will die soon!).
- `windows/`: Visual Studio solution files, Windows service code for ZeroTier One, and the Windows task bar app UI.
* **Mac**: Xcode command line tools. It should build on OSX 10.7 or newer.
* **Linux**: gcc/g++ (4.9 or newer recommended) or clang/clang++ (3.4 or newer recommended) Makefile will use clang by default if available. The Linux build will auto-detect the presence of development headers for *json-parser*, *http-parser*, *li8bnatpmp*, and *libminiupnpc* and will link against the system libraries for these if they are present and recent enough. Otherwise the bundled versions in [ext/](ext/) will be used. Type `make install` to install the binaries and other files on the system, though this will not create init.d or systemd links.
* **FreeBSD**: C++ compiler (G++ usually) and GNU make (gmake).
The base path contains the ZeroTier One service main entry point (`one.cpp`), self test code, makefiles, etc.
Each supported platform has its own *make-XXX.mk* file that contains the actual make rules for the platform. The right .mk file is included by the main Makefile based on the GNU make *OSTYPE* variable. Take a look at the .mk file for your platform for other targets, debug build rules, etc.
### Build and Platform Notes
To build on Mac and Linux just type `make`. On FreeBSD and OpenBSD `gmake` (GNU make) is required and can be installed from packages or ports. For Windows there is a Visual Studio solution in `windows/'.
- **Mac**
- Xcode command line tools for OSX 10.7 or newer are required.
- Tap device driver kext source is in `ext/tap-mac` and a signed pre-built binary can be found in `ext/bin/tap-mac`. You should not need to build it yourself. It's a fork of [tuntaposx](http://tuntaposx.sourceforge.net) with device names changed to `zt#`, support for a larger MTU, and tun functionality removed.
- **Linux**
- The minimum compiler versions required are GCC/G++ 4.9.3 or CLANG/CLANG++ 3.4.2.
- Linux makefiles automatically detect and prefer clang/clang++ if present as it produces smaller and slightly faster binaries in most cases. You can override by supplying CC and CXX variables on the make command line.
- CentOS 7 ships with a version of GCC/G++ that is too old, but a new enough version of CLANG can be found in the *epel* repositories. Type `yum install epel-release` and then `yum install clang` to build there.
- **Windows**
- Windows 7 or newer (and equivalent server versions) are supported. This *may* work on Vista but you're on your own there. Windows XP is not supported since it lacks many important network API functions.
- We build with Visual Studio 2015. Older versions may not work with the solution file and project files we ship and may not have new enough C++11 support.
- Pre-built signed Windows drivers are included in `ext/bin/tap-windows-ndis6`. The MSI files found there will install them on 32-bit and 64-bit systems. (These are included in our multi-architecture installer as chained MSIs.)
- Windows builds are more painful in general than other platforms and are for the adventurous.
- **FreeBSD**
- Tested most recently on FreeBSD-11. Older versions may work but we're not sure.
- GCC/G++ 4.9 and gmake are required. These can be installed from packages or ports. Type `gmake` to build.
- **OpenBSD**
- There is a limit of four network memberships on OpenBSD as there are only four tap devices (`/dev/tap0` through `/dev/tap3`). We're not sure if this can be increased.
- OpenBSD lacks `getifmaddrs` (or any equivalent method) to get interface multicast memberships. As a result multicast will only work on OpenBSD for ARP and NDP (IP/MAC lookup) and not for other purposes.
- Only tested on OpenBSD 6.0. Older versions may not work.
- GCC/G++ 4.9 and gmake are required and can be installed using `pkg_add` or from ports. They get installed in `/usr/local/bin` as `egcc` and `eg++` and our makefile is pre-configured to use them on OpenBSD.
Typing `make selftest` will build a *zerotier-selftest* binary which unit tests various internals and reports on a few aspects of the build environment. It's a good idea to try this on novel platforms or architectures.
Windows, of course, is special. We build for Windows with Microsoft Visual Studio 2012 on Windows 7. A solution file is located in the *windows/* subfolder. Newer versions of Visual Studio (and Windows) may work but haven't been tested. Older versions almost certainly will not, since they lack things like *stdint.h* and certain STL features. MinGW or other ports of gcc/clang to Windows should also work but haven't been tested.
32 and 64 bit X86 and ARM (e.g. Raspberry Pi, Android) are officially supported. Community members have built for MIPS and Sparc without issues.
### Running
Running *zerotier-one* with -h will show help.
@@ -62,7 +86,7 @@ The service is controlled via the JSON API, which by default is available at 127
Here's where home folders live (by default) on each OS:
* **Linux**: `/var/lib/zerotier-one`
* **FreeBSD**: `/var/db/zerotier-one`
* **FreeBSD** / **OpenBSD**: `/var/db/zerotier-one`
* **Mac**: `/Library/Application Support/ZeroTier/One`
* **Windows**: `\ProgramData\ZeroTier\One` (That's for Windows 7. The base 'shared app data' folder might be different on different Windows versions.)
+138
View File
@@ -0,0 +1,138 @@
ZeroTier Release Notes
======
# 2017-04-20 -- Version 1.2.4
* Managed routes are now only bifurcated for the default route. This is a change in behavior, though few people will probably notice. Bifurcating all managed routes was causing more trouble than it was worth for most users.
* Up to 2X crypto speedup on x86-64 (except Windows, which will take some porting) and 32-bit ARM platforms due to integration of fast assembly language implementations of Salsa20/12 from the [supercop](http://bench.cr.yp.to/supercop.html) code base. These were written by Daniel J. Bernstein and are in the public domain. My Macbook Pro (Core i5 2.8ghz) now does almost 1.5GiB/sec Salsa20/12 per core and a Raspberry Pi got a 2X boost. 64-bit ARM support and Windows support will take some work but should not be too hard.
* Refactored code that manages credentials to greatly reduce memory use in most cases. This may also result in a small performance improvement.
* Reworked and simplified path selection and priority logic to fix path instability and dead path persistence edge cases. There have been some sporadic reports of persistent path instabilities and dead paths hanging around that take minutes to resolve. These have proven difficult to reproduce in house, but hopefully this will fix them. In any case it seems to speed up path establishment in our tests and it makes the code simpler and more readable.
* Eliminated some unused cruft from the code around path management and in the peer class.
* Fixed an issue causing build problems on some MIPS architecture systems.
* Fixed Windows forgetting routes on sleep/wake or in some other circumstances. (GitHub issue #465)
# 2017-03-17 -- Version 1.2.2
* A bug causing unreliable multicast propagation (GitHub issue #461).
* A crash in ARM binaries due to a build chain and flags problem.
* A bug in the network controller preventing members from being listed (GitHub issue #460).
# 2017-03-14 -- Version 1.2.0
Version 1.2.0 is a major milestone release representing almost nine months of work. It includes our rules engine for distributed network packet filtering and security monitoring, federated roots, and many other architectural and UI improvements and bug fixes.
## New Features in 1.2.0
### The ZeroTier Rules Engine
The largest new feature in 1.2.0, and the product of many months of work, is our advanced network rules engine. With this release we achieve traffic control, security monitoring, and micro-segmentation capability on par with many enterprise SDN solutions designed for use in advanced data centers and corporate networks.
Rules allow you to filter packets on your network and vector traffic to security observers. Security observation can be performed in-band using REDIRECT or out of band using TEE.
Tags and capabilites provide advanced methods for implementing fine grained permission structures and micro-segmentation schemes without bloating the size and complexity of your rules table.
See the [rules engine announcement blog post](https://www.zerotier.com/blog/?p=927) for an in-depth discussion of theory and implementation. The [manual](https://www.zerotier.com/manual.shtml) contains detailed information on rule, tag, and capability use, and the `rule-compiler/` subfolder of the ZeroTier source tree contains a JavaScript function to compile rules in our human-readable rule definition language into rules suitable for import into a network controller. (ZeroTier Central uses this same script to compile rules on [my.zerotier.com](https://my.zerotier.com/).)
### Root Server Federation
It's now possible to create your own root servers and add them to the root server pool on your nodes. This is done by creating what's called a "moon," which is a signed enumeration of root servers and their stable points on the network. Refer to the [manual](https://www.zerotier.com/manual.shtml) for instructions.
Federated roots achieve a number of things:
* You can deploy your own infrastructure to reduce dependency on ours.
* You can deploy roots *inside your LAN* to ensure that network connectivity inside your facility still works if the Internet goes down. This is the first step toward making ZeroTier viable as an in-house SDN solution.
* Roots can be deployed inside national boundaries for countries with data residency laws or "great firewalls." (As of 1.2.0 there is still no way to force all traffic to use these roots, but that will be easy to do in a later version.)
* Last but not least this makes ZeroTier somewhat less centralized by eliminating any hard dependency on ZeroTier, Inc.'s infrastructure.
Our roots will of course remain and continue to provide zero-configuration instant-on deployment, a secure global authority for identities, and free traffic relaying for those who can't establish peer to peer connections.
### Local Configuration
An element of our design philosophy is "features are bugs." This isn't an absolute dogma but more of a guiding principle. We try as hard as we can to avoid adding features, especially "knobs" that must be tweaked by a user.
As of 1.2.0 we've decided that certain knobs are unavoidable, and so there is now a `local.conf` file that can be used to configure them. See the ZeroTier One documentation for these. They include:
* Blacklisting interfaces you want to make sure ZeroTier doesn't use for network traffic, such as VPNs, slow links, or backplanes designated for only certain kinds of traffic.
* Turning uPnP/NAT-PMP on or off.
* Configuring software updates on Windows and Mac platforms.
* Defining trusted paths (the old trusted paths file is now deprecated)
* Setting the ZeroTier main port so it doesn't have to be changed on the command line, which is very inconvenient in many cases.
### Improved In-Band Software Updates
A good software update system for Windows and Mac clients has been a missing feature in previous versions. It does exist but we've been shy about using it so far due to its fragility in some environments.
We've greatly improved this mechanism in 1.2.0. Not only does it now do a better job of actually invoking the update, but it also transfers updates in-band using the ZeroTier protocol. This means it can work in environments that do not allows http/https traffic or that force it through proxies. There's also now an update channel setting: `beta` or `release` (the default).
Software updates are authenticated three ways:
1. ZeroTier's own signing key is used to sign all updates and this signature is checked prior to installation. ZeroTier, Inc.'s signatures are performed on an air-gapped machine.
2. Updates for Mac and Windows are signed using Apple and Microsoft (DigiCert EV) keys and will not install unless these signatures are also valid.
3. The new in-band update mechanism also authenticates the source of the update via ZeroTier's built-in security features. This provides transport security, while 1 and 2 provide security of the update at rest.
Updates are now configurable via `local.conf`. There are three options: `disable`, `download`, and `apply`. The third (apply) is the default for official builds on Windows and Mac, making updates happen silently and automatically as they do for popular browsers like Chrome and Firefox. Updates are disabled by default on Linux and other Unix-type systems as these are typically updated through package managers.
### Path Link Quality Awareness
Version 1.2.0 is now aware of the link quality of direct paths with other 1.2.0 nodes. This information isn't used yet but is visible through the JSON API. (Quality always shows as 100% with pre-1.2.0 nodes.) Quality is measured passively with no additional overhead using a counter based packet loss detection algorithm.
This information is visible from the command line via `listpeers`:
200 listpeers XXXXXXXXXX 199.XXX.XXX.XXX/9993;10574;15250;1.00 48 1.2.0 LEAF
200 listpeers XXXXXXXXXX 195.XXX.XXX.XXX/45584;467;7608;0.44 290 1.2.0 LEAF
The first peer's path is at 100% (1.00), while the second peer's path is suffering quite a bit of packet loss (0.44).
Link quality awareness is a precursor to intelligent multi-path and QoS support, which will in future versions bring us to feature parity with SD-WAN products like Cisco iWAN.
### Security Improvements
Version 1.2.0 adds anti-DOS (denial of service) rate limits and other hardening for improved resiliency against a number of denial of service attack scenarios.
It also adds a mechanism for instantaneous credential revocation. This can be used to revoke certificates of membership instantly to kick a node off a network (for private networks) and also to revoke capabilities and tags. The new controller sends revocations by default when a peer is de-authorized.
Revocations propagate using a "rumor mill" peer to peer algorithm. This means that a controller need only successfully send a revocation to at least one member of a network with connections to other active members. At this point the revocation will flood through the network peer to peer very quickly. This helps make revocations more robust in the face of poor connectivity with the controller or attempts to incapacitate the controller with denial of service attacks, as well as making revocations faster on huge networks.
### Windows and Macintosh UI Improvements (ZeroTier One)
The Mac has a whole new UI built natively in Objective-C. It provides a pulldown similar in appearance and operation to the Mac WiFi task bar menu.
The Windows UI has also been improved and now provides a task bar icon that can be right-clicked to manage networks. Both now expose managed route and IP permissions, allowing nodes to easily opt in to full tunnel operation if you have a router configured on your network.
### Ad-Hoc Networks
A special kind of public network called an ad-hoc network may be accessed by joining a network ID with the format:
ffSSSSEEEE000000
| | | |
| | | Reserved for future use, must be 0
| | End of port range (hex)
| Start of port range (hex)
Reserved ZeroTier address prefix indicating a controller-less network
Ad-hoc networks are public (no access control) networks that have no network controller. Instead their configuration and other credentials are generated locally. Ad-hoc networks permit only IPv6 UDP and TCP unicast traffic (no multicast or broadcast) using 6plane format NDP-emulated IPv6 addresses. In addition an ad-hoc network ID encodes an IP port range. UDP packets and TCP SYN (connection open) packets are only allowed to desintation ports within the encoded range.
For example `ff00160016000000` is an ad-hoc network allowing only SSH, while `ff0000ffff000000` is an ad-hoc network allowing any UDP or TCP port.
Keep in mind that these networks are public and anyone in the entire world can join them. Care must be taken to avoid exposing vulnerable services or sharing unwanted files or other resources.
### Network Controller (Partial) Rewrite
The network controller has been largely rewritten to use a simple in-filesystem JSON data store in place of SQLite, and it is now included by default in all Windows, Mac, Linux, and BSD builds. This means any desktop or server node running ZeroTier One can now be a controller with no recompilation needed.
If you have data in an old SQLite3 controller we've included a NodeJS script in `controller/migrate-sqlite` to migrate data to the new format. If you don't migrate, members will start getting `NOT_FOUND` when they attempt to query for updates.
## Major Bug Fixes in 1.2.0
* **The Windows HyperV 100% CPU bug is FINALLY DEAD**: This long-running problem turns out to have been an issue with Windows itself, but one we were triggering by placing invalid data into the Windows registry. Microsoft is aware of the issue but we've also fixed the triggering problem on our side. ZeroTier should now co-exist quite well with HyperV and should now be able to be bridged with a HyperV virtual switch.
* **Segmenation faults on musl-libc based Linux systems**: Alpine Linux and some embedded Linux systems that use musl libc (a minimal libc) experienced segmentation faults. These were due to a smaller default stack size. A work-around that sets the stack size for new threads has been added.
* **Windows firewall blocks local JSON API**: On some Windows systems the firewall likes to block 127.0.0.1:9993 for mysterious reasons. This is now fixed in the installer via the addition of another firewall exemption rule.
* **UI crash on embedded Windows due to missing fonts**: The MSI installer now ships fonts and will install them if they are not present, so this should be fixed.
## Other Improvements in 1.2.0
* **Improved dead path detection**: ZeroTier is now more aggressive about expiring paths that do not seem to be active. If a path seems marginal it is re-confirmed before re-use.
* **Minor performance improvements**: We've reduced unnecessary memcpy's and made a few other performance improvements in the core.
* **Linux static binaries**: For our official packages (the ones in the download.zerotier.com apt and yum repositories) we now build Linux binaries with static linking. Hopefully this will stop all the bug reports relating to library inconsistencies, as well as allowing our deb packages to run on a wider variety of Debian-based distributions. (There are far too many of these to support officially!) The overhead for this is very small, especially since we built our static versions against musl-libc. Distribution maintainers are of course free to build dynamically linked versions for inclusion into distributions; this only affects our official binaries.
-408
View File
@@ -1,408 +0,0 @@
/*
* ZeroTier One - Network Virtualization Everywhere
* Copyright (C) 2011-2015 ZeroTier, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* --
*
* ZeroTier may be used and distributed under the terms of the GPLv3, which
* are available at: http://www.gnu.org/licenses/gpl-3.0.html
*
* If you would like to embed ZeroTier into a commercial application or
* redistribute it in a modified binary form, please contact ZeroTier Networks
* LLC. Start here: http://www.zerotier.com/
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <algorithm>
#include "RuntimeEnvironment.hpp"
#include "Logger.hpp"
#include "Filter.hpp"
#include "Utils.hpp"
namespace ZeroTier {
const char *const Filter::UNKNOWN_NAME = "(unknown)";
const Range<unsigned int> Filter::ANY;
static inline Range<unsigned int> __parseRange(char *r)
throw(std::invalid_argument)
{
char *saveptr = (char *)0;
unsigned int a = 0;
unsigned int b = 0;
unsigned int fn = 0;
for(char *f=Utils::stok(r,"-",&saveptr);(f);f=Utils::stok((char *)0,"-",&saveptr)) {
if (*f) {
switch(fn++) {
case 0:
if (*f != '*')
a = b = (unsigned int)strtoul(f,(char **)0,10);
break;
case 1:
if (*f != '*')
b = (unsigned int)strtoul(f,(char **)0,10);
break;
default:
throw std::invalid_argument("rule range must be <int>, <int>-<int>, or *");
}
}
}
return Range<unsigned int>(a,b);
}
Filter::Rule::Rule(const char *s)
throw(std::invalid_argument)
{
char *saveptr = (char *)0;
char tmp[256];
if (!Utils::scopy(tmp,sizeof(tmp),s))
throw std::invalid_argument("rule string too long");
unsigned int fn = 0;
for(char *f=Utils::stok(tmp,";",&saveptr);(f);f=Utils::stok((char *)0,";",&saveptr)) {
if (*f) {
switch(fn++) {
case 0:
_etherType = __parseRange(f);
break;
case 1:
_protocol = __parseRange(f);
break;
case 2:
_port = __parseRange(f);
break;
default:
throw std::invalid_argument("rule string has unknown extra fields");
}
}
}
if (fn != 3)
throw std::invalid_argument("rule string must contain 3 fields");
}
bool Filter::Rule::operator()(unsigned int etype,const void *data,unsigned int len) const
throw(std::invalid_argument)
{
if ((!_etherType)||(_etherType(etype))) { // ethertype is ANY, or matches
// Ethertype determines meaning of protocol and port
switch(etype) {
case ZT_ETHERTYPE_IPV4:
if (len > 20) {
if ((!_protocol)||(_protocol(((const uint8_t *)data)[9]))) { // protocol is ANY or match
if (!_port) // port is ANY
return true;
// Don't match on fragments beyond fragment 0. If we've blocked
// fragment 0, further fragments will fall on deaf ears anyway.
if ((Utils::ntoh(((const uint16_t *)data)[3]) & 0x1fff))
return false;
// Internet header length determines where data begins, in multiples of 32 bits
unsigned int ihl = 4 * (((const uint8_t *)data)[0] & 0x0f);
switch(((const uint8_t *)data)[9]) { // port's meaning depends on IP protocol
case ZT_IPPROTO_ICMP:
// For ICMP, port is ICMP type
return _port(((const uint8_t *)data)[ihl]);
case ZT_IPPROTO_TCP:
case ZT_IPPROTO_UDP:
case ZT_IPPROTO_SCTP:
case ZT_IPPROTO_UDPLITE:
// For these, port is destination port. Protocol designers were
// nice enough to put the field in the same place.
return _port(((const uint16_t *)data)[(ihl / 2) + 1]);
default:
// port has no meaning for other IP types, so ignore it
return true;
}
return false; // no match on port
}
} else throw std::invalid_argument("undersized IPv4 packet");
break;
case ZT_ETHERTYPE_IPV6:
if (len > 40) {
int nextHeader = ((const uint8_t *)data)[6];
unsigned int pos = 40;
while ((pos < len)&&(nextHeader >= 0)&&(nextHeader != 59)) { // 59 == no next header
fprintf(stderr,"[rule] V6: start header parse, header %.2x pos %d\n",nextHeader,pos);
switch(nextHeader) {
case 0: // hop-by-hop options
case 60: // destination options
case 43: // routing
case 135: // mobility (mobile IPv6 options)
if (_protocol((unsigned int)nextHeader))
return true; // match if our goal was to match any of these
nextHeader = ((const uint8_t *)data)[pos];
pos += 8 + (8 * ((const uint8_t *)data)[pos + 1]);
break;
case 44: // fragment
if (_protocol(44))
return true; // match if our goal was to match fragments
nextHeader = ((const uint8_t *)data)[pos];
pos += 8;
break;
case ZT_IPPROTO_AH: // AH
return _protocol(ZT_IPPROTO_AH); // true if AH is matched protocol, otherwise false since packet will be IPsec
case ZT_IPPROTO_ESP: // ESP
return _protocol(ZT_IPPROTO_ESP); // true if ESP is matched protocol, otherwise false since packet will be IPsec
case ZT_IPPROTO_ICMPV6:
// Only match ICMPv6 if we've selected it specifically
if (_protocol(ZT_IPPROTO_ICMPV6)) {
// Port is interpreted as ICMPv6 type
if ((!_port)||(_port(((const uint8_t *)data)[pos])))
return true;
}
break;
case ZT_IPPROTO_TCP:
case ZT_IPPROTO_UDP:
case ZT_IPPROTO_SCTP:
case ZT_IPPROTO_UDPLITE:
// If we encounter any of these, match if protocol matches or is wildcard as
// we'll consider these the "real payload" if present.
if ((!_protocol)||(_protocol(nextHeader))) {
if ((!_port)||(_port(((const uint16_t *)data)[(pos / 2) + 1])))
return true; // protocol matches or is ANY, port is ANY or matches
}
break;
default: {
char foo[128];
Utils::snprintf(foo,sizeof(foo),"unrecognized IPv6 header type %d",(int)nextHeader);
throw std::invalid_argument(foo);
}
}
fprintf(stderr,"[rule] V6: end header parse, next header %.2x, new pos %d\n",nextHeader,pos);
}
} else throw std::invalid_argument("undersized IPv6 packet");
break;
default:
// For other ethertypes, protocol and port are ignored. What would they mean?
return true;
}
}
return false;
}
std::string Filter::Rule::toString() const
{
char buf[128];
std::string s;
switch(_etherType.magnitude()) {
case 0:
s.push_back('*');
break;
case 1:
Utils::snprintf(buf,sizeof(buf),"%u",_etherType.start);
s.append(buf);
break;
default:
Utils::snprintf(buf,sizeof(buf),"%u-%u",_etherType.start,_etherType.end);
s.append(buf);
break;
}
s.push_back(';');
switch(_protocol.magnitude()) {
case 0:
s.push_back('*');
break;
case 1:
Utils::snprintf(buf,sizeof(buf),"%u",_protocol.start);
s.append(buf);
break;
default:
Utils::snprintf(buf,sizeof(buf),"%u-%u",_protocol.start,_protocol.end);
s.append(buf);
break;
}
s.push_back(';');
switch(_port.magnitude()) {
case 0:
s.push_back('*');
break;
case 1:
Utils::snprintf(buf,sizeof(buf),"%u",_port.start);
s.append(buf);
break;
default:
Utils::snprintf(buf,sizeof(buf),"%u-%u",_port.start,_port.end);
s.append(buf);
break;
}
return s;
}
Filter::Filter(const char *s)
throw(std::invalid_argument)
{
char tmp[16384];
if (!Utils::scopy(tmp,sizeof(tmp),s))
throw std::invalid_argument("filter string too long");
char *saveptr = (char *)0;
unsigned int fn = 0;
for(char *f=Utils::stok(tmp,",",&saveptr);(f);f=Utils::stok((char *)0,",",&saveptr)) {
try {
_rules.push_back(Rule(f));
++fn;
} catch (std::invalid_argument &exc) {
char tmp[256];
Utils::snprintf(tmp,sizeof(tmp),"invalid rule at index %u: %s",fn,exc.what());
throw std::invalid_argument(tmp);
}
}
std::sort(_rules.begin(),_rules.end());
}
std::string Filter::toString() const
{
std::string s;
for(std::vector<Rule>::const_iterator r(_rules.begin());r!=_rules.end();++r) {
if (s.length() > 0)
s.push_back(',');
s.append(r->toString());
}
return s;
}
void Filter::add(const Rule &r)
{
for(std::vector<Rule>::iterator rr(_rules.begin());rr!=_rules.end();++rr) {
if (r == *rr)
return;
}
_rules.push_back(r);
std::sort(_rules.begin(),_rules.end());
}
const char *Filter::etherTypeName(const unsigned int etherType)
throw()
{
switch(etherType) {
case ZT_ETHERTYPE_IPV4: return "ETHERTYPE_IPV4";
case ZT_ETHERTYPE_ARP: return "ETHERTYPE_ARP";
case ZT_ETHERTYPE_RARP: return "ETHERTYPE_RARP";
case ZT_ETHERTYPE_ATALK: return "ETHERTYPE_ATALK";
case ZT_ETHERTYPE_AARP: return "ETHERTYPE_AARP";
case ZT_ETHERTYPE_IPX_A: return "ETHERTYPE_IPX_A";
case ZT_ETHERTYPE_IPX_B: return "ETHERTYPE_IPX_B";
case ZT_ETHERTYPE_IPV6: return "ETHERTYPE_IPV6";
}
return UNKNOWN_NAME;
}
const char *Filter::ipProtocolName(const unsigned int ipp)
throw()
{
switch(ipp) {
case ZT_IPPROTO_ICMP: return "IPPROTO_ICMP";
case ZT_IPPROTO_IGMP: return "IPPROTO_IGMP";
case ZT_IPPROTO_TCP: return "IPPROTO_TCP";
case ZT_IPPROTO_UDP: return "IPPROTO_UDP";
case ZT_IPPROTO_GRE: return "IPPROTO_GRE";
case ZT_IPPROTO_ESP: return "IPPROTO_ESP";
case ZT_IPPROTO_AH: return "IPPROTO_AH";
case ZT_IPPROTO_ICMPV6: return "IPPROTO_ICMPV6";
case ZT_IPPROTO_OSPF: return "IPPROTO_OSPF";
case ZT_IPPROTO_IPIP: return "IPPROTO_IPIP";
case ZT_IPPROTO_IPCOMP: return "IPPROTO_IPCOMP";
case ZT_IPPROTO_L2TP: return "IPPROTO_L2TP";
case ZT_IPPROTO_SCTP: return "IPPROTO_SCTP";
case ZT_IPPROTO_FC: return "IPPROTO_FC";
case ZT_IPPROTO_UDPLITE: return "IPPROTO_UDPLITE";
case ZT_IPPROTO_HIP: return "IPPROTO_HIP";
}
return UNKNOWN_NAME;
}
const char *Filter::icmpTypeName(const unsigned int icmpType)
throw()
{
switch(icmpType) {
case ZT_ICMP_ECHO_REPLY: return "ICMP_ECHO_REPLY";
case ZT_ICMP_DESTINATION_UNREACHABLE: return "ICMP_DESTINATION_UNREACHABLE";
case ZT_ICMP_SOURCE_QUENCH: return "ICMP_SOURCE_QUENCH";
case ZT_ICMP_REDIRECT: return "ICMP_REDIRECT";
case ZT_ICMP_ALTERNATE_HOST_ADDRESS: return "ICMP_ALTERNATE_HOST_ADDRESS";
case ZT_ICMP_ECHO_REQUEST: return "ICMP_ECHO_REQUEST";
case ZT_ICMP_ROUTER_ADVERTISEMENT: return "ICMP_ROUTER_ADVERTISEMENT";
case ZT_ICMP_ROUTER_SOLICITATION: return "ICMP_ROUTER_SOLICITATION";
case ZT_ICMP_TIME_EXCEEDED: return "ICMP_TIME_EXCEEDED";
case ZT_ICMP_BAD_IP_HEADER: return "ICMP_BAD_IP_HEADER";
case ZT_ICMP_TIMESTAMP: return "ICMP_TIMESTAMP";
case ZT_ICMP_TIMESTAMP_REPLY: return "ICMP_TIMESTAMP_REPLY";
case ZT_ICMP_INFORMATION_REQUEST: return "ICMP_INFORMATION_REQUEST";
case ZT_ICMP_INFORMATION_REPLY: return "ICMP_INFORMATION_REPLY";
case ZT_ICMP_ADDRESS_MASK_REQUEST: return "ICMP_ADDRESS_MASK_REQUEST";
case ZT_ICMP_ADDRESS_MASK_REPLY: return "ICMP_ADDRESS_MASK_REPLY";
case ZT_ICMP_TRACEROUTE: return "ICMP_TRACEROUTE";
case ZT_ICMP_MOBILE_HOST_REDIRECT: return "ICMP_MOBILE_HOST_REDIRECT";
case ZT_ICMP_MOBILE_REGISTRATION_REQUEST: return "ICMP_MOBILE_REGISTRATION_REQUEST";
case ZT_ICMP_MOBILE_REGISTRATION_REPLY: return "ICMP_MOBILE_REGISTRATION_REPLY";
}
return UNKNOWN_NAME;
}
const char *Filter::icmp6TypeName(const unsigned int icmp6Type)
throw()
{
switch(icmp6Type) {
case ZT_ICMP6_DESTINATION_UNREACHABLE: return "ICMP6_DESTINATION_UNREACHABLE";
case ZT_ICMP6_PACKET_TOO_BIG: return "ICMP6_PACKET_TOO_BIG";
case ZT_ICMP6_TIME_EXCEEDED: return "ICMP6_TIME_EXCEEDED";
case ZT_ICMP6_PARAMETER_PROBLEM: return "ICMP6_PARAMETER_PROBLEM";
case ZT_ICMP6_ECHO_REQUEST: return "ICMP6_ECHO_REQUEST";
case ZT_ICMP6_ECHO_REPLY: return "ICMP6_ECHO_REPLY";
case ZT_ICMP6_MULTICAST_LISTENER_QUERY: return "ICMP6_MULTICAST_LISTENER_QUERY";
case ZT_ICMP6_MULTICAST_LISTENER_REPORT: return "ICMP6_MULTICAST_LISTENER_REPORT";
case ZT_ICMP6_MULTICAST_LISTENER_DONE: return "ICMP6_MULTICAST_LISTENER_DONE";
case ZT_ICMP6_ROUTER_SOLICITATION: return "ICMP6_ROUTER_SOLICITATION";
case ZT_ICMP6_ROUTER_ADVERTISEMENT: return "ICMP6_ROUTER_ADVERTISEMENT";
case ZT_ICMP6_NEIGHBOR_SOLICITATION: return "ICMP6_NEIGHBOR_SOLICITATION";
case ZT_ICMP6_NEIGHBOR_ADVERTISEMENT: return "ICMP6_NEIGHBOR_ADVERTISEMENT";
case ZT_ICMP6_REDIRECT_MESSAGE: return "ICMP6_REDIRECT_MESSAGE";
case ZT_ICMP6_ROUTER_RENUMBERING: return "ICMP6_ROUTER_RENUMBERING";
case ZT_ICMP6_NODE_INFORMATION_QUERY: return "ICMP6_NODE_INFORMATION_QUERY";
case ZT_ICMP6_NODE_INFORMATION_RESPONSE: return "ICMP6_NODE_INFORMATION_RESPONSE";
case ZT_ICMP6_INV_NEIGHBOR_SOLICITATION: return "ICMP6_INV_NEIGHBOR_SOLICITATION";
case ZT_ICMP6_INV_NEIGHBOR_ADVERTISEMENT: return "ICMP6_INV_NEIGHBOR_ADVERTISEMENT";
case ZT_ICMP6_MLDV2: return "ICMP6_MLDV2";
case ZT_ICMP6_HOME_AGENT_ADDRESS_DISCOVERY_REQUEST: return "ICMP6_HOME_AGENT_ADDRESS_DISCOVERY_REQUEST";
case ZT_ICMP6_HOME_AGENT_ADDRESS_DISCOVERY_REPLY: return "ICMP6_HOME_AGENT_ADDRESS_DISCOVERY_REPLY";
case ZT_ICMP6_MOBILE_PREFIX_SOLICITATION: return "ICMP6_MOBILE_PREFIX_SOLICITATION";
case ZT_ICMP6_MOBILE_PREFIX_ADVERTISEMENT: return "ICMP6_MOBILE_PREFIX_ADVERTISEMENT";
case ZT_ICMP6_CERTIFICATION_PATH_SOLICITATION: return "ICMP6_CERTIFICATION_PATH_SOLICITATION";
case ZT_ICMP6_CERTIFICATION_PATH_ADVERTISEMENT: return "ICMP6_CERTIFICATION_PATH_ADVERTISEMENT";
case ZT_ICMP6_MULTICAST_ROUTER_ADVERTISEMENT: return "ICMP6_MULTICAST_ROUTER_ADVERTISEMENT";
case ZT_ICMP6_MULTICAST_ROUTER_SOLICITATION: return "ICMP6_MULTICAST_ROUTER_SOLICITATION";
case ZT_ICMP6_MULTICAST_ROUTER_TERMINATION: return "ICMP6_MULTICAST_ROUTER_TERMINATION";
case ZT_ICMP6_RPL_CONTROL_MESSAGE: return "ICMP6_RPL_CONTROL_MESSAGE";
}
return UNKNOWN_NAME;
}
} // namespace ZeroTier
-284
View File
@@ -1,284 +0,0 @@
/*
* ZeroTier One - Network Virtualization Everywhere
* Copyright (C) 2011-2015 ZeroTier, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* --
*
* ZeroTier may be used and distributed under the terms of the GPLv3, which
* are available at: http://www.gnu.org/licenses/gpl-3.0.html
*
* If you would like to embed ZeroTier into a commercial application or
* redistribute it in a modified binary form, please contact ZeroTier Networks
* LLC. Start here: http://www.zerotier.com/
*/
#ifndef _ZT_FILTER_HPP
#define _ZT_FILTER_HPP
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#include <utility>
#include <stdexcept>
#include "Range.hpp"
/* Ethernet frame types that might be relevant to us */
#define ZT_ETHERTYPE_IPV4 0x0800
#define ZT_ETHERTYPE_ARP 0x0806
#define ZT_ETHERTYPE_RARP 0x8035
#define ZT_ETHERTYPE_ATALK 0x809b
#define ZT_ETHERTYPE_AARP 0x80f3
#define ZT_ETHERTYPE_IPX_A 0x8137
#define ZT_ETHERTYPE_IPX_B 0x8138
#define ZT_ETHERTYPE_IPV6 0x86dd
/* IP protocols we might care about */
#define ZT_IPPROTO_ICMP 0x01
#define ZT_IPPROTO_IGMP 0x02
#define ZT_IPPROTO_TCP 0x06
#define ZT_IPPROTO_UDP 0x11
#define ZT_IPPROTO_GRE 0x2f
#define ZT_IPPROTO_ESP 0x32
#define ZT_IPPROTO_AH 0x33
#define ZT_IPPROTO_ICMPV6 0x3a
#define ZT_IPPROTO_OSPF 0x59
#define ZT_IPPROTO_IPIP 0x5e
#define ZT_IPPROTO_IPCOMP 0x6c
#define ZT_IPPROTO_L2TP 0x73
#define ZT_IPPROTO_SCTP 0x84
#define ZT_IPPROTO_FC 0x85
#define ZT_IPPROTO_UDPLITE 0x88
#define ZT_IPPROTO_HIP 0x8b
/* IPv4 ICMP types */
#define ZT_ICMP_ECHO_REPLY 0
#define ZT_ICMP_DESTINATION_UNREACHABLE 3
#define ZT_ICMP_SOURCE_QUENCH 4
#define ZT_ICMP_REDIRECT 5
#define ZT_ICMP_ALTERNATE_HOST_ADDRESS 6
#define ZT_ICMP_ECHO_REQUEST 8
#define ZT_ICMP_ROUTER_ADVERTISEMENT 9
#define ZT_ICMP_ROUTER_SOLICITATION 10
#define ZT_ICMP_TIME_EXCEEDED 11
#define ZT_ICMP_BAD_IP_HEADER 12
#define ZT_ICMP_TIMESTAMP 13
#define ZT_ICMP_TIMESTAMP_REPLY 14
#define ZT_ICMP_INFORMATION_REQUEST 15
#define ZT_ICMP_INFORMATION_REPLY 16
#define ZT_ICMP_ADDRESS_MASK_REQUEST 17
#define ZT_ICMP_ADDRESS_MASK_REPLY 18
#define ZT_ICMP_TRACEROUTE 30
#define ZT_ICMP_MOBILE_HOST_REDIRECT 32
#define ZT_ICMP_MOBILE_REGISTRATION_REQUEST 35
#define ZT_ICMP_MOBILE_REGISTRATION_REPLY 36
/* IPv6 ICMP types */
#define ZT_ICMP6_DESTINATION_UNREACHABLE 1
#define ZT_ICMP6_PACKET_TOO_BIG 2
#define ZT_ICMP6_TIME_EXCEEDED 3
#define ZT_ICMP6_PARAMETER_PROBLEM 4
#define ZT_ICMP6_ECHO_REQUEST 128
#define ZT_ICMP6_ECHO_REPLY 129
#define ZT_ICMP6_MULTICAST_LISTENER_QUERY 130
#define ZT_ICMP6_MULTICAST_LISTENER_REPORT 131
#define ZT_ICMP6_MULTICAST_LISTENER_DONE 132
#define ZT_ICMP6_ROUTER_SOLICITATION 133
#define ZT_ICMP6_ROUTER_ADVERTISEMENT 134
#define ZT_ICMP6_NEIGHBOR_SOLICITATION 135
#define ZT_ICMP6_NEIGHBOR_ADVERTISEMENT 136
#define ZT_ICMP6_REDIRECT_MESSAGE 137
#define ZT_ICMP6_ROUTER_RENUMBERING 138
#define ZT_ICMP6_NODE_INFORMATION_QUERY 139
#define ZT_ICMP6_NODE_INFORMATION_RESPONSE 140
#define ZT_ICMP6_INV_NEIGHBOR_SOLICITATION 141
#define ZT_ICMP6_INV_NEIGHBOR_ADVERTISEMENT 142
#define ZT_ICMP6_MLDV2 143
#define ZT_ICMP6_HOME_AGENT_ADDRESS_DISCOVERY_REQUEST 144
#define ZT_ICMP6_HOME_AGENT_ADDRESS_DISCOVERY_REPLY 145
#define ZT_ICMP6_MOBILE_PREFIX_SOLICITATION 146
#define ZT_ICMP6_MOBILE_PREFIX_ADVERTISEMENT 147
#define ZT_ICMP6_CERTIFICATION_PATH_SOLICITATION 148
#define ZT_ICMP6_CERTIFICATION_PATH_ADVERTISEMENT 149
#define ZT_ICMP6_MULTICAST_ROUTER_ADVERTISEMENT 151
#define ZT_ICMP6_MULTICAST_ROUTER_SOLICITATION 152
#define ZT_ICMP6_MULTICAST_ROUTER_TERMINATION 153
#define ZT_ICMP6_RPL_CONTROL_MESSAGE 155
namespace ZeroTier {
class RuntimeEnvironment;
/**
* A simple Ethernet frame level filter
*
* This doesn't specify actions, since it's used as a deny filter. The rule
* in ZT1 is "that which is not explicitly prohibited is allowed." (Except for
* ethertypes, which are handled by a whitelist.)
*/
class Filter
{
public:
/**
* Value returned by etherTypeName, etc. on unknown
*
* These static methods return precisely this, so a pointer equality
* check will work.
*/
static const char *const UNKNOWN_NAME;
/**
* An empty range as a more idiomatic way of specifying a wildcard match
*/
static const Range<unsigned int> ANY;
/**
* A filter rule
*/
class Rule
{
public:
Rule()
throw() :
_etherType(),
_protocol(),
_port()
{
}
/**
* Construct a rule from a string-serialized value
*
* @param s String formatted rule, such as returned by toString()
* @throws std::invalid_argument String formatted rule is not valid
*/
Rule(const char *s)
throw(std::invalid_argument);
/**
* Construct a new rule
*
* @param etype Ethernet type or empty range for ANY
* @param prot Protocol or empty range for ANY (meaning depends on ethertype, e.g. IP protocol numbers)
* @param prt Port or empty range for ANY (only applies to some protocols)
*/
Rule(const Range<unsigned int> &etype,const Range<unsigned int> &prot,const Range<unsigned int> &prt)
throw() :
_etherType(etype),
_protocol(prot),
_port(prt)
{
}
inline const Range<unsigned int> &etherType() const throw() { return _etherType; }
inline const Range<unsigned int> &protocol() const throw() { return _protocol; }
inline const Range<unsigned int> &port() const throw() { return _port; }
/**
* Test this rule against a frame
*
* @param etype Type of ethernet frame
* @param data Ethernet frame data
* @param len Length of ethernet frame
* @return True if rule matches
* @throws std::invalid_argument Frame invalid or not parseable
*/
bool operator()(unsigned int etype,const void *data,unsigned int len) const
throw(std::invalid_argument);
/**
* Serialize rule as string
*
* @return Human readable representation of rule
*/
std::string toString() const;
inline bool operator==(const Rule &r) const throw() { return ((_etherType == r._etherType)&&(_protocol == r._protocol)&&(_port == r._port)); }
inline bool operator!=(const Rule &r) const throw() { return !(*this == r); }
inline bool operator<(const Rule &r) const
throw()
{
if (_etherType < r._etherType)
return true;
else if (_etherType == r._etherType) {
if (_protocol < r._protocol)
return true;
else if (_protocol == r._protocol) {
if (_port < r._port)
return true;
}
}
return false;
}
inline bool operator>(const Rule &r) const throw() { return (r < *this); }
inline bool operator<=(const Rule &r) const throw() { return !(r < *this); }
inline bool operator>=(const Rule &r) const throw() { return !(*this < r); }
private:
Range<unsigned int> _etherType;
Range<unsigned int> _protocol;
Range<unsigned int> _port;
};
Filter() {}
/**
* @param s String-serialized filter representation
*/
Filter(const char *s)
throw(std::invalid_argument);
/**
* @return Comma-delimited list of string-format rules
*/
std::string toString() const;
/**
* Add a rule to this filter
*
* @param r Rule to add to filter
*/
void add(const Rule &r);
inline bool operator()(unsigned int etype,const void *data,unsigned int len) const
throw(std::invalid_argument)
{
for(std::vector<Rule>::const_iterator r(_rules.begin());r!=_rules.end();++r) {
if ((*r)(etype,data,len))
return true;
}
return false;
}
static const char *etherTypeName(const unsigned int etherType)
throw();
static const char *ipProtocolName(const unsigned int ipp)
throw();
static const char *icmpTypeName(const unsigned int icmpType)
throw();
static const char *icmp6TypeName(const unsigned int icmp6Type)
throw();
private:
std::vector<Rule> _rules;
};
} // namespace ZeroTier
#endif
@@ -43,7 +43,6 @@
#include <sys/cdefs.h>
#include <sys/uio.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -43,7 +43,6 @@
#include <sys/cdefs.h>
#include <sys/uio.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sys_domain.h>
-84
View File
@@ -1,84 +0,0 @@
ZeroTier Security
======
## Summary
## Using ZeroTier Securely
### Overall Recommendations
*TL;DR: same as anything else: defense in depth defense in depth defense in depth.*
We encourage our users to treat private ZeroTier networks as being rougly equivalent in security to WPA2-enterprise securied WiFi or on-premise wired Ethernet. (Public networks on the other hand are open by design.) That means they're networks with perimeters, but like all networks the compromise of any participating device or network controller allows an attacker to breach this perimeter.
**Never trust the network.** Many modern security professionals discourage reliance on network perimeters as major components in any security strategy, and we strongly agree regardless of whether your network is physical or virtual.
As part of a defense in depth approach **we specifically encourage the use of other secure protocols and authentication systems over ZeroTier networks**. While the use of secure encrypted protocols like SSH and SSL over ZeroTier adds a bit more overhead, it greatly reduces the chance of total compromise.
Imagine that the per-day probability of a major "0-day" security flaw in ZeroTier and OpenSSH are both roughly 0.001 or one per thousand days. Using both at the same time gives you a cumulative 0-day risk of roughly 0.000001 or one per one million days.
Those are made-up numbers. In reality these probabilities can't be known ahead of time. History shows that a 0-day could be found in anything tomorrow, next week, or never. But layers of security give you an overall posture that is the product -- more than the sum -- of its parts. That's how defense in depth works.
### ZeroTier Specifics
#### Protect Your Identity
Each ZeroTier device has an identity. The secret portion of this identity is stored in a file called "identity.secret." *Protect this file.* If it's stolen your device's identity (as represented by its 10-digit ZeroTier address) can easily be stolen or impersonated and your traffic can be decrypted or man-in-the-middle'd.
#### Protect Your Controller
The second major component of ZeroTier network security is the network controller. It's responsible for issuing certificates and configuration information to all network members. That makes it a certificate authority. Compromise of the controller allows an attacker to join or disrupt any network the controller controls. It does *not*, however, allow an attacker to decrypt peer to peer unicast traffic.
If you are using our controller-as-a-service at [my.zerotier.com](https://my.zerotier.com), you are delegating this responsibility to us.
## Security Priorities
These are our security "must-haves." If the system fails in any of these objectives it is broken.
* ZeroTier must be secure against remote vulnerabilities. This includes things like unauthorized remote control, remote penetration of the device using ZeroTier as a vector, or remote injection of malware.
* The content (but not meta-data) of communication must be secure against eavesdropping on the wire by any known means. (We can't warrant against secret vulnerabilities against ciphers, etc., or anything else we don't know about.)
* Communication must be secure against man-in-the-middle attacks and remote device impersonation.
## Security Non-Priorities
There are a few aspects of security we knowingly do not address, since doing so would be beyond scope or would conflict too greatly with other priorities.
* ZeroTier makes no effort to conceal communication meta-data such as source and destination addresses and the amount of information transferred between peers. To do this more or less requires onion routing or other "heavy" approaches to anonymity, and this is beyond scope.
* ZeroTier does not implement complex certificate chains, X.509, or other feature-rich (some would say feature-laden) cryptographic stuff. We only implement the crypto we need to get the job done.
* We don't take extraordinary measures to preserve security under conditions in which an endpoint device has been penetrated by other means (e.g. "rooted" by third party malware) or physicall compromised. If someone steals your keys they've stolen your keys, and if they've "pwned" your device they can easily eavesdrop on everything directly.
## Insecurities and Areas for Improvement
The only perfectly secure system is one that is off. All real world systems have potential security weaknesses. If possible, we like to know what these are and acknowledge their existence.
In some cases we plan to improve these. In other cases we have deliberately decided to "punt" on them in favor of some other priority (see philosophy). We may or may not revisit this decision in the future.
* We don't implement forward secrecy / ephemeral keys. A [discussion of this can be found at the closed GitHub issue for this feature](https://github.com/zerotier/ZeroTierOne/issues/204). In short: we've decided to "punt" on this feature because it introduces complexity and state negotiation. One of the design goals of ZeroTier is "reliability convergence" -- the reliability of ZeroTier virtual networks should rapidly converge with that of the underlying physical wire. Any state that must be negotiated prior to communication multiplies the probability of delay or failure due to packet loss. We *may* revisit this decision at a later date.
## Secure Coding Practices
The first line of defense employed against remote vulnerabilities and other major security flaws is the use of secure coding practices. These are, in no particular order:
* All parsing of remote messages is performed via higher level safe bounds-checked data structures and interfaces. See node/Buffer.hpp for one of the core elements of this.
* C++ exceptions are used to ensure that any unhandled failure or error condition (such as a bounds checking violation) results in the safe and complete termination of message processing. Invalid messages are dropped and ignored.
* Minimalism is a secure coding practice. There is an exponential relationship between complexity and the probability of bugs, and complex designs are much harder to audit and reason about.
* Our build scripts try to enable any OS and compiler level security features such as ASLR and "stack canaries" on non-debug builds.
## Cryptographic Security Practices
* We use [boring crypto](https://cr.yp.to/talks/2015.10.05/slides-djb-20151005-a4.pdf). A single symmetric algorithm (Salsa20/12), a single asymmetric algorithm (Curve25519 ECDH-256), and a single MAC (Poly1305). The way these algorithms are used is identical to how they're used in the NaCl reference implementation. The protocol supports selection of alternative algorithms but only for "future proofing" in the case that a serious flaw is discovered in any of these. Avoding algorithm bloat and cryptographic state negotiation helps guard against down-grade, "oracle," and other protocol level attacks.
* Authenticated encryption is employed with authentication being performed prior to any other operations on received messages. See also: [the cryptographic doom principle](https://moxie.org/blog/the-cryptographic-doom-principle/).
* "Never branch on anything secret" -- deterministic-time comparisons and other operations are used in cryptographic operations. See Utils::secureEq() in node/Utils.hpp.
* OS-derived crypographic random numbers (/dev/urandom or Windows CryptGenRandom) are further randomized using encryption by a secondary key with a secondary source of entropy to guard against CSPRNG bugs. Such OS-level CSPRNG bugs have been found in the past. See Utils::getSecureRandom() in node/Utils.hpp.
+57
View File
@@ -0,0 +1,57 @@
The new ZeroTier CLI!
====
With this update we've expanded upon the previous CLI's functionality, so things should seem pretty familiar. Here are some of the new features we've introduced:
- Create and administer networks on ZeroTier Central directly from the console.
- Service configurations, allows you to control local/remote instances of ZeroTier One
- Identity generation and management is now part of the same CLI tool
***
## Configurations
Configurations are a way for you to nickname and logically organize the control of ZeroTier services running locally or remotely (this includes ZeroTier Central!). They're merely groupings of service API url's and auth tokens. The CLI's settings data is contained within `.zerotierCliSettings`.
For instance, you can control your local instance of ZeroTier One via the `@local` config. By default it is represented as follows:
```
"local": {
"auth": "7tyqRoFytajf21j2l2t9QPm5",
"type": "one",
"url": "http://127.0.0.1:9993/"
}
```
As an example, if you issue the command `zerotier ls` is it implicitly stating `zerotier @local ls`.
With the same line of thinking, you could create a `@my.zerotier.com` which would allow for something like `zerotier @my.zerotier.com net-create` which talks to our hosted ZeroTier Central to create a new network.
## Command families
- `cli-` is for configuring the settings data for the CLI itself, such as adding/removing `@thing` configurations, variables, etc.
- `net-` is for operating on a *ZeroTier Central* service such as `https://my.zerotier.com`
- `id-` is for handling ZeroTier identities.
And those commands with no prefix are there to allow you to operate ZeroTier One instances either local or remote.
***
## Useful command examples
*Add a ZeroTier One configuration:*
- `zerotier cli-add-zt MyLocalConfigName https://127.0.0.1:9993/ <authtoken>`
*Add a ZeroTier Central configuration:*
- `zerotier cli-add-central MyZTCentralConfigName https://my.zerotier.com/ <centralAPIAuthtoken>`
*Set a default ZeroTier One instance:*
- `zerotier cli-set defaultOne MyLocalConfigName`
*Set a default ZeroTier Central:*
- `zerotier cli-set defaultCentral MyZTCentralConfigName`
File diff suppressed because it is too large. Load diff
@@ -4,3 +4,5 @@ Dockerized Linux Build Farm
This subfolder contains Dockerfiles and a script to build Linux packages for a variety of Linux distributions. It's also an excellent way to test your CPU fans and stress test your disk.
Running `build.sh` with no arguments builds everything. You can run `build.sh` with the name of a distro (e.g. centos-7) to only build that. Both 32 and 64 bit packages are built except where no 32-bit version of the distribution exists.
The `make-apt-repos.sh` and `make-rpm-repos.sh` scripts build repositories. They may require some editing for outside-of-ZeroTier use, and be careful with the apt one if you have an existing *aptly* configuration.
File renamed without changes.
Loaded 20 of 406 files, more files were not shown because too many files have changed in this diff. Show more