fix: tun.device not shown in restful api

This commit is contained in:
wwqgtxx 2024-09-21 19:46:39 +08:00
parent a08aa10630
commit f52fe6aa74

View File

@ -138,6 +138,7 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
tunName := options.Device
if options.FileDescriptor == 0 && (tunName == "" || !checkTunName(tunName)) {
tunName = CalculateInterfaceName(InterfaceName)
options.Device = tunName
}
routeAddress := options.RouteAddress
if len(options.Inet4RouteAddress) > 0 {