Example #1
0
 private static Options ParseCommandLine(string[] args)
 {
     Options options = new Options();
     if(!options.ParseCommandLine(args))
         return null;
     return options;
 }
Example #2
0
        private static void StartServers(Options options)
        {
            Configuration config = null;
            if(options.DefaultConfig)
            {
                config = Configuration.Default;
                config.Save(options.ConfigFile);
            }
            else
                config = Configuration.Load(options.ConfigFile);

            State state = new State(config, options.Level);

            AdvDnsServer dns = new AdvDnsServer(state, options.Intercept);
            dns.Start();

            if(options.Intercept)
            {
                AdvWebServer web = new AdvWebServer(state);
                web.Start();
            }
        }