mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 09:16:58 +08:00
Fix: lost stack log info
This commit is contained in:
@@ -107,14 +107,16 @@ func (e *Engine) setDevice() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) setStack() (err error) {
|
func (e *Engine) setStack() (err error) {
|
||||||
handler := &fakeTunnel{}
|
defer func() {
|
||||||
e.stack, err = stack.New(e.device, handler, stack.WithDefault())
|
if err == nil {
|
||||||
if err != nil {
|
log.Infof(
|
||||||
log.Infof(
|
"[STACK] %s://%s <-> %s://%s",
|
||||||
"[STACK] %s://%s <-> %s://%s",
|
e.device.Type(), e.device.Name(),
|
||||||
e.device.Type(), e.device.Name(),
|
e.proxy.Proto(), e.proxy.Addr(),
|
||||||
e.proxy.Proto(), e.proxy.Addr(),
|
)
|
||||||
)
|
}
|
||||||
}
|
}()
|
||||||
|
|
||||||
|
e.stack, err = stack.New(e.device, &fakeTunnel{}, stack.WithDefault())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user