• Stars
    star
    130
  • Rank 267,615 (Top 6 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created about 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Audio Video Signaling (AVS)

Wire - Audio, Video, and Signaling (AVS)

This repository is part of the source code of Wire. You can find more information at wire.com or by contacting [email protected].

You can find the published source code at github.com/wireapp.

For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.

Build Requirements

Apart from the basic toolchain for each system, you need these:

  • clang, libc++
  • readline (for building zcall, only)
  • yasm (for video only)
  • alsa (for Linux only).

For OSX and iOS, you should have Xcode and the Command Line Tools for your specific version of both OSX and Xcode. Things will break if you have the wrong version. You can install the latter via menu Xcode, then Open Developer Tool, then More Developer Tools.

For getting autoconf, automake, libtool, readline and yasm, we suggest Homebrew. Follow the instructions there, then:

$ brew install \
  autoconf \
  automake \
  jq \
  libsodium \
  libtool \
  multirust \
  pkg-config \
  protobuf-c \
  readline \
  sdl \
  yasm
$ multirust default nightly

For Android, you need both the Android SDK as well as the Android NDK. Just get the latest versions and install them somewhere cozy. You need to export two environment variables ANDROID_SDK_ROOT and ANDROID_NDK_ROOT pointing to the respective location. Unless you do a one-off, you probably want to add them to your .bash_profile.

For Linux, you need to install the packages for the stuff mentioned above or, of course, build it all from scratch. If you are on a Debian-esque system, do this:

$ sudo apt-get install \
  autoconf \
  automake \
  clang \
  libasound2-dev \
  libc++-dev \
  libc++abi-dev \
  libevent-dev \
  libprotobuf-c-dev \
  libreadline-dev \
  libsodium-dev \
  libtool \
  libx11-dev \
  libxcomposite-dev \
  libxdamage-dev \
  libxrender-dev \
  make \
  pkgconf \
  protobuf-c-compiler \
  yasm \
  zlib1g-dev \
  zip

$ curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly

For Windows, you will have to start by adding your system to the build system. Good luck!

Build Instructions

AVS uses pre-built Google WebRTC by default that are pulled from the prebuilt webrtc repository as a part of the make process. For information about building your own WebRTC see the "Using a Locally Built WebRTC" section below.

AVS has more dependencies that need to be updated. The first time you need to fetch the submodules by doing:

$ ./prepare.sh

Next step is to build AVS itself. When building AVS with the prebuilt WebRTC, invoke make with:

make

This will build a selection of tools or your host machine. You probably want zcall, the AVS command line client. You can only build that by saying make zcall. Similarly, you can build any other tool by giving its name to make.

The deliverables are being built with the command make dist. You can limit this to only select target platforms through make dist_android, make dist_osx and make dist_ios. All of them take quite a while on a fresh checkout.

You'll find the deliverables in build/dist/{android,ios,osx}.

You can also build just the wrappers for a given architecture by saying make wrappers AVS_OS=<os> AVS_ARCH=<arch> where <os> is one of android, ios, or osx. There is no wrappers for Linux, so you are out of luck there. For <arch> there are several possible values depending on the OS. You can just leave the whole thing out and will receive reasonable defaults (ARMv7 or X86-64). Have a look at mk/target.mk for more on this.

If you want to have a local version of a dist_* target that hasn't all the necessary architectures but builds quicker, you can pass DIST_ARCH=<your_arch> to make and will only built for that architecture:

$ make dist_ios DIST_ARCH=arm64

will build an iOS distribution that will only contain arm64 instead of the usual five architectures.

Using a Locally Built WebRTC

It is possible to use your own locally built WebRTC libraries instead, by following the instructions in the readme file of the prebuilt webrtc repository.

Once built and packaged you should have the following files:

contrib/webrtc/webrtc_<version>_android.zip
contrib/webrtc/webrtc_<version>_headers.zip
contrib/webrtc/webrtc_<version>_ios.zip
contrib/webrtc/webrtc_<version>_linux.zip
contrib/webrtc/webrtc_<version>_osx.zip

These files should be copied to the contrib/webrtc directory and the WEBRTC_VER variable set when making AVS, for example:

make WEBRTC_VER=20200603.local

You can also modify the version set in the mk/target.mk file, as follows:

ifeq ($(WEBRTC_VER),)
WEBRTC_VER := 20200603.local
endif

Running make should then unpack and use the locally built version of WebRTC.

Using the Library

During the build, a set of static libraries is being built. You can use this library in your own projects.

You'll find the APIs in include/*.h. avs.h is your catchall include file. Always use that to protect yourself agains reorganizations.

Linking is a bit tricky, we'll add instructions soon. The easiest is probably to add build/$(your-platform)/lib to your library path and then add all .a files in there as -l arguments.

Using the Command Line Client (zcall)

Start the command line client provding the email address of an existing account using the -e option. You can switch to staging (aka dev) by adding the -D option and to edge by adding the -E option. Since caching is currently a little broken, you probably want to add the -f option, too. For further information on available options, try the ever helpful -h option.

Once started, hit h to see a list of key strokes available and type :help and enter to see a list of commands. All commands are entered by typing : first.

Creating a Client

The first thing you will need is a clientid. This can be done as follows:

:get_clients lists clients for this user, the current one for zcall is marked with a * :reg_client register a new client

There is a limit of 8 clients per user, if all are used you will need to remove one with:

:delete_cient <clientid>

Beware that there is no "are you sure" question, use this only if you know what you are doing! If you delete an in-use client by accident bad things may happen.

Managing Conversations

Keys for listing, selecting and showing conversations are:

l list conversations, the selected one is marked with -> j select previous conversation k select next conversation i show selected conversation ID and members

You can also select a conversation with the :switch command and send basic chat messages to the selected conversation with :say

Calling

Keys for calling are:

c start a call in the selected conversation a answer the most recent incoming call e end/leave the call m toggle mute V toggle video sending

Incoming calls are indicated by the following line:

calling: incoming audio call in conv: Conversation (conference) from "test_user:0123456789abcdef" ring: yes ts: 1614244695

Architecture overview:

           .-----------.                            .---------.  .----------.
           |   wcall   |                            | engine  |  | mediamgr |
           '-----------'                            '---------'  '----------'
            /    |    \                                  |
  .-----------.  |  .-----------.   .----------.    .---------.
  |  egcall   |  |  |   ccall   |---| keystore |    |  REST   |
  '-----------'  |  '-----------'   '----------'    |  nevent |
            \    |    /                             | protobuf|
           .-----------.   .-----------.            '---------'
           |   ecall   |---|  econn    |
           '-----------'   '-----------'
             /        \
     mobile /          \ web
  .-----------.     .-----------.
  | peerflow  |     |  jsflow   |
  '-----------'     '-----------'
        |                 |
  .-----------.     .-----------.
  |webrtc(C++)|     | avs_pc(JS)|
  | peerconn  |     '-----------'
  '-----------'           |
                    .-----------.
                    | webrtc(JS)|
                    | peerconn  |
                    '-----------'

    .------------------------------.
    | Low-level utility modules:   |
    | - audummy (Dummy audio-mod)  |
    | - base (Base module)         |
    | - cert (Certificates)        |
    | - dict (Dictionary)          |
    | - jzon (Json wrappers)       |
    | - log (Logging framework)    |
    | - queue (Packet queue)       |
    | - sem (Semaphores)           |
    | - store (Persistent Storage) |
    | - trace (Tracing tool)       |
    | - uuid (UUID helpers)        |
    | - zapi (ZETA-protocol API)   |
    | - ztime (Timestamp helpers)  |
    '------------------------------'

Some specifications implemented:

Reporting bugs

When reporting bugs against AVS please include the following:

  • Wireshark PCAP trace (download Wireshark)
  • Full logs from client
  • Session-ID
  • Which Backend was used
  • Exact version of client
  • Exact time when call was started/stopped
  • Name/OS of device
  • Adb logcat for Android

Run-time libraries

FROM ubuntu:16.04 RUN apt-get install -qqy --no-install-recommends
libprotobuf-c-dev
libc6-dev-i386
libreadline-dev
libx11-dev
libxcomposite-dev
libxdamage-dev
libxrender-dev
libc++-dev
libc++abi-dev

Upload to sonatype

To manually upload to sonatype create a local.properties with the following values:

sonatype.username=
sonatype.password=
signingKeyFile=<path to asc file>
signingPassword=<gpg key passphrase>

More Repositories

1

wire-server

๐Ÿ‡ช๐Ÿ‡บ Wire back-end services
Haskell
2,584
star
2

wire

ใ€ฐ๏ธ Overview of the open source code for Wire
2,349
star
3

wire-webapp

๐Ÿ‘ฝ Wire for web
TypeScript
1,103
star
4

wire-desktop

๐Ÿ’ป Wire for desktop
TypeScript
1,053
star
5

proteus

Axolotl Protocol Implementation
Rust
412
star
6

wire-ios-sync-engine

iOS synchronization library for Wire
Swift
149
star
7

wire-server-deploy

Code to install/deploy wire-server (on kubernetes)
HCL
89
star
8

lithium

Wire Services JDK
Java
79
star
9

coax

A (barely working) native Wire client for Unix
Rust
75
star
10

wire-android

๐Ÿค– The new Wire client for Android
Kotlin
67
star
11

wire-web-packages

Collection of npm modules created by Wire's web team.
TypeScript
59
star
12

wire-android-sync-engine

Sync library for Android.
Scala
58
star
13

bot-sdk-node

๐Ÿค–
JavaScript
58
star
14

pqproteus

PQProteus
Rust
57
star
15

echo-bot

Echo bot
Java
56
star
16

websql

Encrypted SQLite database for the browser and Node.js
TypeScript
56
star
17

cryptobox

High-level API with persistent storage for proteus
Rust
52
star
18

melissa

Messaging Layer Security (MLS) implementation in Rust
Rust
52
star
19

wire-ios-link-preview

๐Ÿท Open Graph data parser used to generate link previews
Swift
48
star
20

kalium

๐ŸŒ An SDK for creating Wire clients on Android and JVM. Expanding to iOS and Web.
Kotlin
42
star
21

wire-ios

๐Ÿ“ฑ Wire for iOS (iPhone and iPad)
Swift
37
star
22

carthage-gradle-plugin

Gradle plugin for Carthage
Kotlin
36
star
23

libsodium-neon

Node.js bindings to rust_sodium.
Rust
36
star
24

proteus.js

Axolotl protocol implementation for JavaScript
JavaScript
36
star
25

generic-message-proto

Protocol definition for generic messages.
Scala
35
star
26

hkdf

HKDF implementation (RFC 5869)
Rust
29
star
27

cryptobox-c

C-FFI to cryptobox
C
29
star
28

wire-ios-data-model

Core Data model and entity classes
Swift
28
star
29

cryptobox-haskell

Cryptobox Haskell FFI
Haskell
27
star
30

wire-signals

A small and effective event-handling library for Scala
Scala
23
star
31

wire-ios-cryptobox

Swift
22
star
32

wire-ios-transport

Objective-C
22
star
33

wire-ios-ziphy

https://wire.com
Swift
22
star
34

wire-ios-share-engine

Share extension framework for iOS
Swift
22
star
35

core-crypto

MLS/Proteus multiplexer abstraction with encrypted persistent storage in Rust
Rust
20
star
36

node-addressbook

Node.js module providing access to the macOS address book
C++
18
star
37

cryptobox-jni

JNI bindings for cryptobox with support for cross-compilation to Android.
Java
17
star
38

cryptobox.js

JavaScript
17
star
39

wire-ios-images

๐Ÿ—ป Framework to perform rotation and scaling of images
Objective-C
16
star
40

wire-ios-system

Swift
15
star
41

github-action-wire-messenger

JavaScript
15
star
42

wire-ios-utilities

Swift
14
star
43

saml2-web-sso

Library and example web app for the SAML Web-based SSO profile.
Haskell
14
star
44

wire-ios-mocktransport

Objective-C
13
star
45

wire-ios-canvas

Canvas is a component for painting and composing pictures
Swift
13
star
46

wire-ios-protos

๐Ÿ“œ obj-c autogenerated classes from https://github.com/wireapp/generic-message-proto protocol buffer definitions
Swift
13
star
47

ansible-cassandra

Ansible role to install an Apache Cassandra cluster
Shell
13
star
48

wire-emails

Templates for sending emails for Wire
HTML
12
star
49

wire-ios-testing

Objective-C
12
star
50

wire-ios-request-strategy

iOS synchronization base interfaces for Wire
Swift
12
star
51

wire-ios-message-strategy

iOS synchronization of messages for Wire
Swift
11
star
52

backend-api-protobuf

Scala
11
star
53

antiscroll-2

macOS Lion-styled scrollbars for DOM elements.
HTML
11
star
54

servant-uverb

deprecated prototype implementation of https://github.com/haskell-servant/servant/pull/1314
Haskell
11
star
55

anna-bot

Rosie chatbot for Wire
Java
11
star
56

libsodium.js

libsodium compiled to pure JavaScript, with convenient wrappers
JavaScript
10
star
57

wire-web-store-engine

Provider for the following storage engines: File, IndexedDB, Memory & LocalStorage.
JavaScript
10
star
58

wire-account

Account verifications and forgotten passwords (https://wire-account-staging.zinfra.io/forgot/).
TypeScript
10
star
59

picklejar-engine

A JUnit 5 Test engine for running cucumber test in Java. Suitable for very big test suite projects.
Java
9
star
60

wire-web-core

Collection of npm modules created by Wire's web team.
TypeScript
9
star
61

wire-web-queue-priority

A promise based dynamic priority queue runner.
JavaScript
9
star
62

libsodium

A modern and easy-to-use crypto library.
C
9
star
63

avs-ios-binaries

AVS binaries for iOS
Objective-C
9
star
64

libsodium-native

C++
8
star
65

alert-bot

Broadcasts alerts
Java
8
star
66

backup-export-tool

Tool which exports Wire client's backups and generates PDF from it.
Java
8
star
67

wire-audio-files

Audio notifications files for Wire application.
Scala
8
star
68

wire-web-config-default

7
star
69

cryptobox-ios

iOS binaries for cryptobox
Shell
7
star
70

wire-android-translations

โ˜Ž๏ธ Non-english strings for Wire android client
7
star
71

wire-theme

CSS
6
star
72

rusty-jwt-tools

Tools for manipulating JSON Web Tokens, JWS, JWE, and JWK in Rust
Rust
6
star
73

bazinga64

Base64 encoding and decoding with ASCII string representation. Works with Node.js and modern browsers.
JavaScript
6
star
74

scala-utils

JVM friendly utility classes for Scala, including signals and threading.
Scala
6
star
75

recording-bot

Java
6
star
76

broadcast-bot

Broadcast Channel for Wire
Java
6
star
77

wire-ios-shared-resources

Shared resources used by the Wire iOS application
Groovy
6
star
78

mls-client

Rust
5
star
79

fido2-hackathon

Linkdump for the FIDO2/Webauthn/2FA Hackathon
5
star
80

roman

Lithium proxy for Wire
Java
5
star
81

gitlab

GitLab integration for Wire
Java
5
star
82

babel-plugin-remove-jsx-attributes

Babel plugin for removing attributes from JSX elements
JavaScript
5
star
83

ldap-scim-bridge

Command-line translator between LDAP and SCIM systems.
Haskell
5
star
84

wire-web-ets

End-to-end Test Service (ETS) for Wire's test automation suite
TypeScript
5
star
85

charon

Proxy mapping requests from Slack bots to Roman and back
Python
5
star
86

don-bot

Don - Wire meta bot
Java
4
star
87

wire-docs

Documentation of Wire for Developers and Operators
Nix
4
star
88

prebuilt-webrtc-binaries

Prebuilt binaries for webrtc library
Shell
4
star
89

wire-ios-notification-engine

Notification extension framework for iOS
Swift
4
star
90

wire-desktop-packages

Collection of npm modules used by Wire's desktop clients.
TypeScript
4
star
91

grunt-npm-bower

Grunt plugin which helps migrating from Bower to npm.
JavaScript
4
star
92

Down

Blazing fast Markdown rendering in Swift, built upon cmark.
C
4
star
93

brand

Brand assets & styleguide content ยท brand.wire.com
HTML
3
star
94

webapp-module-modal

CSS
3
star
95

mls-server

A prototype MLS server (deprecated)
Haskell
3
star
96

mi

morphing identity
Rust
3
star
97

ansible-minio-archive

minio external playbook
Shell
3
star
98

terraform-hcloud-rke2

HCL
3
star
99

cryptobox4j

Cryptobox jni optimized for Services
Java
3
star
100

hscim

System for Cross-domain Identity Management (SCIM)
Haskell
3
star