Video and audio broadcasting WebRTC server. With the ability of recording a chat session, both on the server and on the client. An example of a client for the server You can find here opaweb
https://github.com/pion/webrtc
https://github.com/gorilla/csrf
https://github.com/gorilla/websocket
https://github.com/julienschmidt/httprouter
https://pkg.go.dev/golang.org/x/crypto/acme/autocert
git clone https://github.com/opaldone/opachat.git
cd opachat
Set the GOPATH variable to the current directory "opachat" to avoid cluttering the global GOPATH directory
export GOPATH=$(pwd)
cd src/opachat
go mod init
go mod tidy
Return to the "opachat" root directory, You can see the "opachat/pkg" folder that contains the required Golang packages
cd ../..
r - means "run", b - means "build"
./r b
The "u" script is a watching script then for stopping press Ctrl+C
u - means "update"
./u
You can check the "opachat/bin" folder. It should contain the necessary structure of folders and files
ls -lash --group-directories-first bin
./r
The config file is located here opachat/bin/config.json
{
"appname": "opachat", // Just a name of application
"address": "0.0.0.0", // IP address of the server, zeros mean current host
"port": 7778, // Port, don't forget to open for firewall
"acme": false, // Set to true if You need to use acme/autocert
"acmehost": "opaldone.click", // The domain name, set acme: true
"dirCache": "./certs", // The folder where acme/autocert will store the keys, set acme: true
"crt": "/server.crt", // The path to your HTTPS cert key, set acme: false
"key": "/server.key", // The path to your HTTPS key, set acme: false
"iceList": [ // Settings of WebRTC turn server
{
"urls": "turn:[some ip]:[some port]", // Example turn:192.177.0.555:3478
"username": "login", // The login for turn server if exists
"credential": "password" // The password for turn server
}
]
}