mirror of
https://github.com/vacp2p/nim-webrtc.git
synced 2026-01-09 23:08:07 -05:00
* feat: dtls connection using mbedtls * refactor: change according to the stun protocol rework * chore: rename init proc into new * docs: adds object field comments * chore: split dtls.nim into two files & renaming * chore: remove useless code * chore: remove TODOs as they were addressed with a Stun refactorization * fix: oversight on dtls.new * feat: add dtls test * chore: added license & used pragma on testdtls * fix: remove usage of deprecated TrackerCounter * fix: trackers counter * fix: - add windows linking library - make stun stop asynchronous (causing issue on macos) - store private key and certificate * chore: renaming test * docs: update DtlsConn comment * fix: remove code duplicate * chore: update comment * chore: remove duplication mbedtls initialization code in accept/connect and un-expose mbedtls context * feat: add exception management to dtls_transport * fix: check address family before handshake * fix: exhaustive case * fix: do not create dtlsConn if the address family is not IP * chore: remove entropy from MbedTLSCtx * chore: remove asyncspawn of cleanupdtlsconn * chore: ctx is no longer public * test: add a test with more than 2 nodes * chore: started is now useful * chore: update Dtls.stop * chore: removed unecessary todos * docs: add comments on DtlsConn.read and getters * feat: add tracker for dtls connection and transport * chore: privatize local and remote certificate * style: use nph * fix: remove laddr from dtls_conn (not used) * style: sort imports * chore: clean Dtls.stop * fix: remote address is no longer exposed * fix: raddr change oversight * chore: change `verify` name * chore: changed `sendFuture: Future[void]` into `dataToSend: seq[byte]` * chore: avoid sequence copy * chore: change assert message --------- Co-authored-by: diegomrsantos <diegomrsantos@gmail.com>
41 lines
1.3 KiB
Nim
41 lines
1.3 KiB
Nim
packageName = "webrtc"
|
|
version = "0.0.1"
|
|
author = "Status Research & Development GmbH"
|
|
description = "Webrtc stack"
|
|
license = "MIT"
|
|
installDirs = @["webrtc"]
|
|
|
|
requires "nim >= 1.6.0",
|
|
"chronicles >= 0.10.2",
|
|
"chronos >= 3.0.6",
|
|
"https://github.com/status-im/nim-binary-serialization.git",
|
|
"https://github.com/status-im/nim-mbedtls.git",
|
|
"https://github.com/status-im/nim-usrsctp.git"
|
|
|
|
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
|
|
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
|
|
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
|
|
let verbose = getEnv("V", "") notin ["", "0"]
|
|
|
|
var cfg =
|
|
" --styleCheck:usages --styleCheck:error" &
|
|
(if verbose: "" else: " --verbosity:0 --hints:off") &
|
|
" --skipParentCfg --skipUserCfg -f" &
|
|
" --threads:on --opt:speed"
|
|
|
|
when defined(windows):
|
|
cfg = cfg & " --clib:ws2_32"
|
|
|
|
import hashes
|
|
|
|
proc runTest(filename: string) =
|
|
var excstr = nimc & " " & lang & " -d:debug " & cfg & " " & flags
|
|
excstr.add(" -d:nimOldCaseObjects") # TODO: fix this in binary-serialization
|
|
if getEnv("CICOV").len > 0:
|
|
excstr &= " --nimcache:nimcache/" & filename & "-" & $excstr.hash
|
|
exec excstr & " -r " & " tests/" & filename
|
|
rmFile "tests/" & filename.toExe
|
|
|
|
task test, "Run test":
|
|
runTest("runalltests")
|