Skip to content

fabrykowski/vite-plugin-ssh-tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-plugin-ssh-tunnel

NPM Version

Vite plugin to set up a reverse SSH tunnel for reverse proxies

Installation

npm install vite-plugin-ssh-tunnel

Usage

vite.config.js

import { defineConfig } from 'vite';
import { sshTunnel } from 'vite-plugin-ssh-tunnel';

export default defineConfig({
    plugins: [
        sshTunnel({
            username: 'tunnel', 
            host: 'tunnel.example.com', 
            privateKey: '/homes/user/.ssh/id_rsa',
        })
    ]
});

Options

username: string

The username for the SSH connection.

host: string

The host for the SSH connection.

privateKey: string

The path to the private key for the SSH connection.

remotePort?: number

The remote port to forward to. Defaults to 3000.

proxyUrl?: string

The URL of the reverse proxy server. Defaults to 'https://{host}'.

About

Vite plugin to set up a reverse SSH tunnel for reverse proxies

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •