Commit Graph

6193 Commits

Author SHA1 Message Date
Sean OMeara
67a7534c21
cargo update tokio >= 1.24 (#1842) 2023-01-12 12:41:29 -08:00
Joseph Henry
39f3f5b2d9 User-configurable physical MTU for individual links
This patch allows users to specify the physical layer MTU for individual links
when in multipath mode. For example:

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

For example:

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

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

(the link#22 one)

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

device: bridge101, target: 0.0.0.0/0

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

Then Full Tunnel Mode doesn't work.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[1] https://android.googlesource.com/platform/ndk/+/ndk-release-r16/docs/UnifiedHeaders.md
2022-12-05 10:34:12 -05:00
Joseph Henry
85c0322313
Fix TCP relay setting 2022-12-01 15:12:54 -08:00
Adam Ierymenko
ebc1ed4015 Hide warning about readdir_r for now. 2022-12-01 11:07:20 -05:00
Adam Ierymenko
a25da7f771
Merge pull request #1799 from zerotier/cleanup/suggest-braces
Fix warning: suggest braces around initialization of subobject
2022-12-01 11:03:26 -05:00
Adam Ierymenko
c78f103ca6
Merge pull request #1800 from zerotier/cleanup/printf-z
Fix several warning: format specifies type 'XXX' but the argument has…
2022-12-01 11:03:11 -05:00
Brenton Bostick
4d50ed0b9d Fix several warning: format specifies type 'XXX' but the argument has type 'YYY'
Use %z for printing size_t and PRId64 etc. macros for printing
platform-specific widths, and remove now-redundant casts
2022-12-01 08:42:06 -05:00
Brenton Bostick
9ac2cfe611 Fix warning: suggest braces around initialization of subobject 2022-12-01 08:35:31 -05:00
Sean OMeara
85da0b419c drone config 2022-11-30 11:01:02 +01:00
Brenton Bostick
3ddaa60de9
prevent: warning: unused variable 'gotViaProc' (#1797) 2022-11-29 17:55:33 +01:00
Grant Limberg
25641d956e
Merge pull request #1795 from zerotier/bugfix/typos
Bugfix/typos
2022-11-28 08:58:27 -08:00
Brenton Bostick
3b8c33d49a fix typos in code 2022-11-28 09:23:58 -05:00
Brenton Bostick
f74a594e98 fix typos in comments and strings 2022-11-28 09:23:45 -05:00
Sean OMeara
668ab8b85c
fixing Makefile for armv6k (#1790) 2022-11-19 22:59:55 +01:00
Joseph Henry
98b190c626
Minor adjustment to packaging README 2022-11-14 15:25:50 -08:00
Grant Limberg
9568a4f2b4 netinet6/in6_var.h not available in iOS 2022-11-10 11:35:34 -08:00
Grant Limberg
b41e0910b0
Fun times in ~~cleveland~~ NDK-land 2022-11-09 11:11:10 -08:00