Documentation ¶
Index ¶
- Constants
- Variables
- func AddTask(t *ServerConfig) error
- func DelTask(vKey string) error
- func GetKeyByHost(host string) (h *HostList, t *ServerConfig, err error)
- func InitFromCsv()
- func NewMode(Bridge *bridge.Tunnel, config *ServerConfig) 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 *ServerConfig)
- func StartTask(vKey string) error
- func StopServer(cFlag string) error
- type Csv
- func (s *Csv) AddRunList(vKey string, svr interface{})
- func (s *Csv) DelHost(host string) error
- func (s *Csv) DelRunList(vKey string)
- func (s *Csv) DelTask(vKey string) error
- func (s *Csv) GetHostList(start, length int, vKey string) ([]*HostList, int)
- func (s *Csv) GetTask(vKey string) (v *ServerConfig, err error)
- func (s *Csv) Init()
- func (s *Csv) LoadHostFromCsv()
- func (s *Csv) LoadTaskFromCsv()
- func (s *Csv) NewHost(t *HostList)
- func (s *Csv) NewTask(t *ServerConfig)
- func (s *Csv) StoreHostToCsv()
- func (s *Csv) StoreTasksToCsv()
- func (s *Csv) UpdateTask(t *ServerConfig) error
- type HostList
- type HostServer
- type ServerConfig
- type Sock5ModeServer
- type TunnelModeServer
- type UdpModeServer
- type WebServer
Constants ¶
View Source
const (
UserPassAuth = uint8(2)
)
Variables ¶
Functions ¶
func GetKeyByHost ¶
func GetKeyByHost(host string) (h *HostList, t *ServerConfig, err error)
get key by host from x
func NewMode ¶
func NewMode(Bridge *bridge.Tunnel, config *ServerConfig) interface{}
new a server by mode name
Types ¶
type Csv ¶
type Csv struct { Tasks []*ServerConfig Path string RunList map[string]interface{} Hosts []*HostList //域名列表 }
func (*Csv) AddRunList ¶
func (*Csv) DelRunList ¶
func (*Csv) GetHostList ¶
func (*Csv) LoadHostFromCsv ¶
func (s *Csv) LoadHostFromCsv()
func (*Csv) LoadTaskFromCsv ¶
func (s *Csv) LoadTaskFromCsv()
func (*Csv) NewTask ¶
func (s *Csv) NewTask(t *ServerConfig)
func (*Csv) StoreHostToCsv ¶
func (s *Csv) StoreHostToCsv()
func (*Csv) StoreTasksToCsv ¶
func (s *Csv) StoreTasksToCsv()
func (*Csv) UpdateTask ¶
func (s *Csv) UpdateTask(t *ServerConfig) error
type HostServer ¶
type HostServer struct {
// contains filtered or unexported fields
}
host
func NewHostServer ¶
func NewHostServer(cnf *ServerConfig) *HostServer
type ServerConfig ¶
type ServerConfig struct { TcpPort int //服务端与客户端通信端口 Mode string //启动方式 Target string //目标 VerifyKey string //flag U string //socks5验证用户名 P string //socks5验证密码 Compress string //压缩方式 Start int //是否开启 IsRun int //是否在运行 ClientStatus int //客s户端状态 Crypt bool //是否加密 Mux bool //是否加密 CompressEncode int CompressDecode int }
func GetServerConfig ¶
func GetServerConfig(start, length int, typeVal string) ([]*ServerConfig, int)
get task list by page num
type Sock5ModeServer ¶
type Sock5ModeServer struct {
// contains filtered or unexported fields
}
func NewSock5ModeServer ¶
func NewSock5ModeServer(bridge *bridge.Tunnel, cnf *ServerConfig) *Sock5ModeServer
new
type TunnelModeServer ¶
type TunnelModeServer struct {
// contains filtered or unexported fields
}
func NewTunnelModeServer ¶
func NewTunnelModeServer(process process, bridge *bridge.Tunnel, cnf *ServerConfig) *TunnelModeServer
tcp|http|host
type UdpModeServer ¶
type UdpModeServer struct {
// contains filtered or unexported fields
}
func NewUdpModeServer ¶
func NewUdpModeServer(bridge *bridge.Tunnel, cnf *ServerConfig) *UdpModeServer
func (*UdpModeServer) Close ¶
func (s *UdpModeServer) Close() error
Click to show internal directories.
Click to hide internal directories.