Documentation ¶
Index ¶
- type Client
- type Config
- type Csv
- func (s *Csv) DelClient(id int) error
- func (s *Csv) DelHost(id int) error
- func (s *Csv) DelTask(id int) error
- func (s *Csv) GetClient(id int) (v *Client, err error)
- func (s *Csv) GetClientId() int
- func (s *Csv) GetClientIdByVkey(vkey string) (id int, err error)
- func (s *Csv) GetClientList(start, length int) ([]*Client, int)
- func (s *Csv) GetHost(start, length int, id int) ([]*Host, int)
- func (s *Csv) GetHostById(id int) (h *Host, err error)
- func (s *Csv) GetHostId() int
- func (s *Csv) GetIdByVerifyKey(vKey string, addr string) (int, error)
- func (s *Csv) GetInfoByHost(host string, r *http.Request) (h *Host, err error)
- func (s *Csv) GetTask(id int) (v *Tunnel, err error)
- func (s *Csv) GetTaskId() int
- func (s *Csv) Init()
- func (s *Csv) IsHostExist(h *Host) bool
- func (s *Csv) LoadClientFromCsv()
- func (s *Csv) LoadHostFromCsv()
- func (s *Csv) LoadTaskFromCsv()
- func (s *Csv) NewClient(c *Client)
- func (s *Csv) NewHost(t *Host)
- func (s *Csv) NewTask(t *Tunnel)
- func (s *Csv) StoreClientsToCsv()
- func (s *Csv) StoreHostToCsv()
- func (s *Csv) StoreTasksToCsv()
- func (s *Csv) UpdateClient(t *Client) error
- func (s *Csv) UpdateHost(t *Host) error
- func (s *Csv) UpdateTask(t *Tunnel) error
- type Flow
- type Host
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Config ¶
type Csv ¶
type Csv struct { Tasks []*Tunnel Path string Hosts []*Host //域名列表 Clients []*Client //客户端 RunPath string //存储根目录 ClientIncreaseId int //客户端id TaskIncreaseId int //任务自增ID HostIncreaseId int sync.Mutex }
var (
CsvDb *Csv
)
func (*Csv) GetClientId ¶
func (*Csv) GetClientIdByVkey ¶ added in v0.0.15
func (*Csv) GetIdByVerifyKey ¶
func (*Csv) GetInfoByHost ¶ added in v0.0.15
get key by host from x
func (*Csv) IsHostExist ¶ added in v0.0.15
func (*Csv) LoadClientFromCsv ¶
func (s *Csv) LoadClientFromCsv()
func (*Csv) LoadHostFromCsv ¶
func (s *Csv) LoadHostFromCsv()
func (*Csv) LoadTaskFromCsv ¶
func (s *Csv) LoadTaskFromCsv()
func (*Csv) StoreClientsToCsv ¶
func (s *Csv) StoreClientsToCsv()
func (*Csv) StoreHostToCsv ¶
func (s *Csv) StoreHostToCsv()
func (*Csv) StoreTasksToCsv ¶
func (s *Csv) StoreTasksToCsv()
func (*Csv) UpdateClient ¶
func (*Csv) UpdateHost ¶
func (*Csv) UpdateTask ¶
type Flow ¶
Click to show internal directories.
Click to hide internal directories.