"use client" import { useEffect, useState } from "react" import TunnelConfig, { type TunnelConfig as TunnelConfigType, type Server } from "@/components/tunnel-config" import Link from "next/link" import { authClient } from "@/lib/auth-client"; import UserMenu from "@/components/user-menu" import { redirect, RedirectType } from 'next/navigation' const defaultConfig: TunnelConfigType = { type: "http", serverPort: 443, localPort: 8000, } export default function Home() { const [selectedServer, setSelectedServer] = useState(null) const [tunnelConfig, setTunnelConfig] = useState(defaultConfig) type SessionData = Awaited>; const [logedin, setLogedin] = useState(null) useEffect(() => { const fetchData = async () => { try { const result = await authClient.getSession() if (result.data != null) { setLogedin(result.data.user); } } catch (error) { console.error('Error fetching data:', error); } }; fetchData(); }, []); const logout = async() => { await authClient.signOut({ fetchOptions: { onSuccess: () => { redirect('/login', RedirectType.replace) } } }) } return (
tunnl.live
{logedin != null ? ( ) : ( <> Sign In
Sign in to save configurations & view history
)}

tunnl.live

Expose your local services to the internet securely with our fast and reliable SSH tunneling service.

Global Network

Choose from servers in US, Singapore, and Indonesia for optimal performance.

Secure by Default

End-to-end encryption with SSH ensures your data remains private and secure.

Flexible Configuration

Support for both HTTP/HTTPS and TCP tunneling with custom port configuration.

100% Free Service

No registration required. Just run the command and start using the tunnel immediately.

) }