Merge branch 'main' into v1_0_0

This commit is contained in:
Michael Quigley 2025-01-31 11:05:01 -05:00
commit ff8e4645e8
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
3 changed files with 13 additions and 12 deletions

View File

@ -1,5 +1,5 @@
---
title: Getting Started with zrok
title: Getting Started
sidebar_label: Getting Started
sidebar_position: 10
---
@ -8,7 +8,7 @@ import { AssetsProvider } from '@site/src/components/assets-context';
import DownloadCard from '@site/src/components/download-card';
import DownloadCardStyles from '@site/src/css/download-card.module.css';
## zrok is your secure internet sharing perimeter
## Your Secure Internet Sharing Perimeter
`zrok` (*/ziːɹɒk/ ZEE-rock*) is a secure, open-source, self-hostable sharing platform that simplifies shielding and sharing network services or files.
There's a hardened zrok-as-a-service offering available at [myzrok.io](https://myzrok.io) with a generous free tier.
@ -55,11 +55,13 @@ There's a hardened zrok-as-a-service offering available at [myzrok.io](https://m
```bash
zrok enable <your_account_token>
```
4. Share `http://localhost:8080`
```bash
zrok share public 8080
```
5. Visit the public URL displayed in your terminal
![zrok share public](images/zrok_share_public.png)
@ -125,7 +127,7 @@ If [sharing privately](./concepts/sharing-private.mdx), only users with the shar
## Enabling Your zrok Environment
After you have [an account](#zrok-is-your-secure-internet-sharing-perimeter), you can enable your `zrok` environment.
After you have [an account](#your-first-share), you can enable your `zrok` environment.
A zrok environment usually refers to an enabled device where shares and accesses can be created, .e.g., `~/.zrok` on a Unix machine. It can be a specific user's environment or a system-wide agent's environment owned by the administrator.
@ -363,7 +365,7 @@ Here's a quick review of the `zrok` mental model and the vocabulary.
You create an _account_ with a `zrok` _instance_. Your account is identified by a username and a password, which you use to log into the _web console_. Your account also has a _secret token_, which you will use to authenticate from the `zrok` command-line to interact with the _instance_.
You create a new _account_ with NetFoundry's `zrok` _instance_ by subscribing in [myzrok.io](https://myzrok.io) or in a self-hosted `zrok` _instance_ by running [the `zrok invite` command](/guides/self-hosting/self-service-invite.mdx).
You create a new _account_ with NetFoundry's `zrok` _instance_ by subscribing in [myzrok.io](https://myzrok.io) or in a self-hosted `zrok` _instance_ by running [the `zrok invite` command](/guides/self-hosting/self-service-invite.mdx) or the `zrok admin create account` command.
### Environment

View File

@ -6,10 +6,10 @@ This is how to set up self-service invitations for your users to get an account
## Overview
- You can create user accounts directly with the `zrok admin` CLI or API.
- You can create user accounts directly with the `zrok admin create account` CLI or API instead of inviting them.
- You can welcome users to invite themselves via email.
- You can generate invitation tokens if you want to restrict self-service invitations.
- To enable self-service invitations you must also configure the controller to send email.
- You can require an invitation token if you want to restrict self-service.
## The Self-Service User Experience

View File

@ -24,14 +24,13 @@ Expected output:
from zrok.proxy import ProxyShare
import zrok
# Load the environment
root = zrok.environment.root.Load()
# Load the user's zrok environment from ~/.zrok
zrok_env = zrok.environment.root.Load()
# Create a temporary proxy share (will be cleaned up on exit)
proxy = ProxyShare.create(root=root, target="http://my-target-service")
proxy = ProxyShare.create(root=zrok_env, target="http://127.0.0.1:3000")
# Access the proxy's endpoints and token
print(f"Access proxy at: {proxy.endpoints}")
print(f"Public URL: {proxy.endpoints}")
proxy.run()
```
@ -43,6 +42,6 @@ To create a share token that persists and can be reused, run the example `proxy.
proxy = ProxyShare.create(
root=root,
target="http://127.0.0.1:3000",
unique_name="my-persistent-proxy"
unique_name="myuniquename"
)
```