Giter VIP home page Giter VIP logo

zrok's Introduction

zrok

zrok is a next-generation, peer-to-peer sharing platform built on top of OpenZiti, a programmable zero-trust network overlay. zrok is a Ziti Native Application.

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.

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.

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.

zrok Web Console

Frictionless

You can be up and sharing using the zrok.io service in minutes. Here is a synopsis of what's involved:

  • Download the binary for your platform here
  • zrok invite to create an account with the service
  • 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

zrok share public

$ curl -s https://dslno640nct4.share.zrok.io | head
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta name="theme-color" content="#000000"/>
    <meta name="description" content="zrok ui"/>
    <link rel="preconnect" href="https://fonts.googleapis.com">

Share "network drives" with public and private users running on Windows, macOS, or Linux systems:

$ zrok share public --backend-mode drive ~/Repos/zrok

zrok share public -b drive

Mounting and working with shared drives is simple, and works with any applications on the end users' systems:

mounted zrok drive

See the Concepts and Getting Started Guide 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

// 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

// 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 provides more details for getting started 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 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:

zrok Office Hours

Building

If you are interested in building zrok for yourself instead of using a released package, please refer to BUILD.md

Contributing

If you'd like to contribute back to zrok, that'd be great. Please see our CONTRIBUTING.md page and abide by the CODE_OF_CONDUCT.md.

zrok's People

Contributors

adaptivefailure avatar beaucollins avatar camotts avatar chenrui333 avatar davefinger avatar dovholuknf avatar ekoby avatar kcchouette avatar michaeldavidgk avatar michaelquigley avatar okandas avatar omartariq612 avatar plorenz avatar qrkourier avatar robhumphris avatar sanabel-al-firdaws avatar smilindave26 avatar testwill avatar ziti-ci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zrok's Issues

Environment Automation

Start introducing environment automation. Probably start with ansible, but possibly move to fablab, etc. as time permits.

zrok test endpoint

We're going to need a handful of little utilities for testing and demonstration purposes, including a little HTTP endpoint.

Edge API Authentication

Authentication between the zrok controller and the edge management API is currently hard-coded to username/password authentication using admin/admin. Will need to be hardened for real scenarios.

Un-tunnel (Cleanup)

When a tunnel shuts down, clean up the resources that were created for it.

End User Interface

Start elaborating a basic web application allowing an inexperienced end-user to interact with the zrok service. Shoud facilitate:

  • establishing an account
  • visualizing (and disabling) enabled accounts
  • visualizing (and disabling) active services

zrokdir and Naming Cleanup

Streamline the naming throughout the stack (environment, service, etc.). Consolidate and refine zrokdir accordingly.

zrok proxy Service Refresh

In order to control the service view of the zrok proxy, the controller is going to have to provoke a service refresh (or update, in future?). Might use a very basic control plane to do this (the controller knows when new services are available).

Might also be able to look into interrogating the sdk to see if it knows about a service, and if it does not... then refresh that service.

Proxy Address Construction

Further refine how the proxy address is constructed for a service/environment combination. Present the address to the end user through the CLI output of zrok http.

v0.2 User Interface

Start iterating on what kinds of features and capabilities could be present in a v0.2 user interface.

  • basic traffic visualization
  • termination of active services
  • configuration inspection

Controller Store

Implement a basic sqlite3-based store for the zrok controller. Support migrations and sqlx.

Environment Variables, zrokdir Configuration

A number of important default endpoints are specified as cobra defaults in the zrok binary. We're going to need a couple of changes as we start having more environments to work with (local development, production, etc.)

The cobra defaults should point to the production instance. These should be overridable by using environment variables.

It might also be useful/important to cascade in settings into the zrokdir, such that the zrokdir maintains pointers to the configured environment for the shell. This would allow zrok enable to use a command-line flag for specifiying the API endpoint, which would then get stored in the zrokdir for future invocations.

zrok http [bind|listen] (&& Proxy 2)

Restructure the CLI environment:

  • zrok http becomes zrok http bind
  • zrok proxy becomes zrok http listen

Refactor the proxy infrastructure at the same time.

Client API

Develop a client API using swagger. The client API will be used by the end-user-facing zrok operations to manage on-demand proxying and tunnels.

HTTP Frontend Health Checks

The OCI load balancer is hitting the frontend and setting a host header that is the private IP of the VIP of the balancer, which is producing this message in the frontend logs:

[ 344.379]    INFO zrok/endpoints/frontend.basicAuth.func1: 10.0.0.88:31264 -> service '10' not found

Might need to start introducing optional frontend configuration. That configuration should probably include ignored host header values or regexes?

zrok http frontend

Allow zrok enable-d environments to register new zrok http frontend instances. Will require ingress selection (#20) in order to function.

Reservations

zrok session identifiers are currently only ephemeral. We're going to want to implement "reservations", so that zrok tunnels can come and go, but the reservation is persistent.

Gorilla Server for go-swagger + UI?

We're going to want a combined API and UI server, exposed from zrok ctrl. Either extend the current go-swagger-generated server to serve the embedded UI, or migrate both to a gorilla-based server.

Ingress Selection

When running zrok http (or other future tunnel commands) we want to be able to target a specific ingress proxy. Maybe even multiple ingress proxies, in the future.

This dovetails with the zrok enable for ingress proxies (#19). When a zrok user can place ingress sites on the network, in addition to terminators, then things get really powerful.

zrok then becomes about cheap, easy, dark connectivity as a service... and is the simplest on-ramp into the world of Ziti.

Provision New Terminator

CLI, API, and whatever necessary plumbing is required to quickly provision a new zrok terminator.

OCI Load Balancer

We really want our frontends behind an OCI load balancer. They're stateless. We could utilize any number of them.

Let's Encrypt

Let's figure out how to get a Let's Encrypt certificate working for both the frontends and the api.

Placeholder Backend

Can we provide a generic "placeholder" backend, clustered, and managed by the zrok controller?

This enables a number of important capabilities, including things like scheduled downtimes, and "session not found" error handling.

Router Selection Logic

zrok is going to need to have some basic understanding of router selection. Router selection (policy creation) is currently hard-coded for demonstration purposes.

zrok test loop

Due to the way zrok is designed, we can implement a zrok test loop, which controls both the frontend and the backend of a communication, so it would be very easy to do rudimentary correctness checking by sending generated requests to the frontend, which will then hit the backend in the same process.

These would be almost limitlessly scalable for scaling and correctness testing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.