secret-tunnel

module
v1.10.6 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0

README

Secret-Tunnel

Golang Release Release License

Usage

Environment
Name Type Comment
ST_DEBUG bool (global) show verbose information
ST_DB_DSN string (server) sqlite database file location
Server
Usage:
  server [flags]
  server [command]

Available Commands:
  client      Manage clients
  help        Help about any command
  task        Manage tasks

Flags:
      --addr string    server address (default "0.0.0.0:9797")
      --api string     api address (default "127.0.0.1:9799")
  -h, --help           help for server
      --token string   api token
  -v, --version        version for server

Use "server [command] --help" for more information about a command.
Client
Usage:
  client [flags]
  client [command]

Available Commands:
  help        Help about any command
  service     Run as a service

Flags:
      --addr string   server address (default "127.0.0.1:9797")
      --dns string    dns server (default "8.8.8.8")
  -h, --help          help for client
      --key string    auth key
  -v, --version       version for client

Use "client [command] --help" for more information about a command.

Docker

Server Docker Hub

Version Size Pull

Client Docker Hub

Version Size Pull

Example

Server
sts
curl \
--location \
--request POST 'http://127.0.0.1:9799/client' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "发送端"
}'
sts client create --name 发送端
curl \
--location \
--request POST 'http://127.0.0.1:9799/client' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "接收端"
}'
sts client create --name 接收端
curl \
--location \
--request POST 'http://127.0.0.1:9799/task' \
--header 'Content-Type: application/json' \
--data-raw '{
    "client_id": 1,
    "name": "ssh",
    "addr": "127.0.0.1:22"
}'
sts task create --client-id 1 --name ssh --addr 127.0.0.1:22
Client
  • 发送端
stc --addr 127.0.0.1:9797 --key fb9a318168714565993f75b97e6af907
  • 发送端(服务)
stc service --user install --addr 127.0.0.1:9797 --key fb9a318168714565993f75b97e6af907
stc service --user start
stc service --user stop
stc service --user uninstall
  • 接收端
stc --addr 127.0.0.1:9797 --key ef335f0c7a9643d19d06591672576f46
tasks:
  - name: ssh
    address: 127.0.0.1:2222
    secret: ab6080af85f44772a0613fd20c09397d
Data Transfer
ssh:22 <-> stc(发送端) <-> sts(9797) <-> stc(接收端) <-> ssh:2222

License

Apache License 2.0

Directories

Path Synopsis
cmd
internal
osx

Jump to

Keyboard shortcuts

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