Example #1
0
 public TunAdapter()
 {
     InterfaceIndex   = RouteHelper.ConvertLuidToIndex(tun2socks.tun_luid());
     NetworkInterface = NetworkInterfaceUtils.Get((int)InterfaceIndex);
     Gateway          = IPAddress.Parse(Global.Settings.TUNTAP.Gateway);
     Global.Logger.Info($"WinTUN 适配器:{NetworkInterface.Name} {NetworkInterface.Id} {NetworkInterface.Description}, index: {InterfaceIndex}");
 }