Skip to content

Commit e5b116b

Browse files
authored
[ZT] Service types in published application routes (#25304)
* published application routes * fix SMB service type * move protocols info to published applications section
1 parent 3b4fc20 commit e5b116b

File tree

7 files changed

+34
-21
lines changed

7 files changed

+34
-21
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/configuration-file.mdx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ warp-routing:
2828
enabled: true
2929
```
3030
31-
## File structure for public hostnames
31+
## File structure for published applications
3232
3333
If you are exposing local services to the Internet, you can assign a public hostname to each service:
3434
@@ -79,9 +79,9 @@ You can use wildcards to match traffic to multiple subdomains. For example, if y
7979

8080
You can also enter regular expressions for the `path` key. For example, if `hostname` is `static.example.com` and `path` is `\.(jpg|png|css|js)$`, matching URLs could include `https://static.example.com/data.js`, `http://static.example.com/images/photo.jpg`, and so on. Cloudflare parses the path regex using the [Go `syntax` package](https://pkg.go.dev/regexp/syntax).
8181

82-
### Supported protocols
82+
### Services
8383

84-
In addition to HTTP, `cloudflared` supports protocols like SSH, RDP, arbitrary TCP services, and Unix sockets. You can also route traffic to the built-in `Hello World` test server or respond to traffic with an HTTP status.
84+
In addition to HTTP, `cloudflared` supports protocols like SSH, RDP, arbitrary TCP services, and Unix sockets. You can also route traffic to the built-in `hello_world` test server or respond to traffic with an HTTP status. For a full list of supported service types, refer to [Protocols for published applications](/cloudflare-one/connections/connect-networks/routing-to-tunnel/protocols/).
8585

8686
```yml
8787
tunnel: 6ff42ae2-765d-4adf-8112-31c55c1551ef
@@ -101,18 +101,6 @@ ingress:
101101
- service: http_status:404
102102
```
103103

104-
| Service | Description | Example `service` value |
105-
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
106-
| HTTP/S | Incoming HTTP requests are proxied directly to your local service. | `https://localhost:8000` |
107-
| HTTP over Unix socket | Just like HTTP, but using a Unix socket instead. | `unix:/home/production/echo.sock` |
108-
| HTTPS over Unix socket | Just like HTTPS, but using a Unix socket instead. | `unix+tls:/home/production/echo.sock` |
109-
| TCP | TCP connections are proxied to your local service. | `tcp://localhost:2222` |
110-
| SSH | SSH connections are proxied to your local service. [Learn more](/cloudflare-one/connections/connect-networks/use-cases/ssh/). | `ssh://localhost:22` |
111-
| RDP | RDP connections are proxied to your local service. [Learn more](/cloudflare-one/connections/connect-networks/use-cases/rdp/). | `rdp://localhost:3389` |
112-
| kubectl bastion mode | `cloudflared` will act like a jumphost, allowing access to any local address. | `bastion` |
113-
| Hello World | Test server for validating your Cloudflare Tunnel setup. | `hello_world` |
114-
| HTTP status | Responds to all requests with the given HTTP status. | `http_status:404` |
115-
116104
### Origin configuration
117105

118106
If you need to proxy traffic to multiple origins within one instance of `cloudflared`, you can define the way `cloudflared` sends requests to each service by specifying [configuration options](/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/origin-parameters/) as part of your ingress rules.

src/content/docs/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/create-local-tunnel.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ warp-routing:
159159
## 5. Start routing traffic
160160

161161
1. Now assign a `CNAME` record that points traffic to your tunnel subdomain:
162-
- If you are connecting an application, route the service to a [public hostname](/cloudflare-one/connections/connect-networks/routing-to-tunnel/):
162+
- If you are connecting an application, route the service to a [published application](/cloudflare-one/connections/connect-networks/routing-to-tunnel/):
163163

164164
```sh
165165
cloudflared tunnel route dns <UUID or NAME> <hostname>

src/content/docs/cloudflare-one/connections/connect-networks/routing-to-tunnel/dns.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: how-to
33
title: DNS records
44
sidebar:
5-
order: 51
5+
order: 2
66
---
77

88
import { Render, TabItem, Tabs, DashButton } from "~/components";

src/content/docs/cloudflare-one/connections/connect-networks/routing-to-tunnel/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ sidebar:
55
order: 8
66
---
77

8-
With Cloudflare Tunnel, you can expose your HTTP resources to the Internet via a public hostname. For example, you can add a route that points `docs.example.com` to `localhost:8080`. Anyone can now view your local application by going to `docs.example.com` in their web browser.
8+
Cloudflare Tunnel allows you to publish local applications to the Internet via a public hostname. For example, you can [add a published application route](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/#2a-publish-an-application) that points `docs.example.com` to `https://localhost:8080`. Anyone can now view your application by going to `docs.example.com` in their web browser.
99

10-
Cloudflare can route traffic to your Cloudflare Tunnel connection using a [DNS record](/cloudflare-one/connections/connect-networks/routing-to-tunnel/dns/) or [Cloudflare Load Balancer](/cloudflare-one/connections/connect-networks/routing-to-tunnel/lb/). You can configure either option from the Cloudflare dashboard by pointing a DNS `CNAME` record or a load balancer pool to the Cloudflare Tunnel subdomain for your connection. You can also associate these records with your tunnel from `cloudflared` directly.
10+
Cloudflare can route traffic down your Cloudflare Tunnel using a [DNS record](/cloudflare-one/connections/connect-networks/routing-to-tunnel/dns/) or [Cloudflare Load Balancer](/cloudflare-one/connections/connect-networks/routing-to-tunnel/lb/). You can configure either option from the Cloudflare dashboard by pointing a DNS `CNAME` record or a load balancer pool to your Cloudflare Tunnel subdomain (`<UUID>.cfargotunnel.com`). You can also associate these records with your tunnel from `cloudflared` directly.
1111

1212
:::note
1313

src/content/docs/cloudflare-one/connections/connect-networks/routing-to-tunnel/lb.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: concept
33
title: Load balancing
44
sidebar:
5-
order: 51
5+
order: 3
66
---
77

88
import { Render, TabItem, Tabs } from "~/components";
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
pcx_content_type: reference
3+
title: Protocols for published applications
4+
sidebar:
5+
order: 4
6+
label: Protocols
7+
tableOfContents: false
8+
---
9+
10+
11+
When you [add a published application route](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/#2a-publish-an-application) to a Cloudflare Tunnel, you are instructing Cloudflare to proxy requests for your public hostname to a service running privately behind `cloudflared`. The table below lists the service types that can route to a public hostname. Non-HTTP services will require [installing `cloudflared` on the client](/cloudflare-one/applications/non-http/cloudflared-authentication/) for end users to connect.
12+
13+
| Service type | Description | Example `service` value |
14+
| ------------ | ----------- | ---------- |
15+
| HTTP | Incoming requests to Cloudflare over HTTPS are proxied to the local web service via HTTP. | `http://localhost:8000` |
16+
| HTTPS | Incoming requests to Cloudflare over HTTPS are proxied directly to the local web service. You can [disable TLS verification](/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/origin-parameters/#notlsverify) if your origin uses self-signed certificates. | `https://localhost:8000` |
17+
| UNIX | Just like HTTP, but using a Unix socket instead. | `unix:/home/production/echo.sock` |
18+
| TCP | Enables TCP streams over a Websocket connection. `cloudflared` will take the packets received from the Websocket and reach out to the origin using TCP. To [connect to the public hostname over arbitrary TCP](/cloudflare-one/applications/non-http/cloudflared-authentication/arbitrary-tcp/), the user needs to run `cloudflared access tcp`, and there are no guarantees on how long the TCP tunnel will live. For long-lived connections, we recommend using [WARP-to-Tunnel](/cloudflare-one/connections/connect-networks/private-net/cloudflared/) instead.| `tcp://localhost:2222` |
19+
| SSH | Enables SSH streams over a Websocket connection. `cloudflared` will take the packets received from the Websocket and reach out to the origin using SSH. To [connect to the public hostname over SSH](/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-cloudflared-authentication/), the client needs to run `cloudflared access ssh`, and there are no guarantees on how long the SSH connection will last. For long-lived connections, we recommend using [WARP-to-Tunnel](/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access/) instead. | `ssh://localhost:22` |
20+
| RDP | Similar to TCP but for RDP streams only. For more information, refer to [Connect to RDP with client-side cloudflared](/cloudflare-one/connections/connect-networks/use-cases/rdp/rdp-cloudflared-authentication/). | `rdp://localhost:3389` |
21+
| UNIX + TLS | Just like HTTPS, but using a Unix socket instead. | `unix+tls:/home/production/echo.sock` |
22+
| SMB | Similar to TCP but for SMB streams only. For more information, refer to [Connect to SMB with client-side cloudflared](/cloudflare-one/connections/connect-networks/use-cases/smb/#connect-to-smb-server-with-cloudflared-access). | `smb://localhost:445` |
23+
| HTTP_STATUS | Responds to all requests with the given HTTP status. | `http_status:404` |
24+
| BASTION | `cloudflared` will act like a jumphost, allowing access to any local address. | `bastion`
25+
| HELLO_WORLD | Test server for validating your Cloudflare Tunnel connection (for [locally managed tunnels](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/configuration-file/#file-structure-for-published-applications) only). | `hello_world` |

src/content/docs/cloudflare-one/connections/connect-networks/use-cases/smb.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The public hostname method can be implemented in conjunction with routing over W
7373

7474
2. In the **Published application routes** tab, choose a domain from the drop-down menu and specify any subdomain (for example, `smb.example.com`).
7575

76-
3. For **Service**, select _TCP_ and enter the SMB listening port (for example, `localhost:445`). SMB drives listen on port `139` or `445` by default.
76+
3. For **Service**, select _SMB_ and enter the SMB listening port (for example, `localhost:445`). SMB drives listen on port `139` or `445` by default.
7777

7878
4. Select **Save**.
7979

0 commit comments

Comments
 (0)