https://github.com/openziti/zrok
Geo-scale, next-generation peer-to-peer sharing platform built on top of OpenZiti.
https://github.com/openziti/zrok
file-sharing golang network peer-to-peer reverse-proxy security zero-trust
Last synced: 11 days ago
JSON representation
Geo-scale, next-generation peer-to-peer sharing platform built on top of OpenZiti.
- Host: GitHub
- URL: https://github.com/openziti/zrok
- Owner: openziti
- License: apache-2.0
- Created: 2022-07-18T19:14:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-30T19:08:37.000Z (24 days ago)
- Last Synced: 2025-04-30T19:43:41.033Z (24 days ago)
- Topics: file-sharing, golang, network, peer-to-peer, reverse-proxy, security, zero-trust
- Language: Go
- Homepage: https://zrok.io
- Size: 31.6 MB
- Stars: 3,154
- Watchers: 27
- Forks: 126
- Open Issues: 94
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-repositories - openziti/zrok - Geo-scale, next-generation peer-to-peer sharing platform built on top of OpenZiti. (Go)
- awesome - openziti/zrok - Geo-scale, next-generation peer-to-peer sharing platform built on top of OpenZiti. (Go)
README

**Note: If you upgrade to `v1.0.0` and you receive an error message like this:**
```
[ERROR]: unable to create share (error getting zrok client: client version error accessing api endpoint 'https://api.zrok.io': [POST /clientVersionCheck] clientVersionCheck (status 404): {}: [POST /clientVersionCheck] clientVersionCheck (status 404): {})
```Use the command `zrok rebase apiEndpoint https://api-v1.zrok.io/` to update your environment for the `v1.0.0` release.
## Your Secure Internet Sharing Perimeter
`zrok` is a next-generation, peer-to-peer sharing platform built on top of [OpenZiti](https://docs.openziti.io/docs/learn/introduction/), a programmable zero-trust network overlay. `zrok` is a _Ziti Native Application_.
`zrok` facilitates both public and private sharing. Public sharing allows you to share securely with non-`zrok` users over the public internet. Private sharing allows you to directly share peer-to-peer with other `zrok` users. No security or firewall changes are required for either type of sharing. No inbound connectivity is required. The OpenZiti overlay provides peer-to-peer connectivity without IP addresses, and employs end-to-end encryption for world-class security.
Like other offerings in this space, `zrok` allows users to create tunnels for HTTP, TCP and UDP network resources. `zrok` additionally allows users to easily and rapidly share files, web content, and custom resources in a peer-to-peer manner.

## Frictionless
You can be up and sharing using the `zrok.io` service in minutes. Here is a synopsis of what's involved:
* [Install the package or download the binary for your platform](https://docs.zrok.io/docs/guides/install/).
* `zrok invite` to create an account with the service (use the [NetFoundry hosted zrok.io service](https://docs.zrok.io/docs/getting-started/))
* `zrok enable` to enable your shell environment for sharing with the service### And then... sharing...
Easily share private network resources with public internet users, securely, without having to alter any of your local network configuration:
```
$ zrok share public localhost:8080
```
```
$ curl -s https://dslno640nct4.share.zrok.io | head
```Share "network drives" with public and private users running on Windows, macOS, or Linux systems:
```
$ zrok share public --backend-mode drive ~/Repos/zrok
```
Mounting and working with shared drives is simple, and works with any applications on the end users' systems:

See the [Concepts and Getting Started Guide](https://docs.zrok.io/docs/getting-started) for a full overview.
## The `zrok` SDK
`zrok` includes an SDK that allows you to embed `zrok` sharing capabilities into your own applications. If you're familiar with a golang `net.Conn` and `net.Listener`, you'll be right at home with our SDK.
### A Simple `zrok` Sharing Service
```go
// load enabled zrok environment
root, err := environment.LoadRoot()// request a share for your resource
shr, err := sdk.CreateShare(root, &sdk.ShareRequest{
BackendMode: sdk.TcpTunnelBackendMode,
ShareMode: sdk.PrivateShareMode,
// ...
})// accept requests for your resource
listener, err := sdk.NewListener(shr.Token, root)
```### A Simple `zrok` Client
```go
// load enabled zrok environment
root, err := environment.LoadRoot()// request access to a shared zrok resource
acc, err := sdk.CreateAccess(root, &sdk.AccessRequest{ShareToken: shrToken})// establish a connection to the resource directly
conn, err := sdk.NewDialer(shrToken, root)
```This [blog post](https://blog.openziti.io/the-zrok-sdk) provides more details for [getting started](https://blog.openziti.io/the-zrok-sdk) with the `zrok` SDK.
## Self-Hosting
`zrok` is designed to scale up to support extremely large service instances. `zrok.io` is a public service instance operated by NetFoundry using the same code base that is available to self-hosted environments.
`zrok` is also designed to scale down to support extremely small deployments. Run `zrok` and OpenZiti on a Raspberry Pi!
The single `zrok` binary contains everything you need to operate `zrok` environments and also host your own service instances. Just add an OpenZiti network and you're up and running.
See the [Self-Hosting Guide](https://docs.zrok.io/docs/guides/self-hosting/self_hosting_guide/) for details on getting your own `zrok` service instance running.
## zrok Office Hours
We maintain a growing playlist of videos focusing on various aspects of `zrok`. This includes the "office hours" series, which are longer-format videos digging into the implementation of `zrok` and showcasing some of the latest features and capabilities:
[](https://www.youtube.com/watch?v=Edqv7yRmXb0&list=PLMUj_5fklasLuM6XiCNqwAFBuZD1t2lO2)
## Building
If you are interested in building `zrok` for yourself instead of using a released package, please refer to [BUILD.md](./BUILD.md)
## Contributing
If you'd like to contribute back to `zrok`, that'd be great. Please see our [CONTRIBUTING.md](./CONTRIBUTING.md) page and
abide by the [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).