Commit Graph

6327 Commits

Author SHA1 Message Date
travisladuke
154b72b4f1 Bump version.h to 1.14.0 2024-03-19 12:22:21 -07:00
Grant Limberg
de4ee08ad4 add make target to build the central-controller run image 2024-03-19 11:31:05 -07:00
Lennon Day-Reynolds
5ae862ff54
Merge pull request #2255 from zerotier/ldr/update-rust-deps
update temporal SDK + other Rust deps, strip debug symbols from release builds
2024-03-19 11:28:06 -07:00
Lennon Day-Reynolds
859031dcd9
Merge branch 'dev' into ldr/update-rust-deps 2024-03-19 10:06:05 -07:00
Lennon Day-Reynolds
39e1aabd2a update temporal SDK version + other Rust dependencies, strip debug symbols from generated libraries in production builds 2024-03-19 10:03:15 -07:00
Travis LaDuke
9f499827af
Merge pull request #2253 from zerotier/freebsd-localhost
Consider ::ffff:127.0.0.1 as a loopback address
2024-03-19 09:04:32 -07:00
travisladuke
9bde5b9065 Consider ::ffff:127.0.0.1 as a loopback address
cpp-httplib  sets IPV6_V6ONLY to false on it's sockets.
On FreeBSD, this makes all ipv4 addresses get get prefixed with ::ffff:
it makes them IPv6 addresses mapped to v4.

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

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

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

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

zerotier-cli info -j

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

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

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

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

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

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

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

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

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

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

```
2024-02-01 12:47:51 -08:00
travisladuke
06399c86f6 Store a network members name
Because the GET request to get a specific member just dumps
the whole member object, `name` is included there too for free.
2024-02-01 12:31:44 -08:00
Grant Limberg
663ed73768
Merge pull request #2165 from zerotier/network-check
check hooks are enabled before firing
2023-11-20 08:16:10 -08:00