client

package
v0.33.13 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: GPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPad = 64

Variables

View Source
var AutoReconnect = true
View Source
var DisableP2P = false
View Source
var HasFailed = false
View Source
var NowStatus int
View Source
var P2PMode = common.CONN_QUIC
View Source
var QuicConfig = &quic.Config{
	KeepAlivePeriod:    10 * time.Second,
	MaxIdleTimeout:     30 * time.Second,
	MaxIncomingStreams: 100000,
}
View Source
var SkipTLSVerify = false
View Source
var TlsCfg = &tls.Config{
	InsecureSkipVerify: true,
	ServerName:         crypt.GetFakeDomainName(),
	NextProtos:         []string{"h3"},
}

Functions

func EnsurePort added in v0.29.3

func EnsurePort(server string, tp string) string

func GetProxyConn added in v0.30.4

func GetProxyConn(proxyUrl, server string, timeout time.Duration) (rawConn net.Conn, err error)

func GetTaskStatus

func GetTaskStatus(server string, vKey string, tp string, proxyUrl string)

func NewConn

func NewConn(tp string, vkey string, server string, proxyUrl string) (*conn.Conn, string, error)

NewConn Create a new connection with the server and verify it

func NewHttpProxyConn

func NewHttpProxyConn(proxyURL *url.URL, remoteAddr string, timeout time.Duration) (net.Conn, error)

NewHttpProxyConn http proxy connection

func RegisterLocalIp

func RegisterLocalIp(server string, vKey string, tp string, proxyUrl string, hour int)

func SendType added in v0.30.6

func SendType(c *conn.Conn, connType, uuid string) error

func StartFromFile

func StartFromFile(pCtx context.Context, pCancel context.CancelFunc, path string)

func VerifyState added in v0.29.26

func VerifyState(state tls.ConnectionState, host string) (fingerprint []byte, verified bool)

func VerifyTLS added in v0.28.3

func VerifyTLS(connection net.Conn, host string) (fingerprint []byte, verified bool)

Types

type Closer added in v0.29.5

type Closer interface{ Close() error }

type FileServerManager added in v0.29.5

type FileServerManager struct {
	// contains filtered or unexported fields
}

func NewFileServerManager added in v0.29.5

func NewFileServerManager(parentCtx context.Context) *FileServerManager

func (*FileServerManager) CloseAll added in v0.29.5

func (fsm *FileServerManager) CloseAll()

func (*FileServerManager) GetListenerByKey added in v0.30.6

func (fsm *FileServerManager) GetListenerByKey(key string) (*conn.VirtualListener, bool)

func (*FileServerManager) StartFileServer added in v0.29.5

func (fsm *FileServerManager) StartFileServer(t *file.Tunnel, vkey string)

type HealthChecker added in v0.29.5

type HealthChecker struct {
	// contains filtered or unexported fields
}

func NewHealthChecker added in v0.29.5

func NewHealthChecker(parentCtx context.Context, healths []*file.Health, c *conn.Conn) *HealthChecker

func (*HealthChecker) Reset added in v0.29.5

func (hc *HealthChecker) Reset()

func (*HealthChecker) Start added in v0.29.5

func (hc *HealthChecker) Start()

func (*HealthChecker) Stop added in v0.29.5

func (hc *HealthChecker) Stop()

type P2PManager added in v0.29.5

type P2PManager struct {
	// contains filtered or unexported fields
}

func NewP2PManager added in v0.29.5

func NewP2PManager(pCtx context.Context, pCancel context.CancelFunc, cfg *config.CommonConfig) *P2PManager

func (*P2PManager) Close added in v0.29.5

func (mgr *P2PManager) Close()

func (*P2PManager) StartLocalServer added in v0.29.5

func (mgr *P2PManager) StartLocalServer(l *config.LocalServer) error

type P2pBridge added in v0.32.3

type P2pBridge struct {
	// contains filtered or unexported fields
}

func NewP2pBridge added in v0.32.3

func NewP2pBridge(mgr *P2PManager, l *config.LocalServer) *P2pBridge

func (*P2pBridge) CliProcess added in v0.33.7

func (b *P2pBridge) CliProcess(*conn.Conn, string)

func (*P2pBridge) IsServer added in v0.32.3

func (b *P2pBridge) IsServer() bool

func (*P2pBridge) SendLinkInfo added in v0.32.3

func (b *P2pBridge) SendLinkInfo(_ int, link *conn.Link, _ *file.Tunnel) (net.Conn, error)

type TRPClient

type TRPClient struct {
	// contains filtered or unexported fields
}

func NewRPClient

func NewRPClient(svrAddr, vKey, bridgeConnType, proxyUrl, uuid string, cnf *config.Config, disconnectTime int, fsm *FileServerManager) *TRPClient

NewRPClient new client

func (*TRPClient) Close

func (s *TRPClient) Close()

func (*TRPClient) Start

func (s *TRPClient) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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