fix: tunnel panic

This commit is contained in:
gVisor bot 2022-12-11 08:59:57 +08:00
parent f59d3e1c6d
commit 459166668c

View File

@ -64,7 +64,13 @@ func (t *Tunnel) Close() error {
// Address implements constant.InboundListener
func (t *Tunnel) Address() string {
return t.ttl.Address()
if t.ttl != nil {
return t.ttl.Address()
}
if t.tul != nil {
return t.tul.Address()
}
return ""
}
// Listen implements constant.InboundListener