2018-02-14 02:49:41 +01:00
|
|
|
# yaja (Yet Another JAbber implementation)
|
|
|
|
|
2019-06-22 12:29:33 +02:00
|
|
|
[![pipeline status](https://dev.sum7.eu/genofire/yaja/badges/master/pipeline.svg)](https://dev.sum7.eu/genofire/yaja/pipelines)
|
|
|
|
[![coverage report](https://dev.sum7.eu/genofire/yaja/badges/master/coverage.svg)](https://dev.sum7.eu/genofire/yaja/pipelines)
|
|
|
|
[![Go Report Card](https://goreportcard.com/badge/dev.sum7.eu/genofire/yaja)](https://goreportcard.com/report/dev.sum7.eu/genofire/yaja)
|
|
|
|
[![GoDoc](https://godoc.org/dev.sum7.eu/genofire/yaja?status.svg)](https://godoc.org/dev.sum7.eu/genofire/yaja)
|
|
|
|
[![](https://inverse.chat/badge.svg?room=yaja@conference.chat.sum7.eu)](https://conversations.im/j/yaja@conference.chat.sum7.eu)
|
|
|
|
|
2018-02-14 02:49:41 +01:00
|
|
|
|
|
|
|
## Features
|
2018-02-14 18:49:26 +01:00
|
|
|
- XMPP Library (first version - PR are welcome)
|
2018-02-14 02:49:41 +01:00
|
|
|
- Client Library (WIP)
|
|
|
|
- Stream: TLS Required
|
|
|
|
- SASL-Auth (PLAIN, DIGEST-MD5)
|
|
|
|
- Read & Decode (recv xml)
|
|
|
|
- Send (send xml)
|
2018-04-18 14:24:28 +02:00
|
|
|
- No OTR (never implemented -> nowadays OMEMO or PGP preferred)
|
2018-02-14 02:49:41 +01:00
|
|
|
- No OMEMO support (not implemented by me: library only for bots and testing)
|
|
|
|
- Client (planned)
|
|
|
|
- Daemon
|
|
|
|
- Tester (based on Client Library)
|
|
|
|
- Bidirected Messaging
|
|
|
|
- Check IPv4 & IPv6
|
|
|
|
- TLS Version
|
|
|
|
- Server (maybe broken, planned)
|
|
|
|
- get certificate by lets encrypt
|
|
|
|
- registration (for every possible TLS domain)
|
|
|
|
|
|
|
|
## Library
|
|
|
|
|
2018-02-14 18:49:26 +01:00
|
|
|
### XMPP
|
2018-02-14 02:49:41 +01:00
|
|
|
all implementation of all comman (RFCs and XEPs) xml element
|
|
|
|
|
|
|
|
**Version**
|
2018-02-22 03:12:07 +01:00
|
|
|
- [RFC 6120 (XMPP - Core)](https://xmpp.org/rfcs/rfc6120.html)
|
|
|
|
- [RFC 6121 (XMPP - Instant Messaging and Presence)](https://xmpp.org/rfcs/rfc6121.html)
|
|
|
|
- [XEP-0030: Service Discovery](https://xmpp.org/extensions/xep-0030.html)
|
2018-02-15 20:56:04 +01:00
|
|
|
- [XEP-0049: Private XML Storage](https://xmpp.org/extensions/xep-0049.html)
|
|
|
|
- [XEP-0092: Software Version](https://xmpp.org/extensions/xep-0092.html)
|
|
|
|
- [XEP-0138: Stream Compression](https://xmpp.org/extensions/xep-0138.html)
|
|
|
|
- [XEP-0199: XMPP Ping](https://xmpp.org/extensions/xep-0199.html)
|
2018-02-14 02:49:41 +01:00
|
|
|
|
|
|
|
### Client
|
|
|
|
|
|
|
|
**Planned**
|
|
|
|
- auto decoding of XML (with some auto answer e.g. ping)
|
|
|
|
- SendRecv to get answer of a request
|
|
|
|
- Register
|
|
|
|
|
2019-06-22 12:29:33 +02:00
|
|
|
## Get yaja
|
|
|
|
|
|
|
|
#### Download
|
|
|
|
|
|
|
|
Latest Build binary from ci here:
|
|
|
|
|
|
|
|
[Download All](https://dev.sum7.eu/genofire/yaja/-/jobs/artifacts/master/download/?job=build-my-project) (with config example)
|
|
|
|
|
|
|
|
[Download Binary](https://dev.sum7.eu/genofire/yaja/-/jobs/artifacts/master/raw/bin/yaja?inline=false&job=build-my-project)
|
|
|
|
|
|
|
|
|
2018-02-14 02:49:41 +01:00
|
|
|
## Run
|
2017-10-01 23:30:48 +02:00
|
|
|
|
2017-12-14 21:30:07 +01:00
|
|
|
```
|
2018-02-14 02:49:41 +01:00
|
|
|
A small standalone command line round about jabber (e.g tester WIP: client & server)
|
2017-12-14 21:30:07 +01:00
|
|
|
|
|
|
|
Usage:
|
|
|
|
yaja [command]
|
|
|
|
|
|
|
|
Available Commands:
|
2018-02-14 02:49:41 +01:00
|
|
|
daemon daemon of yaja
|
2017-12-14 21:30:07 +01:00
|
|
|
help Help about any command
|
|
|
|
|
|
|
|
Flags:
|
|
|
|
-h, --help help for yaja
|
|
|
|
|
|
|
|
Use "yaja [command] --help" for more information about a command.
|
2018-02-14 02:49:41 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
### Daemons
|
|
|
|
```
|
|
|
|
daemon of yaja
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
yaja daemon [command]
|
|
|
|
|
|
|
|
Available Commands:
|
|
|
|
server runs xmpp server
|
|
|
|
tester runs xmpp tester server
|
|
|
|
|
|
|
|
Flags:
|
|
|
|
-h, --help help for daemon
|
|
|
|
|
|
|
|
Use "yaja daemon [command] --help" for more information about a command.
|
|
|
|
```
|
|
|
|
#### Tester
|
|
|
|
Website for displaying: [genofire/yaja-tester-viewer](https://github.com/genofire/yaja-tester-viewer/tree/master)
|
|
|
|
|
|
|
|
(dirty and based on [Freifunk Meshviewer](https://github.com/ffrgb/meshviewer/))
|
|
|
|
|
|
|
|
Demo: [tester.chat.sum7.eu](https://tester.chat.sum7.eu)
|
|
|
|
|
|
|
|
```
|
|
|
|
runs xmpp tester server
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
yaja daemon tester [flags]
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
yaja daemon tester -c /etc/yaja.conf
|
|
|
|
|
|
|
|
Flags:
|
|
|
|
-c, --config string path to configuration file (default "yaja-tester.conf")
|
|
|
|
-h, --help help for tester
|
|
|
|
|
2017-12-14 21:30:07 +01:00
|
|
|
```
|
2018-02-14 02:49:41 +01:00
|
|
|
**Features**
|
|
|
|
- notification of disconnect by server (domain)
|
|
|
|
- manage by bot command `admin (add|del) <JID>` and `admin list`)
|
|
|
|
- auto accept subscription by every user to every bot
|
|
|
|
- `ping` to `pong` by every user to every bot (for self check)
|
2017-12-14 21:30:07 +01:00
|
|
|
|
2018-02-14 02:49:41 +01:00
|
|
|
**Planned**
|
|
|
|
- improve chat bot implementation
|
|
|
|
- improve notification (add my self, not only other by admins)
|
|
|
|
- add new accounts/server
|
|
|
|
- other checks, maybe like [running](https://conversations.im/compliance/) - [source-code](https://github.com/iNPUTmice/ComplianceTester)
|
|
|
|
- software and version of xmpp servers
|
|
|
|
|
|
|
|
**Inspiration by**
|
|
|
|
|
|
|
|
*Sorry i did not like Java on my server*
|
|
|
|
- ServerStatus of iNPUTmice: [running](https://status.conversations.im/) - [source-code](https://github.com/iNPUTmice/ServerStatus)
|
|
|
|
|
|
|
|
#### Server
|
|
|
|
```
|
|
|
|
runs xmpp server
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
yaja daemon server [flags]
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
yaja daemon server -c /etc/yaja.conf
|
|
|
|
|
|
|
|
Flags:
|
|
|
|
-c, --config string path to configuration file (default "yaja-server.conf")
|
|
|
|
-h, --help help for server
|
|
|
|
```
|
2017-12-14 21:30:07 +01:00
|
|
|
|
2018-02-14 02:49:41 +01:00
|
|
|
## Inspiration by source-code structures (but rewritten)
|
|
|
|
- **server side:** [tam7t](https://github.com/tam7t/xmpp) a fork of [agl](https://github.com/agl)'s work
|
|
|
|
- **client side:** [mattn](https://github.com/mattn/go-xmpp) (original by russ cox)
|