import { useState } from "react" import { TunnelScene } from "./scenes/TunnelScene" import { TunnelArt } from "./poster/TunnelArt" import { Globe } from "./scenes/Globe" import { useTime, useTransform } from "motion/react" import { Caption, Wordmark } from "./wordmark" import { Justified } from "./Justified" import { Ink } from "./Ink" import { Splatter } from "./Splatter" import signature from "./footer-signature.svg" const github = "https://github.com/anomalyco/opentunnel" const installs = { curl: "curl -fsSL https://opentunnel.xyz/install | sh", brew: "brew install anomalyco/tap/opentunnel", arch: "yay -S opentunnel-bin", npm: "npm i -g opentunnel", cargo: "cargo install opentunnel-cli", } as const type Manager = keyof typeof installs function Install() { const [manager, setManager] = useState("curl") return
{(Object.keys(installs) as Manager[]).map(name => )} github
$ {installs[manager]}
} /** The print in a square the mark's height, the mark beside it, and under the square the caption. */ function Masthead() { const seconds = useTransform(useTime(), ms => ms / 1000) return

} />

} const out = (text: string) => {text} export function App() { return

cli

{`$ opentunnel route add 47365\n`}{out("creating tunnel... tunnel is ready.\nadded route 3e9b1c07a4d25f86 → 127.0.0.1:47365\nhttps://3e9b1c07a4d25f86.f7a2mx4kq9vn.opentunnel.xyz")}{`\n\n$ curl https://3e9b1c07a4d25f86.f7a2mx4kq9vn.opentunnel.xyz\n`}{out("hello from localhost:47365")}

sdk

{`// bun add @opentunnel/client
import { create } from "@opentunnel/client"

const client = create()
const connection = await client.tunnel.connect({
  routes: { opencode: "127.0.0.1:47365" },
})

console.log(\`https://opencode.\${connection.tunnel.hostname}\`)
`}{out("https://opencode.f7a2mx4kq9vn.opentunnel.xyz")}

how it works

privacy

the relay can't read your traffic
your tunnel hostname is public
route names are private, not secret
put auth in the services themselves
}