Rustunnelのロゴ

Rustunnel

コミュニティ
joaoh82
rustunnel

Expose local services via secure tunnels using rustunnel. Create public HTTPS/TCP/UDP URLs, peer-to-peer tunnels, and load-balanced pools for testing, webhooks, demos, and deployment — from any AI agent or harness.

概要

公開者joaoh82
リポジトリrustunnel
スキル名rustunnel
スター
660
フォーク
49
同梱ファイル
指示のみ
ライセンスAGPL-3.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    joaoh82がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルRustunnelをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/joaoh82/rustunnel/tree/main/plugins/claude-code/skills/rustunnel
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/joaoh82/rustunnel.git /tmp/rustunnel
mkdir -p .claude/skills
cp -r /tmp/rustunnel/plugins/claude-code/skills/rustunnel .claude/skills/rustunnel
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでRustunnelを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にRustunnelを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Rustunnelは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Rustunnel — Secure Tunnel Management

Expose local services (HTTP / TCP / UDP / P2P) through public URLs using rustunnel. Perfect for testing webhooks, sharing local development, database access, and AI agent workflows. Works through the rustunnel MCP server, so any MCP-capable harness (Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Cline, or a custom agent) can drive it.

When to Use

  • Webhook testing — receive webhooks from Stripe/GitHub/etc. on a local server
  • Demo sharing — share local development with stakeholders
  • CI/CD & previews — expose preview environments
  • Database / TCP access — expose PostgreSQL, Redis, SSH, raw TCP
  • UDP services — game servers, DNS, custom UDP protocols
  • Peer-to-peer — direct, NAT-punched connections between two peers
  • Load balancing — spread traffic across multiple local backends with health checks

Authentication — you need an API token (one-time)

rustunnel requires an API token. Get one once, then reuse it:

  1. Hosted (rustunnel.com): sign up free at https://rustunnel.com → Dashboard → API Keys → create a key.
  2. Self-hosted: create one with rustunnel token create --name agent (needs the server admin token), or from your dashboard.

Where the token lives (in priority order):

  1. The RUSTUNNEL_TOKEN environment variable, set once in your MCP client config. This is the recommended setup — when it's set, you do not need to pass token on tool calls and you should not ask the user for it again.
  2. A token argument passed explicitly to a tool call.
  3. ~/.rustunnel/config.yml (auth_token:) for the CLI.

If no token is configured, ask the user once: "What's your rustunnel API token? Get one free at https://rustunnel.com → Dashboard → API Keys." Then prefer storing it as RUSTUNNEL_TOKEN in the MCP config so it persists.


IMPORTANT: Prefer MCP Tools over the raw CLI

Use the MCP tools for tunnel management — they handle the process lifecycle automatically (no orphaned processes, automatic cleanup, tunnel IDs for tracking). Only fall back to the CLI (get_connection_info) when the agent cannot spawn subprocesses (e.g. a cloud sandbox).

MethodLifecycleUse it when
MCP tools (create_tunnel, close_tunnel)Automatic cleanupDefault
CLI (via get_connection_info)Manual (user runs it)Cloud sandbox / no subprocess

MCP Tools

create_tunnel

Open a tunnel and get a public URL. The token may be omitted when RUSTUNNEL_TOKEN is set.

ParamTypeRequiredDescription
tokenstringno¹API token (¹required unless RUSTUNNEL_TOKEN is set)
local_portintegeryesLocal port to expose
protocol"http" | "tcp" | "udp" | "p2p"yesTunnel type
subdomainstringnoCustom subdomain (HTTP only)
regionstringno"eu", "us", "ap". Omit to auto-select by latency
local_hoststringnoLocal hostname to forward to (default localhost)
secretstringp2p onlyShared secret; publisher and subscriber must match
peer_namestringp2p publishPublish the local service under this name
peer_targetstringp2p connectConnect to a published P2P tunnel by this name
groupstringLBLoad-balancing pool name (http/tcp only)
group_keystringLBShared secret for the pool; members must agree
health_checkobjectnoHealth probe — see below

health_check object: { type: "tcp"|"http", path, interval_secs, timeout_secs, max_failed, expect_2xx, alert_webhook }.

Returns:

json
{ "public_url": "https://abc123.eu.edge.rustunnel.com", "tunnel_id": "a1b2c3d4-...", "protocol": "http" }

Tunnel stays open until close_tunnel is called or the MCP server exits.

close_tunnel

Close a tunnel by ID. The public URL stops working immediately.

ParamTypeRequiredDescription
tokenstringno¹API token
tunnel_idstringyesUUID from create_tunnel / list_tunnels

list_tunnels

List active tunnels (public URL, protocol, traffic count). token optional¹.

get_tunnel_history

Past tunnels (duration, owning token). Params: token (optional¹), protocol (filter, optional), limit (default 25).

list_regions

Available server regions. No auth required.

get_connection_info

Returns the CLI command (and, for load-balanced tunnels, a config file) to run the client manually — without spawning anything. Use in cloud sandboxes. Accepts the same arguments as create_tunnel.


Common Workflows

Expose a local web app

create_tunnel(local_port=3000, protocol="http")
→ return public_url; close_tunnel(tunnel_id) when done

Custom subdomain

create_tunnel(local_port=5173, protocol="http", subdomain="myapp-preview")

Database / TCP

create_tunnel(local_port=5432, protocol="tcp")  → host:port to connect

UDP service

create_tunnel(local_port=27015, protocol="udp")

Peer-to-peer — publish, then connect

# Publisher (machine A)
create_tunnel(local_port=3000, protocol="p2p", secret="shared", peer_name="my-svc")
# Subscriber (machine B)
create_tunnel(local_port=8000, protocol="p2p", secret="shared", peer_target="my-svc")

Load-balanced pool with health checks

Run one create_tunnel per backend; members sharing (group, group_key) form one pool (requires the edge to have [load_balancing] enabled = true):

create_tunnel(local_port=3000, protocol="http", subdomain="pool",
              group="web", group_key="shared-secret",
              health_check={ "type": "http", "path": "/health", "interval_secs": 10 })
create_tunnel(local_port=3001, protocol="http", subdomain="pool",
              group="web", group_key="shared-secret",
              health_check={ "type": "http", "path": "/health" })

Cloud sandbox (CLI fallback)

get_connection_info(local_port=3000, protocol="http")
→ output the command for the user to run locally
→ list_tunnels() to confirm and fetch public_url

Prerequisites

The rustunnel CLI must be installed and on PATH (the MCP server spawns it):

bash
# Homebrew (macOS/Linux)
brew tap joaoh82/rustunnel && brew install rustunnel

# Or build from source
git clone https://github.com/joaoh82/rustunnel.git && cd rustunnel
make release   # builds rustunnel, rustunnel-mcp

Adding rustunnel to your harness

See docs/agent-integration.md for copy-paste MCP config for Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Cline, and generic/custom agents — plus a one-command installer:

bash
curl -fsSL https://raw.githubusercontent.com/joaoh82/rustunnel/main/integrations/install.sh | bash

A minimal MCP config looks like:

json
{
  "mcpServers": {
    "rustunnel": {
      "command": "rustunnel-mcp",
      "args": ["--server", "eu.edge.rustunnel.com:4040", "--api", "https://eu.edge.rustunnel.com:8443"],
      "env": { "RUSTUNNEL_TOKEN": "<your-token>" }
    }
  }
}

Security Notes

  • Tokens travel over HTTPS (use --insecure only in local dev with self-signed certs).
  • MCP tools clean up subprocesses automatically; tunnels close when the MCP server exits.
  • Protect the config file: chmod 600 ~/.rustunnel/config.yml.

Resources

よくある質問

AIスキル「Rustunnel」では何ができますか?

Expose local services via secure tunnels using rustunnel. Create public HTTPS/TCP/UDP URLs, peer-to-peer tunnels, and load-balanced pools for testing, webhooks, demos, and deployment — from any AI agent or harness.

TypingMindでRustunnelを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Rustunnelはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにRustunnelをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/joaoh82/rustunnel/tree/main/plugins/claude-code/skills/rustunnelを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Rustunnelを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Rustunnelは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもRustunnelを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Rustunnel」は無料ですか?

はい。joaoh82がGitHubでAGPL-3.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇