This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
_gen_ula(){ | |
# Generate a 40-bit random global ID | |
local random_id | |
random_id=$(od -An -N5 -tx1 /dev/urandom | xxd -p | tr -d '\n') | |
# Construct the ULA address prefix with the generated global ID | |
local ula_prefix="fd${random_id:0:2}:${random_id:2:4}:${random_id:6:4}" | |
echo "${ula_prefix}::1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
exec 3>/dev/null # suppress debug on 3 | |
exec 4>&1; exec 1>/dev/null # stash stdout on 4 | |
declare -a ARTIFACTS=(openziti{-{controller,router},}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
set -o xtrace | |
get(){ | |
local target=$1 | |
local arch=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(set -euxopipefail | |
GOOD_VERSION=1.0.0 | |
for REPO in ziti-{cli,controller,router,tunnel}; do | |
docker buildx imagetools create --tag openziti/${REPO}:latest openziti/${REPO}:${GOOD_VERSION} | |
done | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
set -euxopipefail | |
ARTIFACTORY_REPO='zitipax-openziti-(rpm|deb)-stable' | |
DELETE="--dry-run" | |
: DELETE="--quiet" | |
BAD_VERSION=1.1.8 | |
declare -a ARTIFACTS=(openziti{,-controller,-router}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
set -euxopipefail | |
ARTIFACTORY_REPO='zitipax-(openziti-(rpm|deb)-test|fork-(rpm|deb)-stable)' | |
: DELETE="--quiet" | |
DELETE="--dry-run" | |
RETENTION_DAYS=30 | |
declare -a ARTIFACTS=(ziti-edge-tunnel openziti{,-controller,-router,-console} zrok{,-share}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from os import chdir, walk | |
from os.path import dirname, getsize, join | |
from pathlib import Path | |
from shutil import move | |
import ffmpeg | |
import filetype |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import logging | |
import os | |
import re | |
import time | |
import docker | |
import requests | |
from packaging import version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
if systemctl is-enabled --quiet ziti-edge-tunnel.service && ykman piv info &>/dev/null | |
then | |
RESPONSE=$(ykman oath accounts code "$ZITI_IDENTITY" \ | |
| awk '{print $2;}' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This script parses and attempts to verify the signature of a Ziti JWT token and prints the header, payload, and | |
# analysis of the token. | |
import argparse | |
import json | |
import logging | |
import os | |
import ssl |