mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 09:12:23 +08:00
20 lines
264 B
Go
20 lines
264 B
Go
package debugio
|
|
|
|
import (
|
|
"fmt"
|
|
"reflect"
|
|
|
|
"github.com/sagernet/sing/common"
|
|
)
|
|
|
|
func PrintUpstream(obj any) {
|
|
for obj != nil {
|
|
fmt.Println(reflect.TypeOf(obj))
|
|
if u, ok := obj.(common.WithUpstream); !ok {
|
|
break
|
|
} else {
|
|
obj = u.Upstream()
|
|
}
|
|
}
|
|
}
|