SAMP over HTTPS

This is a web-app containing a hub relay (at the XML-RPC endpoint xmlrpc) and some SAMP web applications. The web apps should work using either HTTP (Web profile, nothing new) or HTTPS (experimental TLS profile, involves bouncing all SAMP communications via the Relay, see protocol details).

The web apps are:

To make the HTTPS version work, you need to run a hub using a suitable version of the experimental TLS profile. Do that by running

   java -jar tlshub.jar

To set up your own HTTPS-capable clients, you (more or less) just need to set the profile property of the Connector appropriately, something like this:

  var connector = new samp.Connector(clientName, metaData);

  // This is the part that's required for use with HTTPS.
  // You need to set the connector profile property to an instance of
  // samp.TlsProfile, pointing to a hub relay XML-RPC server. -->
  if (location.protocol === "https:") {
      var relay = baseUrl + "xmlrpc";
      connector.profile = new samp.TlsProfile(relay);
  }