client

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubTypeUP2P  = SubType("SubTypeUP2P")
	SubTypeP2P   = SubType("SubTypeP2P")
	SubTypeProxy = SubType("SubTypeProxy")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceBox added in v1.3.0

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

func LinkProxyServer added in v1.3.0

func LinkProxyServer(name, addr, key string) (*DeviceBox, error)

func LinkProxyServerFromAnonymity added in v1.3.8

func LinkProxyServerFromAnonymity(addr, key string) (*DeviceBox, error)

func LinkProxyServerRaw added in v1.3.8

func LinkProxyServerRaw(name, addr, key string, isAnonymity bool) (*DeviceBox, error)

func (*DeviceBox) Close added in v1.3.0

func (box *DeviceBox) Close() error

func (*DeviceBox) GetAllNetworkSpeedView added in v1.3.0

func (box *DeviceBox) GetAllNetworkSpeedView() tool.NetworkSpeedView

func (*DeviceBox) GetNetworkSpeedView added in v1.3.0

func (box *DeviceBox) GetNetworkSpeedView() tool.NetworkSpeedView

func (*DeviceBox) GetOtherDelayPing added in v1.3.0

func (box *DeviceBox) GetOtherDelayPing(name ...string) ([]tool.OdjPing, error)

func (*DeviceBox) GetSubBox added in v1.3.0

func (box *DeviceBox) GetSubBox(name string) (*SubBox, error)

func (*DeviceBox) GetSubBoxByP2P added in v1.3.3

func (box *DeviceBox) GetSubBoxByP2P(name string) (*SubBox, error)

GetSubBoxByP2P tcp to p2p It's very difficult, Do not use. If you need p2p, please use GetSubBoxByUP2P

func (*DeviceBox) GetSubBoxBySubType added in v1.3.7

func (box *DeviceBox) GetSubBoxBySubType(name string, subType SubType) (*SubBox, error)

func (*DeviceBox) GetSubBoxBySubTypeMix added in v1.3.7

func (box *DeviceBox) GetSubBoxBySubTypeMix(name string, subTypes []SubType) (*SubBox, []error, error)

func (*DeviceBox) GetSubBoxByUP2P added in v1.3.6

func (box *DeviceBox) GetSubBoxByUP2P(name string) (*SubBox, error)

GetSubBoxByUP2P udp to kcp

func (*DeviceBox) GetSubBoxFromSid added in v1.3.8

func (box *DeviceBox) GetSubBoxFromSid(sid string) (*SubBox, bool)

func (*DeviceBox) IsAnonymity added in v1.3.8

func (box *DeviceBox) IsAnonymity() bool

func (*DeviceBox) ListenSubBox added in v1.3.0

func (box *DeviceBox) ListenSubBox(fn func(sub *SubBox)) error

func (*DeviceBox) ListenSubBoxOnce added in v1.3.5

func (box *DeviceBox) ListenSubBoxOnce() (sub *SubBox, err error)

func (*DeviceBox) LocalAddr added in v1.3.7

func (box *DeviceBox) LocalAddr() net.Addr

func (*DeviceBox) Name added in v1.3.8

func (box *DeviceBox) Name() string

func (*DeviceBox) ProxyAddr added in v1.3.7

func (box *DeviceBox) ProxyAddr() net.Addr

func (*DeviceBox) Read added in v1.3.1

func (box *DeviceBox) Read(b []byte) (int, error)

func (*DeviceBox) SetDeadline added in v1.3.0

func (box *DeviceBox) SetDeadline(timeout time.Duration) bool

func (*DeviceBox) SetInfoLog added in v1.3.0

func (box *DeviceBox) SetInfoLog(a ...any)

func (*DeviceBox) SetWarnLog added in v1.3.0

func (box *DeviceBox) SetWarnLog(a ...any)

func (*DeviceBox) SubNumbers added in v1.3.8

func (box *DeviceBox) SubNumbers() int

func (*DeviceBox) SwitchListenUP2P added in v1.3.7

func (box *DeviceBox) SwitchListenUP2P(r bool)

func (*DeviceBox) Wait added in v1.3.0

func (box *DeviceBox) Wait()

func (*DeviceBox) Write added in v1.3.1

func (box *DeviceBox) Write(b []byte) (int, error)

type LinkClient added in v1.3.5

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

func LinkOtherConn added in v1.3.5

func LinkOtherConn(req LinkConnReq) (*LinkClient, error)

func (*LinkClient) Close added in v1.3.5

func (lc *LinkClient) Close(err error) error

func (*LinkClient) CopyLocalAddr added in v1.3.5

func (lc *LinkClient) CopyLocalAddr() net.Addr

func (*LinkClient) CopyRemoteAddr added in v1.3.5

func (lc *LinkClient) CopyRemoteAddr() net.Addr

func (*LinkClient) LinkLocalAddr added in v1.3.5

func (lc *LinkClient) LinkLocalAddr() net.Addr

func (*LinkClient) LinkRemoteAddr added in v1.3.5

func (lc *LinkClient) LinkRemoteAddr() net.Addr

func (*LinkClient) LocalAddr added in v1.3.5

func (lc *LinkClient) LocalAddr() net.Addr

func (*LinkClient) RemoteAddr added in v1.3.5

func (lc *LinkClient) RemoteAddr() net.Addr

func (*LinkClient) SetCopyDeadline added in v1.3.5

func (lc *LinkClient) SetCopyDeadline(t time.Time) error

func (*LinkClient) SetCopyReadDeadline added in v1.3.5

func (lc *LinkClient) SetCopyReadDeadline(t time.Time) error

func (*LinkClient) SetCopyWriteDeadline added in v1.3.5

func (lc *LinkClient) SetCopyWriteDeadline(t time.Time) error

func (*LinkClient) SetDeadline added in v1.3.5

func (lc *LinkClient) SetDeadline(t time.Time) error

func (*LinkClient) SetLinkDeadline added in v1.3.5

func (lc *LinkClient) SetLinkDeadline(t time.Time) error

func (*LinkClient) SetLinkReadDeadline added in v1.3.5

func (lc *LinkClient) SetLinkReadDeadline(t time.Time) error

func (*LinkClient) SetLinkWriteDeadline added in v1.3.5

func (lc *LinkClient) SetLinkWriteDeadline(t time.Time) error

func (*LinkClient) SetReadDeadline added in v1.3.5

func (lc *LinkClient) SetReadDeadline(t time.Time) error

func (*LinkClient) SetWriteDeadline added in v1.3.5

func (lc *LinkClient) SetWriteDeadline(t time.Time) error

func (*LinkClient) Wait added in v1.3.5

func (lc *LinkClient) Wait() error

func (*LinkClient) WriteToLinkConn added in v1.3.5

func (lc *LinkClient) WriteToLinkConn(b []byte) error

type LinkClientRW added in v1.3.5

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

func (*LinkClientRW) Read added in v1.3.5

func (lcrw *LinkClientRW) Read(b []byte) (n int, err error)

func (*LinkClientRW) Write added in v1.3.5

func (lcrw *LinkClientRW) Write(b []byte) (n int, err error)

type LinkConnReq added in v1.3.5

type LinkConnReq struct {
	CopyConn  net.Conn
	ConnType  string
	ConnAddr  string
	ProxyAddr string
	ProxyKey  string
}

type SubBox added in v1.3.0

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

func (*SubBox) Close added in v1.3.0

func (sub *SubBox) Close() error

func (*SubBox) GetAllNetworkSpeedView added in v1.3.0

func (sub *SubBox) GetAllNetworkSpeedView() tool.NetworkSpeedView

func (*SubBox) GetLocalIntranetAddr added in v1.3.3

func (sub *SubBox) GetLocalIntranetAddr() net.Addr

func (*SubBox) GetLocalName added in v1.3.0

func (sub *SubBox) GetLocalName() string

func (*SubBox) GetLocalPublicAddr added in v1.3.3

func (sub *SubBox) GetLocalPublicAddr() net.Addr

func (*SubBox) GetNetworkSpeedView added in v1.3.0

func (sub *SubBox) GetNetworkSpeedView() tool.NetworkSpeedView

func (*SubBox) GetRawKey added in v1.3.8

func (sub *SubBox) GetRawKey() string

func (*SubBox) GetRemoteIntranetAddr added in v1.3.3

func (sub *SubBox) GetRemoteIntranetAddr() net.Addr

func (*SubBox) GetRemoteName added in v1.3.0

func (sub *SubBox) GetRemoteName() string

func (*SubBox) GetRemotePublicAddr added in v1.3.3

func (sub *SubBox) GetRemotePublicAddr() net.Addr

func (*SubBox) Id added in v1.3.8

func (sub *SubBox) Id() string

func (*SubBox) LocalAddr added in v1.3.0

func (sub *SubBox) LocalAddr() net.Addr

func (*SubBox) NewKey added in v1.3.0

func (sub *SubBox) NewKey(key string) tool.Key

func (*SubBox) Read added in v1.3.0

func (sub *SubBox) Read(b []byte) (int, error)

func (*SubBox) ReadCMsgCb added in v1.3.1

func (sub *SubBox) ReadCMsgCb(fn func(cMsg tool.ConnMsg) (bool, error)) error

func (*SubBox) RemoteAddr added in v1.3.0

func (sub *SubBox) RemoteAddr() net.Addr

func (*SubBox) SetDeadline added in v1.3.0

func (sub *SubBox) SetDeadline(t time.Time) error

func (*SubBox) SetDeadlineDuration added in v1.3.0

func (sub *SubBox) SetDeadlineDuration(timeout time.Duration) bool

func (*SubBox) SetDebugLog added in v1.3.1

func (sub *SubBox) SetDebugLog(a ...any)

func (*SubBox) SetInfoLog added in v1.3.0

func (sub *SubBox) SetInfoLog(a ...any)

func (*SubBox) SetReadDeadline added in v1.3.0

func (sub *SubBox) SetReadDeadline(t time.Time) error

func (*SubBox) SetWarnLog added in v1.3.0

func (sub *SubBox) SetWarnLog(a ...any)

func (*SubBox) SetWriteDeadline added in v1.3.0

func (sub *SubBox) SetWriteDeadline(t time.Time) error

func (*SubBox) Type added in v1.3.7

func (sub *SubBox) Type() string

func (*SubBox) Write added in v1.3.0

func (sub *SubBox) Write(b []byte) (int, error)

func (*SubBox) WriteCMsg added in v1.3.1

func (sub *SubBox) WriteCMsg(header string, id string, code int, data interface{}) error

func (*SubBox) WriteQueueBytes added in v1.3.1

func (sub *SubBox) WriteQueueBytes(b [][]byte) error

type SubType added in v1.3.7

type SubType string

func (*SubType) String added in v1.3.7

func (st *SubType) String() string

Jump to

Keyboard shortcuts

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