Slide 1

Slide 1 text

シンプルな TUI VoIP の VoRS Kenichiro Matohara(matoken) 1

Slide 2

Slide 2 text

matoken @ 鹿児島の右下の山奥から参加 好きなLinuxディストリビューションは Debian map: © OpenStreetMap contributors Kenichiro Matohara(matoken) https://matoken.org matoken@inari.opencocon.org 2

Slide 3

Slide 3 text

VoRS 軽量でシンプルな VoIP ソリューション 音声は Opus インターフェイスは TUI Go製, GNU Affero GPLv3 license. VoRS – Vo(IP) Really Simple. Very simple and usable multi-user VoIP solution. Some kind of alternative to Mumble. http://www.vors.stargrave.org/ 3

Slide 4

Slide 4 text

4

Slide 5

Slide 5 text

VoRS / Mumble でオンラインミーティ ング 軽量,低帯域で音声通話,テキストチャットが可能 専用クライアントが必要 画面共有が出来ない…… 事前に資料配布? 5

Slide 6

Slide 6 text

source download 1 source & 署名ファイル download 2 署名確認のために SSH 公開鍵入手 3 署名確認,指紋は でも確認できる 4 展開 $ sodo apt install golang sox $ wget -c http://www.vors.stargrave.org/download/vors-2.3.0.tar.zst \ http://www.vors.stargrave.org/download/vors-2.3.0.tar.zst.sig $ wget http://www.vors.stargrave.org/PUBKEY-SSH.pub $ ssh-keygen -Y verify -f PUBKEY-SSH.pub -I vors@stargrave.org -n file \ -s vors-2.3.0.tar.zst.sig < vors-2.3.0.tar.zst Good "file" signature for vors@stargrave.org with ED25519 key SHA256:qmlbyzvDRNXGJNxteapAWOmJR $ tar xf vors-2.3.0.tar.zst && cd vors-2.3.0 1 2 3 4 web 6

Slide 7

Slide 7 text

build error $ ./build : flag provided but not defined: -C usage: go build [-o output] [build flags] [packages] Run 'go help build' for details. VoRS is written on Go (at least 1.21 version is required) http://www.vors.stargrave.org/Install.html $ go version go version go1.19.8 linux/amd64 7

Slide 8

Slide 8 text

Go Lang 1.22 を debian bookworm backports から 導入 を利用して Go 1.21+ を入手 https://backports.debian.org/ $ apt-cache search golang-1.*-go golang-1.19-go - Go programming language compiler, linker, compiled stdlib golang-1.20-go - Go programming language compiler, linker, compiled stdlib golang-1.21-go - Go programming language compiler, linker, compiled stdlib golang-1.22-go - Go programming language compiler, linker, compiled stdlib $ sudo apt install golang-1.22 8

Slide 9

Slide 9 text

update-alternatives を使い Go 1.22 に path を 通す $ sudo update-alternatives --install /usr/bin/go go /usr/lib/go-1.22/bin/go 100 \ --slave /usr/bin/gofmt gofmt /usr/lib/go-1.22/bin/gofmt $ sudo update-alternatives --install /usr/bin/go go /usr/lib/go-1.19/bin/go 50 \ --slave /usr/bin/gofmt gofmt /usr/lib/go-1.19/bin/gofmt $ update-alternatives --display go go - auto mode link best version is /usr/lib/go-1.22/bin/go link currently points to /usr/lib/go-1.22/bin/go link go is /usr/bin/go slave gofmt is /usr/bin/gofmt /usr/lib/go-1.19/bin/go - priority 50 slave gofmt: /usr/lib/go-1.19/bin/gofmt /usr/lib/go-1.22/bin/go - priority 100 slave gofmt: /usr/lib/go-1.22/bin/gofmt $ go version go version go1.22.1 linux/amd64 9

Slide 10

Slide 10 text

再度 build $ ./build $ ls bin vors-client vors-keygen vors-server vors-vad $ cp -p bin/vors-* ~/bin/ 10

Slide 11

Slide 11 text

VoRS の為の鍵作成 1 鍵の作成( ここでは ./key ) 2 公開鍵の表示,ネットワークアドレスとこの公開鍵を共有( server 起動時にも表示される ) $ vors-keygen | tee key | vors-keygen -pub | read pub $ vors-keygen -pub < key cXachMhP2HMqEA3h6E5kYCGqkVpsFzyLnYszY7RzXmc 1 2 11

Slide 12

Slide 12 text

起動 server 起動 client 起動 $ vors-server -key key -bind 0.0.0.0:12978 $ vors-client -srv "127.0.0.1:12978" \ -pub cXachMhP2HMqEA3h6E5kYCGqkVpsFzyLnYszY7RzXmc -name matoken 12

Slide 13

Slide 13 text

Raspberry Pi OS bookworm armhf でも動かし たい cross build 失敗( opus(c) も build しているのでそちらのクロス 環境も必要そう ) $ GOOS=linux GOARCH=arm ./build package go.stargrave.org/vors/cmd/client imports go.stargrave.org/opus/v2: build constraints exclude all Go files in /media/mat 13

Slide 14

Slide 14 text

$ cat build #!/bin/sh -e opus=opus-1.5.2 if ! [ -d local/lib ] ; then rm -fr local $opus tar xf $opus.tar cd $opus ./configure --prefix=$(realpath ..)/local \ --enable-deep-plc \ --enable-osce \ --disable-doc \ --disable-extra-programs make -j4 make install cd .. rm -r $opus fi export PKG_CONFIG_PATH="$(realpath local)/lib/pkgconfig:$PKG_CONFIG_PATH" mkdir -p bin [ -d vendor ] && vendor="-mod=vendor" strip=-ldflags=-s tags="nolibopusfile" go build -C cmd/vad $strip $vendor -o ../../bin/vors-vad go build -C cmd/keygen $strip $vendor -o ../../bin/vors-keygen go build -C cmd/server $strip $vendor -o ../../bin/vors-server go build -C cmd/client -tags $tags $strip $vendor -o ../../bin/vors-client 14

Slide 15

Slide 15 text

Pi にも Go 1.22 を導入して実機で build client 起動 $ bin/vors-client -srv "192.168.0.11:12978" \ -pub cXachMhP2HMqEA3h6E5kYCGqkVpsFzyLnYszY7RzXmc -name pi ┌─Logs3name=pi6room=/────────────────────────────────────────────────────────────────────────── │07:11:38.338441 main.go:305: connected sid: 1 addr: 192.168.0.7:51994 │ │ │ │ │ │ │ │ │ │ ┌─matoken────────────────────────────────────────────────────────────────────────────────────── │ └────────────────────────────────────────────────────────────────────────────────────────────── ┌─pi─────────────────────────────────────────────────────────────────────────────────────────── │ └────────────────────────────────────────────────────────────────────────────────────────────── 15

Slide 16

Slide 16 text

即転ける>< 未解決…… goroutine 21 [running]: runtime/internal/atomic.panicUnaligned() /usr/lib/go-1.22/src/runtime/internal/atomic/unaligned.go:8 +0x24 runtime/internal/atomic.Xadd64(0x151a21c, 0x415d9554) /usr/lib/go-1.22/src/runtime/internal/atomic/atomic_arm.s:265 +0x14 main.(*Stats).AddRMS(0x151a1e0, {0x16a2000, 0x3c0, 0x3c0}) /home/matoken/src/vors-2.3.0/cmd/client/stats.go:47 +0x70 main.main.func7.1() /home/matoken/src/vors-2.3.0/cmd/client/main.go:470 +0x82c created by main.main.func7 in goroutine 11 /home/matoken/src/vors-2.3.0/cmd/client/main.go:360 +0x4ec It should work on all POSIX-compatible systems. http://www.vors.stargrave.org/index.html 16

Slide 17

Slide 17 text

VoRS 軽量で便利そう 人に使ってもらうにはバイナリの配布もしたい TUI のみは辛い? しかし今の所 Mumble に比べ動作環境が少ない Mumble は スマホや SBC でも動作 てことでやはり Mumble か…… 17

Slide 18

Slide 18 text

Debian での導入例 Mumble $ sudo apt install mumble-server mumble 18

Slide 19

Slide 19 text

家で外音取り込みに使ったりも 🐈 🗨 🪟🎤📱 ((( 🖥️ ))) 💻🎧 19

Slide 20

Slide 20 text

息が長いだけあってクライアントやツールが沢山 SBC をheadlessトランシーバーなどに利用するプロジェクト Web ベースの聞き専クライアント Mumble と Discord の間の音声ブリッジ ESP32 で Mumble(等)を使ったウォーキートーキー 3rd Party Applications - Mumble Wiki talkkonnect – A Headless Mumble Client Based on Raspberry Pi porjo/mumblet: Web-based Mumble client Stieneee/mumble-discord-bridge: A simple voice bridge between Mumble and Discord. jeffskinnerbox/esp32-walkie-talkie: A Walkie-Talkie based around the ESP32 using UDP Broadcast or ESP- NOW or Mumble 20

Slide 21

Slide 21 text

発表時の反応など Mumble を知っている人 → 0人 😣 こういうコマンドはどこから探してくるの? とか reddit の など Hacker News Command Line 21

Slide 22

Slide 22 text

奥付 発表 発表者 利用ソフトウェア + ライセンス LILO&東海道らぐオフラインミーティング 2024-04-27 Kenichiro Matohara(matoken) Lite XL Asciidoctor Reveal.js CC BY 4.0 22