Add: external controller

This commit is contained in:
Dreamacro
2018-06-18 11:31:49 +08:00
parent bc4ca2818b
commit 79e5338113
5 changed files with 120 additions and 1 deletions

View File

@ -34,6 +34,14 @@ func (t *Tunnel) Add(req C.ServerAdapter) {
t.queue.In() <- req
}
func (t *Tunnel) Traffic() *C.Traffic {
return t.traffic
}
func (t *Tunnel) Log() *observable.Observable {
return t.observable
}
func (t *Tunnel) UpdateConfig() (err error) {
cfg, err := C.GetConfig()
if err != nil {