mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 01:33:49 +08:00
fix: tun.device not shown in restful api
This commit is contained in:
parent
a08aa10630
commit
f52fe6aa74
@ -138,6 +138,7 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
|
|||||||
tunName := options.Device
|
tunName := options.Device
|
||||||
if options.FileDescriptor == 0 && (tunName == "" || !checkTunName(tunName)) {
|
if options.FileDescriptor == 0 && (tunName == "" || !checkTunName(tunName)) {
|
||||||
tunName = CalculateInterfaceName(InterfaceName)
|
tunName = CalculateInterfaceName(InterfaceName)
|
||||||
|
options.Device = tunName
|
||||||
}
|
}
|
||||||
routeAddress := options.RouteAddress
|
routeAddress := options.RouteAddress
|
||||||
if len(options.Inet4RouteAddress) > 0 {
|
if len(options.Inet4RouteAddress) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user