Add option to toggle if ignore virtual interfaces

Some VPN like ZerotierOne owns IP address but no gateway, and there is no
good idea in NetworkManager.GetIPsDefault() to filter such virtual interfaces,
so just provide one option to let user decide it.
This commit is contained in:
Xu Fasheng
2019-02-21 22:35:31 +08:00
parent e7e7d96f51
commit cf4e64f430
7 changed files with 18 additions and 11 deletions

View File

@@ -1577,7 +1577,7 @@ namespace Emby.Server.Implementations
if (addresses.Count == 0)
{
addresses.AddRange(NetworkManager.GetLocalIpAddresses());
addresses.AddRange(NetworkManager.GetLocalIpAddresses(ServerConfigurationManager.Configuration.IgnoreVirtualInterfaces));
}
var resultList = new List<IpAddressInfo>();