nim-webrtc/webrtc.nimble

41 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

packageName = "webrtc"
version = "0.0.1"
author = "Status Research & Development GmbH"
description = "Webrtc stack"
license = "MIT"
installDirs = @["webrtc"]
2024-03-07 15:10:58 +00:00
requires "nim >= 1.6.0",
"chronicles >= 0.10.2",
2023-04-11 12:31:30 +00:00
"chronos >= 3.0.6",
2023-05-30 09:24:54 +00:00
"https://github.com/status-im/nim-binary-serialization.git",
2024-03-08 11:33:45 +00:00
"https://github.com/status-im/nim-mbedtls.git",
"https://github.com/status-im/nim-usrsctp.git"
2023-05-30 09:24:54 +00:00
2024-03-07 11:16:48 +00:00
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"]
feat: dtls connection using mbedtls (#10) * 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>
2024-08-13 13:54:03 +00:00
var cfg =
2024-03-07 11:16:48 +00:00
" --styleCheck:usages --styleCheck:error" &
(if verbose: "" else: " --verbosity:0 --hints:off") &
" --skipParentCfg --skipUserCfg -f" &
" --threads:on --opt:speed"
feat: dtls connection using mbedtls (#10) * 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>
2024-08-13 13:54:03 +00:00
when defined(windows):
cfg = cfg & " --clib:ws2_32"
2024-03-07 11:16:48 +00:00
import hashes
2023-05-30 09:24:54 +00:00
proc runTest(filename: string) =
2024-03-07 11:16:48 +00:00
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
feat: stun protocol & stun connection (#9) * feat: stun protocol & stun connection * rename getResponse into getPong and test it * add Username attribute * genUfrag procedure * Add generateRandomSeq to generate a transaction id * First draft of getPing * Use UdpPacketInfo tuple * Change closing debug message * Add proper exception tracking * Change StunConn init behavior * Add a last UdpPacketInfo * Add comments * refactor: change connection management * Add a lot of comments/Finish refactor * Add copyright headers on test files * simplify newRng proc for testing * add exception tracking for stun transport asynchronous proc * remove ping/pong example building in the ci * rename getPong test * remove maximum connections * Add ICE stun attributes * Stun rework * feat: getBindingRequest * fix oversight & add comments * Test rework * Adds continue in stunMessageHandler loop * remove `doAssert(false)` from Stun.connect() * Update TODO * fix comment typo * fix: test lacking precision * docs: add StunConn.init() comments * chore: make teststun more readable * feat: use withValue instead of getOrDefault in Stun.connect() * feat: add check if Fingerprint is valid * refactor: getAttribute and username/password provider * chore: removes genUfrag, should be in libp2p instead * chore: remove redundant test * chore: change warn log to debug * docs: update getBindingResponse/Request comments * chore: renames init into new * fix: compilation warnings * chore: change closed line to be at the end of the close procedure * feat: limit queues size
2024-05-24 12:14:30 +00:00
task test, "Run test":
runTest("runalltests")