Ejemplo n.º 1
0
        public static void WebStart(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime lifetime)
        {
            SignumServer.Start(app, env, typeof(Startup).Assembly);

            AuthServer.Start(app, () => Starter.Configuration.Value.AuthTokens, "IMPORTANT SECRET FROM AtTest. CHANGE THIS STRING!!!");
            CacheServer.Start(app);
            FilesServer.Start(app);
            UserQueryServer.Start(app);
            DashboardServer.Start(app);
            WordServer.Start(app);
            ExcelServer.Start(app);
            ChartServer.Start(app);
            MapServer.Start(app);
            ToolbarServer.Start(app);
            TranslationServer.Start(app, new AlreadyTranslatedTranslator(new AzureTranslator("Your API Key for Azure Translate")));
            SchedulerServer.Start(app, lifetime);
            ProcessServer.Start(app);
            MailingServer.Start(app);
            ProfilerServer.Start(app);
            DiffLogServer.Start(app);
            PredictorServer.Start(app);
            OmniboxServer.Start(app,
                                new EntityOmniboxResultGenenerator(),
                                new DynamicQueryOmniboxResultGenerator(),
                                new ChartOmniboxResultGenerator(),
                                new DashboardOmniboxResultGenerator(DashboardLogic.Autocomplete),
                                new UserQueryOmniboxResultGenerator(UserQueryLogic.Autocomplete),
                                new UserChartOmniboxResultGenerator(UserChartLogic.Autocomplete),
                                new MapOmniboxResultGenerator(type => OperationLogic.TypeOperations(type).Any()),
                                new ReactSpecialOmniboxGenerator()
                                   //new HelpModuleOmniboxResultGenerator(),
                                ); //Omnibox

            SignumCultureSelectorFilter.GetCurrentCulture = (ctx) => GetCulture(ctx);
        }
Ejemplo n.º 2
0
        public static void WebStart(HttpConfiguration config)
        {
            SignumServer.Start(config, typeof(Global).Assembly);
            AuthServer.Start(config, () => Starter.Configuration.Value.AuthTokens, "IMPORTANT SECRET FROM Southwind. CHANGE THIS STRING!!!");
            CacheServer.Start(config);
            FilesServer.Start(config);
            UserQueryServer.Start(config);
            DashboardServer.Start(config);
            WordServer.Start(config);
            ExcelServer.Start(config);
            ChartServer.Start(config);
            MapServer.Start(config);
            TranslationServer.Start(config, new AlreadyTranslatedTranslator(new BingTranslator()));
            SchedulerServer.Start(config);
            ProcessServer.Start(config);
            DisconnectedServer.Start(config);
            MailingServer.Start(config);
            ProfilerServer.Start(config);
            DiffLogServer.Start(config);

            OmniboxServer.Start(config,
                                new EntityOmniboxResultGenenerator(),
                                new DynamicQueryOmniboxResultGenerator(),
                                new ChartOmniboxResultGenerator(),
                                new DashboardOmniboxResultGenerator(DashboardLogic.Autocomplete),
                                new UserQueryOmniboxResultGenerator(UserQueryLogic.Autocomplete),
                                new UserChartOmniboxResultGenerator(UserChartLogic.Autocomplete),
                                new MapOmniboxResultGenerator(type => OperationLogic.TypeOperations(type).Any()),
                                new ReactSpecialOmniboxGenerator()
                                   //new HelpModuleOmniboxResultGenerator(),
                                ); //Omnibox
        }
Ejemplo n.º 3
0
        public static void Initialize()
        {
            GetHostByNameHook.Install();
            ConnectHook.Install();
            SendHook.InstallSend();
            SendHook.InstallRecv();
            PortPatch.Apply();
            DisableEncryptionPatch.Apply();
            GameProtocolHook.Install2((msgid, msg) =>
            {
                Debugging.Debug.Log("msg: " + msgid.ToString());
            });

            GameProtocolHook.Install((gameProtocol, type) =>
            {
                Debugging.Debug.Log(gameProtocol.ToString() + ", " + type.ToString());
                if (type == 0)
                {
                    GameServer.Protocol = new Protocol.Protocol(gameProtocol);
                }
                else if (type == 3)
                {
                    AuthServer.Protocol = new Protocol.Protocol(gameProtocol);
                }
                else
                {
                    Debugging.Debug.Log("Unknown protocol type: " + gameProtocol.ToString() + ", " + type.ToString());
                }
            });

            _fileServer.Start();
            AuthServer.Start();
            GameServer.Start();
        }
Ejemplo n.º 4
0
        private static void StartServer(ref AuthServer server)
        {
            server.Initialize();
            server.Start();
            GC.Collect();

            while (true)
            {
                Thread.Sleep(5000);
            }
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            var server = new AuthServer();

            if (!Debugger.IsAttached)
            {
                try
                {
                    server.Initialize();
                    server.Start();

                    GC.Collect();

                    while (true)
                    {
                        Thread.Sleep(5000);
                    }
                }
                catch (Exception e)
                {
                    server.HandleCrashException(e);
                }
                finally
                {
                    server.Shutdown();
                }
            }
            else
            {
                server.Initialize();
                server.Start();

                GC.Collect();

                while (true)
                {
                    Thread.Sleep(5000);
                }
            }
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            Console.Title = "[REALM] BurningEmu for Dofus 2.53.2 RELEASE";

            FrameManager.Initialize("Burning.Emu");

            DatabaseManager.Instance.Initialize("mongodb://localhost");

            AccountRepository.Instance.Initialize("account");

            AuthServer authServer = new AuthServer("127.0.0.1", 6897);

            serverTaskList.Add(Task.Run(() => authServer.Start()));


            Task.WaitAll(serverTaskList.ToArray());
        }
Ejemplo n.º 7
0
        public static void Initialize()
        {
            ConnectHook.Install();
            PortPatch.Apply();
            DisableEncryptionPatch.Apply();
            GetHostByNameHook.Install();

            GameProtocolHook.Install(gameProtocol =>
            {
                GameServer.Protocol = new Protocol.Protocol(gameProtocol);
                AuthServer.Protocol = GameServer.Protocol.Next;
            });

            _fileServer.Start();
            AuthServer.Start();
            GameServer.Start();
        }
Ejemplo n.º 8
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                args = new [] { "auth.conf" };
            }

            Log.Trace("Started");

            var configPath = args[0];
            var encoding   = Encoding.UTF8;

            if (!File.Exists(configPath))
            {
                Log.Error("{0} not found", configPath);
                return;
            }

            try
            {
                var configContent = File.ReadAllText(configPath);
                var parser        = new IniDataParser();

                Config = parser.Parse(configContent);

                Log.Trace("Complete load config");
            }
            catch (Exception ex)
            {
                Log.Error(ex);
            }
            var port    = int.Parse(Config.Sections["GAuthServer"]["port"]);
            var backLog = 0;

            if (!int.TryParse(Config.Sections["GAuthServer"]["listen_backlog"].Safe(), out backLog))
            {
                backLog = 100;
            }

            AuthServer       = new AuthServer <AuthSession>();
            AuthServer.State = Config;
            AuthServer.Start(new IPEndPoint(IPAddress.Any, port), backLog);

            Thread.Sleep(Timeout.Infinite);
        }