gopolar

module
v0.0.0-...-8cea320 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: GPL-3.0

README

gopolar

gopolar

TCP port forwarding tool with both TUI and web UI support.

The gopher image is Creative Commons Attribution 4.0 licensed, credit to Renee French.

Install

Simply go install github.com/goverclock/gopolar/cmd/...@latest would install gopolar core & TUI, which is enough for basic usage.

The web UI has to be built with install.sh . Vite is required to build the UI.

Usage

Basic

After install, run gpcore to start gopolar core process. In another window run gptui to start TUI and interact with the core.

If the web UI is installed, visit localhost:7070 in a browser. The web UI offers same functionality with TUI.

With the web UI/TUI, you can create, edit, toggle and delete tunnels and inspect their status.

You may want to create a system service for gpcore if you are using systemd.

Saved Tunnels

gopolar saves tunnels in ~/.gopolar/tunnels.toml, and restore them after gpcore starts. If you want to ignore them, run gpcore with -nosave flag.

Logs

On startup, gopolar deletes all previous logs. Copy them to another directory if you want to persist them.

gopolar does not do logging by default in consideration of performance. Run gpcore with -log flag to enable logging.

Logs are saved at ~/.gopolar/logs/[tunnel source]-[tunnel dest]/[connection establish time]-[send | recv], containing raw data sent and received for each connection in that tunnel. You may want to read them with a hex reader like xxd e.g. cat logs/\[::\]:2222-localhost:7070/2024-02-18\ 09:54:10.727005-send | xxd.

RESTful API

You can also integrate gopolar easily with its RESTful API. Check out API.md.

Screenshots

TUI:

tui

Web UI:

webui

Directories

Path Synopsis
cmd
internal
tui
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL