aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs10
-rw-r--r--OpenSim/Tests/Robust/Clients/Grid/GridClient.cs133
-rw-r--r--OpenSim/Tests/Robust/Clients/Presence/PresenceClient.cs81
-rw-r--r--OpenSim/Tests/Robust/Server/DemonServer.cs67
-rw-r--r--bin/Robust.Tests.dll.config43
-rw-r--r--bin/Robust.Tests.ini495
-rw-r--r--prebuild.xml35
7 files changed, 862 insertions, 2 deletions
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index d7d1306..1f2c54d 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -82,7 +82,9 @@ namespace OpenSim.Server.Base
82 argvConfig.AddSwitch("Startup", "logconfig", "g"); 82 argvConfig.AddSwitch("Startup", "logconfig", "g");
83 83
84 // Automagically create the ini file name 84 // Automagically create the ini file name
85 string fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location); 85 string fileName = "";
86 if (Assembly.GetEntryAssembly() != null)
87 fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location);
86 string iniFile = fileName + ".ini"; 88 string iniFile = fileName + ".ini";
87 string logConfig = null; 89 string logConfig = null;
88 90
@@ -158,7 +160,11 @@ namespace OpenSim.Server.Base
158 MainConsole.Instance = new RemoteConsole(prompt); 160 MainConsole.Instance = new RemoteConsole(prompt);
159 ((RemoteConsole)MainConsole.Instance).ReadConfig(Config); 161 ((RemoteConsole)MainConsole.Instance).ReadConfig(Config);
160 } 162 }
161 else 163 else if (consoleType == "mock")
164 {
165 MainConsole.Instance = new MockConsole();
166 }
167 else if (consoleType == "local")
162 { 168 {
163 MainConsole.Instance = new LocalConsole(prompt, startupConfig); 169 MainConsole.Instance = new LocalConsole(prompt, startupConfig);
164 } 170 }
diff --git a/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs b/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs
new file mode 100644
index 0000000..671aca7
--- /dev/null
+++ b/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs
@@ -0,0 +1,133 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31using System.Reflection;
32
33using OpenMetaverse;
34using NUnit.Framework;
35
36using OpenSim.Framework;
37using OpenSim.Services.Interfaces;
38using GridRegion = OpenSim.Services.Interfaces.GridRegion;
39using OpenSim.Services.Connectors;
40
41namespace Robust.Tests
42{
43 [TestFixture]
44 public class GridClient
45 {
46// private static readonly ILog m_log =
47// LogManager.GetLogger(
48// MethodBase.GetCurrentMethod().DeclaringType);
49
50 [Test]
51 public void Grid_001()
52 {
53 GridServicesConnector m_Connector = new GridServicesConnector(DemonServer.Address);
54
55 GridRegion r1 = CreateRegion("Test Region 1", 1000, 1000);
56 GridRegion r2 = CreateRegion("Test Region 2", 1001, 1000);
57 GridRegion r3 = CreateRegion("Test Region 3", 1005, 1000);
58
59 string msg = m_Connector.RegisterRegion(UUID.Zero, r1);
60 Assert.AreEqual(msg, string.Empty, "Region 1 failed to register");
61
62 msg = m_Connector.RegisterRegion(UUID.Zero, r2);
63 Assert.AreEqual(msg, string.Empty, "Region 2 failed to register");
64
65 msg = m_Connector.RegisterRegion(UUID.Zero, r3);
66 Assert.AreEqual(msg, string.Empty, "Region 3 failed to register");
67
68 bool success;
69 success = m_Connector.DeregisterRegion(r3.RegionID);
70 Assert.AreEqual(success, true, "Region 3 failed to deregister");
71
72 msg = m_Connector.RegisterRegion(UUID.Zero, r3);
73 Assert.AreEqual(msg, string.Empty, "Region 3 failed to re-register");
74
75 List<GridRegion> regions = m_Connector.GetNeighbours(UUID.Zero, r1.RegionID);
76 Assert.AreNotEqual(regions, null, "GetNeighbours of region 1 failed");
77 Assert.AreEqual(regions.Count, 1, "Region 1 should have 1 neighbor");
78 Assert.AreEqual(regions[0].RegionName, "Test Region 2", "Region 1 has the wrong neighbor");
79
80 GridRegion region = m_Connector.GetRegionByUUID(UUID.Zero, r2.RegionID);
81 Assert.AreNotEqual(region, null, "GetRegionByUUID for region 2 failed");
82 Assert.AreEqual(region.RegionName, "Test Region 2", "GetRegionByUUID of region 2 returned wrong region");
83
84 region = m_Connector.GetRegionByUUID(UUID.Zero, UUID.Random());
85 Assert.AreEqual(region, null, "Region with randon id should not exist");
86
87 region = m_Connector.GetRegionByName(UUID.Zero, r3.RegionName);
88 Assert.AreNotEqual(region, null, "GetRegionByUUID for region 3 failed");
89 Assert.AreEqual(region.RegionName, "Test Region 3", "GetRegionByUUID of region 3 returned wrong region");
90
91 region = m_Connector.GetRegionByName(UUID.Zero, "Foo");
92 Assert.AreEqual(region, null, "Region Foo should not exist");
93
94 regions = m_Connector.GetRegionsByName(UUID.Zero, "Test", 10);
95 Assert.AreNotEqual(regions, null, "GetRegionsByName failed");
96 Assert.AreEqual(regions.Count, 3, "GetRegionsByName should return 3");
97
98 regions = m_Connector.GetRegionRange(UUID.Zero,
99 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002),
100 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) );
101 Assert.AreNotEqual(regions, null, "GetRegionRange failed");
102 Assert.AreEqual(regions.Count, 2, "GetRegionRange should return 2");
103
104 regions = m_Connector.GetRegionRange(UUID.Zero,
105 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(950),
106 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(950) );
107 Assert.AreNotEqual(regions, null, "GetRegionRange (bis) failed");
108 Assert.AreEqual(regions.Count, 0, "GetRegionRange (bis) should return 0");
109
110 // Deregister them all
111 success = m_Connector.DeregisterRegion(r1.RegionID);
112 Assert.AreEqual(success, true, "Region 1 failed to deregister");
113
114 success = m_Connector.DeregisterRegion(r2.RegionID);
115 Assert.AreEqual(success, true, "Region 2 failed to deregister");
116
117 success = m_Connector.DeregisterRegion(r3.RegionID);
118 Assert.AreEqual(success, true, "Region 3 failed to deregister");
119 }
120
121 private static GridRegion CreateRegion(string name, uint xcell, uint ycell)
122 {
123 GridRegion region = new GridRegion(xcell, ycell);
124 region.RegionName = name;
125 region.RegionID = UUID.Random();
126 region.ExternalHostName = "127.0.0.1";
127 region.HttpPort = 9000;
128 region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 9000);
129
130 return region;
131 }
132 }
133}
diff --git a/OpenSim/Tests/Robust/Clients/Presence/PresenceClient.cs b/OpenSim/Tests/Robust/Clients/Presence/PresenceClient.cs
new file mode 100644
index 0000000..31c8ee9
--- /dev/null
+++ b/OpenSim/Tests/Robust/Clients/Presence/PresenceClient.cs
@@ -0,0 +1,81 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31using System.Reflection;
32
33using OpenMetaverse;
34using NUnit.Framework;
35
36using OpenSim.Framework;
37using OpenSim.Services.Interfaces;
38using OpenSim.Services.Connectors;
39
40namespace Robust.Tests
41{
42 [TestFixture]
43 public class PresenceClient
44 {
45 [Test]
46 public void Presence_001()
47 {
48 PresenceServicesConnector m_Connector = new PresenceServicesConnector(DemonServer.Address);
49
50 UUID user1 = UUID.Random();
51 UUID session1 = UUID.Random();
52 UUID region1 = UUID.Random();
53
54 bool success = m_Connector.LoginAgent(user1.ToString(), session1, UUID.Zero);
55 Assert.AreEqual(success, true, "Failed to add user session");
56
57 PresenceInfo pinfo = m_Connector.GetAgent(session1);
58 Assert.AreNotEqual(pinfo, null, "Unable to retrieve session");
59 Assert.AreEqual(pinfo.UserID, user1.ToString(), "Retrieved session does not match expected userID");
60 Assert.AreNotEqual(pinfo.RegionID, region1, "Retrieved session is unexpectedly in region");
61
62 success = m_Connector.ReportAgent(session1, region1);
63 Assert.AreEqual(success, true, "Failed to report session in region 1");
64
65 pinfo = m_Connector.GetAgent(session1);
66 Assert.AreNotEqual(pinfo, null, "Unable to session presence");
67 Assert.AreEqual(pinfo.UserID, user1.ToString(), "Retrieved session does not match expected userID");
68 Assert.AreEqual(pinfo.RegionID, region1, "Retrieved session is not in expected region");
69
70 success = m_Connector.LogoutAgent(session1);
71 Assert.AreEqual(success, true, "Failed to remove session");
72
73 pinfo = m_Connector.GetAgent(session1);
74 Assert.AreEqual(pinfo, null, "Session is still there, even though it shouldn't");
75
76 success = m_Connector.ReportAgent(session1, UUID.Random());
77 Assert.AreEqual(success, false, "Remove non-existing session should fail");
78 }
79
80 }
81}
diff --git a/OpenSim/Tests/Robust/Server/DemonServer.cs b/OpenSim/Tests/Robust/Server/DemonServer.cs
new file mode 100644
index 0000000..b51a6bb
--- /dev/null
+++ b/OpenSim/Tests/Robust/Server/DemonServer.cs
@@ -0,0 +1,67 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.IO;
31using System.Threading;
32
33using Nini.Config;
34using log4net;
35using NUnit.Framework;
36
37using OpenSim.Server;
38
39namespace Robust.Tests
40{
41 [SetUpFixture]
42 public class DemonServer : OpenSimServer
43 {
44 private Thread m_demon;
45
46 public static string Address = "http://localhost:8888";
47
48 [SetUp]
49 public void StartDemon()
50 {
51 if (File.Exists("Robust.Tests.log"))
52 File.Delete("Robust.Tests.log");
53
54 Console.WriteLine("**** Starting demon Robust server ****");
55 m_demon = new Thread( () => Main(new string[] {"-inifile=Robust.Tests.ini"}));
56 m_demon.Start();
57 Console.WriteLine("**** Setup Finished ****");
58 }
59
60 [TearDown]
61 public void StopDemon()
62 {
63 Console.WriteLine("**** Killing demon Robust Server ****");
64 m_Server.Shutdown();
65 }
66 }
67}
diff --git a/bin/Robust.Tests.dll.config b/bin/Robust.Tests.dll.config
new file mode 100644
index 0000000..a4c43e7
--- /dev/null
+++ b/bin/Robust.Tests.dll.config
@@ -0,0 +1,43 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<configuration>
3 <configSections>
4 <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
5 </configSections>
6 <runtime>
7 <loadFromRemoteSources enabled="true" />
8 <gcConcurrent enabled="true" />
9 <gcServer enabled="true" />
10 </runtime>
11 <appSettings>
12 </appSettings>
13 <log4net>
14 <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
15 <filter type="log4net.Filter.LoggerMatchFilter">
16 <loggerToMatch value="special"/>
17 <acceptOnMatch value="false"/>
18 </filter>
19 <layout type="log4net.Layout.PatternLayout">
20 <conversionPattern value="%date{HH:mm:ss} - %message" />
21 </layout>
22 </appender>
23
24 <appender name="LogFileAppender" type="log4net.Appender.FileAppender">
25 <file value="Robust.Tests.log" />
26 <appendToFile value="true" />
27 <filter type="log4net.Filter.LoggerMatchFilter">
28 <loggerToMatch value="special"/>
29 <acceptOnMatch value="false"/>
30 </filter>
31 <layout type="log4net.Layout.PatternLayout">
32 <conversionPattern value="%date %-5level - %logger %message%newline" />
33 </layout>
34 </appender>
35
36 <root>
37 <level value="DEBUG" />
38 <appender-ref ref="Console" />
39 <appender-ref ref="LogFileAppender" />
40 </root>
41
42 </log4net>
43</configuration>
diff --git a/bin/Robust.Tests.ini b/bin/Robust.Tests.ini
new file mode 100644
index 0000000..fc405f9
--- /dev/null
+++ b/bin/Robust.Tests.ini
@@ -0,0 +1,495 @@
1; * FOR TESTS ONLY -- DO NOT USE THIS FILE
2[Const]
3
4 ; The URL of the Robust server
5 BaseURL = "http://127.0.0.1"
6
7 ; The public port of the Robust server
8 PublicPort = "8888"
9
10 ; The private port of the Robust server, same for testing
11 PrivatePort = "8888"
12
13
14; * The startup section lists all the connectors to start up in this server
15; * instance. This may be only one, or it may be the entire server suite.
16; * Multiple connectors should be separated by commas.
17; *
18; * These are the IN connectors the server uses, the in connectors
19; * read this config file and load the needed service and database connectors
20; *
21; * The full syntax of a connector string is:
22; * [[<ConfigName>@]<port>/]<dll name>[:<class name>]
23; *
24[Startup]
25 ; Place to create a PID file
26 ; If no path if specified then a PID file is not created.
27 ; PIDFile = "/tmp/Robust.exe.pid"
28
29 ; Plugin Registry Location
30 ; Set path to directory for plugin registry. Information
31 ; about the registered repositories and installed plugins
32 ; will be stored here
33 ; The Robust.exe process must have R/W access to the location
34 RegistryLocation = "."
35
36 ; Modular configurations
37 ; Set path to directory for modular ini files...
38 ; The Robust.exe process must have R/W access to the location
39 ConfigDirectory = "."
40
41 console = "rest"
42
43 ; Console commands can be saved to a file, so the command history persists after a restart. (default is true)
44 ConsoleHistoryFileEnabled = false
45
46 ; The history file can be just a filename (relative to OpenSim's bin/ directory
47 ; or it can be a full path to somewhere else. (default is OpenSimConsoleHistory.txt in bin/)
48 ConsoleHistoryFile = "RobustConsoleHistory.txt"
49
50 ; How many lines of command history should we keep? (default is 100)
51 ConsoleHistoryFileLines = 100
52
53[ServiceList]
54 GridServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridServiceConnector"
55 PresenceServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:PresenceServiceConnector"
56
57 ;InventoryInConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XInventoryInConnector"
58 ;UserAccountServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:UserAccountServiceConnector"
59
60 ;; Uncomment as more tests are added
61 ;AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector"
62 ;GridInfoServerInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GridInfoServerInConnector"
63 ;AuthenticationServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector"
64 ;OpenIdServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:OpenIdServerConnector"
65 ;AvatarServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AvatarServiceConnector"
66 ;LLLoginServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector"
67 ;GridUserServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridUserServiceConnector"
68 ;FriendsServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:FriendsServiceConnector"
69 ;MapAddServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:MapAddServiceConnector"
70 ;MapGetServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:MapGetServiceConnector"
71 ;OfflineIMServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.OfflineIM.dll:OfflineIMServiceRobustConnector"
72 ;GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector"
73 ;BakedTextureService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XBakesConnector"
74 ;UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector"
75 ;EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector"
76
77; * This is common for all services, it's the network setup for the entire
78; * server instance, if none is specified above
79; *
80[Network]
81 port = ${Const|PrivatePort}
82
83 ;; The follow 3 variables are for HTTP Basic Authentication for the Robust services.
84 ;; Use this if your central services in port ${Const|PrivatePort} need to be accessible on the Internet
85 ;; but you want to protect them from unauthorized access.
86 ; AuthType = "BasicHttpAuthentication"
87 ; HttpAuthUsername = "some_username"
88 ; HttpAuthPassword = "some_password"
89 ;;
90 ;; AuthType above can be overriden in any of the service sections below by
91 ; AuthType = "None"
92 ;; This is useful in cases where you want to protect most of the services,
93 ;; but unprotect individual services. Username and Password can also be
94 ;; overriden if you want to use different credentials for the different services.
95
96 ;; By default, scripts are not allowed to call private services via llHttpRequest()
97 ;; Such calls are detected by the X-SecondLife-Shared HTTP header
98 ;; If you allow such calls you must be sure that they are restricted to very trusted scripters
99 ;; (remember scripts can also be in visiting avatar attachments).
100 ;; This can be overriden in individual private service sections if necessary
101 AllowllHTTPRequestIn = false
102
103 ; * The following are for the remote console
104 ; * They have no effect for the local or basic console types
105 ; * Leave commented to diable logins to the console
106 ;ConsoleUser = Test
107 ;ConsolePass = secret
108 ;ConsolePort = 0
109
110
111[DatabaseService]
112 ; PGSQL
113 ; Uncomment these lines if you want to use PGSQL storage
114 ; Change the connection string to your db details
115 ;StorageProvider = "OpenSim.Data.PGSQL.dll"
116 ;ConnectionString = "Server=localhost;Database=opensim;User Id=opensim; password=***;"
117
118 ; Null
119 ; Uncomment these lines if you want to use MySQL storage
120 ; Change the connection string to your db details
121 StorageProvider = "OpenSim.Data.Null.dll"
122 ConnectionString = ""
123
124
125; * As an example, the below configuration precisely mimicks the legacy
126; * asset server. It is read by the asset IN connector (defined above)
127; * and it then loads the OUT connector (a local database module). That,
128; * in turn, reads the asset loader and database connection information
129; *
130[AssetService]
131 LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
132 DefaultAssetLoader = ""
133
134 ; Allow maptile assets to remotely deleted by remote calls to the asset service.
135 ; There is no harm in having this as false - it just means that historical maptile assets are not deleted.
136 ; This only applies to maptiles served via the version 1 viewer mechanisms
137 ; Default is false
138 AllowRemoteDelete = false
139
140 ; Allow all assets to be remotely deleted.
141 ; Only set this to true if you are operating a grid where you control all calls to the asset service
142 ; (where a necessary condition is that you control all simulators) and you need this for admin purposes.
143 ; If set to true, AllowRemoteDelete = true is required as well.
144 ; Default is false.
145 AllowRemoteDeleteAllTypes = false
146
147
148; * This configuration loads the inventory server modules. It duplicates
149; * the function of the legacy inventory server
150; *
151[InventoryService]
152 LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
153
154 ; Will calls to purge folders (empty trash) and immediately delete/update items or folders (not move to trash first) succeed?
155 ; If this is set to false then some other arrangement must be made to perform these operations if necessary.
156 AllowDelete = true
157
158
159; * This is the new style grid service.
160; * "Realm" is the table that is used for user lookup.
161; * It defaults to "regions", which uses the legacy tables
162; *
163[GridService]
164 LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
165 ; Realm = "regions"
166 ; AllowDuplicateNames = "True"
167
168 ;; Next, we can specify properties of regions, including default and fallback regions
169 ;; The syntax is: Region_<RegionName> = "<flags>"
170 ;; or: Region_<RegionID> = "<flags>"
171 ;; where <flags> can be DefaultRegion, DefaultHGRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut, Reservation, NoMove, Authenticate
172 ;;
173 ;; DefaultRegion If a local login cannot be placed in the required region (e.g. home region does not exist, avatar is not allowed entry, etc.)
174 ;; then this region becomes the destination. Only the first online default region will be used. If no DefaultHGRegion
175 ;; is specified then this will also be used as the region for hypergrid connections that require it (commonly because they have not specified
176 ;; an explicit region.
177 ;;
178 ;; DefaultHGRegion If an avatar connecting via the hypergrid does not specify a region, then they are placed here. Only the first online
179 ;; region will be used.
180 ;;
181 ;; FallbackRegion If the DefaultRegion is not available for a local login, then any FallbackRegions are tried instead. These are tried in the
182 ;; order specified. This only applies to local logins at this time, not Hypergrid connections.
183 ;;
184 ;; NoDirectLogin A hypergrid user cannot directly connect to this region. This does not apply to local logins.
185 ;;
186 ;; Persistent When the simulator is shutdown, the region is signalled as offline but left registered on the grid.
187 ;;
188 ;; Example specification:
189 ; Region_Welcome_Area = "DefaultRegion, FallbackRegion"
190 ; (replace spaces with underscore)
191
192 ;; Allow supporting viewers to export content
193 ;; Set to false to prevent export
194 ExportSupported = true
195
196
197; * This is the configuration for the freeswitch server in grid mode
198[FreeswitchService]
199 LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
200
201 ;; The IP address of your FreeSWITCH server.
202 ;; This address must be reachable by viewers.
203 ; ServerAddress = 127.0.0.1
204
205 ;; The following configuration parameters are optional
206
207 ;; By default, this is the same as the ServerAddress
208 ; Realm = 127.0.0.1
209
210 ;; By default, this is the same as the ServerAddress on port 5060
211 ; SIPProxy = 127.0.0.1:5060
212
213 ;; Default is 5000ms
214 ; DefaultTimeout = 5000
215
216 ;; The dial plan context. Default is "default"
217 ; Context = default
218
219 ;; Currently unused
220 ; UserName = freeswitch
221
222 ;; Currently unused
223 ; Password = password
224
225 ;; The following parameters are for STUN = Simple Traversal of UDP through NATs
226 ;; See http://wiki.freeswitch.org/wiki/NAT_Traversal
227 ;; stun.freeswitch.org is not guaranteed to be running so use it in
228 ;; production at your own risk
229 ; EchoServer = 127.0.0.1
230 ; EchoPort = 50505
231 ; AttemptSTUN = false
232
233
234; * This is the new style authentication service. Currently, only MySQL
235; * is implemented.
236; *
237[AuthenticationService]
238 ; for the server connector
239 LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
240
241 ;; Allow the service to process HTTP getauthinfo calls.
242 ;; Default is false.
243 ; AllowGetAuthInfo = false
244
245 ;; Allow the service to process HTTP setauthinfo calls.
246 ;; Default is false.
247 ; AllowSetAuthInfo = false
248
249 ;; Allow the service to process HTTP setpassword calls.
250 ;; Default is false.
251 ; AllowSetPassword = false
252
253
254[OpenIdService]
255 ; for the server connector
256 AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
257 UserAccountServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
258
259
260; * This is the new style authentication service. Currently, only MySQL
261; * is implemented. "Realm" is the table that is used for user lookup.
262; * It defaults to "useraccounts", which uses the new style.
263; * Realm = "users" will use the legacy tables as an authentication source
264; *
265[UserAccountService]
266 ; for the server connector
267 LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
268 ; Realm = "useraccounts"
269
270 ; These are for creating new accounts by the service
271 AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
272 PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
273 GridService = "OpenSim.Services.GridService.dll:GridService"
274 InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
275 AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
276 GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
277
278 ;; This switch creates the minimum set of body parts and avatar entries for a viewer 2
279 ;; to show a default "Ruth" avatar rather than a cloud for a newly created user.
280 ;; Default is false
281 CreateDefaultAvatarEntries = true
282
283 ;; Allow the service to process HTTP createuser calls.
284 ;; Default is false.
285 ; AllowCreateUser = false
286
287 ;; Allow the service to process HTTP setaccount calls.
288 ;; Default is false.
289 ; AllowSetAccount = false
290
291
292[GridUserService]
293 ; for the server connector
294 LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService"
295
296
297[PresenceService]
298 ; for the server connector
299 LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
300 ; Set this to true to allow the use of advanced web services and multiple
301 ; bots using one account
302 AllowDuplicatePresences = false;
303
304
305[AvatarService]
306 ; for the server connector
307 LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService"
308
309
310[FriendsService]
311 ; for the server connector
312 LocalServiceModule = "OpenSim.Services.FriendsService.dll:FriendsService"
313
314[EstateService]
315 LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService"
316
317[LibraryService]
318 LibraryName = "OpenSim Library"
319 DefaultLibrary = "./inventory/Libraries.xml"
320
321
322[LoginService]
323 ; for the server connector
324 LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService"
325 ; for the service
326 UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
327 GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
328 AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
329 InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
330 AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
331 PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
332 GridService = "OpenSim.Services.GridService.dll:GridService"
333 SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector"
334 LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService"
335 FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
336
337 ; The minimum user level required for a user to be able to login. 0 by default
338 ; If you disable a particular user's account then you can set their login level below this number.
339 ; You can also change this level from the console though these changes will not be persisted.
340 ; MinLoginLevel = 0
341
342 ; Ask co-operative viewers to use a different currency name
343 ;Currency = ""
344
345 ;; Set minimum fee to publish classified
346 ; ClassifiedFee = 0
347
348 WelcomeMessage = "Welcome, Avatar!"
349 AllowRemoteSetLoginLevel = "false"
350
351 ; For V2 map
352 MapTileURL = "${Const|BaseURL}:${Const|PublicPort}/";
353
354 ; Url to search service
355 ; SearchURL = "${Const|BaseURL}:${Const|PublicPort}/";
356
357 ; For V3 destination guide
358 ; DestinationGuide = "${Const|BaseURL}/guide"
359
360 ; For V3 avatar picker (( work in progress ))
361 ; AvatarPicker = "${Const|BaseURL}/avatars"
362
363 ; If you run this login server behind a proxy, set this to true
364 ; HasProxy = false
365
366 ;; Regular expressions for controlling which client versions are accepted/denied.
367 ;; An empty string means nothing is checked.
368 ;;
369 ;; Example 1: allow only these 3 types of clients (any version of them)
370 ;; AllowedClients = "Imprudence|Hippo|Second Life"
371 ;;
372 ;; Example 2: allow all clients except these
373 ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald"
374 ;;
375 ;; Note that these are regular expressions, so every character counts.
376 ;; Also note that this is very weak security and should not be trusted as a reliable means
377 ;; for keeping bad clients out; modified clients can fake their identifiers.
378 ;;
379 ;;
380 ;AllowedClients = ""
381 ;DeniedClients = ""
382
383 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
384 ;; Viewers do not listen to timezone sent by the server. They use Pacific Standard Time instead,
385 ;; but rely on the server to calculate Daylight Saving Time. Sending another DST than US Pacific
386 ;; would result in time inconsistencies between grids (during summer and around DST transition period)
387 ;; default let OpenSim calculate US Pacific DST
388 ;; "none" disable DST (equivallent to "local" with system set to GMT)
389 ;; "local" force legacy behaviour (using local system time to calculate DST)
390 ; DSTZone = "America/Los_Angeles;Pacific Standard Time"
391
392 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
393 ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time
394 ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not.
395 ;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids.
396 ;; By default, this setting uses various timezone names to calculate DST with regards to the viewer's standard PST.
397 ;; Options are
398 ;; "none" no DST
399 ;; "local" use the server's only timezone to calculate DST. This is previous OpenSimulator behaviour.
400 ;; "America/Los_Angeles;Pacific Standard Time" use these timezone names to look up Daylight savings.
401 ;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows
402 DSTZone = "America/Los_Angeles;Pacific Standard Time"
403
404 ;Basic Login Service Dos Protection Tweaks
405 ;;
406 ;; Some Grids/Users use a transparent proxy that makes use of the X-Forwarded-For HTTP Header, If you do, set this to true
407 ;; If you set this to true and you don't have a transparent proxy, it may allow attackers to put random things in the X-Forwarded-For header to
408 ;; get around this basic DOS protection.
409 ;DOSAllowXForwardedForHeader = false
410 ;;
411 ;; The protector adds up requests during this rolling period of time, default 10 seconds
412 ;DOSRequestTimeFrameMS = 10000
413 ;;
414 ;; The amount of requests in the above timeframe from the same endpoint that triggers protection
415 ;DOSMaxRequestsInTimeFrame = 5
416 ;;
417 ;; The amount of time that a specific endpoint is blocked. Default 2 minutes.
418 ;DOSForgiveClientAfterMS = 120000
419 ;;
420 ;; To turn off basic dos protection, set the DOSMaxRequestsInTimeFrame to 0.
421
422
423[MapImageService]
424 LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService"
425
426 ; Set this if you want to change the default
427 ; TilesStoragePath = "maptiles"
428 ;
429 ; If for some reason you have the AddMapTile service outside the firewall (e.g. ${Const|PublicPort}),
430 ; you may want to set this. Otherwise, don't set it, because it's already protected.
431 ; GridService = "OpenSim.Services.GridService.dll:GridService"
432 ;
433 ; Additionally, if you run this server behind a proxy, set this to true
434 ; HasProxy = false
435
436
437[Messaging]
438 ; OfflineIM
439 OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService"
440
441
442[GridInfoService]
443 ; These settings are used to return information on a get_grid_info call.
444 ; Client launcher scripts and third-party clients make use of this to
445 ; autoconfigure the client and to provide a nice user experience. If you
446 ; want to facilitate that, you should configure the settings here according
447 ; to your grid or standalone setup.
448 ;
449 ; See http://opensimulator.org/wiki/GridInfo
450
451 ; login uri: for grid this is the login server URI
452 login = ${Const|BaseURL}:${Const|PublicPort}/
453
454 ; long grid name: the long name of your grid
455 gridname = "the lost continent of hippo"
456
457 ; short grid name: the short name of your grid
458 gridnick = "hippogrid"
459
460 ; login page: optional: if it exists it will be used to tell the client to use
461 ; this as splash page
462 ;welcome = ${Const|BaseURL}/welcome
463
464 ; helper uri: optional: if it exists if will be used to tell the client to use
465 ; this for all economy related things
466 ;economy = ${Const|BaseURL}:${Const|PublicPort}/
467
468 ; web page of grid: optional: page providing further information about your grid
469 ;about = ${Const|BaseURL}/about/
470
471 ; account creation: optional: page providing further information about obtaining
472 ; a user account on your grid
473 ;register = ${Const|BaseURL}/register
474
475 ; help: optional: page providing further assistance for users of your grid
476 ;help = ${Const|BaseURL}/help
477
478 ; password help: optional: page providing password assistance for users of your grid
479 ;password = ${Const|BaseURL}/password
480
481
482[UserProfilesService]
483 LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService"
484 Enabled = false
485 ;; Configure this for separate profiles database
486 ;; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;"
487 ;; Realm = UserProfiles
488 UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService
489 AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
490
491
492[BakedTextureService]
493 LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes"
494 ;; This directory must be writable by the user ROBUST runs as. It will be created automatically.
495 BaseDirectory = "./bakes"
diff --git a/prebuild.xml b/prebuild.xml
index c46740b..c778943 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -2661,6 +2661,41 @@
2661 </Project> 2661 </Project>
2662 2662
2663 <!-- Test Clients --> 2663 <!-- Test Clients -->
2664 <Project frameworkVersion="v4_0" name="Robust.Tests" path="OpenSim/Tests/Robust" type="Library">
2665 <Configuration name="Debug">
2666 <Options>
2667 <OutputPath>../../../bin/</OutputPath>
2668 </Options>
2669 </Configuration>
2670 <Configuration name="Release">
2671 <Options>
2672 <OutputPath>../../../bin/</OutputPath>
2673 </Options>
2674 </Configuration>
2675
2676 <ReferencePath>../../../bin/</ReferencePath>
2677 <Reference name="System"/>
2678 <Reference name="OpenMetaverseTypes" path="../../../bin/"/>
2679 <Reference name="OpenMetaverse" path="../../../bin/"/>
2680 <Reference name="OpenSim.Framework"/>
2681 <Reference name="OpenSim.Framework.Servers"/>
2682 <Reference name="OpenSim.Framework.Servers.HttpServer"/>
2683 <Reference name="OpenSim.Framework"/>
2684 <Reference name="OpenSim.Server.Base"/>
2685 <Reference name="OpenSim.Server.Handlers"/>
2686 <Reference name="OpenSim.Services.Interfaces"/>
2687 <Reference name="OpenSim.Services.Connectors"/>
2688 <Reference name="Robust"/>
2689 <Reference name="Nini" path="../../../bin/"/>
2690 <Reference name="log4net" path="../../../bin/"/>
2691 <Reference name="nunit.framework" path="../../../bin/"/>
2692
2693 <Files>
2694 <Match pattern="*.cs" recurse="true"/>
2695 </Files>
2696 </Project>
2697
2698
2664 <Project frameworkVersion="v4_0" name="OpenSim.Tests.Clients.AssetClient" path="OpenSim/Tests/Clients/Assets" type="Exe"> 2699 <Project frameworkVersion="v4_0" name="OpenSim.Tests.Clients.AssetClient" path="OpenSim/Tests/Clients/Assets" type="Exe">
2665 <Configuration name="Debug"> 2700 <Configuration name="Debug">
2666 <Options> 2701 <Options>