TURN (Traversal Using Relays around NAT) Server handling as relays media, means allows clients(zomie app) to send and receive data to Media Server through an intermediary server(TURN server). Server running on nodejs, this server work as a backup if STUN Server won't work because client device behind of symmetric NAT.
-
WebRTC with STUN/TURN
- config
- create your .env from .env.example, & fill the credential
TURN_PORT=3478 TURN_USERNAME=zomie TURN_PASSWORD=password
- install
- npm install
- dev
- npm run dev
- nodemon server
- prod
- npm run start
- node server
After running turn server then you can test TURN server here test.
Or You can run test on __test/index.html
.
After running this server don't forget to setup configuration of zomie app & Media Server
-
Client (zomie app)
- dotenv file
ALLOW_TURN_SERVER = "true" TURN_SERVER_HOST = "turn:ip:port" #example: "turn:192.168.1.9:3478" TURN_SERVER_USERNAME = "zomie" TURN_SERVER_PASSWORD = "password"
-
- .env file
ALLOW_TURN_SERVER = "true" TURN_SERVER_HOST = "turn:ip:port" #example: "turn:192.168.1.9:3478" TURN_SERVER_USERNAME = "zomie" TURN_SERVER_PASSWORD = "password"
-
Port port for TURN
3478 TCP & UDP 49152–65535 UDP
- Articles
- Videos
- Code
- Issues