tunnel

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PageLangFor

func PageLangFor(connType string) string

PageLangFor 按连接类型推荐隧道页语言:jsp→jsp,php→php,其余回退 jsp(舰队以 Tomcat 为主)。

func RenderPage

func RenderPage(kind, pwHash string) (string, error)

RenderPage 生成目标侧隧道页。kind: jsp / php。

func SuggestPagePath

func SuggestPagePath(connURL, lang string) string

SuggestPagePath 推荐落点:与现有 shell 同目录同扩展名(同目录即同 webapp 可达路径)。

Types

type PageDeployer

type PageDeployer interface {
	DeployPage(ctx context.Context, sess session.Session, path string, content []byte) error
	RemovePage(ctx context.Context, sess session.Session, path string) error
}

PageDeployer is the host boundary for writing/removing the target-side page.

type Plan

type Plan struct {
	Session    session.Session
	PagePath   string
	ListenHost string
	ListenPort int
}

Plan describes a WebShell-over-HTTP SOCKS tunnel. The host must deploy the page with its session executor and run the local SOCKS listener.

type Sink

type Sink interface {
	Start(ctx context.Context, plan Plan) (*Status, error)
	Stop(ctx context.Context, sess session.Session) error
}

Sink is the host boundary for the local SOCKS5 engine. This module ships no default networking implementation.

type Status

type Status struct {
	Running   bool
	LocalAddr string
	PageURL   string
	Sessions  int
	Message   string
}

Jump to

Keyboard shortcuts

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