0.1.6 • Published 3 months ago

bunnel v0.1.6

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

Bunnel Client

Installation

npm install bunnel
# or for global/CLI use
npm install -g bunnel

Usage

CLI

# Specify local server and tunnel server
bunnel client --local http://localhost:3000 --tunnel wss://example.com:4444

SDK

import { TunnelClient } from 'bunnel';

const tunnel = new TunnelClient({
    localServerUrl: 'http://localhost:3000',
    tunnelServerUrl: 'wss://example.com:4444',
    onClosed: () => console.log('Tunnel closed')
});

try {
    const { subdomain, tunnelUrl, proxyUrl } = await tunnel.connect();
    console.log(`Tunnel available on remote at: ${tunnelUrl} or ${proxyUrl}`);

    // Later, to disconnect
    tunnel.disconnect();
} catch (error) {
    console.error('Tunnel error:', error);
}

Options

  • --local, -l: Local server URL)
  • --tunnel, -t: Tunnel server URL)
0.1.4

3 months ago

0.1.6

3 months ago

0.1.5

3 months ago

0.1.3

3 months ago

0.1.2

3 months ago

0.1.1

4 months ago

0.1.0

4 months ago