Documentation
¶
Index ¶
- Constants
- Variables
- func EnsurePort(server string, tp string) string
- func GetProxyConn(proxyUrl, server string, timeout time.Duration) (rawConn net.Conn, err error)
- func GetTaskStatus(server string, vKey string, tp string, proxyUrl string)
- func NewConn(tp string, vkey string, server string, proxyUrl string) (*conn.Conn, string, error)
- func NewHttpProxyConn(proxyURL *url.URL, remoteAddr string, timeout time.Duration) (net.Conn, error)
- func RegisterLocalIp(server string, vKey string, tp string, proxyUrl string, hour int)
- func SendType(c *conn.Conn, connType, uuid string) error
- func StartFromFile(pCtx context.Context, pCancel context.CancelFunc, path string)
- func VerifyState(state tls.ConnectionState, host string) (fingerprint []byte, verified bool)
- func VerifyTLS(connection net.Conn, host string) (fingerprint []byte, verified bool)
- type Closer
- type FileServerManager
- type HealthChecker
- type P2PManager
- type P2pBridge
- type TRPClient
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"}, }
View Source
var Ver = version.GetLatestIndex()
Functions ¶
func EnsurePort ¶
func GetProxyConn ¶ added in v0.33.12
func NewHttpProxyConn ¶
func NewHttpProxyConn(proxyURL *url.URL, remoteAddr string, timeout time.Duration) (net.Conn, error)
NewHttpProxyConn http proxy connection
func RegisterLocalIp ¶
func StartFromFile ¶
func StartFromFile(pCtx context.Context, pCancel context.CancelFunc, path string)
func VerifyState ¶ added in v0.33.12
func VerifyState(state tls.ConnectionState, host string) (fingerprint []byte, verified bool)
Types ¶
type FileServerManager ¶
type FileServerManager struct {
// contains filtered or unexported fields
}
func NewFileServerManager ¶
func NewFileServerManager(parentCtx context.Context) *FileServerManager
func (*FileServerManager) CloseAll ¶
func (fsm *FileServerManager) CloseAll()
func (*FileServerManager) GetListenerByKey ¶ added in v0.33.12
func (fsm *FileServerManager) GetListenerByKey(key string) (*conn.VirtualListener, bool)
func (*FileServerManager) StartFileServer ¶
func (fsm *FileServerManager) StartFileServer(t *file.Tunnel, vkey string)
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
func NewHealthChecker ¶
func (*HealthChecker) Reset ¶
func (hc *HealthChecker) Reset()
func (*HealthChecker) Start ¶
func (hc *HealthChecker) Start()
func (*HealthChecker) Stop ¶
func (hc *HealthChecker) Stop()
type P2PManager ¶
type P2PManager struct {
// contains filtered or unexported fields
}
func NewP2PManager ¶
func NewP2PManager(pCtx context.Context, pCancel context.CancelFunc, cfg *config.CommonConfig) *P2PManager
func (*P2PManager) Close ¶
func (mgr *P2PManager) Close()
func (*P2PManager) StartLocalServer ¶
func (mgr *P2PManager) StartLocalServer(l *config.LocalServer) error
type P2pBridge ¶ added in v0.33.12
type P2pBridge struct {
// contains filtered or unexported fields
}
func NewP2pBridge ¶ added in v0.33.12
func NewP2pBridge(mgr *P2PManager, l *config.LocalServer) *P2pBridge
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
Click to show internal directories.
Click to hide internal directories.