2025-07-05 00:07:55 +05:30
2025-02-27 23:01:49 +05:30
2025-03-04 19:56:51 +05:30
2025-06-29 01:11:40 +05:30
2025-03-10 17:21:34 +05:30
2025-06-24 22:28:45 +05:30
2025-02-27 17:01:50 +05:30
2025-06-24 22:25:07 +05:30
2025-03-04 00:47:01 +05:30
2025-03-04 00:47:01 +05:30
2025-07-05 00:07:55 +05:30
2025-02-28 03:15:05 +05:30
2025-06-24 22:25:07 +05:30
2025-06-25 01:47:13 +05:30
2025-02-27 17:01:50 +05:30

trok

Accessing your local service should be simple

wakatime home GitHub repo size GitHub commit activity

Table of Contents

Features

  • TCP Tunneling
  • UDP Tunneling (planned)
  • HTTP Tunneling
  • HTTPS Tunneling (planned)

Installation

curl -fsSL https://trok.cloud/install.sh | sh

Nix

# If you want to quickly test trok
nix run github:tuxdotrs/trok

Flake

# Add to your flake inputs
trok = {
  url = "github:tuxdotrs/trok";
  inputs.nixpkgs.follows = "nixpkgs";
};

# Add this in your nixos config
environment.systemPackages = [ inputs.trok.packages.${system}.default ];

Usage

Start a TCP tunnel:

trok tcp PORT_NUMBER

Example:

trok tcp 3000

Selfhosted Server:

trok tcp 3000 -s SERVER_URL

This will expose your local service running on port 3000 to a public endpoint via the trok server.

Selfhost

You can host your own trok server with NixOS:

# Add to your flake inputs
trok = {
  url = "github:tuxdotrs/trok";
  inputs.nixpkgs.follows = "nixpkgs";
};

# Add this in your nixos config
{inputs, ...}: {
  imports = [
    inputs.trok.nixosModules.default
  ];

  tux.services.trok = {
    enable = true;
    host = "0.0.0.0";
    port = 1337;
    openFirewall = true;
    user = "trok";
    group = "trok";
  };
}

Once deployed, your trok server will be ready to handle tunneling requests from clients.

Description
Accessing your local service should be simple
Readme GPL-3.0 196 KiB
Languages
Go 43.2%
TypeScript 37.8%
Nix 13.3%
Shell 2.9%
CSS 1.4%
Other 1.4%