xmppjs/radiowave

Name: radiowave

Owner: xmpp.js

Description: Radiowave is a Jabber/XMPP server written in Javascript

Created: 2015-05-02 08:15:43.0

Updated: 2018-02-12 03:40:15.0

Pushed: 2016-04-10 18:21:03.0

Homepage: http://node-xmpp.github.io/radiowave.

Size: 1091

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Radiowave

Radiowave is a lightweight XMPP server that is made for the web:

Quickstart
Docker
art PostgresSQL
er run --name radiowave-pg -e POSTGRES_PASSWORD=mysecretpassword -d postgres

art Radiowave
er build -t radiowave .
er run --name radiowave --link radiowave-pg:pg -d -p 5222:5222 -p 5280:5280 -p 9031:9031 -p 9030:9030 -p 8080:8080 radiowave

tect ip if you are using boot2docker via `boot2docker ip`

bug Docker container
er exec -it radiowave /bin/bash

By default three users are configured:

"type": "simple",
"testusers": true,
"users": [{
    "user": "romeo",
    "password": "romeo"
}, {
    "user": "mercutio",
    "password": "mercutio"
}, {
    "user": "benvolio",
    "password": "benvolio"
}]

Configure Adium

Adium Config Adium Config

Manual Installation

Prepare your server:

bian
get install libicu-dev

c (optional)
 install icu4c
s /usr/local/Cellar/icu4c/<VERSION>/bin/icu-config /usr/local/bin/icu-config
s /usr/local/Cellar/icu4c/<VERSION>/include/* /usr/local/include

Adapt the settings/default.json to your needs. If you do not install a specific database, Radiowave will fallback to SQLite.

install -g radiowave
man start
Register as service
man export upstart /etc/init
ice radiowave start

Features & Roadmap

? supported, ? not supported by Radiowave (yet)

| Reference | Description | Supported | | ————- | ———– | ——— | | Core XMPP specifications ||| | RFC-3920 Extensible Messaging and Presence Protocol (XMPP): Core | XMPP Core mechanisms and routing | ? | | RFC-3921 XMPP: Instant Messaging and Presence | XMPP IM and presence | (?) | | RFC-6120 XMPP: Core | RFC-3920 update| ? | | RFC-6121 XMPP: Instant Messaging and Presence | RFC-3920 update | (?) | | RFC-6122 XMPP: Address Format | Format for user and services addresses | ? | | XMPP Server compliance ||| | XEP-0212: XMPP Basic Server 2008 | Compliance Specification | ? | | XEP-0216: XMPP Intermediate IM Server 2008 | Compliance Specification | ? | | XEP-0243: XMPP Server Compliance 2009 | Compliance Specification | ? | | XEP-0270: XMPP Compliance Suites 2010 | Compliance Specification | ? | | XEP-0302: XMPP Compliance Suites 2012 | Compliance Specification| ? | | XMPP Core Server Extensions ||| | XEP-0030: Service Discovery | Discover features and capabilities of server | ? | | XEP-0115: Entity Capabilities | | ? | | XMPP Advanced Server Extensions ||| | XEP-0045: Multi-User Chat | Chat conferences with multiple users | (?) | | XEP-0054: vcard-temp | Business cards storage |?| | XEP-0060: Publish-Subscribe | Publish and subscribe over xmpp| (?) | | XEP-0114: Jabber Component Protocol | Server-side components |?| | XEP-0124: BOSH | BOSH HTTP Binding| ? | | XEP-0163: Personal Eventing Protocol | user location, modd or activity |?| | XEP-0191: Blocking Command | Communication blocking|?| | XEP-0198: Stream Management | Stream commands|?| | XEP-0206: XMPP Over BOSH | Connect over HTTP with long-polling | ? | | XMPP Extensions ||| | XEP-0004: Data Forms | XML Forms for queries and responses| ? | | XEP-0092: Software Version | Discover software release| ? | | XEP-0199: XMPP Ping | Ping Pong for XMPP | ? | | XEP-0203: Delayed Delivery | Offline messaging|? | | DRAFT: Websocket | Connect over HTTP with websockets | ? | | XEP-0307:Unique Room Names for Multi-User Chat | Create unique room names | ? | | XMPP Security ||| | XEP-0077: In-band Registration | For account creators | ? | | XEP-0158: CAPTCHA Forms | Prevent bots | ? | | XEP-0205: Best Practices to Discourage Denial of Service Attacks | Prevent denial of service attacks | ? |

FAQ

REST api

Radiowave ships with a REST api. To determine the own JID:

 -s --user romeo:romeo http://192.168.59.103:8080/api/user | jq '.'

ser": "romeo@example.net"

Create a new MUC room via Rest API:

rl -s --user romeo:romeo http://192.168.59.103:8080/api/user/rooms | jq '.'


rl -s -X POST --user romeo:romeo --data  '{"name" : "romeo"}' http://localhost:8080/api/user/rooms --header "Content-Type:application/json" | jq '.'

d": 1,
ame": "romeo",
pdatedAt": "2015-05-01T13:33:41.000Z",
reatedAt": "2015-05-01T13:33:41.000Z"


rl -s --user romeo:romeo http://192.168.59.103:8080/api/user/rooms | jq '.'


"id": 1,
"name": "romeo",
"subject": null,
"description": null,
"createdAt": "2015-05-01T13:33:41.000Z",
"updatedAt": "2015-05-01T13:33:41.000Z",
"members": [
  {
    "jid": "romeo@example.net",
    "RoomMember": {
      "nickname": "",
      "role": "moderator",
      "affiliation": "owner",
      "state": "accepted",
      "createdAt": "2015-05-01 13:33:41.000 +00:00",
      "updatedAt": "2015-05-01 13:33:41.000 +00:00",
      "UserId": 1,
      "RoomId": 1
    }
  }
]


Database

Radiowave uses sequelize as database abstractions layer. While it provides support for PostgreSQL, MySQL, MariaDB, SQLite and MSSQL, Radiowave is only tested on SQLite and PostgresSQL.

Radioware make heavy use of SQL transactions to ensure no data is corrupted. Since SQLite is not optimized for handling many parallel connection, I recommend to use PostgresSQL for production. Change the configuration file accordingly:

rage": {
"dialect" : "postgres",
"native": true,
"user": "postgres",
"password" : "supersecretpassword",
"database": "radiowave",
"host": "localhost",
"port": 5432

Logging

Radiowave uses bunyan as logger framework. To format the json output pipe the content to bunyan.

de bin/radiowave settings/default.json |bunyan

5-05-01T13:31:25.029Z] DEBUG: radiowave/35782 on milkyway.fritz.box: Load file: /Users/chris/Development/xrocket/xrocketd/settings/default.json (widget_type=radiowave)
5-05-01T13:31:25.047Z] DEBUG: radiowave/35782 on milkyway.fritz.box: Environment: development (widget_type=radiowave)
5-05-01T13:31:25.048Z] DEBUG: radiowave/35782 on milkyway.fritz.box: port: 5222 (widget_type=radiowave)
5-05-01T13:31:25.048Z] DEBUG: radiowave/35782 on milkyway.fritz.box: port: 5280 (widget_type=radiowave)
5-05-01T13:31:25.048Z] DEBUG: radiowave/35782 on milkyway.fritz.box: port: 5281 (widget_type=radiowave)
5-05-01T13:31:25.048Z] DEBUG: radiowave/35782 on milkyway.fritz.box: port: 8889 (widget_type=radiowave)
5-05-01T13:31:25.048Z] DEBUG: radiowave/35782 on milkyway.fritz.box: port: 8080 (widget_type=radiowave)
5-05-01T13:31:25.049Z] DEBUG: radiowave/35782 on milkyway.fritz.box: load storage module (widget_type=radiowave)
5-05-01T13:31:25.050Z] DEBUG: radiowave/35782 on milkyway.fritz.box: initialize (widget_type=storage)
5-05-01T13:31:25.234Z] DEBUG: radiowave/35782 on milkyway.fritz.box: load connection manger (widget_type=radiowave)
5-05-01T13:31:25.241Z] DEBUG: radiowave/35782 on milkyway.fritz.box: load xmpp components (widget_type=radiowave)
5-05-01T13:31:25.241Z] DEBUG: radiowave/35782 on milkyway.fritz.box: Configure domain: example.net (widget_type=radiowave)
5-05-01T13:31:25.245Z]  INFO: radiowave/35782 on milkyway.fritz.box: load components Core (widget_type=radiowave)
5-05-01T13:31:25.246Z] DEBUG: radiowave/35782 on milkyway.fritz.box: load core modules (widget_type=core)
5-05-01T13:31:25.247Z]  INFO: radiowave/35782 on milkyway.fritz.box: load RFC 3921: Roaster (widget_type=roaster)
5-05-01T13:31:25.247Z] DEBUG: radiowave/35782 on milkyway.fritz.box: load module: RFC 3921: Roaster (widget_type=xcomponent)
5-05-01T13:31:25.248Z]  INFO: radiowave/35782 on milkyway.fritz.box: load XEP-0016: Privacy Lists (widget_type=privacylist)
5-05-01T13:31:25.248Z] DEBUG: radiowave/35782 on milkyway.fritz.box: load module: XEP-0016: Privacy Lists (widget_type=xcomponent)
5-05-01T13:31:25.248Z]  INFO: radiowave/35782 on milkyway.fritz.box: load XEP-0030: Service Discovery (widget_type=disco)

Author

License

Copyright 2013 - 2015 Christoph Hartmann

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.