示例#1
0
        public bool Start()
        {
            try
            {
                _ = Server.Listen(new IPEndPoint(IPAddress.IPv6Any, 53));
            }
            catch (Exception e)
            {
                Utils.Logging.Info(e.ToString());
                return(false);
            }

            return(true);
        }
示例#2
0
        public bool Start()
        {
            MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("Starting LocalDns service")}");
            try
            {
                _ = Server.Listen(new IPEndPoint(IPAddress.IPv6Any, 53));
            }
            catch (Exception e)
            {
                Utils.Logging.Info(e.ToString());
                return(false);
            }

            return(true);
        }
示例#3
0
 public static void Main(string[] args)
 {
     Server = new DNS.Server.DnsServer(new Resolver());
     Server.Listen(new IPEndPoint(IPAddress.IPv6Any, 53)).Wait();
 }