zrok/README.md

81 lines
3.6 KiB
Markdown
Raw Normal View History

2023-08-28 23:04:42 +02:00
![zrok](docs/images/zrok_cover.png)
2022-07-19 19:41:12 +02:00
2023-08-28 23:04:42 +02:00
`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_.
2022-10-05 21:14:39 +02:00
2023-08-28 23:05:25 +02:00
`zrok` facilitates sharing resources both publicly and privately. Public sharing allows you to share `zrok` resources with non-`zrok` users over the public internet. Private sharing allows you to directly share your resources peer-to-peer with other `zrok` users without changing your security or firewall settings.
2022-10-05 21:14:39 +02:00
2023-08-28 23:17:57 +02:00
Like other offerings in this space, `zrok` allows users to share 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.
2023-08-28 23:05:25 +02:00
2023-09-07 16:05:57 +02:00
`zrok` is an extensible platform for sharing. Initially we're targeting technical users. Super-simple sharing for end users is planned and in the backlog.
2023-01-31 17:53:57 +01:00
2023-08-28 23:07:34 +02:00
![zrok Web Console](docs/images/zrok_web_console.png)
2023-01-17 21:14:39 +01:00
## Frictionless
2022-10-05 21:14:39 +02:00
2023-08-28 23:05:25 +02:00
You can be up and sharing using the `zrok.io` service in minutes. Here is a synopsis of what's involved:
2023-01-17 21:28:12 +01:00
2023-08-28 23:10:16 +02:00
* Download the binary for your platform [here](https://github.com/openziti/zrok/releases/latest)
2023-01-17 21:14:39 +01:00
* `zrok invite` to create an account with the service
* `zrok enable` to enable your shell environment for sharing with the service
2023-01-17 21:28:12 +01:00
2023-01-17 21:54:37 +01:00
### And then... sharing...
2023-01-17 21:28:12 +01:00
2023-01-17 21:54:37 +01:00
* `zrok share` to share resources immediately, simply and securely
2023-01-17 21:14:39 +01:00
2023-08-28 23:09:01 +02:00
See the [Concepts and Getting Started Guide](https://docs.zrok.io/docs/getting-started) for a full overview.
2023-01-17 21:14:39 +01:00
2023-08-28 23:05:25 +02:00
## 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)
```
2023-08-28 23:12:06 +02:00
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.
2023-01-17 21:14:39 +01:00
## Self-Hosting
2023-01-18 19:41:12 +01:00
`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.
2023-01-17 21:14:39 +01:00
2023-02-01 16:29:29 +01:00
`zrok` is also designed to scale down to support extremely small deployments. Run `zrok` and OpenZiti on a Raspberry Pi!
2023-01-17 21:14:39 +01:00
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.
2023-01-17 21:14:39 +01:00
2023-08-28 23:12:06 +02:00
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.
## Building
2023-01-30 20:27:40 +01:00
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).