mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-09-22 15:29:03 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc762196dc | ||
|
|
0a900dc275 | ||
|
|
6f58510431 | ||
|
|
666fb7ea2d | ||
|
|
f0778860e5 | ||
|
|
6aea546d6f | ||
|
|
e0a3291235 | ||
|
|
b88d7091c8 | ||
|
|
15cfa3bf62 | ||
|
|
9c9d1650d1 | ||
|
|
0ae09577f6 | ||
|
|
a59f82093a | ||
|
|
be95b56c10 | ||
|
|
ea0f7dde95 | ||
|
|
a59626c971 | ||
|
|
67a7534c21 | ||
|
|
39f3f5b2d9 | ||
|
|
eccc31a4b9 | ||
|
|
d31f238be0 | ||
|
|
27c26a77a2 | ||
|
|
ab503902c8 | ||
|
|
ed53b62f1b | ||
|
|
ad5ba54cd4 | ||
|
|
a6742b7f82 | ||
|
|
91bae4b1a8 | ||
|
|
4959d8079b | ||
|
|
a558bd9312 | ||
|
|
3e41163bbe | ||
|
|
10170b41c3 | ||
|
|
e0e91e8397 | ||
|
|
d2de0292cc | ||
|
|
0210ba9c13 | ||
|
|
117d7194af | ||
|
|
7587ef5136 | ||
|
|
087a797257 | ||
|
|
a02f42188c | ||
|
|
98e0bf22d3 | ||
|
|
1e2ff042b4 | ||
|
|
b8eb9196e8 | ||
|
|
db1df58955 | ||
|
|
2f5dc10399 | ||
|
|
4100615cd6 | ||
|
|
e27c3edaba | ||
|
|
3c9ea2b667 | ||
|
|
065f42af1d | ||
|
|
1d503f45ad | ||
|
|
5b5f9a069a | ||
|
|
77c7f9133f | ||
|
|
475281935e | ||
|
|
cdf248b1e2 | ||
|
|
85c0322313 | ||
|
|
ebc1ed4015 | ||
|
|
a25da7f771 | ||
|
|
c78f103ca6 | ||
|
|
4d50ed0b9d | ||
|
|
9ac2cfe611 | ||
|
|
85da0b419c | ||
|
|
3ddaa60de9 | ||
|
|
25641d956e | ||
|
|
3b8c33d49a | ||
|
|
f74a594e98 | ||
|
|
668ab8b85c | ||
|
|
98b190c626 | ||
|
|
9568a4f2b4 | ||
|
|
b41e0910b0 | ||
|
|
6448189d20 | ||
|
|
1694d510ec | ||
|
|
af7ccff846 | ||
|
|
381460fd97 | ||
|
|
b02a41751c | ||
|
|
378e4ea34e |
No files matched your search
+11
-63
@@ -1,50 +1,7 @@
|
||||
local registry = "084037375216.dkr.ecr.us-east-2.amazonaws.com";
|
||||
|
||||
local targets = [
|
||||
//
|
||||
// Render these into .drone.yaml by running "make drone"
|
||||
//
|
||||
{ "os": "linux", "name": "el9", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "el8", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "el7", "isas": [ "amd64", "ppc64le"], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "el6", "isas": [ "amd64" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "amzn2", "isas": [ "amd64", "arm64" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "fc37", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "fc36", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "fc35", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "jammy", "isas": [ "amd64", "arm64", "armv7", "riscv64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "focal", "isas": [ "amd64", "arm64", "armv7", "riscv64", "ppc64le" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "bionic", "isas": [ "amd64", "arm64", "386", "ppc64le", "s390x" ], "events": ["tag" ] },
|
||||
{ "os": "linux", "name": "xenial", "isas": [ "amd64", "arm64", "386" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "sid", "isas": [ "386", "amd64", "arm64", "riscv64", "mips64le", "ppc64le", "s390x" ], "events": [ "push", "tag" ] },
|
||||
{ "os": "linux", "name": "bookworm", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "bullseye", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "buster", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "stretch", "isas": [ "amd64", "arm64", "386" ], "events": [ "tag" ] },
|
||||
// { "os": "windows", "name": "win2k19", "isas": [ "amd64" ], "events": ["push", "tag" ] }
|
||||
];
|
||||
|
||||
local master_targets = [
|
||||
//
|
||||
// Render these into .drone.yaml by running "make drone"
|
||||
//
|
||||
{ "os": "linux", "name": "el9", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "el8", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "el7", "isas": [ "amd64", "ppc64le"], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "el6", "isas": [ "amd64" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "amzn2", "isas": [ "amd64", "arm64" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "fc37", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "fc36", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "fc35", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "jammy", "isas": [ "amd64", "arm64", "armv7", "riscv64", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "focal", "isas": [ "amd64", "arm64", "armv7", "riscv64", "ppc64le" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "bionic", "isas": [ "amd64", "arm64", "386", "ppc64le", "s390x" ], "events": ["tag" ] },
|
||||
{ "os": "linux", "name": "xenial", "isas": [ "amd64", "arm64", "386" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "sid", "isas": [ "386", "amd64", "arm64", "riscv64", "mips64le", "ppc64le", "s390x" ], "events": [ "push", "tag" ] },
|
||||
{ "os": "linux", "name": "bookworm", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "bullseye", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "buster", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] },
|
||||
{ "os": "linux", "name": "stretch", "isas": [ "amd64", "arm64", "386" ], "events": [ "tag" ] },
|
||||
// { "os": "windows", "name": "win2k19", "isas": [ "amd64" ], "events": ["push", "tag" ] }
|
||||
{ "os": "linux", "name": "sid", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x", "riscv64" ], "events": [ "push", "tag", "custom" ] },
|
||||
];
|
||||
|
||||
local Build(platform, os, isa, events) = {
|
||||
@@ -56,27 +13,18 @@ local Build(platform, os, isa, events) = {
|
||||
"steps": [
|
||||
{
|
||||
"name": "build",
|
||||
"image": "registry.sean.farm/honda-builder",
|
||||
"commands": [ "./ci/scripts/build.sh " + platform + " " + isa + " " + "100.0.0+${DRONE_COMMIT_SHA:0:8}" + " " + "${DRONE_BUILD_EVENT}" ]
|
||||
},
|
||||
{
|
||||
"name": "list",
|
||||
"image": "registry.sean.farm/honda-builder",
|
||||
"commands": [ "ls -la " + platform ]
|
||||
"image": registry + "/honda-builder",
|
||||
"commands": [
|
||||
"aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin " + registry,
|
||||
"./ci/scripts/build.sh " + platform + " " + isa + " " + "100.0.0+${DRONE_COMMIT_SHA:0:8}" + " " + "${DRONE_BUILD_EVENT}"
|
||||
]
|
||||
},
|
||||
// {
|
||||
// "name": "notify-mattermost",
|
||||
// "image": "registry.sean.farm/mattermost-notify",
|
||||
// "environment": {
|
||||
// "token": { "from_secret": "mattermost-token" },
|
||||
// "host": { "from_secret": "mattermost-host" },
|
||||
// "channel": { "from_secret": "mattermost-channel" },
|
||||
// "maxRetry": 3,
|
||||
// },
|
||||
// "when": { "status": [ "failure" ] }
|
||||
// }
|
||||
// "name": "list",
|
||||
// "image": registry + "/honda-builder",
|
||||
// "commands": [ "ls -la " + platform ]
|
||||
// },
|
||||
],
|
||||
"image_pull_secrets": [ "dockerconfigjson" ],
|
||||
[ if isa == "arm64" || isa == "armv7" then "platform" ]: { os: os, arch: "arm64" },
|
||||
"trigger": { "event": events }
|
||||
};
|
||||
|
||||
+53
-2512
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,107 @@
|
||||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
build_ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: gitconfig
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.eol lf
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: aarch64-apple-darwin
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Set up cargo cache
|
||||
uses: actions/cache@v3
|
||||
continue-on-error: false
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cargo-
|
||||
- name: make
|
||||
run: make
|
||||
- name: selftest
|
||||
run: |
|
||||
make selftest
|
||||
./zerotier-selftest
|
||||
|
||||
build_macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: gitconfig
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.eol lf
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: aarch64-apple-darwin
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
- name: Set up cargo cache
|
||||
uses: actions/cache@v3
|
||||
continue-on-error: false
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cargo-
|
||||
- name: make
|
||||
run: make
|
||||
- name: selftest
|
||||
run: |
|
||||
make selftest
|
||||
./zerotier-selftest
|
||||
|
||||
build_windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: gitconfig
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.eol lf
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: aarch64-apple-darwin
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
- name: Set up cargo cache
|
||||
uses: actions/cache@v3
|
||||
continue-on-error: false
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cargo-
|
||||
- name: setup msbuild
|
||||
uses: microsoft/setup-msbuild@v1.1.3
|
||||
- name: msbuild
|
||||
run: |
|
||||
msbuild windows\ZeroTierOne.sln /m /p:Configuration=Release /property:Platform=x64 /t:ZeroTierOne:Rebuild
|
||||
+2
-1
@@ -136,4 +136,5 @@ zeroidc/target/
|
||||
__pycache__
|
||||
*.pyc
|
||||
*_source.tar.bz2
|
||||
snap/.snapcraft
|
||||
snap/.snapcraft
|
||||
tcp-proxy/tcp-proxy
|
||||
+13
-1
@@ -1,6 +1,18 @@
|
||||
ZeroTier Release Notes
|
||||
======
|
||||
|
||||
# 2023-02-15 -- Version 1.10.3
|
||||
|
||||
* Fix for duplicate paths in client. Could cause connectivity issues. Affects all platforms.
|
||||
* Fix for Ethernet Tap MTU setting, would not properly apply on Linux.
|
||||
* Fix default route bugs (macOS.)
|
||||
* Enable Ping automatically for ZeroTier Adapters (Windows.)
|
||||
* SSO updates and minor bugfixes.
|
||||
* Add low-bandwidth mode.
|
||||
* Add forceTcpRelay mode (optionally enabled.)
|
||||
* Fix bug that prevented setting of custom TCP relay address.
|
||||
* Build script improvements and bug fixes.
|
||||
|
||||
# 2022-11-01 -- Version 1.10.2
|
||||
|
||||
* Fix another SSO "stuck client" issue in zeroidc.
|
||||
@@ -32,7 +44,7 @@ Note that releases are coming few and far between because most of our dev effort
|
||||
|
||||
# 2022-04-25 -- Version 1.8.9
|
||||
|
||||
* Fixed a long-standing and strange bug that was causing sporadic "phantom" packet authentication failures. Not a security problem but could be behind spordaic reports of link failures under some conditions.
|
||||
* Fixed a long-standing and strange bug that was causing sporadic "phantom" packet authentication failures. Not a security problem but could be behind sporadic reports of link failures under some conditions.
|
||||
* Fized a memory leak in SSO/OIDC support.
|
||||
* Fixed SSO/OIDC display error on CLI.
|
||||
* Fixed a bug causing nodes to sometimes fail to push certs to each other (primarily affects SSO/OIDC use cases).
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
ARG PLATFORM
|
||||
FROM registry.sean.farm/${PLATFORM}-builder as stage
|
||||
FROM 084037375216.dkr.ecr.us-east-2.amazonaws.com/${PLATFORM}-builder as stage
|
||||
WORKDIR /work/build
|
||||
COPY . .
|
||||
RUN make debian
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
ARG PLATFORM
|
||||
FROM 084037375216.dkr.ecr.us-east-2.amazonaws.com/${PLATFORM}-builder as stage
|
||||
WORKDIR /work
|
||||
COPY . .
|
||||
RUN make
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
ARG PLATFORM
|
||||
FROM registry.sean.farm/${PLATFORM}-builder as stage
|
||||
FROM 084037375216.dkr.ecr.us-east-2.amazonaws.com/${PLATFORM}-builder as stage
|
||||
WORKDIR /root/rpmbuild/BUILD
|
||||
COPY . .
|
||||
RUN make redhat
|
||||
|
||||
+53
-43
@@ -8,6 +8,9 @@ export VERSION=$3
|
||||
export EVENT=$4
|
||||
|
||||
case $PLATFORM in
|
||||
sid)
|
||||
export PKGFMT=none
|
||||
;;
|
||||
el*|fc*|amzn*)
|
||||
export PKGFMT=rpm
|
||||
;;
|
||||
@@ -15,22 +18,21 @@ case $PLATFORM in
|
||||
export PKGFMT=deb
|
||||
esac
|
||||
|
||||
# OSX
|
||||
# x86_64-apple-darwin
|
||||
# aarch64-apple-darwin
|
||||
#
|
||||
# Allow user to drop in custom Dockerfile for PLATFORM
|
||||
#
|
||||
|
||||
# Windows
|
||||
# x86_64-pc-windows-msvc
|
||||
# i686-pc-windows-msvc
|
||||
# aarch64-pc-windows-msvc
|
||||
if [ -f "ci/Dockerfile.${PLATFORM}" ]; then
|
||||
export DOCKERFILE="ci/Dockerfile.${PLATFORM}"
|
||||
else
|
||||
export DOCKERFILE="ci/Dockerfile.${PKGFMT}"
|
||||
fi
|
||||
|
||||
# Linux
|
||||
# i686-unknown-linux-gnu
|
||||
# x86_64-unknown-linux-gnu
|
||||
# arm-unknown-linux-gnueabi ?
|
||||
# arm-unknown-linux-gnueabihf ?
|
||||
# armv7-unknown-linux-gnueabihf
|
||||
#
|
||||
#
|
||||
# Rust sometimes gets confused about where it's running.
|
||||
# Normally, the build images will have Rust pre-baked.
|
||||
# Pass RUST_TRIPLET for convenience when using a custom Dockerfile
|
||||
#
|
||||
|
||||
case $ZT_ISA in
|
||||
386)
|
||||
@@ -41,13 +43,9 @@ case $ZT_ISA in
|
||||
export DOCKER_ARCH=amd64
|
||||
export RUST_TRIPLET=x86_64-unknown-linux-gnu
|
||||
;;
|
||||
armv6)
|
||||
export DOCKER_ARCH=arm/v6
|
||||
export RUST_TRIPLET=arm-unknown-linux-gnueabi
|
||||
;;
|
||||
armv7)
|
||||
armv7)
|
||||
export DOCKER_ARCH=arm/v7
|
||||
export RUST_TRIPLET=arm-unknown-linux-gnueabihf
|
||||
export RUST_TRIPLET=armv7-unknown-linux-gnueabihf
|
||||
;;
|
||||
arm64)
|
||||
export DOCKER_ARCH=arm64/v8
|
||||
@@ -60,7 +58,7 @@ case $ZT_ISA in
|
||||
ppc64le)
|
||||
export DOCKER_ARCH=ppc64le
|
||||
export RUST_TRIPLET=powerpc64le-unknown-linux-gnu
|
||||
;;
|
||||
;;
|
||||
mips64le)
|
||||
export DOCKER_ARCH=mips64le
|
||||
export RUST_TRIPLET=mips64el-unknown-linux-gnuabi64
|
||||
@@ -69,17 +67,15 @@ case $ZT_ISA in
|
||||
export DOCKER_ARCH=s390x
|
||||
export RUST_TRIPLET=s390x-unknown-linux-gnu
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
echo "ERROR: could not determine architecture settings. PLEASE FIX ME"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f "ci/Dockerfile.${PLATFORM}" ]; then
|
||||
export DOCKERFILE="ci/Dockerfile.${PLATFORM}"
|
||||
else
|
||||
export DOCKERFILE="ci/Dockerfile.${PKGFMT}"
|
||||
fi
|
||||
#
|
||||
# Print debug info
|
||||
#
|
||||
|
||||
echo "#~~~~~~~~~~~~~~~~~~~~"
|
||||
echo "$0 variables:"
|
||||
@@ -94,23 +90,37 @@ echo "PWD: ${PWD}"
|
||||
echo "DOCKERFILE: ${DOCKERFILE}"
|
||||
echo "#~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
if [ ${EVENT} == "push" ]; then
|
||||
make munge_rpm zerotier-one.spec VERSION=${VERSION}
|
||||
make munge_deb debian/changelog VERSION=${VERSION}
|
||||
#
|
||||
# Munge RPM and Deb
|
||||
#
|
||||
|
||||
if [ ${PKGFMT} != "none" ] && [ ${EVENT} != "tag" ]; then
|
||||
make munge_rpm zerotier-one.spec VERSION=${VERSION}
|
||||
make munge_deb debian/changelog VERSION=${VERSION}
|
||||
fi
|
||||
|
||||
export DOCKER_BUILDKIT=1
|
||||
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||
#
|
||||
# Assemble buildx arguments
|
||||
#
|
||||
|
||||
# docker pull --platform linux/${DOCKER_ARCH} registry.sean.farm/${PLATFORM}-builder
|
||||
build_args=(
|
||||
--no-cache
|
||||
--build-arg PLATFORM=${PLATFORM}
|
||||
--build-arg RUST_TRIPLET=${RUST_TRIPLET}
|
||||
--build-arg DOCKER_ARCH=${DOCKER_ARCH}
|
||||
--platform linux/${DOCKER_ARCH}
|
||||
-f ${DOCKERFILE}
|
||||
-t build
|
||||
.
|
||||
)
|
||||
|
||||
docker buildx build \
|
||||
--build-arg PLATFORM="${PLATFORM}" \
|
||||
--build-arg RUST_TRIPLET="${RUST_TRIPLET}" \
|
||||
--build-arg DOCKER_ARCH="${DOCKER_ARCH}" \
|
||||
--platform linux/${DOCKER_ARCH} \
|
||||
-f ${DOCKERFILE} \
|
||||
-t build \
|
||||
. \
|
||||
--output type=local,dest=. \
|
||||
--target export
|
||||
if [ ${PKGFMT} != "none" ]; then
|
||||
build_args+=("--output type=local,dest=.")
|
||||
build_args+=("--target export")
|
||||
fi
|
||||
|
||||
#
|
||||
# Do build
|
||||
#
|
||||
|
||||
docker buildx build ${build_args[@]}
|
||||
@@ -53,6 +53,7 @@ public:
|
||||
, ssoNonce()
|
||||
, ssoState()
|
||||
, ssoClientID()
|
||||
, ssoProvider("default")
|
||||
{}
|
||||
|
||||
bool enabled;
|
||||
@@ -64,6 +65,7 @@ public:
|
||||
std::string ssoNonce;
|
||||
std::string ssoState;
|
||||
std::string ssoClientID;
|
||||
std::string ssoProvider;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+40
-20
@@ -34,7 +34,7 @@ using json = nlohmann::json;
|
||||
|
||||
namespace {
|
||||
|
||||
static const int DB_MINIMUM_VERSION = 20;
|
||||
static const int DB_MINIMUM_VERSION = 38;
|
||||
|
||||
static const char *_timestr()
|
||||
{
|
||||
@@ -113,7 +113,7 @@ MemberNotificationReceiver::MemberNotificationReceiver(PostgreSQL *p, pqxx::conn
|
||||
: pqxx::notification_receiver(c, channel)
|
||||
, _psql(p)
|
||||
{
|
||||
fprintf(stderr, "initialize MemberNotificaitonReceiver\n");
|
||||
fprintf(stderr, "initialize MemberNotificationReceiver\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ NetworkNotificationReceiver::NetworkNotificationReceiver(PostgreSQL *p, pqxx::co
|
||||
}
|
||||
|
||||
void NetworkNotificationReceiver::operator() (const std::string &payload, int packend_pid) {
|
||||
fprintf(stderr, "Network Notificaiton received: %s\n", payload.c_str());
|
||||
fprintf(stderr, "Network Notification received: %s\n", payload.c_str());
|
||||
json tmp(json::parse(payload));
|
||||
json &ov = tmp["old_val"];
|
||||
json &nv = tmp["new_val"];
|
||||
@@ -185,7 +185,7 @@ PostgreSQL::PostgreSQL(const Identity &myId, const char *path, int listenPort, R
|
||||
fprintf(stderr, "ZT_SSO_PSK: %s\n", ssoPskHex);
|
||||
#endif
|
||||
if (ssoPskHex) {
|
||||
// SECURITY: note that ssoPskHex will always be null-terminated if libc acatually
|
||||
// SECURITY: note that ssoPskHex will always be null-terminated if libc actually
|
||||
// returns something non-NULL. If the hex encodes something shorter than 48 bytes,
|
||||
// it will be padded at the end with zeroes. If longer, it'll be truncated.
|
||||
Utils::unhex(ssoPskHex, _ssoPsk, sizeof(_ssoPsk));
|
||||
@@ -442,20 +442,29 @@ AuthInfo PostgreSQL::getSSOAuthInfo(const nlohmann::json &member, const std::str
|
||||
exit(7);
|
||||
}
|
||||
|
||||
r = w.exec_params("SELECT org.client_id, org.authorization_endpoint, org.issuer, org.sso_impl_version "
|
||||
"FROM ztc_network AS nw, ztc_org AS org "
|
||||
"WHERE nw.id = $1 AND nw.sso_enabled = true AND org.owner_id = nw.owner_id", networkId);
|
||||
r = w.exec_params(
|
||||
"SELECT oc.client_id, oc.authorization_endpoint, oc.issuer, oc.provider, oc.sso_impl_version "
|
||||
"FROM ztc_network AS n "
|
||||
"INNER JOIN ztc_org o "
|
||||
" ON o.owner_id = n.owner_id "
|
||||
"LEFT OUTER JOIN ztc_network_oidc_config noc "
|
||||
" ON noc.network_id = n.id "
|
||||
"LEFT OUTER JOIN ztc_oidc_config oc "
|
||||
" ON noc.client_id = oc.client_id AND noc.org_id = o.org_id "
|
||||
"WHERE n.id = $1 AND n.sso_enabled = true", networkId);
|
||||
|
||||
std::string client_id = "";
|
||||
std::string authorization_endpoint = "";
|
||||
std::string issuer = "";
|
||||
std::string provider = "";
|
||||
uint64_t sso_version = 0;
|
||||
|
||||
if (r.size() == 1) {
|
||||
client_id = r.at(0)[0].as<std::string>();
|
||||
authorization_endpoint = r.at(0)[1].as<std::string>();
|
||||
issuer = r.at(0)[2].as<std::string>();
|
||||
sso_version = r.at(0)[3].as<uint64_t>();
|
||||
provider = r.at(0)[3].as<std::string>();
|
||||
sso_version = r.at(0)[4].as<uint64_t>();
|
||||
} else if (r.size() > 1) {
|
||||
fprintf(stderr, "ERROR: More than one auth endpoint for an organization?!?!? NetworkID: %s\n", networkId.c_str());
|
||||
} else {
|
||||
@@ -485,18 +494,20 @@ AuthInfo PostgreSQL::getSSOAuthInfo(const nlohmann::json &member, const std::str
|
||||
} else if (info.version == 1) {
|
||||
info.ssoClientID = client_id;
|
||||
info.issuerURL = issuer;
|
||||
info.ssoProvider = provider;
|
||||
info.ssoNonce = nonce;
|
||||
info.ssoState = std::string(state_hex) + "_" +networkId;
|
||||
info.centralAuthURL = redirectURL;
|
||||
#ifdef ZT_DEBUG
|
||||
fprintf(
|
||||
stderr,
|
||||
"ssoClientID: %s\nissuerURL: %s\nssoNonce: %s\nssoState: %s\ncentralAuthURL: %s\n",
|
||||
"ssoClientID: %s\nissuerURL: %s\nssoNonce: %s\nssoState: %s\ncentralAuthURL: %s\nprovider: %s\n",
|
||||
info.ssoClientID.c_str(),
|
||||
info.issuerURL.c_str(),
|
||||
info.ssoNonce.c_str(),
|
||||
info.ssoState.c_str(),
|
||||
info.centralAuthURL.c_str());
|
||||
info.centralAuthURL.c_str(),
|
||||
provider.c_str());
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
@@ -535,15 +546,21 @@ void PostgreSQL::initializeNetworks()
|
||||
std::unordered_set<std::string> networkSet;
|
||||
|
||||
char qbuf[2048] = {0};
|
||||
sprintf(qbuf, "SELECT n.id, (EXTRACT(EPOCH FROM n.creation_time AT TIME ZONE 'UTC')*1000)::bigint as creation_time, n.capabilities, "
|
||||
sprintf(qbuf,
|
||||
"SELECT n.id, (EXTRACT(EPOCH FROM n.creation_time AT TIME ZONE 'UTC')*1000)::bigint as creation_time, n.capabilities, "
|
||||
"n.enable_broadcast, (EXTRACT(EPOCH FROM n.last_modified AT TIME ZONE 'UTC')*1000)::bigint AS last_modified, n.mtu, n.multicast_limit, n.name, n.private, n.remote_trace_level, "
|
||||
"n.remote_trace_target, n.revision, n.rules, n.tags, n.v4_assign_mode, n.v6_assign_mode, n.sso_enabled, (CASE WHEN n.sso_enabled THEN o.client_id ELSE NULL END) as client_id, "
|
||||
"(CASE WHEN n.sso_enabled THEN o.authorization_endpoint ELSE NULL END) as authorization_endpoint, d.domain, d.servers, "
|
||||
"n.remote_trace_target, n.revision, n.rules, n.tags, n.v4_assign_mode, n.v6_assign_mode, n.sso_enabled, (CASE WHEN n.sso_enabled THEN noc.client_id ELSE NULL END) as client_id, "
|
||||
"(CASE WHEN n.sso_enabled THEN oc.authorization_endpoint ELSE NULL END) as authorization_endpoint, "
|
||||
"(CASE WHEN n.sso_enabled THEN oc.provider ELSE NULL END) as provider, d.domain, d.servers, "
|
||||
"ARRAY(SELECT CONCAT(host(ip_range_start),'|', host(ip_range_end)) FROM ztc_network_assignment_pool WHERE network_id = n.id) AS assignment_pool, "
|
||||
"ARRAY(SELECT CONCAT(host(address),'/',bits::text,'|',COALESCE(host(via), 'NULL'))FROM ztc_network_route WHERE network_id = n.id) AS routes "
|
||||
"FROM ztc_network n "
|
||||
"LEFT OUTER JOIN ztc_org o "
|
||||
" ON o.owner_id = n.owner_id "
|
||||
" ON o.owner_id = n.owner_id "
|
||||
"LEFT OUTER JOIN ztc_network_oidc_config noc "
|
||||
" ON noc.network_id = n.id "
|
||||
"LEFT OUTER JOIN ztc_oidc_config oc "
|
||||
" ON noc.client_id = oc.client_id AND oc.org_id = o.org_id "
|
||||
"LEFT OUTER JOIN ztc_network_dns d "
|
||||
" ON d.network_id = n.id "
|
||||
"WHERE deleted = false AND controller_id = '%s'", _myAddressStr.c_str());
|
||||
@@ -574,6 +591,7 @@ void PostgreSQL::initializeNetworks()
|
||||
, std::optional<bool> // ssoEnabled
|
||||
, std::optional<std::string> // clientId
|
||||
, std::optional<std::string> // authorizationEndpoint
|
||||
, std::optional<std::string> // ssoProvider
|
||||
, std::optional<std::string> // domain
|
||||
, std::optional<std::string> // servers
|
||||
, std::string // assignmentPoolString
|
||||
@@ -610,10 +628,11 @@ void PostgreSQL::initializeNetworks()
|
||||
std::optional<bool> ssoEnabled = std::get<16>(row);
|
||||
std::optional<std::string> clientId = std::get<17>(row);
|
||||
std::optional<std::string> authorizationEndpoint = std::get<18>(row);
|
||||
std::optional<std::string> dnsDomain = std::get<19>(row);
|
||||
std::optional<std::string> dnsServers = std::get<20>(row);
|
||||
std::string assignmentPoolString = std::get<21>(row);
|
||||
std::string routesString = std::get<22>(row);
|
||||
std::optional<std::string> ssoProvider = std::get<19>(row);
|
||||
std::optional<std::string> dnsDomain = std::get<20>(row);
|
||||
std::optional<std::string> dnsServers = std::get<21>(row);
|
||||
std::string assignmentPoolString = std::get<22>(row);
|
||||
std::string routesString = std::get<23>(row);
|
||||
|
||||
config["id"] = nwid;
|
||||
config["nwid"] = nwid;
|
||||
@@ -638,6 +657,7 @@ void PostgreSQL::initializeNetworks()
|
||||
config["routes"] = json::array();
|
||||
config["clientId"] = clientId.value_or("");
|
||||
config["authorizationEndpoint"] = authorizationEndpoint.value_or("");
|
||||
config["provider"] = ssoProvider.value_or("");
|
||||
|
||||
networkSet.insert(nwid);
|
||||
|
||||
@@ -1387,7 +1407,7 @@ void PostgreSQL::commitThread()
|
||||
"sso_enabled = EXCLUDED.sso_enabled",
|
||||
id,
|
||||
_myAddressStr,
|
||||
OSUtils::jsonDump(config["capabilitles"], -1),
|
||||
OSUtils::jsonDump(config["capabilities"], -1),
|
||||
(bool)config["enableBroadcast"],
|
||||
OSUtils::now(),
|
||||
(int)config["mtu"],
|
||||
@@ -1586,7 +1606,7 @@ void PostgreSQL::onlineNotificationThread()
|
||||
/**
|
||||
* ONLY UNCOMMENT FOR TEMPORARY DB MAINTENANCE
|
||||
*
|
||||
* This define temproarly turns off writing to the member status table
|
||||
* This define temporarily turns off writing to the member status table
|
||||
* so it can be reindexed when the indexes get too large.
|
||||
*/
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ This returns a JSON object containing all member IDs as keys and their `memberRe
|
||||
| vMajor | integer | Most recently known major version | no |
|
||||
| vMinor | integer | Most recently known minor version | no |
|
||||
| vRev | integer | Most recently known revision | no |
|
||||
| vProto | integer | Most recently known protocl version | no |
|
||||
| vProto | integer | Most recently known protocol version | no |
|
||||
|
||||
Note that managed IP assignments are only used if they fall within a managed route. Otherwise they are ignored.
|
||||
|
||||
Vendored
+6
@@ -1,3 +1,9 @@
|
||||
zerotier-one (1.10.3) unstable; urgency=medium
|
||||
|
||||
* See RELEASE-NOTES.md for release notes.
|
||||
|
||||
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Sat, 21 Jan 2023 01:00:00 -0700
|
||||
|
||||
zerotier-one (1.10.2) unstable; urgency=medium
|
||||
|
||||
* See RELEASE-NOTES.md for release notes.
|
||||
|
||||
@@ -81,7 +81,7 @@ These are found in the service's working directory.
|
||||
If the ZeroTier One service is built with the network controller enabled, it periodically backs up its controller.db database in this file (currently every 5 minutes if there have been changes). Since this file is not a currently in use SQLite3 database it's safer to back up without corruption. On new backups the file is rotated out rather than being rewritten in place.
|
||||
|
||||
* `iddb.d/` (directory):
|
||||
Caches the public identity of every peer ZeroTier has spoken with in the last 60 days. This directory and its contents can be deleted, but this may result in slower connection initations since it will require that we go out and re-fetch full identities for peers we're speaking to.
|
||||
Caches the public identity of every peer ZeroTier has spoken with in the last 60 days. This directory and its contents can be deleted, but this may result in slower connection initiations since it will require that we go out and re-fetch full identities for peers we're speaking to.
|
||||
|
||||
* `networks.d` (directory):
|
||||
This caches network configurations and certificate information for networks you belong to. ZeroTier scans this directory for <network ID>.conf files on startup to recall its networks, so "touch"ing an empty <network ID>.conf file in this directory is a way of pre-configuring ZeroTier to join a specific network on startup without using the API. If the config file is empty ZeroTIer will just fetch it from the network's controller.
|
||||
|
||||
@@ -701,7 +701,7 @@
|
||||
<key>USE_HFS+_COMPRESSION</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<string>1.10.2</string>
|
||||
<string>1.10.3</string>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
|
||||
@@ -384,7 +384,7 @@ enum ZT_ResultCode
|
||||
*/
|
||||
ZT_RESULT_OK_IGNORED = 1,
|
||||
|
||||
// Fatal errors (>100, <1000)
|
||||
// Fatal errors (>=100, <1000)
|
||||
|
||||
/**
|
||||
* Ran out of memory
|
||||
@@ -1208,7 +1208,7 @@ typedef struct
|
||||
bool ssoEnabled;
|
||||
|
||||
/**
|
||||
* SSO verison
|
||||
* SSO version
|
||||
*/
|
||||
uint64_t ssoVersion;
|
||||
|
||||
@@ -1246,6 +1246,11 @@ typedef struct
|
||||
* oidc client id
|
||||
*/
|
||||
char ssoClientID[256];
|
||||
|
||||
/**
|
||||
* sso provider
|
||||
**/
|
||||
char ssoProvider[64];
|
||||
} ZT_VirtualNetworkConfig;
|
||||
|
||||
/**
|
||||
@@ -2066,7 +2071,7 @@ ZT_SDK_API int ZT_Node_sendUserMessage(ZT_Node *node,void *tptr,uint64_t dest,ui
|
||||
* NetworkConfigMaster base class in node/. No type checking is performed,
|
||||
* so a pointer to anything else will result in a crash.
|
||||
*
|
||||
* @param node ZertTier One node
|
||||
* @param node ZeroTier One node
|
||||
* @param networkConfigMasterInstance Instance of NetworkConfigMaster C++ class or NULL to disable
|
||||
* @return OK (0) or error code if a fatal error condition has occurred
|
||||
*/
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ ZeroTier One SDK - Android JNI Wrapper
|
||||
Building
|
||||
-----
|
||||
|
||||
Reqires:
|
||||
Requires:
|
||||
|
||||
* JDK
|
||||
* ANT
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ZeroTierOneJNI
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(ZT1)/include \
|
||||
$(ZT1)/node \
|
||||
$(ZT1)/osdep
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
# LOCAL_CFLAGS := -g
|
||||
|
||||
APP_UNIFIED_HEADERS := true
|
||||
|
||||
LOCAL_CFLAGS := -DZT_USE_MINIUPNPC
|
||||
ifeq ($(TARGET_ARCH_ABI),x86_64)
|
||||
LOCAL_CXXFLAGS := -maes -mpclmul -msse3 -msse4.1
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
||||
LOCAL_ARM_NEON := true
|
||||
LOCAL_CXXFLAGS := -march=armv8-a+crypto -mfloat-abi=softfp -mfpu=neon -maes -isystem $NDK/sysroot/usr/include/$TRIPLE
|
||||
endif
|
||||
|
||||
# ZeroTierOne SDK source files
|
||||
LOCAL_SRC_FILES := \
|
||||
$(ZT1)/node/AES.cpp \
|
||||
$(ZT1)/node/AES_aesni.cpp \
|
||||
$(ZT1)/node/AES_armcrypto.cpp \
|
||||
$(ZT1)/node/Bond.cpp \
|
||||
$(ZT1)/node/C25519.cpp \
|
||||
$(ZT1)/node/Capability.cpp \
|
||||
$(ZT1)/node/CertificateOfMembership.cpp \
|
||||
$(ZT1)/node/CertificateOfOwnership.cpp \
|
||||
$(ZT1)/node/Identity.cpp \
|
||||
$(ZT1)/node/IncomingPacket.cpp \
|
||||
$(ZT1)/node/InetAddress.cpp \
|
||||
$(ZT1)/node/Membership.cpp \
|
||||
$(ZT1)/node/Multicaster.cpp \
|
||||
$(ZT1)/node/Network.cpp \
|
||||
$(ZT1)/node/NetworkConfig.cpp \
|
||||
$(ZT1)/node/Node.cpp \
|
||||
$(ZT1)/node/OutboundMulticast.cpp \
|
||||
$(ZT1)/node/Packet.cpp \
|
||||
$(ZT1)/node/Path.cpp \
|
||||
$(ZT1)/node/Peer.cpp \
|
||||
$(ZT1)/node/Poly1305.cpp \
|
||||
$(ZT1)/node/Revocation.cpp \
|
||||
$(ZT1)/node/Salsa20.cpp \
|
||||
$(ZT1)/node/SelfAwareness.cpp \
|
||||
$(ZT1)/node/SHA512.cpp \
|
||||
$(ZT1)/node/Switch.cpp \
|
||||
$(ZT1)/node/Tag.cpp \
|
||||
$(ZT1)/node/Topology.cpp \
|
||||
$(ZT1)/node/Trace.cpp \
|
||||
$(ZT1)/node/Utils.cpp \
|
||||
$(ZT1)/osdep/OSUtils.cpp
|
||||
|
||||
# JNI Files
|
||||
LOCAL_SRC_FILES += \
|
||||
com_zerotierone_sdk_Node.cpp \
|
||||
ZT_jniarray.cpp \
|
||||
ZT_jniutils.cpp \
|
||||
ZT_jnilookup.cpp
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -1,5 +0,0 @@
|
||||
# NDK_TOOLCHAIN_VERSION := clang3.5
|
||||
APP_STL := c++_static
|
||||
APP_CPPFLAGS := -Wall -fstack-protector -fexceptions -fno-strict-aliasing -frtti -Wno-deprecated-register -DZT_NO_TYPE_PUNNING=1
|
||||
APP_PLATFORM := android-21
|
||||
APP_ABI := all
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "ZT_jniarray.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
jclass java_util_ArrayList;
|
||||
jmethodID java_util_ArrayList_;
|
||||
|
||||
Loaded 20 of 1761 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user