You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"channel":"stdout","message":"2024-09-29T03:05:45.209546381Z [2024-09-29T03:05:44Z INFO rust_prover::groth16] Starting setup process\n"}
226
226
```
227
227
228
-
## Reverse proxy: TLS Passthrough
228
+
## TLS Passthrough with Custom Domain
229
229
230
-
dstack-gateway listens for incoming TLS connections and forwards them to the appropriate app based on `SNI`. If the SNI is your custom domain, dstack-gateway queries the TXT DNS record `_dstack-app-address.<custom_domain>` to determine the forwarding destination.
230
+
dstack-gateway supports TLS passthrough for custom domains.
231
231
232
-
For example, assuming I've deployed an app at `3327603e03f5bd1f830812ca4a789277fc31f577`, as shown below:
233
-
234
-

235
-
236
-
Now, I want to use my custom domain `myapp.kvin.wang` to access the app. I need to set up two DNS records with my DNS provider (Cloudflare in my case):
237
-
238
-
1. `A` or `CNAME` record to point the domain to the tdx machine:
239
-
240
-

241
-
242
-
2. `TXT` record to instruct the dstack-gateway to direct the request to the specified app:
243
-
244
-

245
-
246
-
Where
247
-
248
-
`_dstack-app-address.myapp.kvin.wang`means configuring the app destination address of domain `myapp.kvin.wang`.
249
-
250
-
The TXT record value `3327603e03f5bd1f830812ca4a789277fc31f577:8043` means that requests sent to `myapp.kvin.wang` will be processed by app `3327603e03f5bd1f830812ca4a789277fc31f577` on port `8043`
251
-
252
-
Now we can go to [`https://myapp.kvin.wang`](https://myapp.kvin.wang) and the request will be handled by the service listening on `8043` in app `3327603e03f5bd1f830812ca4a789277fc31f577`.
232
+
See the example [here](https://github.com/Dstack-TEE/dstack-examples/tree/main/custom-domain/dstack-ingress) for more details.
0 commit comments