Upgrade to Pro — share decks privately, control downloads, hide ads and more …

シンプルな TUI VoIP の VoRS

シンプルな TUI VoIP の VoRS

source: https://codeberg.org/matoken/lilo-tokaido.2024.04/src/branch/main/slide/slide.adoc
発表:: LILO&東海道らぐオフラインミーティング 2024-04-27 https://lilo.connpass.com/event/316818/

Kenichiro MATOHARA

April 27, 2024
Tweet

More Decks by Kenichiro MATOHARA

Other Decks in Technology

Transcript

  1. 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
  2. 4

  3. 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 [email protected] -n file \ -s vors-2.3.0.tar.zst.sig < vors-2.3.0.tar.zst Good "file" signature for [email protected] with ED25519 key SHA256:qmlbyzvDRNXGJNxteapAWOmJR $ tar xf vors-2.3.0.tar.zst && cd vors-2.3.0 1 2 3 4 web 6
  4. 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
  5. 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
  6. 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
  7. VoRS の為の鍵作成 1 鍵の作成( ここでは ./key ) 2 公開鍵の表示,ネットワークアドレスとこの公開鍵を共有( server

    起動時にも表示される ) $ vors-keygen | tee key | vors-keygen -pub | read pub $ vors-keygen -pub < key cXachMhP2HMqEA3h6E5kYCGqkVpsFzyLnYszY7RzXmc 1 2 11
  8. 起動 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
  9. 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
  10. $ 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
  11. 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
  12. 即転ける>< 未解決…… 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
  13. 息が長いだけあってクライアントやツールが沢山 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