Skip to content
/ khanik Public

khanik is a master and maintainer of surangs, he helped the Pandavas escape Lakshagriha

License

Notifications You must be signed in to change notification settings

Donnie/khanik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Khanik - SSH Surang Manager

Khanik is a Go-based tool for managing SSH tunnels (referred to as "surangs"). It provides a daemon that automatically starts, monitors, and restarts SSH tunnels based on a configuration file.

Features

  • Daemon-based management of SSH tunnels
  • Automatic restart of failed tunnels
  • IP verification for each tunnel
  • Easy-to-use CLI commands

Installation

To download Khanik (a single executable) do:

gh release download 0.0.4 -R Donnie/khanik
chmod +x khanik-macos-arm64
mv khanik-macos-arm64 /usr/local/bin/khanik
which khanik
khanik version

Configuration

Create a config.yaml file in a directory. Here's an example configuration:

surangs:
  home:
    command: "[email protected]"
    expect_ip: "203.0.113.1"
    port: 8080
  office:
    command: "[email protected]"
    expect_ip: "203.0.113.2"
    port: 8081

Usage

Khanik provides the following commands:

  • khanik start: Start the surang manager daemon
  • khanik stop: Stop the surang manager daemon
  • khanik list: List all configured surangs and their status
  • khanik version: Display the version of Khanik

Examples

Start the daemon:

khanik start

List all surangs:

khanik list

Stop the daemon:

khanik stop

How It Works

Khanik uses SSH's built-in SOCKS proxy functionality to create tunnels. The daemon periodically checks each configured tunnel to ensure it's running and functioning correctly. If a tunnel fails, Khanik automatically attempts to restart it.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

About

khanik is a master and maintainer of surangs, he helped the Pandavas escape Lakshagriha

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages