예제 #1
0
        protected override void StartupSpecific()
        {
            m_storageManager = CreateStorageManager();

            m_clientStackManager = CreateClientStackManager();

            Initialize();

            m_httpServer
                = new BaseHttpServer(
                      m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
                      m_networkServersInfo.HttpSSLCN);

            if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
            {
                m_log.Error("[REGION SERVER]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
            }

            m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
            m_httpServer.Start();

            MainServer.Instance = m_httpServer;

            base.StartupSpecific();
        }
        protected override void StartupSpecific()
        {
            m_storageManager = CreateStorageManager();

            m_clientStackManager = CreateClientStackManager();

            Initialize();

            // Main HTTP server first
            m_httpServer          = new BaseHttpServer(m_httpServerPort, null);
            m_httpServer.HostName = m_networkServersInfo.HostName;
            MainServer.AddHttpServer(m_httpServer);

            m_log.InfoFormat("[REGION]: Starting HTTP server on {0}:{1}", m_httpServer.HostName, m_httpServerPort);
            m_httpServer.Start();

            // If specified configure an ssl server for use as well
            // you need a Cert Request/Signed pair installed in the MY store with the CN specified
            if (m_networkServersInfo.HttpUsesSSL)
            {
                if (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)
                {
                    m_log.Error("[HTTP]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
                }
                else
                {
                    /// XXX Should also support specifying an IP Address
                    BaseHttpServer secureServer = new BaseHttpServer(m_networkServersInfo.httpSSLPort, null);
                    secureServer.HostName = m_networkServersInfo.HostName;

                    if (m_networkServersInfo.HttpSSLCN != null)
                    {
                        secureServer.SetSecureParams(m_networkServersInfo.HttpSSLCN, m_networkServersInfo.sslProtocol);
                    }
                    else
                    {
                        secureServer.SetSecureParams(m_networkServersInfo.HttpSSLCert, m_networkServersInfo.HttpSSLPassword, m_networkServersInfo.sslProtocol);
                    }

                    MainServer.AddHttpServer(secureServer);

                    m_log.Info("[REGION]: Starting HTTPS server");
                    secureServer.Start();
                }
            }

            base.StartupSpecific();
        }
예제 #3
0
        protected override void StartupSpecific()
        {
            if (m_log.IsDebugEnabled)
            {
                m_log.DebugFormat("{0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

            SceneManager         = SceneManager.Instance;
            m_clientStackManager = CreateClientStackManager();

            Initialize();

            m_httpServer
                = new BaseHttpServer(
                      m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
                      m_networkServersInfo.HttpSSLCN);

            if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
            {
                m_log.Error("[REGION SERVER]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
            }

            m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
            m_httpServer.Start();

            MainServer.AddHttpServer(m_httpServer);
            MainServer.Instance = m_httpServer;

            // "OOB" Server
            if (m_networkServersInfo.ssl_listener)
            {
                BaseHttpServer server = new BaseHttpServer(
                    m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path,
                    m_networkServersInfo.cert_pass);

                m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port);
                MainServer.AddHttpServer(server);
                server.Start();
            }

            base.StartupSpecific();
        }
예제 #4
0
        public void PostInitialise()
        {
            if ((m_scene != null) && (m_createClientStack))
            {
                m_log.Info("[LLClientStackModule] Starting up LLClientStack.");
                IPEndPoint endPoint = m_scene.RegionInfo.InternalEndPoint;

                uint port = (uint)endPoint.Port;
                m_clientStackManager = new ClientStackManager(m_clientStackDll);

                m_clientServer
                   = m_clientStackManager.CreateServer(endPoint.Address,
                     ref port, m_scene.RegionInfo.ProxyOffset, m_scene.RegionInfo.m_allow_alternate_ports, m_source,
                       m_scene.CommsManager.AssetCache);

                m_clientServer.AddScene(m_scene);

                m_clientServer.Start();
            }
        }
예제 #5
0
        protected override void StartupSpecific()
        {
			if (m_log.IsDebugEnabled) {
				m_log.DebugFormat ("{0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
			}

            SceneManager = SceneManager.Instance;
            m_clientStackManager = CreateClientStackManager();

            Initialize();

            m_httpServer 
                = new BaseHttpServer(
                    m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort, 
                    m_networkServersInfo.HttpSSLCN);
            
            if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
            {
                m_log.Error("[REGION SERVER]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
            }

            m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
            m_httpServer.Start();

            MainServer.AddHttpServer(m_httpServer);
            MainServer.Instance = m_httpServer;

            // "OOB" Server
            if (m_networkServersInfo.ssl_listener)
            {
                BaseHttpServer server = new BaseHttpServer(
                    m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path,
                    m_networkServersInfo.cert_pass);

                m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port);
                MainServer.AddHttpServer(server);
                server.Start();
            }
            
            base.StartupSpecific();
        }
예제 #6
0
        protected override void StartupSpecific()
        {
            m_clientStackManager = CreateClientStackManager();

            Initialize();

            m_httpServer 
                = new BaseHttpServer(
                    m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort, 
                    m_networkServersInfo.HttpSSLCN);
            
            if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
            {
                m_log.Error("[REGION SERVER]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
            }

            m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
            m_httpServer.Start();

            MainServer.Instance = m_httpServer;

            // "OOB" Server
            if (m_networkServersInfo.ssl_listener)
            {
                BaseHttpServer server = null;
                server = new BaseHttpServer(
                    m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path,
                    m_networkServersInfo.cert_pass);
                // Add the server to m_Servers
                if(server != null)
                {
                    m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port);
                    MainServer.AddHttpServer(server);
                    server.Start();
                }
            }
            
            base.StartupSpecific();
        }
예제 #7
0
        protected override void StartupSpecific()
        {
            m_clientStackManager = CreateClientStackManager();

            Initialize();

            m_httpServer
                = new BaseHttpServer(
                      m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
                      m_networkServersInfo.HttpSSLCN);

            if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
            {
                m_log.Error("[REGION SERVER]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
            }

            m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
            m_httpServer.Start();

            MainServer.Instance = m_httpServer;

            // "OOB" Server
            if (m_networkServersInfo.ssl_listener)
            {
                BaseHttpServer server = null;
                server = new BaseHttpServer(
                    m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path,
                    m_networkServersInfo.cert_pass);
                // Add the server to m_Servers
                if (server != null)
                {
                    m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port);
                    MainServer.AddHttpServer(server);
                    server.Start();
                }
            }

            base.StartupSpecific();
        }
        protected override void StartupSpecific()
        {
            m_clientStackManager = CreateClientStackManager();

            Initialize();

            m_httpServer 
                = new BaseHttpServer(
                    m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort, 
                    m_networkServersInfo.HttpSSLCN);
            
            if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
            {
                m_log.Error("[REGION SERVER]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
            }

            m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
            m_httpServer.Start();

            MainServer.Instance = m_httpServer;

            base.StartupSpecific();
        }
        public void RegionLoaded(Scene scene)
        {
            if (m_scene == null)
            {
                m_scene = scene;
            }

            if ((m_scene != null) && (m_createClientStack))
            {
                m_log.Info("[LLClientStackModule] Starting up LLClientStack.");
                IPEndPoint endPoint = m_scene.RegionInfo.InternalEndPoint;

                uint port = (uint)endPoint.Port;
                m_clientStackManager = new ClientStackManager(m_clientStackDll);

                m_clientServer
                   = m_clientStackManager.CreateServer(endPoint.Address,
                     ref port, m_scene.RegionInfo.ProxyOffset, m_scene.RegionInfo.m_allow_alternate_ports, m_source,
                       m_scene.AuthenticateHandler);

                m_clientServer.AddScene(m_scene);

                m_clientServer.Start();
            }
        }
예제 #10
0
        protected override void StartupSpecific()
        {
            m_storageManager = CreateStorageManager();

            m_clientStackManager = CreateClientStackManager();

            Initialize();

            m_httpServer 
                = new BaseHttpServer(
                    m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort, 
                    m_networkServersInfo.HttpSSLCN);
            
            if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
            {
                m_log.Error("[HTTP]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
            }

            m_log.Info("[REGION]: Starting HTTP server");
            m_httpServer.Start();

            base.StartupSpecific();
        }
예제 #11
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public OpenSimBase(IConfigSource configSource)
        {
            m_startuptime = DateTime.Now;
            m_version = VersionInfo.Version;

            // Random uuid for private data
            m_osSecret = UUID.Random().ToString();

            m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics);
            m_periodicDiagnosticsTimer.Enabled = true;

            // This thread will go on to become the console listening thread
            Thread.CurrentThread.Name = "ConsoleThread";

            ILoggerRepository repository = LogManager.GetRepository();
            IAppender[] appenders = repository.GetAppenders();

            foreach (IAppender appender in appenders)
            {
                if (appender.Name == "LogFileAppender")
                {
                    m_logFileAppender = appender;
                }
            }

            LoadConfigSettings(configSource);

            m_clientStackManager = CreateClientStackManager();

            Initialize();

            m_httpServer = new BaseHttpServer(
                m_httpServerPort, m_configSettings.HttpUsesSSL, m_configSettings.httpSSLPort,
                m_configSettings.HttpSSLCN);

            if (m_configSettings.HttpUsesSSL && (m_configSettings.HttpListenerPort == m_configSettings.httpSSLPort))
            {
                m_log.Error("[REGION SERVER]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
            }

            m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
            m_httpServer.Start();

            MainServer.Instance = m_httpServer;
        }
예제 #12
0
        protected override void StartupSpecific()
        {
            m_storageManager = CreateStorageManager();

            m_clientStackManager = CreateClientStackManager();

            Initialize();

            // Main HTTP server first
            m_httpServer = new BaseHttpServer(m_httpServerPort, null);
            m_httpServer.HostName = m_networkServersInfo.HostName; 
            MainServer.AddHttpServer(m_httpServer);

            m_log.InfoFormat("[REGION]: Starting HTTP server on {0}:{1}", m_httpServer.HostName, m_httpServerPort);
            m_httpServer.Start();

            // If specified configure an ssl server for use as well
            // you need a Cert Request/Signed pair installed in the MY store with the CN specified
            if (m_networkServersInfo.HttpUsesSSL)
            {
                if (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)
                {
                    m_log.Error("[HTTP]: HTTP Server config failed.   HTTP Server and HTTPS server must be on different ports");
                }
                else
                {
                    /// XXX Should also support specifying an IP Address
                    BaseHttpServer secureServer = new BaseHttpServer(m_networkServersInfo.httpSSLPort, null);
                    secureServer.HostName = m_networkServersInfo.HostName;

                    if (m_networkServersInfo.HttpSSLCN != null)
                        secureServer.SetSecureParams(m_networkServersInfo.HttpSSLCN, m_networkServersInfo.sslProtocol);
                    else
                        secureServer.SetSecureParams(m_networkServersInfo.HttpSSLCert, m_networkServersInfo.HttpSSLPassword, m_networkServersInfo.sslProtocol);

                    MainServer.AddHttpServer(secureServer);

                    m_log.Info("[REGION]: Starting HTTPS server");
                    secureServer.Start();
                }
            }

            base.StartupSpecific();
        }