Wifi

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(PLEASE NOTE FOR WIFI FROM OPENSIM 0.8.0')
m
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{quicklinks}}
+
{{quicklinks|Wifi}}
 
{{thirdparty}}
 
{{thirdparty}}
 
'''Wifi - A Simple Account Management Front-end'''
 
'''Wifi - A Simple Account Management Front-end'''
Line 5: Line 5:
 
"Wifi" stands for "Web Interface For... I", and is an '''add-on''' module which is not a standard part of OpenSimulator. It is provided by Diva Canto and can be added to OpenSimulator 0.7 onwards.  It is also part of the Diva distribution (D2).
 
"Wifi" stands for "Web Interface For... I", and is an '''add-on''' module which is not a standard part of OpenSimulator. It is provided by Diva Canto and can be added to OpenSimulator 0.7 onwards.  It is also part of the Diva distribution (D2).
  
== '''PLEASE NOTE FOR WIFI FROM OPENSIM 0.8.1' ==
+
== WiFi Module for OpenSim 0.9.1.* Onwards==
 +
 
 +
OpenSim 0.9.1.0 onwards uses .NET 4.6. Diva's Wifi Module was updated for this on 17-Nov-2019...
 +
 
 +
d2: https://github.com/diva/d2
 +
 
 +
diva-distribution: https://github.com/diva/diva-distribution
 +
 
 +
Additional post for Windows Wifi build updating for 0.9.1.* (based on .NET Framework 4.6)...
 +
[http://blog.inf.ed.ac.uk/atate/2018/12/12/diva-wifi/ Austin Tate Blog Post – Diva Wifi on Windows – 12-Dec-2018]
 +
 
 +
== WiFi Module for OpenSim 0.8.1 to 0.9.0.1 ==
 +
 
 
Up to OpenSim 0.8.0, Wifi was available as an add on module via compiled .DLL libraries which could be enabled for Standalone and Grid setups. From OpenSim 0.8.1 onwards, a more flexible “add-in” library mechanism that was already in OpenSim has been improved and Wifi now is provided as an add-in under that mechanism. This does mean that the build and configuration process is different.
 
Up to OpenSim 0.8.0, Wifi was available as an add on module via compiled .DLL libraries which could be enabled for Standalone and Grid setups. From OpenSim 0.8.1 onwards, a more flexible “add-in” library mechanism that was already in OpenSim has been improved and Wifi now is provided as an add-in under that mechanism. This does mean that the build and configuration process is different.
  
Line 12: Line 24:
 
[http://metaverseink.com/blog/?p=592 Diva Canto Blog Post – Wifi and Other Diva Addons – 5-Apr-2015]
 
[http://metaverseink.com/blog/?p=592 Diva Canto Blog Post – Wifi and Other Diva Addons – 5-Apr-2015]
  
Additional post for Windows WiFi build.. [http://blog.inf.ed.ac.uk/atate/2015/04/06/diva-wifi-on-windows/ Austin Tate Blog Post – iva Wifi on Windows – 6-Apr-2015]
+
Additional post for Windows Wifi build from 0.8.1 up to 0.9.0 (based on .NET Framework 4.0)... [http://blog.inf.ed.ac.uk/atate/2015/04/06/diva-wifi-on-windows/ Austin Tate Blog Post – Diva Wifi on Windows – 6-Apr-2015]
----
+
 
 +
Additional Testing VS2017 (Win10) + Mono 5.18 Xamarin msbuild (Ubuntu 18)
  
 
== Introduction ==
 
== Introduction ==
Line 36: Line 49:
 
# Using OpenSimulator features bring many technical benefits. These benefits aren't visible immediately, but it will show its value in the future. Unlike other Web apps that access the database directly, Wifi works by communicating with OpenSimulator directly. This means that any future changes to the OpenSimulator database structure, will not affect Wifi.
 
# Using OpenSimulator features bring many technical benefits. These benefits aren't visible immediately, but it will show its value in the future. Unlike other Web apps that access the database directly, Wifi works by communicating with OpenSimulator directly. This means that any future changes to the OpenSimulator database structure, will not affect Wifi.
 
# Technically speaking, Wifi is a set of components that can be used by both standalone sims, as well as [[ROBUST]] (Grid) servers.
 
# Technically speaking, Wifi is a set of components that can be used by both standalone sims, as well as [[ROBUST]] (Grid) servers.
 
== Adding Wifi files to your OpenSimulator Setup ==
 
 
=== Binary Approach ===
 
 
Obtain the latest Wifi module distribution zip from
 
http://metaverseink.com/Downloads.html
 
and place the files as instructed in the equivalent locations in your OpenSimulator directory.
 
 
==== Copy DLLs ====
 
* add bin/Diva.Data.dll
 
* add bin/Diva.Data.MySQL.dll (optional if you are not using the MySQL database).
 
* add bin/Diva.Data.SQLite.dll (optional if you are not using the MySQL database).
 
* add bin/Diva.Interfaces.dll
 
* add bin/Diva.OpenSimServices.dll
 
* add bin/Diva.Utils.dll
 
* add bin/Diva.Wifi.dll
 
* add bin/Diva.Wifi.ScriptEngine.dll
 
* for standalones, you'll also need to separately add from the diva-rxxxxx.zip distribution file
 
** bin/Diva.Modules.dll
 
 
==== Copy WifiPages ====
 
Copy WifiPages directory and its contents to OpenSimulator top level directory.
 
 
==== Copy documentation (optional) ====
 
doc directory
 
* add in doc/WIFI.txt
 
 
Copy over the WIFI related readme, release notes and licence text files.
 
 
==== Copy over avatar library files ====
 
Copy Library/*
 
 
For some reason, these are not available in the standalone wifi zip or the [https://github.com/diva/diva-distribution Wifi Github repository].  Rather, you will have to obtain this from [http://metaverseink.com/Downloads.html the distribution itself].
 
 
These are only necessary if you want to use the bodyparts and clothing in these libraries to create your default avatars.
 
 
== Configuring Wifi ==
 
 
=== Grid mode ===
 
 
The complete example file is here:
 
http://github.com/diva/diva-distribution/blob/master/addon-modules/Wifi/Wifi.ini.example
 
 
'''Additions to Robust.ini or Robust.HG.ini for Grids'''
 
 
<source lang="ini">[Startup]
 
    ServiceConnectors = "8002/Diva.Wifi.dll:WifiServerConnector"
 
</source>
 
 
Note that this is the public grid services port as used by the login service, etc (default 8002), not the private one as made available by the asset service, inventory service, etc. (default 8003).
 
 
To enable users online, regions, etc. statistics on the Wifi pages (and stop generating errors in the OpenSimulator logs), change [DatabaseService] to use the Diva.Data.MySQL.dll rather than OpenSim.Data.MySQL.dll.
 
 
<source lang="ini">
 
[DatabaseService]
 
StorageProvider = "Diva.Data.MySQL.dll"
 
</source>
 
 
On older versions of OpenSimulator, it may also be necessary to set
 
 
<source lang="ini">
 
[GridService]
 
StorageProvider = "Diva.Data.MySQL.dll"
 
</source>
 
 
Then you need to add the [WifiService] section.
 
 
<source lang="ini">
 
[WifiService]
 
    GridName = "grid name"
 
    LoginURL = "http://<hostname>:8002"
 
    WebAddress = "http://<hostname>:8002"
 
     
 
    ;; The Wifi Administrator account
 
    AdminFirst = "Wifi"
 
    AdminLast = "Admin"
 
    AdminEmail = "you@example.com"
 
   
 
    ;; Do you want to be able to control grid registrations?
 
    AccountConfirmationRequired = false
 
   
 
    ;; Default avatars for new account registration
 
    ;; Syntax: AvatarAccount_<AvatarType> = "<FirstName> <LastName>"
 
    ;; Appearance and attachments are copied from avatar <FirstName> <LastName>.
 
    AvatarAccount_Female = "Female Avatar"
 
    AvatarAccount_Male = "Male Avatar"
 
    AvatarAccount_Neutral = "Neutral Avatar"
 
 
    ;; Preselection for default avatar in new account registration
 
    AvatarPreselection = "Neutral"
 
 
    ;; Variables for your mail server
 
    ;; Users will get email notifications from this account.
 
    SmtpHost = "mail.example.com"
 
    SmtpPort = "587"
 
    SmtpUsername = "your_account_in_this_mail_server"
 
    SmtpPassword = "your_password_in_this_mail_server"
 
</source>
 
 
You will need to create user accounts for each default avatar listed and dress them in the required body parts and clothing.
 
 
=== Standalone mode ===
 
 
The complete example file is here:
 
http://github.com/diva/diva-distribution/blob/master/addon-modules/Wifi/Wifi.ini.example
 
 
'''Additions to config-include/StandaloneCommon.ini for Standalones'''
 
 
For standalones, edit StandaloneCommon.ini in section [Modules] to add <code>WifiModule = true</code>.
 
 
<source lang="ini">[Modules]
 
    WifiModule = true
 
</source>
 
 
To enable users online, regions, etc. statistics on the Wifi pages (and stop generating errors in the OpenSimulator logs), change [DatabaseService] StorageProvider entries to use the Diva.Data.MySQL.dll rather than OpenSim.Data.MySQL.dll.
 
 
<source lang="ini">
 
[DatabaseService]
 
StorageProvider = "Diva.Data.MySQL.dll"
 
</source>
 
 
On older versions of OpenSimulator, it may also be necessary to set
 
 
<source lang="ini">
 
[GridService]
 
StorageProvider = "Diva.Data.MySQL.dll"
 
</source>
 
 
Finally, add the WifiService section to configure the Wifi system.
 
 
<source lang="ini">
 
 
[WifiService]
 
    GridName = "grid name"
 
    LoginURL = "http://<hostname>:9000"
 
    WebAddress = "http://<hostname>:9000"
 
     
 
    ;; The Wifi Administrator account
 
    AdminFirst = "Wifi"
 
    AdminLast = "Admin"
 
    AdminEmail = "you@example.com"
 
   
 
    ;; Do you want to be able to control grid registrations?
 
    AccountConfirmationRequired = false
 
   
 
    ;; Default avatars for new account registration
 
    ;; Syntax: AvatarAccount_<AvatarType> = "<FirstName> <LastName>"
 
    ;; Appearance and attachments are copied from avatar <FirstName> <LastName>.
 
    AvatarAccount_Female = "Female Avatar"
 
    AvatarAccount_Male = "Male Avatar"
 
    AvatarAccount_Neutral = "Neutral Avatar"
 
 
    ;; Preselection for default avatar in new account registration
 
    AvatarPreselection = "Neutral"
 
   
 
    ;; Variables for your mail server
 
    ;; Users will get email notifications from this account.
 
    SmtpHost = "mail.example.com"
 
    SmtpPort = "587"
 
    SmtpUsername = "your_account_in_this_mail_server"
 
    SmtpPassword = "your_password_in_this_mail_server"
 
</source>
 
 
You will need to create user accounts for each default avatar listed and dress them in the required body parts and clothing.
 
  
 
== Configurable Default Avatars ==
 
== Configurable Default Avatars ==
 
[[Image:Openvue-avatars-male-female-neutral-2010-08-27.jpg|300px|right|Example Avatars]]
 
[[Image:Openvue-avatars-male-female-neutral-2010-08-27.jpg|300px|right|Example Avatars]]
When users sign up, they can choose between default avatars. It's up to you to decide what these default avatars look like. Here is how you can configure them... Once your OpenSimulator is up and running, create accounts (using Wifi) with the names given in your configuration. With the above examples, these would be:
+
When users sign up for an avatar account vua WiFi, they can choose between default avatars. It's up to you to decide what these default avatars look like. Here is how you can configure them... Once your OpenSimulator is up and running, create accounts (using Wifi) with the names given in your configuration. These might be:
 
* Male Avatar
 
* Male Avatar
 
* Female Avatar
 
* Female Avatar
Line 210: Line 58:
  
 
Then login to the world under each of those accounts, and set their appearances however you like. You can add prim attachments.
 
Then login to the world under each of those accounts, and set their appearances however you like. You can add prim attachments.
 
== Problems with HTTP ports ==
 
 
The port used for the Wifi HTTP service is configurable. Usually this will be 8002 for a grid and 9000 for a standalone unless you use custom ports.
 
 
For a standalone you can do this by adding the "port" line for the port to use for Wifi and other services to the [Network] section of OpenSim.ini
 
 
<source lang="ini">[Network]
 
    port = 9000
 
</source>
 
 
Or for a grid specify a specific port (usually 8002) for the WifiServiceConnector in the ServiceConnectors list in the [Startup] section of Robust(.HG).ini
 
 
<source lang="ini">[Startup]
 
    ServiceConnectors="............,8002/Diva.Wifi.dll:WifiServerConnector"
 
</source>
 
 
In either case, define the equivalent WebAddress in the [WifiService] section of your StandaloneCommon.ini or Robust(.HG).ini (or addon-modules/Wifi/config/Wifi.ini if used in future).
 
 
<source lang="ini">[WifiService]
 
    WebAddress = "http://hostname:8002"
 
</source>
 
 
If you do not use the usual OpenSimulator service ports, please note that some network setups and ISPs will not allow HTTP to be served on port 80. It is usual to use an alternative port such as 8080 or a custom port in that case.
 
  
 
== Wifi URLs When Operational ==
 
== Wifi URLs When Operational ==
Line 241: Line 65:
 
* Local standalone: <nowiki>http://localhost:9000/wifi</nowiki>
 
* Local standalone: <nowiki>http://localhost:9000/wifi</nowiki>
  
You can see if the wifi endpoints have been made available by executing the console command "show http-handlers" in the Robust or standalone simulator console as appropriate.  If it is active you should see a bunch of endpoints such as  
+
You can see if the Wifi endpoints have been made available by executing the console command "show http-handlers" in the Robust or standalone simulator console as appropriate.  If it is active you should see a bunch of endpoints such as  
  
 
<pre>
 
<pre>

Latest revision as of 07:33, 20 July 2024


Wifi - A Simple Account Management Front-end

"Wifi" stands for "Web Interface For... I", and is an add-on module which is not a standard part of OpenSimulator. It is provided by Diva Canto and can be added to OpenSimulator 0.7 onwards. It is also part of the Diva distribution (D2).

Contents

[edit] WiFi Module for OpenSim 0.9.1.* Onwards

OpenSim 0.9.1.0 onwards uses .NET 4.6. Diva's Wifi Module was updated for this on 17-Nov-2019...

d2: https://github.com/diva/d2

diva-distribution: https://github.com/diva/diva-distribution

Additional post for Windows Wifi build updating for 0.9.1.* (based on .NET Framework 4.6)... Austin Tate Blog Post – Diva Wifi on Windows – 12-Dec-2018

[edit] WiFi Module for OpenSim 0.8.1 to 0.9.0.1

Up to OpenSim 0.8.0, Wifi was available as an add on module via compiled .DLL libraries which could be enabled for Standalone and Grid setups. From OpenSim 0.8.1 onwards, a more flexible “add-in” library mechanism that was already in OpenSim has been improved and Wifi now is provided as an add-in under that mechanism. This does mean that the build and configuration process is different.

Diva Canto has provided a blog post which describes the new Wifi mechanism and how to build and configure it, mostly geared at Unix/Linux users.

Diva Canto Blog Post – Wifi and Other Diva Addons – 5-Apr-2015

Additional post for Windows Wifi build from 0.8.1 up to 0.9.0 (based on .NET Framework 4.0)... Austin Tate Blog Post – Diva Wifi on Windows – 6-Apr-2015

Additional Testing VS2017 (Win10) + Mono 5.18 Xamarin msbuild (Ubuntu 18)

[edit] Introduction

Wifi provides an embedded Web application for handling user registrations. Wifi is a set of components that can be loaded up by both standalone simulators and ROBUST servers.

Its features include:

  • Account creation, optionally controlled by the administrator
  • Configurable default avatars for new accounts
  • Account updates by both users and administrator
  • Account deletion by administrator
  • Password recovery via email
  • Simple management of user inventory
  • A welcome page which can be used as login page for the user's viewer.

Wifi has a few interesting properties that make it a good fit for small-to-medium OpenSimulator-based virtual worlds.

  1. It doesn’t require an additional web server; it’s all done with built-in OpenSimulator features.
  2. Using OpenSimulator features bring many technical benefits. These benefits aren't visible immediately, but it will show its value in the future. Unlike other Web apps that access the database directly, Wifi works by communicating with OpenSimulator directly. This means that any future changes to the OpenSimulator database structure, will not affect Wifi.
  3. Technically speaking, Wifi is a set of components that can be used by both standalone sims, as well as ROBUST (Grid) servers.

[edit] Configurable Default Avatars

Example Avatars

When users sign up for an avatar account vua WiFi, they can choose between default avatars. It's up to you to decide what these default avatars look like. Here is how you can configure them... Once your OpenSimulator is up and running, create accounts (using Wifi) with the names given in your configuration. These might be:

  • Male Avatar
  • Female Avatar
  • Neutral Avatar

Then login to the world under each of those accounts, and set their appearances however you like. You can add prim attachments.

[edit] Wifi URLs When Operational

  • Sample grid: http://yourgridhostname:8002/wifi
  • Sample standalone: http://yourstandalonehostname:9000/wifi
  • Local standalone: http://localhost:9000/wifi

You can see if the Wifi endpoints have been made available by executing the console command "show http-handlers" in the Robust or standalone simulator console as appropriate. If it is active you should see a bunch of endpoints such as

* StreamHandlers (31):
        ...
	GET:/wifi
	HEAD:/wifi
	POST:/wifi/notify
	GET:/wifi/install
	POST:/wifi/install
	POST:/wifi/login
	GET:/wifi/logout
	GET:/wifi/forgotpassword
	POST:/wifi/forgotpassword
	GET:/wifi/recover
	POST:/wifi/recover
	GET:/wifi/user/account
	POST:/wifi/user/account
	GET:/wifi/admin/users
	POST:/wifi/admin/users
	GET:/wifi/admin/console
	GET:/wifi/user/loadinventory
	GET:/wifi/user/inventory
	POST:/wifi/user/inventory
	GET:/wifi/linkregion
	POST:/wifi/linkregion
	GET:/wifi/tos
	POST:/wifi/tos
	GET:/wifi/admin/groups
	POST:/wifi/admin/groups

[edit] Wifi Administrator Functions

[edit] Manage Users

Example Wifi Entry Page

If authorisation is set to be on, you will receive an e-mail to the nominated admin account e-mail address if a user requests a new account and avatar creation. You can activate or delete new user creation requests. Users are notified of the activation via an e-mail to their nominated address.

You can also search for users and change their details. Give a space as a search term to select all avatars. Available are fields for "Level", "Flags" and "Title".

  • Level = 0 is a normal user
  • Level = 50 (or a level you set) is used to indicate a privileged user (e.g. who can set up new hypergrid linked regions)
  • Level = 100 is a Wifi admin account user

You can manually reset a user's password by typing into the password box and the hitting the "Reset" button. Note that the user is NOT infromed of this password reset, so you must manually contact the user to communicate such a password change.

Note that the Wifi admin username/avatar is set in the Wifi configuration, and can be changed there. BUT.. once an admin always an admin. Well almost. If you change from one admin to another, the previous avatar still has administrator rights. You can remove Wifi administrator rights from an avatar by changing the "Level" of the user from 100 to the normal avatar level of 0 using the Manage Users facility in Wifi.

You can set an intermediate level for a privileged user which can be used to allow certain types of Wifi menu that a normal user will not see, but that are less than full admin user rights. A configurable parameter sets the Level above which this functions for a user (default 50).

[edit] Manage Regions

A facility to add LINK REGIONS is available in Wifi versions for OpenSimulator 0.7.1 onwards.

Administrators and other privileged users can also view the current set of LINKED REGIONS

[edit] Remote Console

A feature in Wifi versions for 0.7.1 onwards and available to administrators via the CONSOLE link if suitably enabled.

The WifiConsole uses OpenSim's REST console and thus the Robust server and any simulators must be started with parameter "-console rest". Furthermore, the configuration options "ConsoleUser" and "ConsolePass" must be set in section [Network] and the values of these options must match across all instances. Finally, for all region simulators (i.e. except for the Robust server), option "ConsoleAllowedOrigin" must be set to the same value as option "WebAddress" in section [WifiService] of the Robust configuration.

Please note that as at February 2011 the console in Wifi is not much more than a proof on concept in its current state. It has been tested on web browsers based on Mozilla (i.e. the Gecko Engine) only. Browsers using the WebKit engine do work somewhat, too, and IE has its own issues. The console also does not yet work with any interactive input, as necessary for creating a new region with "create region", for example.

Right now, there is no way to use this feature in a secure way because the values for "ConsoleUser" and "ConsolePass" are transmitted as clear text over the network. Please keep this in mind when using the console in Wifi.

[edit] Diva Distribution

Example Wifi Entry Page

Wifi is included and enabled by default in the Diva Distribution:

Personal tools
General
About This Wiki