diff --git a/.gitignore b/.gitignore index 96bd031..38f9e2c 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,3 @@ result # web node_modules -dist diff --git a/internal/web/dist/assets/Koulen-Regular-1aI44dQz.ttf b/internal/web/dist/assets/Koulen-Regular-1aI44dQz.ttf new file mode 100644 index 0000000..1729525 Binary files /dev/null and b/internal/web/dist/assets/Koulen-Regular-1aI44dQz.ttf differ diff --git a/internal/web/dist/assets/index-3ZG59SIU.css b/internal/web/dist/assets/index-3ZG59SIU.css new file mode 100644 index 0000000..d91b863 --- /dev/null +++ b/internal/web/dist/assets/index-3ZG59SIU.css @@ -0,0 +1 @@ +/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--color-cyan-200:oklch(.917 .08 205.041);--color-gray-200:oklch(.928 .006 264.531);--color-gray-500:oklch(.551 .027 264.364);--color-zinc-50:oklch(.985 0 0);--color-zinc-100:oklch(.967 .001 286.375);--color-zinc-300:oklch(.871 .006 286.286);--color-zinc-400:oklch(.705 .015 286.067);--color-zinc-500:oklch(.552 .016 285.938);--color-zinc-600:oklch(.442 .017 285.786);--color-zinc-700:oklch(.37 .013 285.805);--spacing:.25rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-bold:700;--radius-sm:.25rem;--radius-lg:.5rem;--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--font-koulen:"Koulen","sans-serif"}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.relative{position:relative}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-auto{margin-inline:auto}.-mt-\[1px\]{margin-top:-1px}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-5{margin-top:calc(var(--spacing)*5)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-10{margin-right:calc(var(--spacing)*10)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.flex{display:flex}.inline{display:inline}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-10{height:calc(var(--spacing)*10)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-full{height:100%}.w-3{width:calc(var(--spacing)*3)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-full{width:100%}.flex-1{flex:1}.grow{flex-grow:1}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-tr-lg{border-top-right-radius:var(--radius-lg)}.rounded-br-lg{border-bottom-right-radius:var(--radius-lg)}.rounded-bl-lg{border-bottom-left-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-zinc-300{border-color:var(--color-zinc-300)}.border-zinc-400{border-color:var(--color-zinc-400)}.bg-zinc-50{background-color:var(--color-zinc-50)}.bg-zinc-100{background-color:var(--color-zinc-100)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-5{padding:calc(var(--spacing)*5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-10{padding-top:calc(var(--spacing)*10)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pb-10{padding-bottom:calc(var(--spacing)*10)}.text-left{text-align:left}.font-koulen{font-family:var(--font-koulen)}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-sm\/6{font-size:var(--text-sm);line-height:calc(var(--spacing)*6)}.text-xs\/6{font-size:var(--text-xs);line-height:calc(var(--spacing)*6)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.text-gray-500{color:var(--color-gray-500)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-700{color:var(--color-zinc-700)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (width>=40rem){.sm\:gap-5{gap:calc(var(--spacing)*5)}}@media (width>=48rem){.md\:mx-0{margin-inline:calc(var(--spacing)*0)}.md\:flex{display:flex}.md\:h-screen{height:100vh}.md\:w-1\/3{width:33.3333%}.md\:w-5\/12{width:41.6667%}.md\:w-7\/12{width:58.3333%}.md\:w-screen{width:100vw}.md\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}}@media (width>=64rem){.lg\:max-w-5xl{max-width:var(--container-5xl)}}}@font-face{font-family:Koulen;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/Koulen-Regular-1aI44dQz.ttf)}::selection{background:var(--color-cyan-200)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false} diff --git a/internal/web/dist/assets/index-5XdRZXKz.js b/internal/web/dist/assets/index-5XdRZXKz.js new file mode 100644 index 0000000..6e02a8c --- /dev/null +++ b/internal/web/dist/assets/index-5XdRZXKz.js @@ -0,0 +1 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))l(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&l(i)}).observe(document,{childList:!0,subtree:!0});function s(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function l(n){if(n.ep)return;n.ep=!0;const r=s(n);fetch(n.href,r)}})();const ne=!1,le=(e,t)=>e===t,E={equals:le};let re=K;const m=1,k=2,D={owned:null,cleanups:null,context:null,owner:null};var h=null;let j=null,oe=null,u=null,a=null,b=null,O=0;function ie(e,t){const s=u,l=h,n=e.length===0,r=t===void 0?l:t,i=n?D:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=n?e:()=>e(()=>I(()=>S(i)));h=i,u=null;try{return $(o,!0)}finally{u=s,h=l}}function ce(e,t){t=t?Object.assign({},E,t):E;const s={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},l=n=>(typeof n=="function"&&(n=n(s.value)),q(s,n));return[H.bind(s),l]}function v(e,t,s){const l=G(e,t,!1,m);L(l)}function P(e,t,s){s=s?Object.assign({},E,s):E;const l=G(e,t,!0,0);return l.observers=null,l.observerSlots=null,l.comparator=s.equals||void 0,L(l),H.bind(l)}function I(e){if(u===null)return e();const t=u;u=null;try{return e()}finally{u=t}}function H(){if(this.sources&&this.state)if(this.state===m)L(this);else{const e=a;a=null,$(()=>z(this),!1),a=e}if(u){const e=this.observers?this.observers.length:0;u.sources?(u.sources.push(this),u.sourceSlots.push(e)):(u.sources=[this],u.sourceSlots=[e]),this.observers?(this.observers.push(u),this.observerSlots.push(u.sources.length-1)):(this.observers=[u],this.observerSlots=[u.sources.length-1])}return this.value}function q(e,t,s){let l=e.value;return(!e.comparator||!e.comparator(l,t))&&(e.value=t,e.observers&&e.observers.length&&$(()=>{for(let n=0;n1e6)throw a=[],new Error},!1)),t}function L(e){if(!e.fn)return;S(e);const t=O;ue(e,e.value,t)}function ue(e,t,s){let l;const n=h,r=u;u=h=e;try{l=e.fn(t)}catch(i){return e.pure&&(e.state=m,e.owned&&e.owned.forEach(S),e.owned=null),e.updatedAt=s+1,Z(i)}finally{u=r,h=n}(!e.updatedAt||e.updatedAt<=s)&&(e.updatedAt!=null&&"observers"in e?q(e,l):e.value=l,e.updatedAt=s)}function G(e,t,s,l=m,n){const r={fn:e,state:l,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:h?h.context:null,pure:s};return h===null||h!==D&&(h.owned?h.owned.push(r):h.owned=[r]),r}function F(e){if(e.state===0)return;if(e.state===k)return z(e);if(e.suspense&&I(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;s--)if(e=t[s],e.state===m)L(e);else if(e.state===k){const l=a;a=null,$(()=>z(e,t[0]),!1),a=l}}function $(e,t){if(a)return e();let s=!1;t||(a=[]),b?s=!0:b=[],O++;try{const l=e();return fe(s),l}catch(l){s||(b=null),a=null,Z(l)}}function fe(e){if(a&&(K(a),a=null),e)return;const t=b;b=null,t.length&&$(()=>re(t),!1)}function K(e){for(let t=0;t=0;t--)S(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)S(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function ae(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Z(e,t=h){throw ae(e)}function A(e,t){return I(()=>e(t||{}))}function de(e,t,s){let l=s.length,n=t.length,r=l,i=0,o=0,c=t[n-1].nextSibling,f=null;for(;id-o){const g=t[i];for(;o{n=r,t===document?e():_(t,e(),t.firstChild?null:void 0,s)},l.owner),()=>{n(),t.textContent=""}}function w(e,t,s,l){let n;const r=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},i=()=>(n||(n=r())).cloneNode(!0);return i.cloneNode=i,i}function pe(e,t=window.document){const s=t[R]||(t[R]=new Set);for(let l=0,n=e.length;lT(e,t(),n,s),l)}function be(e){let t=e.target;const s=`$$${e.type}`,l=e.target,n=e.currentTarget,r=c=>Object.defineProperty(e,"target",{configurable:!0,value:c}),i=()=>{const c=t[s];if(c&&!t.disabled){const f=t[`${s}Data`];if(f!==void 0?c.call(t,f,e):c.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&r(t.host),!0},o=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const c=e.composedPath();r(c[0]);for(let f=0;f{let o=t();for(;typeof o=="function";)o=o();s=T(e,o,s,l)}),()=>s;if(Array.isArray(t)){const o=[],c=s&&Array.isArray(s);if(B(o,t,s,n))return v(()=>s=T(e,o,s,l,!0)),()=>s;if(o.length===0){if(s=x(e,s,l),i)return s}else c?s.length===0?U(e,o,l):de(e,s,o):(s&&x(e),U(e,o));s=o}else if(t.nodeType){if(Array.isArray(s)){if(i)return s=x(e,s,l,t);x(e,s,null,t)}else s==null||s===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);s=t}}return s}function B(e,t,s,l){let n=!1;for(let r=0,i=t.length;r=0;i--){const o=t[i];if(n!==o){const c=o.parentNode===e;!r&&!i?c?e.replaceChild(n,o):e.insertBefore(n,s):c&&o.remove()}else r=!0}}else e.insertBefore(n,s);return[n]}var me=w(''),ge=w(''),xe=w('');const ve=e=>(()=>{var t=me();return v(()=>M(t,"class",e.class)),t})(),we=e=>(()=>{var t=ge();return v(()=>M(t,"class",e.class)),t})(),ye=e=>(()=>{var t=xe();return v(()=>M(t,"class",e.class)),t})();var Se=w('

TROK

EXPOSE. SHARE. ACCESS.

Accessing your
local service should
be simple

It's like ngrok but simpler. Just log in, run the command, and get a shareable URL to access your local service from anywhere. No complex setup—just instant, secure tunneling to the internet.

Install

Install trok to your machine using shell:

This will download the trok binary to the path you ran the script from.
Run it with ./trok on any system

USING TROK:

> $ trok client -a :3000

started Trok client on trok.cloud

[CMD] EHLO [ARG] trok.cloud

1. Expose

provide the local port you want to share, and it'll generate a URL.

hey here take a look at my project...

2. Share

share the URL with your friends.

https://awesome-project.trok.cloud
🎉 your awesome project 🎉

3. Access

access your local service from anywhere.

'),$e=w('copied!'),Ce=w('');function Ae(){const e="curl -fsSL https://trok.cloud/install.sh | sh",[t,s]=ce(!1),l=()=>{navigator.clipboard.writeText(e),s(!0),setTimeout(()=>{s(!1)},1300)};return(()=>{var n=Se(),r=n.firstChild,i=r.firstChild,o=i.nextSibling,c=o.nextSibling,f=c.firstChild,d=f.firstChild,p=d.nextSibling,y=p.firstChild,C=y.nextSibling,g=C.nextSibling;g.firstChild;var J=c.nextSibling,Q=J.nextSibling,W=Q.firstChild,Y=W.nextSibling,ee=Y.firstChild,te=ee.nextSibling,V=te.firstChild,se=V.firstChild;return g.$$click=l,_(g,(()=>{var N=P(()=>!!t());return()=>N()?$e():Ce()})(),null),_(g,(()=>{var N=P(()=>!!t());return()=>N()?A(ye,{class:"h-5 w-5 text-zinc-500"}):A(we,{class:"h-5 w-5 text-zinc-500"})})(),null),_(V,A(ve,{class:"w-6 h-6 mr-2"}),se),n})()}pe(["click"]);const _e=document.getElementById("root");he(()=>A(Ae,{}),_e); diff --git a/internal/web/dist/favicon.ico b/internal/web/dist/favicon.ico new file mode 100644 index 0000000..e290ad6 Binary files /dev/null and b/internal/web/dist/favicon.ico differ diff --git a/internal/web/dist/index.html b/internal/web/dist/index.html new file mode 100644 index 0000000..5f0f794 --- /dev/null +++ b/internal/web/dist/index.html @@ -0,0 +1,17 @@ + + + + + + + + trok ~ Accessing your local service should be simple + + + + + +
+ + + diff --git a/internal/web/dist/install.sh b/internal/web/dist/install.sh new file mode 100644 index 0000000..36eb1dd --- /dev/null +++ b/internal/web/dist/install.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# Copyright 2025 t@tux.rs. All rights reserved. + +set -e + +repo="tuxdotrs/trok" +release_url="https://api.github.com/repos/$repo/releases/latest" + +if [ "$OS" = "Windows_NT" ]; then + echo "Error: this installer only works on linux & macOS." 1>&2 + exit 1 +else + case $(uname -sm) in + "Darwin x86_64") target="darwin-x86_64" ;; + "Darwin arm64") target="darwin-aarch64" ;; + "Linux x86_64") target="linux-x86_64" ;; + "Linux arm64"|"Linux aarch64") target="linux-aarch64" ;; + *) target="linux-x86_64" ;; + esac +fi + +echo "Downloading $repo for $target" +release_target_url=$( + curl -s "$release_url" | + grep "browser_download_url" | + grep "$target" | + sed -re 's/.*: "([^"]+)".*/\1/' \ +) + +curl -sL "$release_target_url" | tar xz