From 98c79845defa97dbe6d07b8cc7621a67dc333c91 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Mon, 26 Jun 2023 12:57:04 -0400 Subject: [PATCH] proxy --- docs/core-features/files.md | 2 +- docs/core-features/http.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 docs/core-features/http.md diff --git a/docs/core-features/files.md b/docs/core-features/files.md index 070acb86..598c2f7b 100644 --- a/docs/core-features/files.md +++ b/docs/core-features/files.md @@ -1,7 +1,7 @@ --- sidebar_position: 30 --- -# File Sharing +# Web and File Sharing With `zrok` it is possible to share files quickly and easily as well. To share files using `zrok` use the `--backend-mode web`, for example: `zrok share private . --backend-mode web`. diff --git a/docs/core-features/http.md b/docs/core-features/http.md new file mode 100644 index 00000000..b3e9ea56 --- /dev/null +++ b/docs/core-features/http.md @@ -0,0 +1,35 @@ +--- +sidebar_position: 22 +--- + +# HTTP and HTTPS Endpoints + +`zrok` can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you will use the `zrok share` command using the `--backend-mode proxy` flag. + +The `--backend-mode proxy` is the default backend mode, so if you do not specify a `--backend-mode` you will get the `proxy` mode by default. + +If you have a web server running on `localhost` that you want to expose to other users using `zrok`, you can execute a command like the following: + +``` +$ zrok share public localhost:8080 +``` +When you execute this command, you'll get a `zrok` bridge like the following: + +``` +╭───────────────────────────────────────────────╮╭──────────────────────────╮ +│ http://0635uf7slmbu.share.zrok.io ││ [PUBLIC] [PROXY] │ +╰───────────────────────────────────────────────╯╰──────────────────────────╯ +╭───────────────────────────────────────────────────────────────────────────╮ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +╰───────────────────────────────────────────────────────────────────────────╯ +``` + +The URL shown at the top of the bridge shows the address where you can access your `public` share. + +Hit `CTRL-C` or `q` in the bridge to exit it and delete the `public` share. \ No newline at end of file