bridge

package
v0.29.21 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: GPL-3.0 Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerTcpEnable  bool = false
	ServerKcpEnable  bool = false
	ServerTlsEnable  bool = false
	ServerWsEnable   bool = false
	ServerWssEnable  bool = false
	ServerSecureMode bool = false
)

Functions

func IsReplay added in v0.27.0

func IsReplay(key string) bool

Types

type Bridge

type Bridge struct {
	TunnelPort int
	Client     *sync.Map
	Register   *sync.Map

	OpenTask    chan *file.Tunnel
	CloseTask   chan *file.Tunnel
	CloseClient chan int
	SecretChan  chan *conn.Secret
	// contains filtered or unexported fields
}

func NewTunnel

func NewTunnel(tunnelPort int, tunnelType string, ipVerify bool, runList *sync.Map, disconnectTime int) *Bridge

func (*Bridge) DelClient

func (s *Bridge) DelClient(id int)

func (*Bridge) GetHealthFromClient

func (s *Bridge) GetHealthFromClient(id int, c *conn.Conn)

get health information form client

func (*Bridge) SendLinkInfo

func (s *Bridge) SendLinkInfo(clientId int, link *conn.Link, t *file.Tunnel) (target net.Conn, err error)

func (*Bridge) StartTunnel

func (s *Bridge) StartTunnel() error

type Client

type Client struct {
	Version string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(t, f *nps_mux.Mux, s *conn.Conn, vs string) *Client

Jump to

Keyboard shortcuts

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