Skip to content

Commit 3cb1f2d

Browse files
authored
Merge pull request #183 from Dstack-TEE/md-custom-domain
Update Custom Domain in README
2 parents 5bec5e6 + 8dc63cd commit 3cb1f2d

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

README.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -225,31 +225,11 @@ $ curl 'http://0.0.0.0:9190/logs/zk-provider-server?text&timestamps'
225225
{"channel":"stdout","message":"2024-09-29T03:05:45.209546381Z [2024-09-29T03:05:44Z INFO rust_prover::groth16] Starting setup process\n"}
226226
```
227227

228-
## Reverse proxy: TLS Passthrough
228+
## TLS Passthrough with Custom Domain
229229

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.
231231

232-
For example, assuming I've deployed an app at `3327603e03f5bd1f830812ca4a789277fc31f577`, as shown below:
233-
234-
![appid](./docs/assets/appid.png)
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-
![app-dns-a](./docs/assets/app-dns-a.png)
241-
242-
2. `TXT` record to instruct the dstack-gateway to direct the request to the specified app:
243-
244-
![app-dns-txt](./docs/assets/app-dns-txt.png)
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.
253233

254234
## Upgrade an App
255235

0 commit comments

Comments
 (0)