zrok->zrok2 (#1134)

This commit is contained in:
Michael Quigley
2026-01-29 16:41:35 -05:00
parent 8611b5f58a
commit 60f8aea58b
173 changed files with 989 additions and 1597 deletions
+2 -2
View File
@@ -72,7 +72,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: linux-amd64
path: ${{ steps.solve_go_bin.outputs.go_bin }}/zrok
path: ${{ steps.solve_go_bin.outputs.go_bin }}/zrok2
if-no-files-found: error
windows-build:
@@ -122,7 +122,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: windows-amd64
path: ./dist/**/zrok.exe
path: ./dist/**/zrok2.exe
if-no-files-found: error
pytest:
+8 -8
View File
@@ -2,7 +2,7 @@ version: 2
builds:
- id: zrok-amd64
main: ./cmd/zrok
binary: zrok
binary: zrok2
ldflags: "-s -w -X github.com/openziti/zrok/v2/build.Version={{.Tag}} -X github.com/openziti/zrok/v2/build.Hash={{.ShortCommit}}"
env:
- CGO_ENABLED=1
@@ -12,15 +12,15 @@ builds:
- amd64
hooks:
post:
- cmd: 'codesign -s "Developer ID Application: NetFoundry Inc" -v dist/zrok-amd64_darwin_amd64_v1/zrok --options=runtime'
- cmd: 'codesign -s "Developer ID Application: NetFoundry Inc" -v dist/zrok-amd64_darwin_amd64_v1/zrok2 --options=runtime'
output: true
- cmd: zip "dist/zrok-amd64_darwin_amd64_v1/zrok.zip" dist/zrok-amd64_darwin_amd64_v1/zrok
- cmd: xcrun notarytool submit "dist/zrok-amd64_darwin_amd64_v1/zrok.zip" --apple-id {{ .Env.AC_USERNAME }} --password {{ .Env.AC_PASSWORD }} --team-id MN5S649TXM --wait
- cmd: zip "dist/zrok-amd64_darwin_amd64_v1/zrok2.zip" dist/zrok-amd64_darwin_amd64_v1/zrok2
- cmd: xcrun notarytool submit "dist/zrok-amd64_darwin_amd64_v1/zrok2.zip" --apple-id {{ .Env.AC_USERNAME }} --password {{ .Env.AC_PASSWORD }} --team-id MN5S649TXM --wait
output: true
- id: zrok-arm64
main: ./cmd/zrok
binary: zrok
binary: zrok2
ldflags: "-s -w -X github.com/openziti/zrok/v2/build.Version={{.Tag}} -X github.com/openziti/zrok/v2/build.Hash={{.ShortCommit}}"
env:
- CGO_ENABLED=1
@@ -30,8 +30,8 @@ builds:
- arm64
hooks:
post:
- cmd: 'codesign -s "Developer ID Application: NetFoundry Inc" -v dist/zrok-arm64_darwin_arm64_v8.0/zrok --options=runtime'
- cmd: 'codesign -s "Developer ID Application: NetFoundry Inc" -v dist/zrok-arm64_darwin_arm64_v8.0/zrok2 --options=runtime'
output: true
- cmd: zip "dist/zrok-arm64_darwin_arm64_v8.0/zrok.zip" dist/zrok-arm64_darwin_arm64_v8.0/zrok
- cmd: xcrun notarytool submit "dist/zrok-arm64_darwin_arm64_v8.0/zrok.zip" --apple-id {{ .Env.AC_USERNAME }} --password {{ .Env.AC_PASSWORD }} --team-id MN5S649TXM --wait
- cmd: zip "dist/zrok-arm64_darwin_arm64_v8.0/zrok2.zip" dist/zrok-arm64_darwin_arm64_v8.0/zrok2
- cmd: xcrun notarytool submit "dist/zrok-arm64_darwin_arm64_v8.0/zrok2.zip" --apple-id {{ .Env.AC_USERNAME }} --password {{ .Env.AC_PASSWORD }} --team-id MN5S649TXM --wait
output: true
+26 -26
View File
@@ -2,7 +2,7 @@ version: 2
builds:
- id: zrok-amd64
main: ./cmd/zrok
binary: zrok
binary: zrok2
ldflags: "-s -w -X github.com/openziti/zrok/v2/build.Version={{.Tag}} -X github.com/openziti/zrok/v2/build.Hash={{.ShortCommit}}"
env:
- CGO_ENABLED=1
@@ -12,7 +12,7 @@ builds:
- amd64
nfpms:
- package_name: zrok
- package_name: zrok2
id: zrok-cli
vendor: NetFoundry
homepage: https://zrok.io/
@@ -51,18 +51,18 @@ nfpms:
# Contents to add to the package.
contents:
- src: /opt/openziti/bin/zrok
dst: /usr/bin/zrok
- src: /opt/openziti/bin/zrok2
dst: /usr/bin/zrok2
type: "symlink"
- package_name: zrok-share
- package_name: zrok2-share
id: zrok-share
vendor: NetFoundry
homepage: https://zrok.io/
maintainer: support@zrok.io
description: |-
This package provides zrok-share.service. To enable, edit the "/opt/openziti/etc/zrok/zrok-share.env" file with the
desired target for sharing, and run "systemctl enable --now zrok-share.service".
This package provides zrok2-share.service. To enable, edit the "/opt/openziti/etc/zrok2/zrok2-share.env" file with the
desired target for sharing, and run "systemctl enable --now zrok2-share.service".
license: Apache 2.0
# do not bundle the built binaries, only supporting files
@@ -90,10 +90,10 @@ nfpms:
# GoReleaser will automatically add the binaries here
dependencies:
- zrok
- zrok2
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
# apt install --no-recommends zrok-share
# apt install --no-recommends zrok2-share
recommends:
- jq
@@ -101,49 +101,49 @@ nfpms:
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
rpm:
dependencies:
- zrok
- zrok2
- jq
# Contents to add to the package.
contents:
- dst: /lib/systemd/system/
src: ./nfpm/zrok-share.service
src: ./nfpm/zrok2-share.service
- dst: /usr/lib/systemd/user/
src: ./nfpm/zrok-share@.service
src: ./nfpm/zrok2-share@.service
- dst: /opt/openziti/etc/zrok
- dst: /opt/openziti/etc/zrok2
type: dir
file_info:
mode: 0755
- dst: /opt/openziti/bin/
src: ./nfpm/zrok-share.bash
src: ./nfpm/zrok2-share.bash
file_info:
mode: 0755
- dst: /opt/openziti/bin/
src: ./nfpm/zrok-enable.bash
src: ./nfpm/zrok2-enable.bash
file_info:
mode: 0755
- dst: /opt/openziti/etc/zrok/
src: ./nfpm/zrok-share.env
- dst: /opt/openziti/etc/zrok2/
src: ./nfpm/zrok2-share.env
type: config|noreplace
- dst: /opt/openziti/etc/zrok/
- dst: /opt/openziti/etc/zrok2/
src: ./etc/caddy/multiple_upstream.Caddyfile
type: config|noreplace
- package_name: zrok-agent
- package_name: zrok2-agent
id: zrok-agent
vendor: NetFoundry
homepage: https://zrok.io/
maintainer: support@zrok.io
description: |
This package provides zrok-agent.service. Enable your zrok account on this device with "zrok enable". Run
"systemctl enable --user --now zrok-agent.service" to enable the service for the current user and visit the agent
UI by running "zrok agent console".
This package provides zrok2-agent.service. Enable your zrok account on this device with "zrok2 enable". Run
"systemctl enable --user --now zrok2-agent.service" to enable the service for the current user and visit the agent
UI by running "zrok2 agent console".
license: Apache 2.0
# do not bundle the built binaries, only supporting files
@@ -171,19 +171,19 @@ nfpms:
# GoReleaser will automatically add the binaries here
dependencies:
- zrok
- zrok2
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
# apt install --no-recommends zrok-share
# apt install --no-recommends zrok2-share
recommends: []
overrides:
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
rpm:
dependencies:
- zrok
- zrok2
# Contents to add to the package.
contents:
- dst: /usr/lib/systemd/user/
src: ./nfpm/zrok-agent.service
src: ./nfpm/zrok2-agent.service
+26 -26
View File
@@ -2,7 +2,7 @@ version: 2
builds:
- id: zrok-armv8
main: ./cmd/zrok
binary: zrok
binary: zrok2
ldflags: "-s -w -X github.com/openziti/zrok/v2/build.Version={{.Tag}} -X github.com/openziti/zrok/v2/build.Hash={{.ShortCommit}}"
env:
- CC=aarch64-linux-gnu-gcc
@@ -16,7 +16,7 @@ builds:
- 8
nfpms:
- package_name: zrok
- package_name: zrok2
id: zrok-cli
vendor: NetFoundry
homepage: https://zrok.io/
@@ -55,18 +55,18 @@ nfpms:
# Contents to add to the package.
contents:
- src: /opt/openziti/bin/zrok
dst: /usr/bin/zrok
- src: /opt/openziti/bin/zrok2
dst: /usr/bin/zrok2
type: "symlink"
- package_name: zrok-share
- package_name: zrok2-share
id: zrok-share
vendor: NetFoundry
homepage: https://zrok.io/
maintainer: support@zrok.io
description: |-
This package provides zrok-share.service. To enable, edit the "/opt/openziti/etc/zrok/zrok-share.env" file with the
desired target for sharing, and run "systemctl enable --now zrok-share.service".
This package provides zrok2-share.service. To enable, edit the "/opt/openziti/etc/zrok2/zrok2-share.env" file with the
desired target for sharing, and run "systemctl enable --now zrok2-share.service".
license: Apache 2.0
# do not bundle the built binaries, only supporting files
@@ -94,10 +94,10 @@ nfpms:
# GoReleaser will automatically add the binaries here
dependencies:
- zrok
- zrok2
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
# apt install --no-recommends zrok-share
# apt install --no-recommends zrok2-share
recommends:
- jq
@@ -105,49 +105,49 @@ nfpms:
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
rpm:
dependencies:
- zrok
- zrok2
- jq
# Contents to add to the package.
contents:
- dst: /lib/systemd/system/
src: ./nfpm/zrok-share.service
src: ./nfpm/zrok2-share.service
- dst: /usr/lib/systemd/user/
src: ./nfpm/zrok-share@.service
src: ./nfpm/zrok2-share@.service
- dst: /opt/openziti/etc/zrok
- dst: /opt/openziti/etc/zrok2
type: dir
file_info:
mode: 0755
- dst: /opt/openziti/bin/
src: ./nfpm/zrok-share.bash
src: ./nfpm/zrok2-share.bash
file_info:
mode: 0755
- dst: /opt/openziti/bin/
src: ./nfpm/zrok-enable.bash
src: ./nfpm/zrok2-enable.bash
file_info:
mode: 0755
- dst: /opt/openziti/etc/zrok/
src: ./nfpm/zrok-share.env
- dst: /opt/openziti/etc/zrok2/
src: ./nfpm/zrok2-share.env
type: config|noreplace
- dst: /opt/openziti/etc/zrok/
- dst: /opt/openziti/etc/zrok2/
src: ./etc/caddy/multiple_upstream.Caddyfile
type: config|noreplace
- package_name: zrok-agent
- package_name: zrok2-agent
id: zrok-agent
vendor: NetFoundry
homepage: https://zrok.io/
maintainer: support@zrok.io
description: |
This package provides zrok-agent.service. Enable your zrok account on this device with "zrok enable". Run
"systemctl enable --user --now zrok-agent.service" to enable the service for the current user and visit the agent
UI by running "zrok agent console".
This package provides zrok2-agent.service. Enable your zrok account on this device with "zrok2 enable". Run
"systemctl enable --user --now zrok2-agent.service" to enable the service for the current user and visit the agent
UI by running "zrok2 agent console".
license: Apache 2.0
# do not bundle the built binaries, only supporting files
@@ -175,19 +175,19 @@ nfpms:
# GoReleaser will automatically add the binaries here
dependencies:
- zrok
- zrok2
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
# apt install --no-recommends zrok-share
# apt install --no-recommends zrok2-share
recommends: []
overrides:
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
rpm:
dependencies:
- zrok
- zrok2
# Contents to add to the package.
contents:
- dst: /usr/lib/systemd/user/
src: ./nfpm/zrok-agent.service
src: ./nfpm/zrok2-agent.service
+26 -26
View File
@@ -5,7 +5,7 @@ version: 2
builds:
- id: zrok-armel
main: ./cmd/zrok
binary: zrok
binary: zrok2
ldflags:
- "-s -w -X github.com/openziti/zrok/v2/build.Version={{.Tag}} -X github.com/openziti/zrok/v2/build.Hash={{.ShortCommit}}"
env:
@@ -20,7 +20,7 @@ builds:
- 7
nfpms:
- package_name: zrok
- package_name: zrok2
id: zrok-cli
vendor: NetFoundry
homepage: https://zrok.io/
@@ -59,18 +59,18 @@ nfpms:
# Contents to add to the package.
contents:
- src: /opt/openziti/bin/zrok
dst: /usr/bin/zrok
- src: /opt/openziti/bin/zrok2
dst: /usr/bin/zrok2
type: "symlink"
- package_name: zrok-share
- package_name: zrok2-share
id: zrok-share
vendor: NetFoundry
homepage: https://zrok.io/
maintainer: support@zrok.io
description: |-
This package provides zrok-share.service. To enable, edit the "/opt/openziti/etc/zrok/zrok-share.env" file with the
desired target for sharing, and run "systemctl enable --now zrok-share.service".
This package provides zrok2-share.service. To enable, edit the "/opt/openziti/etc/zrok2/zrok2-share.env" file with the
desired target for sharing, and run "systemctl enable --now zrok2-share.service".
license: Apache 2.0
# do not bundle the built binaries, only supporting files
@@ -98,10 +98,10 @@ nfpms:
# GoReleaser will automatically add the binaries here
dependencies:
- zrok
- zrok2
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
# apt install --no-recommends zrok-share
# apt install --no-recommends zrok2-share
recommends:
- jq
@@ -109,49 +109,49 @@ nfpms:
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
rpm:
dependencies:
- zrok
- zrok2
- jq
# Contents to add to the package.
contents:
- dst: /lib/systemd/system/
src: ./nfpm/zrok-share.service
src: ./nfpm/zrok2-share.service
- dst: /usr/lib/systemd/user/
src: ./nfpm/zrok-share@.service
src: ./nfpm/zrok2-share@.service
- dst: /opt/openziti/etc/zrok
- dst: /opt/openziti/etc/zrok2
type: dir
file_info:
mode: 0755
- dst: /opt/openziti/bin/
src: ./nfpm/zrok-share.bash
src: ./nfpm/zrok2-share.bash
file_info:
mode: 0755
- dst: /opt/openziti/bin/
src: ./nfpm/zrok-enable.bash
src: ./nfpm/zrok2-enable.bash
file_info:
mode: 0755
- dst: /opt/openziti/etc/zrok/
src: ./nfpm/zrok-share.env
- dst: /opt/openziti/etc/zrok2/
src: ./nfpm/zrok2-share.env
type: config|noreplace
- dst: /opt/openziti/etc/zrok/
- dst: /opt/openziti/etc/zrok2/
src: ./etc/caddy/multiple_upstream.Caddyfile
type: config|noreplace
- package_name: zrok-agent
- package_name: zrok2-agent
id: zrok-agent
vendor: NetFoundry
homepage: https://zrok.io/
maintainer: support@zrok.io
description: |
This package provides zrok-agent.service. Enable your zrok account on this device with "zrok enable". Run
"systemctl enable --user --now zrok-agent.service" to enable the service for the current user and visit the agent
UI by running "zrok agent console".
This package provides zrok2-agent.service. Enable your zrok account on this device with "zrok2 enable". Run
"systemctl enable --user --now zrok2-agent.service" to enable the service for the current user and visit the agent
UI by running "zrok2 agent console".
license: Apache 2.0
# do not bundle the built binaries, only supporting files
@@ -179,19 +179,19 @@ nfpms:
# GoReleaser will automatically add the binaries here
dependencies:
- zrok
- zrok2
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
# apt install --no-recommends zrok-share
# apt install --no-recommends zrok2-share
recommends: []
overrides:
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
rpm:
dependencies:
- zrok
- zrok2
# Contents to add to the package.
contents:
- dst: /usr/lib/systemd/user/
src: ./nfpm/zrok-agent.service
src: ./nfpm/zrok2-agent.service
+26 -26
View File
@@ -3,7 +3,7 @@ version: 2
builds:
- id: zrok-armhf
main: ./cmd/zrok
binary: zrok
binary: zrok2
ldflags:
- "-s -w -X github.com/openziti/zrok/v2/build.Version={{.Tag}} -X github.com/openziti/zrok/v2/build.Hash={{.ShortCommit}}"
env:
@@ -18,7 +18,7 @@ builds:
- 7
nfpms:
- package_name: zrok
- package_name: zrok2
id: zrok-cli
vendor: NetFoundry
homepage: https://zrok.io/
@@ -57,18 +57,18 @@ nfpms:
# Contents to add to the package.
contents:
- src: /opt/openziti/bin/zrok
dst: /usr/bin/zrok
- src: /opt/openziti/bin/zrok2
dst: /usr/bin/zrok2
type: "symlink"
- package_name: zrok-share
- package_name: zrok2-share
id: zrok-share
vendor: NetFoundry
homepage: https://zrok.io/
maintainer: support@zrok.io
description: |-
This package provides zrok-share.service. To enable, edit the "/opt/openziti/etc/zrok/zrok-share.env" file with the
desired target for sharing, and run "systemctl enable --now zrok-share.service".
This package provides zrok2-share.service. To enable, edit the "/opt/openziti/etc/zrok2/zrok2-share.env" file with the
desired target for sharing, and run "systemctl enable --now zrok2-share.service".
license: Apache 2.0
# do not bundle the built binaries, only supporting files
@@ -96,10 +96,10 @@ nfpms:
# GoReleaser will automatically add the binaries here
dependencies:
- zrok
- zrok2
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
# apt install --no-recommends zrok-share
# apt install --no-recommends zrok2-share
recommends:
- jq
@@ -107,49 +107,49 @@ nfpms:
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
rpm:
dependencies:
- zrok
- zrok2
- jq
# Contents to add to the package.
contents:
- dst: /lib/systemd/system/
src: ./nfpm/zrok-share.service
src: ./nfpm/zrok2-share.service
- dst: /usr/lib/systemd/user/
src: ./nfpm/zrok-share@.service
src: ./nfpm/zrok2-share@.service
- dst: /opt/openziti/etc/zrok
- dst: /opt/openziti/etc/zrok2
type: dir
file_info:
mode: 0755
- dst: /opt/openziti/bin/
src: ./nfpm/zrok-share.bash
src: ./nfpm/zrok2-share.bash
file_info:
mode: 0755
- dst: /opt/openziti/bin/
src: ./nfpm/zrok-enable.bash
src: ./nfpm/zrok2-enable.bash
file_info:
mode: 0755
- dst: /opt/openziti/etc/zrok/
src: ./nfpm/zrok-share.env
- dst: /opt/openziti/etc/zrok2/
src: ./nfpm/zrok2-share.env
type: config|noreplace
- dst: /opt/openziti/etc/zrok/
- dst: /opt/openziti/etc/zrok2/
src: ./etc/caddy/multiple_upstream.Caddyfile
type: config|noreplace
- package_name: zrok-agent
- package_name: zrok2-agent
id: zrok-agent
vendor: NetFoundry
homepage: https://zrok.io/
maintainer: support@zrok.io
description: |
This package provides zrok-agent.service. Enable your zrok account on this device with "zrok enable". Run
"systemctl enable --user --now zrok-agent.service" to enable the service for the current user and visit the agent
UI by running "zrok agent console".
This package provides zrok2-agent.service. Enable your zrok account on this device with "zrok2 enable". Run
"systemctl enable --user --now zrok2-agent.service" to enable the service for the current user and visit the agent
UI by running "zrok2 agent console".
license: Apache 2.0
# do not bundle the built binaries, only supporting files
@@ -177,19 +177,19 @@ nfpms:
# GoReleaser will automatically add the binaries here
dependencies:
- zrok
- zrok2
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
# apt install --no-recommends zrok-share
# apt install --no-recommends zrok2-share
recommends: []
overrides:
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
rpm:
dependencies:
- zrok
- zrok2
# Contents to add to the package.
contents:
- dst: /usr/lib/systemd/user/
src: ./nfpm/zrok-agent.service
src: ./nfpm/zrok2-agent.service
+1 -1
View File
@@ -1,7 +1,7 @@
version: 2
builds:
- main: ./cmd/zrok
binary: zrok
binary: zrok2
ldflags: "-s -w -X github.com/openziti/zrok/v2/build.Version={{.Tag}} -X github.com/openziti/zrok/v2/build.Hash={{.ShortCommit}}"
env:
- CGO_ENABLED=1
+21 -12
View File
@@ -2,34 +2,43 @@
## v2.0.0
FEATURE: Major changes to how "unique names" and "reserved sharing" work. See the [zrok v2 Migration Guide](https://docs.zrok.io) for details. Reserved sharing, including the `zrok reserve`, `zrok release` and `zrok share reserved` commands have been removed. Namespaces and reserved names replace these concepts in a much more powerful, flexible way which can accomplis what reserved sharing did in a much better way. (https://github.com/openziti/zrok/issues/726)
FEATURE: Major changes to how "unique names" and "reserved sharing" work. See the [zrok v2 Migration Guide](https://docs.zrok.io) for details. Reserved sharing, including the `zrok reserve`, `zrok release` and `zrok share reserved` commands have been removed. Namespaces and reserved names replace these concepts in a much more powerful, flexible way which can accomplish what reserved sharing did in a much better way. (https://github.com/openziti/zrok/issues/726)
FEATURE: `zrok share private` now includes a `--share-token` flag, which allows a user to create a vanity token for private shares. Now that reserved sharing has been replaced with namespaces, the `--share-token` flag allows private sharing to retain custom, persistent share token names. (https://github.com/openziti/zrok/issues/1070)
FEATURE: `zrok2 share private` now includes a `--share-token` flag, which allows a user to create a vanity token for private shares. Now that reserved sharing has been replaced with namespaces, the `--share-token` flag allows private sharing to retain custom, persistent share token names. (https://github.com/openziti/zrok/issues/1070)
FEATURE: `zrok modify name` command available to "upgrade" an ephemeral share name to a reserved share name. If you share something ephemerally and later decide that you want to persist that name for future use you can just `zrok modify name -r` that name and retain it indefinitely (or conversely `zrok modify name -r=false` to schedule a reserved name to be released when an associated share is terminated). (https://github.com/openziti/zrok/issues/1066)
FEATURE: `zrok2 modify name` command available to "upgrade" an ephemeral share name to a reserved share name. If you share something ephemerally and later decide that you want to persist that name for future use you can just `zrok2 modify name -r` that name and retain it indefinitely (or conversely `zrok2 modify name -r=false` to schedule a reserved name to be released when an associated share is terminated). (https://github.com/openziti/zrok/issues/1066)
FEATURE: New `zrok list names`, `zrok list namespaces`, `zrok list environments`, `zrok list shares`, and `zrok list accesses` commands available to query the environments, shares, and accesses contained in the user's account; supports filtering on activity, accesses, shares, descriptions, host, ip address, and other relevant search criteria. By default outputs human-readable tabular output, but has a `--json` option to emit the values as JSON. (https://github.com/openziti/zrok/issues/1107)
FEATURE: New `zrok2 list names`, `zrok2 list namespaces`, `zrok2 list environments`, `zrok2 list shares`, and `zrok2 list accesses` commands available to query the environments, shares, and accesses contained in the user's account; supports filtering on activity, accesses, shares, descriptions, host, ip address, and other relevant search criteria. By default outputs human-readable tabular output, but has a `--json` option to emit the values as JSON. (https://github.com/openziti/zrok/issues/1107)
FEATURE: New `zrok delete environment` command that allows for deleting environments other than the current enabled environment. Use `zrok list environments --idle` to find idle environments and remove them using `zrok delete environment`. (https://github.com/openziti/zrok/issues/1107)
FEATURE: New `zrok2 delete environment` command that allows for deleting environments other than the current enabled environment. Use `zrok2 list environments --idle` to find idle environments and remove them using `zrok2 delete environment`. (https://github.com/openziti/zrok/issues/1107)
FEATURE: New `zrok access dynamicProxy` which is designed to work with the new namespaces/names functionality. Rather than parsing the `Host` header and trying to extract a share token, the new `dynamicProxy` receives mapping updates from the zrok controller, allowing it to support any kind of mapped name. See the [zrok dynamicProxy Guide](https://docs.zrok.io) for details on setting up the new frontend. `zrok access public` remains available for legacy-style setups. (https://github.com/openziti/zrok/issues/1041)
FEATURE: New `zrok2 access dynamicProxy` which is designed to work with the new namespaces/names functionality. Rather than parsing the `Host` header and trying to extract a share token, the new `dynamicProxy` receives mapping updates from the zrok controller, allowing it to support any kind of mapped name. See the [zrok dynamicProxy Guide](https://docs.zrok.io) for details on setting up the new frontend. `zrok2 access public` remains available for legacy-style setups. (https://github.com/openziti/zrok/issues/1041)
FEATURE: The zrok Agent now includes significantly improved handling for subordinate processes in error states. Errors encountered during agent reloading and also during active runtime are retried using an exponential falloff approach. Errored accesses or shares are given transient `err_XXXX` tokens, which can be used to manage (release) these processes. (https://github.com/openziti/zrok/issues/1000)
FEATURE: The zrok Agent has been updated for v2 name selections. Now that "reserved shares" have been replaced with reserved names, the zrok Agent will automatically restart any share which contains a name selection with a reserved name. The Agent continues to automatically manage `zrok access private` processes as always.
FEATURE: The zrok Agent has been updated for v2 name selections. Now that "reserved shares" have been replaced with reserved names, the zrok Agent will automatically restart any share which contains a name selection with a reserved name. The Agent continues to automatically manage `zrok2 access private` processes as always.
FEATURE: `zrok overview` now includes a human-readable default output, that formats the details of your zrok account in an easy-to-understand format. The classic JSON output is still available using the `--json` flag. (https://github.com/openziti/zrok/issues/1064)
FEATURE: `zrok2 overview` now includes a human-readable default output, that formats the details of your zrok account in an easy-to-understand format. The classic JSON output is still available using the `--json` flag. (https://github.com/openziti/zrok/issues/1064)
FEATURE: `zrok admin migrate` now supports a `--down <n>` flag, which allows for reverse-migration by a specified number of migrations
FEATURE: `zrok2 admin migrate` now supports a `--down <n>` flag, which allows for reverse-migration by a specified number of migrations
CHANGE: The root package path was migrated from `github.com/openziti/zrok` to `github.com/openziti/zrok/v2` to accomodate golang v2+ package naming semantics.
CHANGE: `zrok status` now shows `EnvZId` instead of `Ziti Identity` in output. (https://github.com/openziti/zrok/issues/1107)
CHANGE: **Binary renamed from `zrok` to `zrok2`**. This allows zrok v1 and v2 to coexist on the same system without conflicts. All command invocations now use `zrok2` (e.g., `zrok2 enable`, `zrok2 share public`). (https://github.com/openziti/zrok/issues/1124)
CHANGE: **Environment directory changed from `~/.zrok` to `~/.zrok2`**. This provides complete isolation between v1 and v2 environments. Users running `zrok2 enable` will create a new environment in `~/.zrok2`; existing `~/.zrok` environments are not affected. (https://github.com/openziti/zrok/issues/1124)
CHANGE: **Environment variables renamed from `ZROK_*` to `ZROK2_*`**. All environment variables now use the `ZROK2_` prefix (e.g., `ZROK2_API_ENDPOINT`, `ZROK2_ADMIN_TOKEN`, `ZROK2_ENABLE_TOKEN`). This ensures v1 and v2 environment configurations do not interfere with each other. (https://github.com/openziti/zrok/issues/1124)
CHANGE: **Linux packages renamed to `zrok2`, `zrok2-share`, `zrok2-agent`**. Systemd service files renamed to `zrok2-agent.service`, `zrok2-share.service`, `zrok2-share@.service`. Configuration directory changed to `/opt/openziti/etc/zrok2`. (https://github.com/openziti/zrok/issues/1124)
CHANGE: **Removed `env_v0_3` compatibility layer**. Since zrok2 uses `~/.zrok2` exclusively and will never touch `~/.zrok`, the v0.3 environment migration code has been removed. The update infrastructure remains for future version upgrades.
CHANGE: `zrok2 status` now shows `EnvZId` instead of `Ziti Identity` in output. (https://github.com/openziti/zrok/issues/1107)
CHANGE: `defaultFrontend` configuration replaced with new `defaultNamespace`, which provides the logical equivalent of the old name-handling configuration (https://github.com/openziti/zrok/issues/1065)
CHANGE: `zrok admin create frontend`, `zrok admin update frontend` now include a new `--dynamic` flag which allows setting/changing the value of the `dynamic` property in the frontend. Setting `dynamic` is required when configuring a `dynamicProxy` frontend. `zrok admin list frontends` now displays the `dynamic` value of the frontends in the system. `zrok admin list frontends` includes a new `--extra` flag to display the additional/v1 properties maintained for frontends. (https://github.com/openziti/zrok/issues/1096)
CHANGE: `zrok2 admin create frontend`, `zrok2 admin update frontend` now include a new `--dynamic` flag which allows setting/changing the value of the `dynamic` property in the frontend. Setting `dynamic` is required when configuring a `dynamicProxy` frontend. `zrok2 admin list frontends` now displays the `dynamic` value of the frontends in the system. `zrok2 admin list frontends` includes a new `--extra` flag to display the additional/v1 properties maintained for frontends. (https://github.com/openziti/zrok/issues/1096)
CHANGE: Completely overhauled the core ziti automation logic. The legacy `controller/zrokEdgeSdk` package has been replaced with a much more streamlined, clearer package `controller/automation`. This makes comprehending the controller code a lot simpler. (https://github.com/openziti/zrok/issues/1054)
+1 -1
View File
@@ -3,7 +3,7 @@ package agent
import (
"github.com/michaelquigley/df/dl"
"github.com/openziti/zrok/v2/agent/proctree"
"github.com/openziti/zrok/v2/cmd/zrok/subordinate"
"github.com/openziti/zrok/v2/cmd/zrok2/subordinate"
)
type AccessPrivateRequest struct {
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"github.com/michaelquigley/df/dl"
"github.com/openziti/zrok/v2/agent/agentGrpc"
"github.com/openziti/zrok/v2/agent/proctree"
"github.com/openziti/zrok/v2/cmd/zrok/subordinate"
"github.com/openziti/zrok/v2/cmd/zrok2/subordinate"
"github.com/openziti/zrok/v2/environment"
)
@@ -19,7 +19,7 @@ func (a *Agent) AccessPrivate(req *AccessPrivateRequest) (frontendToken string,
}
if !root.IsEnabled() {
return "", errors.New("unable to load environment; did you 'zrok enable'?")
return "", errors.New("unable to load environment; did you 'zrok2 enable'?")
}
// build command using CommandBuilder
+1 -1
View File
@@ -38,7 +38,7 @@ type Agent struct {
func NewAgent(cfg *AgentConfig, root env_core.Root) (*Agent, error) {
if !root.IsEnabled() {
return nil, errors.Errorf("unable to load environment; did you 'zrok enable'?")
return nil, errors.Errorf("unable to load environment; did you 'zrok2 enable'?")
}
a := &Agent{
cfg: cfg,
+2 -2
View File
@@ -4,7 +4,7 @@ import (
"errors"
"github.com/michaelquigley/df/dl"
"github.com/openziti/zrok/v2/cmd/zrok/subordinate"
"github.com/openziti/zrok/v2/cmd/zrok2/subordinate"
"github.com/openziti/zrok/v2/sdk/golang/sdk"
)
@@ -119,4 +119,4 @@ func NewAccessBootHandler(acc *access, bootErr *error) *UnifiedBootHandler {
OperationType: "access",
}
return NewBootHandler(config, bootErr)
}
}
+1 -2
View File
@@ -5,7 +5,7 @@ import (
"github.com/michaelquigley/df/dl"
"github.com/openziti/zrok/v2/agent/proctree"
"github.com/openziti/zrok/v2/cmd/zrok/subordinate"
"github.com/openziti/zrok/v2/cmd/zrok2/subordinate"
"github.com/openziti/zrok/v2/sdk/golang/sdk"
)
@@ -83,4 +83,3 @@ func (s *share) monitor() {
s.processExited = true
s.agent.rmShare <- s
}
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"github.com/michaelquigley/df/dl"
"github.com/openziti/zrok/v2/agent/agentGrpc"
"github.com/openziti/zrok/v2/agent/proctree"
"github.com/openziti/zrok/v2/cmd/zrok/subordinate"
"github.com/openziti/zrok/v2/cmd/zrok2/subordinate"
"github.com/openziti/zrok/v2/environment"
"github.com/openziti/zrok/v2/sdk/golang/sdk"
)
@@ -20,7 +20,7 @@ func (a *Agent) SharePrivate(req *SharePrivateRequest) (shareToken string, err e
}
if !root.IsEnabled() {
return "", errors.New("unable to load environment; did you 'zrok enable'?")
return "", errors.New("unable to load environment; did you 'zrok2 enable'?")
}
shr := &share{
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"github.com/michaelquigley/df/dl"
"github.com/openziti/zrok/v2/agent/agentGrpc"
"github.com/openziti/zrok/v2/agent/proctree"
"github.com/openziti/zrok/v2/cmd/zrok/subordinate"
"github.com/openziti/zrok/v2/cmd/zrok2/subordinate"
"github.com/openziti/zrok/v2/environment"
"github.com/openziti/zrok/v2/sdk/golang/sdk"
)
@@ -20,7 +20,7 @@ func (a *Agent) SharePublic(req *SharePublicRequest) (shareToken string, fronten
}
if !root.IsEnabled() {
return "", nil, errors.New("unable to load environment; did you 'zrok enable'?")
return "", nil, errors.New("unable to load environment; did you 'zrok2 enable'?")
}
shr := &share{
+1 -1
View File
@@ -6,7 +6,7 @@ import (
)
func AcknowledgeDangerousCanary() error {
if _, ok := os.LookupEnv("ZROK_DANGEROUS_CANARY"); !ok {
if _, ok := os.LookupEnv("ZROK2_DANGEROUS_CANARY"); !ok {
return fmt.Errorf("this is a dangerous canary; see canary docs for details on enabling")
}
return nil
@@ -18,7 +18,7 @@ import (
"github.com/michaelquigley/df/dl"
"github.com/openziti/zrok/v2/agent/agentClient"
"github.com/openziti/zrok/v2/agent/agentGrpc"
"github.com/openziti/zrok/v2/cmd/zrok/subordinate"
"github.com/openziti/zrok/v2/cmd/zrok2/subordinate"
"github.com/openziti/zrok/v2/endpoints"
"github.com/openziti/zrok/v2/endpoints/proxy"
"github.com/openziti/zrok/v2/endpoints/proxyUi"
@@ -95,7 +95,7 @@ func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
detectAndRouteToAgent(
@@ -40,7 +40,7 @@ func (cmd *agentEnrollCommand) run(_ *cobra.Command, _ []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
enrlPath, err := root.AgentEnrollment()
@@ -50,7 +50,7 @@ func (cmd *agentEnrollCommand) run(_ *cobra.Command, _ []string) {
_, err = agent.LoadEnrollment(enrlPath)
if err == nil {
tui.Error("agent already enrolled; 'zrok agent unenroll' first", nil)
tui.Error("agent already enrolled; 'zrok2 agent unenroll' first", nil)
}
if !cmd.headless {
@@ -43,7 +43,7 @@ func (cmd *agentStartCommand) run(_ *cobra.Command, _ []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
cfg := agent.DefaultConfig()
@@ -37,7 +37,7 @@ func (cmd *agentUnenrollCommand) run(_ *cobra.Command, _ []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
enrlPath, err := root.AgentEnrollment()
@@ -46,12 +46,12 @@ func (cmd *agentUnenrollCommand) run(_ *cobra.Command, _ []string) {
}
if _, err := os.Stat(enrlPath); os.IsNotExist(err) {
tui.Error("agent not enrolled; use 'zrok agent enroll' to enroll", nil)
tui.Error("agent not enrolled; use 'zrok2 agent enroll' to enroll", nil)
}
_, err = agent.LoadEnrollment(enrlPath)
if err != nil {
tui.Warning("error loading agent enrollment; use 'zrok agent enroll' to enroll", err)
tui.Warning("error loading agent enrollment; use 'zrok2 agent enroll' to enroll", err)
}
zrok, err := root.Client()
@@ -19,7 +19,7 @@ func newConfigGetCommand() *configGetCommand {
cmd := &cobra.Command{
Use: "get <configName>",
Short: "Get a value from the environment config",
Long: "Get a value from the environment config. Use 'zrok status' to list available configuration names and current values.",
Long: "Get a value from the environment config. Use 'zrok2 status' to list available configuration names and current values.",
Args: cobra.ExactArgs(1),
}
command := &configGetCommand{cmd: cmd}
@@ -24,7 +24,7 @@ func newConfigSetCommand() *configSetCommand {
cmd := &cobra.Command{
Use: "set <configName> <value>",
Short: "Set a value into the environment config",
Long: "Set a value into the environment config. Use 'zrok status' to list available configuration names and current values.",
Long: "Set a value into the environment config. Use 'zrok2 status' to list available configuration names and current values.",
Args: cobra.ExactArgs(2),
}
command := &configSetCommand{cmd: cmd}
@@ -63,7 +63,7 @@ func (cmd *configSetCommand) run(_ *cobra.Command, args []string) {
}
fmt.Println("zrok configuration updated")
if env.IsEnabled() {
fmt.Printf("\n[%v]: because you have a %v-d environment, you won't see your config change until you run %v first!\n\n", tui.WarningLabel, tui.Code.Render("zrok enable"), tui.Code.Render("zrok disable"))
fmt.Printf("\n[%v]: because you have a %v-d environment, you won't see your config change until you run %v first!\n\n", tui.WarningLabel, tui.Code.Render("zrok2 enable"), tui.Code.Render("zrok2 disable"))
}
case "defaultNamespace":
@@ -42,7 +42,7 @@ func (cmd *configUnsetCommand) run(_ *cobra.Command, args []string) {
case "apiEndpoint":
cfg.ApiEndpoint = ""
if env.IsEnabled() {
fmt.Printf("\n[%v]: because you have a %v-d environment, you won't see your config change until you run %v first!\n\n", tui.WarningLabel, tui.Code.Render("zrok enable"), tui.Code.Render("zrok disable"))
fmt.Printf("\n[%v]: because you have a %v-d environment, you won't see your config change until you run %v first!\n\n", tui.WarningLabel, tui.Code.Render("zrok2 enable"), tui.Code.Render("zrok2 disable"))
}
case "defaultNamespace":
+1 -1
View File
@@ -37,7 +37,7 @@ func newCopyCommand() *copyCommand {
func (cmd *copyCommand) run(_ *cobra.Command, args []string) {
if cmd.basicAuth == "" {
cmd.basicAuth = os.Getenv("ZROK_DRIVES_BASIC_AUTH")
cmd.basicAuth = os.Getenv("ZROK2_DRIVES_BASIC_AUTH")
}
sourceUrl, err := url.Parse(args[0])
@@ -29,7 +29,7 @@ func newDeleteEnvironmentCommand() *deleteEnvironmentCommand {
Args: cobra.ExactArgs(1),
Long: `Delete a zrok environment other than your current environment.
If you want to delete your current environment, use 'zrok disable' instead,
If you want to delete your current environment, use 'zrok2 disable' instead,
which will also clean up local configuration files.
This command requires a local environment to determine the API endpoint.
@@ -37,9 +37,9 @@ By default, it uses the local environment's account token for authentication.
Use --account-token to authenticate as a different account.
Examples:
zrok delete environment abc123def456
zrok delete environment abc123def456 --force
zrok delete environment abc123def456 --account-token your-token-here
zrok2 delete environment abc123def456
zrok2 delete environment abc123def456 --force
zrok2 delete environment abc123def456 --account-token your-token-here
`,
}
command := &deleteEnvironmentCommand{cmd: cmd}
@@ -64,9 +64,9 @@ func (cmd *deleteEnvironmentCommand) run(_ *cobra.Command, args []string) {
// if we have an enabled environment, check if user is trying to delete it
if env.IsEnabled() && env.Environment().ZitiIdentity == envZIdToDelete {
if !panicInstead {
tui.Error("cannot delete current environment", fmt.Errorf("you are trying to delete your current environment; use 'zrok disable' instead to properly clean up local files"))
tui.Error("cannot delete current environment", fmt.Errorf("you are trying to delete your current environment; use 'zrok2 disable' instead to properly clean up local files"))
}
panic("cannot delete current environment; use 'zrok disable' instead")
panic("cannot delete current environment; use 'zrok2 disable' instead")
}
// confirmation prompt (unless --force is used)
+2 -2
View File
@@ -48,7 +48,7 @@ func (cmd *enableCommand) run(_ *cobra.Command, args []string) {
token := args[0]
if env.IsEnabled() {
tui.Error(fmt.Sprintf("you already have an enabled environment, %v first before you %v", tui.Code.Render("zrok disable"), tui.Code.Render("zrok enable")), nil)
tui.Error(fmt.Sprintf("you already have an enabled environment, %v first before you %v", tui.Code.Render("zrok2 disable"), tui.Code.Render("zrok2 enable")), nil)
}
hostName, hostDetail, username, err := util.GetHostDetails()
@@ -151,7 +151,7 @@ func (cmd *enableCommand) endpointError(apiEndpoint, _ string) {
fmt.Printf("%v\n\n", tui.SeriousBusiness.Render("there was a problem enabling your environment!"))
fmt.Printf("you are trying to use the zrok service at: %v\n\n", tui.Code.Render(apiEndpoint))
fmt.Printf("you can change your zrok service endpoint using this command:\n\n")
fmt.Printf("%v\n\n", tui.Code.Render("$ zrok config set apiEndpoint <newEndpoint>"))
fmt.Printf("%v\n\n", tui.Code.Render("$ zrok2 config set apiEndpoint <newEndpoint>"))
fmt.Printf("(where newEndpoint is something like: %v)\n\n", tui.Code.Render("https://some.zrok.io"))
}
+1 -1
View File
@@ -95,7 +95,7 @@ func (cmd *inviteCommand) endpointError(apiEndpoint, _ string) {
fmt.Printf("%v\n\n", tui.SeriousBusiness.Render("there was a problem creating an invitation!"))
fmt.Printf("you are trying to use the zrok service at: %v\n\n", tui.Code.Render(apiEndpoint))
fmt.Printf("you can change your zrok service endpoint using this command:\n\n")
fmt.Printf("%v\n\n", tui.Code.Render("$ zrok config set apiEndpoint <newEndpoint>"))
fmt.Printf("%v\n\n", tui.Code.Render("$ zrok2 config set apiEndpoint <newEndpoint>"))
fmt.Printf("(where newEndpoint is something like: %v)\n\n", tui.Code.Render("https://some.zrok.io"))
}
+1 -1
View File
@@ -40,7 +40,7 @@ func newLsCommand() *lsCommand {
func (cmd *lsCommand) run(_ *cobra.Command, args []string) {
if cmd.basicAuth == "" {
cmd.basicAuth = os.Getenv("ZROK_DRIVES_BASIC_AUTH")
cmd.basicAuth = os.Getenv("ZROK2_DRIVES_BASIC_AUTH")
}
targetUrl, err := url.Parse(args[0])
+4 -4
View File
@@ -57,7 +57,7 @@ func init() {
var rootCmd = &cobra.Command{
Use: strings.TrimSuffix(filepath.Base(os.Args[0]), filepath.Ext(os.Args[0])),
Short: "zrok",
Short: "zrok2",
PersistentPreRun: func(_ *cobra.Command, _ []string) {
if verbose {
dl.Init(dl.DefaultOptions().SetTrimPrefix(trimPrefix).SetLevel(slog.LevelInfo))
@@ -100,18 +100,18 @@ var adminUpdateCmd = &cobra.Command{
var agentCmd = &cobra.Command{
Use: "agent",
Short: "zrok Agent commands",
Short: "zrok2 Agent commands",
Aliases: []string{"daemon"},
}
var agentReleaseCmd = &cobra.Command{
Use: "release",
Short: "zrok Agent release commands",
Short: "zrok2 Agent release commands",
}
var agentShareCmd = &cobra.Command{
Use: "share",
Short: "zrok Agent share commands",
Short: "zrok2 Agent share commands",
}
var configCmd = &cobra.Command{
+1 -1
View File
@@ -37,7 +37,7 @@ func newMdCommand() *mdCommand {
func (cmd *mdCommand) run(_ *cobra.Command, args []string) {
if cmd.basicAuth == "" {
cmd.basicAuth = os.Getenv("ZROK_DRIVES_BASIC_AUTH")
cmd.basicAuth = os.Getenv("ZROK2_DRIVES_BASIC_AUTH")
}
targetUrl, err := url.Parse(args[0])
@@ -51,7 +51,7 @@ func (cmd *modifyNameCommand) run(_ *cobra.Command, args []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
zrok, err := root.Client()
@@ -44,7 +44,7 @@ func (cmd *modifyShareCommand) run(_ *cobra.Command, args []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
zrok, err := root.Client()
+1 -1
View File
@@ -37,7 +37,7 @@ func newMvCommand() *mvCommand {
func (cmd *mvCommand) run(_ *cobra.Command, args []string) {
if cmd.basicAuth == "" {
cmd.basicAuth = os.Getenv("ZROK_DRIVES_BASIC_AUTH")
cmd.basicAuth = os.Getenv("ZROK2_DRIVES_BASIC_AUTH")
}
targetUrl, err := url.Parse(args[0])
@@ -40,7 +40,7 @@ func (c *orgAdminListCommand) run(_ *cobra.Command, args []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
zrok, err := root.Client()
@@ -39,7 +39,7 @@ func (cmd *orgAdminOverviewCommand) run(_ *cobra.Command, args []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
client := &http.Client{}
@@ -40,7 +40,7 @@ func (c *orgMembershipsCommand) run(_ *cobra.Command, _ []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
zrok, err := root.Client()
@@ -228,7 +228,7 @@ func (cmd *overviewCommand) run(_ *cobra.Command, _ []string) {
if len(overview.Environments) == 0 && len(overview.Names) == 0 && len(overview.Namespaces) == 0 {
fmt.Println("No environments, namespaces, or names found.")
fmt.Println("Run 'zrok enable' to set up your first environment.")
fmt.Println("Run 'zrok2 enable' to set up your first environment.")
fmt.Println()
}
}
@@ -35,7 +35,7 @@ func (cmd *rebaseAccountTokenCommand) run(_ *cobra.Command, args []string) {
}
if !root.IsEnabled() {
tui.Error("environment not enabled; 'zrok enable' your environment instead", nil)
tui.Error("environment not enabled; 'zrok2 enable' your environment instead", nil)
}
env := root.Environment()
@@ -35,7 +35,7 @@ func (cmd *rebaseApiEndpointCommand) run(_ *cobra.Command, args []string) {
}
if !root.IsEnabled() {
tui.Error("environment not enabled; 'zrok enable' your environment instead", nil)
tui.Error("environment not enabled; 'zrok2 enable' your environment instead", nil)
}
currentEndpoint, _ := root.ApiEndpoint()
+1 -1
View File
@@ -37,7 +37,7 @@ func newRmCommand() *rmCommand {
func (cmd *rmCommand) run(_ *cobra.Command, args []string) {
if cmd.basicAuth == "" {
cmd.basicAuth = os.Getenv("ZROK_DRIVES_BASIC_AUTH")
cmd.basicAuth = os.Getenv("ZROK2_DRIVES_BASIC_AUTH")
}
targetUrl, err := url.Parse(args[0])
@@ -15,7 +15,7 @@ import (
"github.com/michaelquigley/df/dl"
"github.com/openziti/zrok/v2/agent/agentClient"
"github.com/openziti/zrok/v2/agent/agentGrpc"
"github.com/openziti/zrok/v2/cmd/zrok/subordinate"
"github.com/openziti/zrok/v2/cmd/zrok2/subordinate"
"github.com/openziti/zrok/v2/endpoints"
"github.com/openziti/zrok/v2/endpoints/drive"
"github.com/openziti/zrok/v2/endpoints/proxy"
@@ -88,7 +88,7 @@ func (cmd *sharePrivateCommand) run(_ *cobra.Command, args []string) {
}
if !root.IsEnabled() {
tui.Error("unable to load environment; did you 'zrok enable'?", nil)
tui.Error("unable to load environment; did you 'zrok2 enable'?", nil)
}
detectAndRouteToAgent(
@@ -133,7 +133,7 @@ func (cmd *sharePrivateCommand) shareLocal(args []string, root env_core.Root) {
cmd.error("unable to create share", err)
}
shareDescription := fmt.Sprintf("access your share with: %v", tui.Code.Render(fmt.Sprintf("zrok access private %v", shr.Token)))
shareDescription := fmt.Sprintf("access your share with: %v", tui.Code.Render(fmt.Sprintf("zrok2 access private %v", shr.Token)))
mdl := newShareModel(shr.Token, []string{shareDescription}, sdk.PrivateShareMode, sdk.BackendMode(cmd.backendMode))
if !cmd.headless && !cmd.subordinate {
proxy.SetCaddyLoggingWriter(mdl)
@@ -305,7 +305,7 @@ func (cmd *sharePrivateCommand) shareLocal(args []string, root env_core.Root) {
}
if cmd.headless && !cmd.subordinate {
dl.Infof("allow other to access your share with the following command:\nzrok access private %v", shr.Token)
dl.Infof("allow other to access your share with the following command:\nzrok2 access private %v", shr.Token)
for {
select {
case req := <-requests:

Some files were not shown because too many files have changed in this diff Show More