Versions in this module Expand all Collapse all v1 v1.4.1 Dec 24, 2021 Changes in this version + const AUTO_MODE + const DEFAULT_TIMEOUT + const FLOW_MODE + const HTTPTYPE + const SINGLE_MODE + const SOCKS5TYPE + const STAGE_CONNECT + const STAGE_DONE + const STAGE_INIT + const STAGE_UNEXISTS + var GlobalStatus = false — darwin/amd64, linux/amd64, windows/amd64 + var IsStartHttpProxy = false + var Locker = sync.RWMutex + var RAW_PROFILE = "" — darwin/amd64, linux/amd64 + var TO_STOP = false + var UDPSTACK = &UDpSocks5Conn + var UseGBK = false + var WaitClose = make(chan int, 5) + func Auth(name, host, port, passwd string, callbcak func(sess *ssh.Session)) + func Build(name, host, port, pwd string, config utils.Config) + func GetStage(src *net.UDPAddr) int + func GetUDPCon(host string) (con *net.UDPConn, err error) + func HandleBySrc(src *net.UDPAddr, data []byte) (out []byte, err error) + func IfProxyStart() bool — darwin/amd64, linux/amd64, windows/amd64 + func InitDesktop() — darwin/amd64, linux/amd64 + func KillKcpee() — darwin/amd64, linux/amd64, windows/amd64 + func NewCmdRunner(remoteConn net.Conn) error + func NewForwardingHTTPProxy(logger *log.Logger) *httputil.ReverseProxy + func ProxySet(localAddr string) — darwin/amd64, linux/amd64, windows/amd64 + func Stop(name, host, port, pwd string) + func UpdateStage(src *net.UDPAddr, stage int) + type CmdStruct struct + UseGbk bool + func NewCmdStruct(cmd string) (c *CmdStruct) + func (cmd *CmdStruct) ToData() *bytes.Buffer + type KcpClient struct + CmdChan chan string + RRR uint16 + ShowLog int + func NewKcpClient(config *utils.Config, kconfig *utils.KcpConfig) (kclient *KcpClient) + func (conn *KcpClient) CmdString(cmd string) + func (conn *KcpClient) Listen(listenAddr string, ifStartUdpListener ...bool) (err error) + func (conn *KcpClient) ListenUDP(listenAddr string) (err error) + func (conn *KcpClient) SetProxyType(tp int) + func (kclient *KcpClient) ListenHttpProxy(listenAddr string) (err error) + func (kclient *KcpClient) SetMode(mode int) + type KcpTunnel struct + func NewKcpTunnel(config *utils.Config, kconfig *utils.KcpConfig) (kclient *KcpTunnel) + func (kcpBase *KcpTunnel) HeartBeatC(stream net.Conn) + func (tun *KcpTunnel) Connect(listenAddr, host string) + func (tun *KcpTunnel) ConnectCmd(host string) error + func (tun *KcpTunnel) ConnectCmdInit(host string) (p1 Stdio, p2 net.Conn, err error) + func (tun *KcpTunnel) SetRedirectHost(host string) + func (tun *KcpTunnel) SetTunMode(mode string) + func (tun *KcpTunnel) TryPadding(host string) + func (tun *KcpTunnel) Tunnel(host string) + func (tun *KcpTunnel) TunnelOne(host string) + type Proxy struct + AuthPass string + AuthUser string + Avoid string + ClientReadTimeout time.Duration + ClientWriteTimeout time.Duration + DestDialTimeout time.Duration + DestReadTimeout time.Duration + DestWriteTimeout time.Duration + ForwardingHTTPProxy *httputil.ReverseProxy + HandleBody func(p1 net.Conn, host string, afterConnected func(p1, p2 net.Conn)) + Logger *zap.Logger + func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Stdio struct + UseGbk bool + func NewStdio(remoteHost string) Stdio + func (std *Stdio) Close() error + func (std *Stdio) LocalAddr() net.Addr + func (std *Stdio) Read(buf []byte) (n int, err error) + func (std *Stdio) RemoteAddr() net.Addr + func (std *Stdio) SetDeadline(t time.Time) error + func (std *Stdio) SetReadDeadline(t time.Time) error + func (std *Stdio) SetTimeout(t time.Duration) + func (std *Stdio) SetWriteDeadline(t time.Time) error + func (std *Stdio) Write(buf []byte) (n int, err error) + type UDpSocks5Conn struct + Dst *net.UDPAddr + StackSrc map[string]int + Stage int