This repo is broken into 3 components, a CLI, GUI app, and shared-core library that the CLI & GUI draw on.
- For all three crates:
rust & cargo - For UI:
dioxus- specifically, install
dxwithcargo install dioxus-cli - if you have
binstall, you can skip compilingdxfrom source by runningcargo binstall dioxus-cli
- specifically, install
to run without compiling, use cargo run in the cli directory:
cd cli
cargo run -- --help
This exercises the CONNECT-based gateway flow that Envoy will use in staging/prod.
Use a non-.local origin (e.g. datumconnect.test):
cargo run -p datum-connect -- dns-dev serve \
--origin datumconnect.test \
--bind 127.0.0.1:53535 \
--data ./dns-dev.yml
This prints the endpoint id and the iroh UDP bound sockets you must publish:
cargo run -p datum-connect -- serve
Copy the printed dns-dev upsert example, but run it via cargo run -p datum-connect -- ...
and make sure the origin matches datumconnect.test. Quote IPv6 addresses like "[::]:1234".
The serve command prints the z-base-32 ID and the full DNS name. Query it with:
dig +norecurse @127.0.0.1 -p 53535 TXT _iroh.<z32>.datumconnect.test
cargo run -p datum-connect -- gateway \
--port 8080 \
--mode forward \
--discovery dns \
--dns-origin datumconnect.test \
--dns-resolver 127.0.0.1:53535
Discovery modes:
- `default`: iroh defaults (n0 preset).
- `dns`: only the provided DNS origin/resolver.
- `hybrid`: default + custom DNS.
If your target TCP service is on 127.0.0.1:5173:
curl --proxytunnel -x 127.0.0.1:8080 \
--proxy-header "x-iroh-endpoint-id: REPLACE_WITH_ENDPOINT_ID" \
"http://127.0.0.1:5173"
This mirrors the same flow, but uses the GUI to create the proxy entry.
If you want a one-shot experience, run:
./scripts/try-ui-demo.sh
It starts dns-dev, an HTTPS origin, the gateway, and the GUI, and waits for you to
create a TCP proxy in the UI before visiting https://localhost:5173 in the browser.
cargo run -p datum-connect -- dns-dev serve \
--origin datumconnect.test \
--bind 127.0.0.1:53535 \
--data ./dns-dev.yml
openssl req -x509 -nodes -newkey rsa:2048 -days 1 \
-keyout /tmp/iroh-dev.key -out /tmp/iroh-dev.crt \
-subj "/CN=localhost"
openssl s_server -accept 5173 -cert /tmp/iroh-dev.crt -key /tmp/iroh-dev.key -www
export DATUM_CONNECT_REPO=$(pwd)/.datum-connect-dev
cd ui
dx serve --platform desktop
Add a TCP proxy for 127.0.0.1:5173.
cd ..
export DATUM_CONNECT_REPO=$(pwd)/.datum-connect-dev
cargo run -p datum-connect -- serve
Copy the printed dns-dev upsert example, but change the origin to datumconnect.test
and run it via cargo run -p datum-connect -- ... (quote IPv6 addresses).
export DATUM_CONNECT_REPO=$(pwd)/.datum-connect-dev
cargo run -p datum-connect -- gateway \
--port 8080 \
--mode forward \
--discovery dns \
--dns-origin datumconnect.test \
--dns-resolver 127.0.0.1:53535
This avoids any browser proxy configuration. It listens on 127.0.0.1:8888 and
uses CONNECT under the hood to reach the target:
cargo run -p datum-connect -- tunnel-dev \
--gateway 127.0.0.1:8080 \
--node-id REPLACE_WITH_ENDPOINT_ID \
--target-host 127.0.0.1 \
--target-port 5173
Now visit:
https://localhost:8888
You should see the openssl s_server status page (cipher list + handshake info).
That output is expected and means the CONNECT request tunneled through the gateway
to the local origin.
to run the UI, make sure you have rust, cargo, and dioxus installed:
cd ui
dx serve