Documentation ¶
Index ¶
- Constants
- Variables
- func AddTask(t *utils.Tunnel) error
- func DelClientConnect(clientId int)
- func DelTask(id int) error
- func DelTunnelAndHostByClientId(clientId int)
- func GetClientList(start, length int) (list []*utils.Client, cnt int)
- func GetDashboardData() map[string]int
- func GetInfoByHost(host string) (h *utils.Host, err error)
- func GetTunnel(start, length int, typeVal string, clientId int) ([]*utils.Tunnel, int)
- func InitFromCsv()
- func NewMode(Bridge *bridge.Bridge, c *utils.Tunnel) interface{}
- func ProcessHost(c *utils.Conn, s *TunnelModeServer) error
- func ProcessHttp(c *utils.Conn, s *TunnelModeServer) error
- func ProcessTunnel(c *utils.Conn, s *TunnelModeServer) error
- func StartNewServer(bridgePort int, cnf *utils.Tunnel)
- func StartTask(id int) error
- func StopServer(id int) error
- type HostServer
- func (s *HostServer) Close() error
- func (s *HostServer) FlowAdd(in, out int64)
- func (s *HostServer) FlowAddHost(host *utils.Host, in, out int64)
- func (s *HostServer) GetTunnelAndWriteHost(connType string, clientId int, cnf *utils.Config, addr string) (link *utils.Conn, err error)
- func (s *HostServer) ResetConfig() bool
- func (s *HostServer) Start() error
- type RunServer
- type Sock5ModeServer
- func (s *Sock5ModeServer) Auth(c net.Conn) error
- func (s *Sock5ModeServer) Close() error
- func (s *Sock5ModeServer) FlowAdd(in, out int64)
- func (s *Sock5ModeServer) FlowAddHost(host *utils.Host, in, out int64)
- func (s *Sock5ModeServer) GetTunnelAndWriteHost(connType string, clientId int, cnf *utils.Config, addr string) (link *utils.Conn, err error)
- func (s *Sock5ModeServer) ResetConfig() bool
- func (s *Sock5ModeServer) Start() error
- type TunnelModeServer
- func (s *TunnelModeServer) Close() error
- func (s *TunnelModeServer) FlowAdd(in, out int64)
- func (s *TunnelModeServer) FlowAddHost(host *utils.Host, in, out int64)
- func (s *TunnelModeServer) GetTunnelAndWriteHost(connType string, clientId int, cnf *utils.Config, addr string) (link *utils.Conn, err error)
- func (s *TunnelModeServer) ResetConfig() bool
- func (s *TunnelModeServer) Start() error
- type UdpModeServer
- func (s *UdpModeServer) Close() error
- func (s *UdpModeServer) FlowAdd(in, out int64)
- func (s *UdpModeServer) FlowAddHost(host *utils.Host, in, out int64)
- func (s *UdpModeServer) GetTunnelAndWriteHost(connType string, clientId int, cnf *utils.Config, addr string) (link *utils.Conn, err error)
- func (s *UdpModeServer) ResetConfig() bool
- func (s *UdpModeServer) Start() error
- type WebServer
- func (s *WebServer) FlowAdd(in, out int64)
- func (s *WebServer) FlowAddHost(host *utils.Host, in, out int64)
- func (s *WebServer) GetTunnelAndWriteHost(connType string, clientId int, cnf *utils.Config, addr string) (link *utils.Conn, err error)
- func (s *WebServer) ResetConfig() bool
- func (s *WebServer) Start()
Constants ¶
View Source
const (
UserPassAuth = uint8(2)
)
Variables ¶
Functions ¶
func DelTunnelAndHostByClientId ¶ added in v0.0.10
func DelTunnelAndHostByClientId(clientId int)
根据客户端id删除其所属的所有隧道和域名
func GetClientList ¶ added in v0.0.10
获取客户端列表
func GetDashboardData ¶ added in v0.0.10
func GetInfoByHost ¶ added in v0.0.10
get key by host from x
Types ¶
type HostServer ¶
type HostServer struct {
// contains filtered or unexported fields
}
host
func NewHostServer ¶
func NewHostServer(task *utils.Tunnel) *HostServer
func (*HostServer) FlowAddHost ¶ added in v0.0.10
func (*HostServer) GetTunnelAndWriteHost ¶ added in v0.0.10
type Sock5ModeServer ¶
type Sock5ModeServer struct {
// contains filtered or unexported fields
}
func NewSock5ModeServer ¶
func NewSock5ModeServer(bridge *bridge.Bridge, task *utils.Tunnel) *Sock5ModeServer
new
func (*Sock5ModeServer) FlowAddHost ¶ added in v0.0.10
func (*Sock5ModeServer) GetTunnelAndWriteHost ¶ added in v0.0.10
func (*Sock5ModeServer) ResetConfig ¶ added in v0.0.10
func (s *Sock5ModeServer) ResetConfig() bool
热更新配置
type TunnelModeServer ¶
type TunnelModeServer struct {
// contains filtered or unexported fields
}
func NewTunnelModeServer ¶
func NewTunnelModeServer(process process, bridge *bridge.Bridge, task *utils.Tunnel) *TunnelModeServer
tcp|http|host
func (*TunnelModeServer) FlowAdd ¶ added in v0.0.10
func (s *TunnelModeServer) FlowAdd(in, out int64)
func (*TunnelModeServer) FlowAddHost ¶ added in v0.0.10
func (*TunnelModeServer) GetTunnelAndWriteHost ¶ added in v0.0.9
func (*TunnelModeServer) ResetConfig ¶ added in v0.0.10
func (s *TunnelModeServer) ResetConfig() bool
热更新配置
type UdpModeServer ¶
type UdpModeServer struct {
// contains filtered or unexported fields
}
func NewUdpModeServer ¶
func NewUdpModeServer(bridge *bridge.Bridge, task *utils.Tunnel) *UdpModeServer
func (*UdpModeServer) Close ¶
func (s *UdpModeServer) Close() error
func (*UdpModeServer) FlowAddHost ¶ added in v0.0.10
func (*UdpModeServer) GetTunnelAndWriteHost ¶ added in v0.0.10
func (*UdpModeServer) ResetConfig ¶ added in v0.0.10
func (s *UdpModeServer) ResetConfig() bool
热更新配置
type WebServer ¶
type WebServer struct {
// contains filtered or unexported fields
}
web管理方式
func (*WebServer) FlowAddHost ¶ added in v0.0.10
func (*WebServer) GetTunnelAndWriteHost ¶ added in v0.0.10
Click to show internal directories.
Click to hide internal directories.