Skip to content
pubscout

tcp_tunnel

2.3.1, released 2 weeks ago by an unverified publisher

Minimalistic TCP tunnel library and CLI written in Dart

$ flutter pub add tcp_tunnel
Source repository

What it does

Provides a TCP tunneling library and CLI tool supporting local port redirects, bridge tunneling, client tunnels, and hub mode routing between networks behind NAT.

AI-written summary of version 2.3.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to expose private servers or services behind NAT to other networks
  • You want a pure Dart TCP tunneling library with a CLI tool

Skip it when

  • You require application-level protocols or HTTP-specific routing without relying on raw TCP pipes

Strengths

  • Entirely written in Dart with a convenient CLI
  • Supports multiple tunnel types including local redirect, bridge, client, and hub mode
  • Opt-in TLS encryption and token authentication for hub mode

Weaknesses

  • Plaintext and unauthenticated by default in legacy local, bridge, and client modes

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

Not documented

Future<void> redirectLocalPort(int listenPort, int targetPort, {String targetHost = 'localhost'}) async {
  await TunnelLocalServer(listenPort, targetPort, targetHost: targetHost).start();
}

Alternatives

Packages that do the same job and could replace tcp_tunnel.

  • signalr_core

    Client for ASP.NET Core SignalR, supports WebSocket and SSE across Dart platforms

Works with

Packages commonly used together with tcp_tunnel: ones it builds on, ones built on it, and its own family.