Documentation ¶
Index ¶
- Constants
- Variables
- func AddTask(t *file.Tunnel) error
- func DelClientConnect(clientId int)
- func DelTask(id int) error
- func DelTunnelAndHostByClientId(clientId int)
- func GetClientList(start, length int) (list []*file.Client, cnt int)
- func GetDashboardData() map[string]int
- func GetInfoByHost(host string) (h *file.Host, err error)
- func GetTunnel(start, length int, typeVal string, clientId int) ([]*file.Tunnel, int)
- func InitFromCsv()
- func NewHttp(bridge *bridge.Bridge, c *file.Tunnel) *httpServer
- func NewMode(Bridge *bridge.Bridge, c *file.Tunnel) interface{}
- func ProcessHttp(c *conn.Conn, s *TunnelModeServer) error
- func ProcessTunnel(c *conn.Conn, s *TunnelModeServer) error
- func StartNewServer(bridgePort int, cnf *file.Tunnel, bridgeType string)
- func StartTask(id int) error
- func StopServer(id int) error
- func TestServerConfig()
- type Sock5ModeServer
- type TunnelModeServer
- type UdpModeServer
- type WebServer
Constants ¶
View Source
const (
UserPassAuth = uint8(2)
)
Variables ¶
View Source
var ( Bridge *bridge.Bridge RunList map[int]interface{} //运行中的任务 )
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
func StartNewServer ¶
start a new server
func TestServerConfig ¶ added in v0.0.14
func TestServerConfig()
Types ¶
type Sock5ModeServer ¶
type Sock5ModeServer struct {
// contains filtered or unexported fields
}
func NewSock5ModeServer ¶
func NewSock5ModeServer(bridge *bridge.Bridge, task *file.Tunnel) *Sock5ModeServer
new
func (*Sock5ModeServer) FlowAddHost ¶ 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 *file.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) 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 *file.Tunnel) *UdpModeServer
func (*UdpModeServer) Close ¶
func (s *UdpModeServer) Close() error
func (*UdpModeServer) FlowAddHost ¶ 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
Click to show internal directories.
Click to hide internal directories.