tcptunnel

package
v0.0.0-...-0321c80 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// ServerAddr 服务端的地址,必填,如 192.168.1.10:8080
	ServerAddr string

	// LocalAddr 期望对外发布的本地服务的地址,必填,如 127.0.0.1:8090
	LocalAddr string

	// Worker
	Worker int

	// ConnectTimeout 网络连接超时时间,可选
	ConnectTimeout time.Duration

	// Token 加密密码,可选
	Token string
	// contains filtered or unexported fields
}

func (*Client) BindFlags

func (c *Client) BindFlags()

func (*Client) Start

func (c *Client) Start() error

type Server

type Server struct {
	// ListenOut 对外转发的监听地址,必填
	ListenOut string

	// ListenClient 为 Client 准备的监听地址,必填
	ListenClient string

	// Token 加密密码,可选
	Token string

	ClientExpire time.Duration

	Size int
	// contains filtered or unexported fields
}

func (*Server) BindFlags

func (s *Server) BindFlags()

func (*Server) Start

func (s *Server) Start() error

type Tunneler

type Tunneler struct {
	RemoteRW func() io.ReadWriteCloser
	LocalRW  func() io.ReadWriteCloser

	Worker int
	// contains filtered or unexported fields
}

func (*Tunneler) Start

func (c *Tunneler) Start() error

func (*Tunneler) Stop

func (c *Tunneler) Stop()

Jump to

Keyboard shortcuts

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