RTCMultiConnection icon indicating copy to clipboard operation
RTCMultiConnection copied to clipboard

how provide public ip and local ip manually to RTCMulticonnection instead using stun and turn server

Open webleb opened this issue 1 year ago • 14 comments

Hello, I am looking for a solution that allow me to provide public and local ips of peers manually instead of using signal and stun and turn server. is there a way to provide rtcmulticonnection the info needed to establish peer to peer connection such public and local ip manually? @grimace @killmenot @muaz-khan @dansandland @Yuripetusko it is appreciated if someone could help Thanks

webleb avatar Apr 06 '23 17:04 webleb

you are talking about ip multicast which is not available in javascript today. a project started 2 years ago to implement it as a browser W3C standard but stopped to be financed by Cisco. however the main author of this project would be happy to see open source developers to continue the job... https://lists.w3.org/Archives/Public/public-multicast/ https://www.w3.org/community/multicast/ https://github.com/GrumpyOldTroll/wicg-multicast-receiver-api (btw ip multicast was implemented in the lovely missing flash plugin until 2021 and the end of plugins in browser)

ROBERT-MCDOWELL avatar Apr 06 '23 21:04 ROBERT-MCDOWELL

@ROBERT-MCDOWELL @grimace @killmenot @muaz-khan I am trying to build a stun-like script in javascript (not node.js) that read the ip's from a local file and i want to make rtcmulticonnection working without signal server. does anyone can assist in that

webleb avatar Apr 08 '23 16:04 webleb

@webleb you cannot develop a stun/turn server on javascript client side since the JS engine of browsers don't allow to create low level sockets and btw the sandbox does not allow other clients to know your IP.

ROBERT-MCDOWELL avatar Apr 08 '23 20:04 ROBERT-MCDOWELL

@ROBERT-MCDOWELL I dont want that Stun know the ip but just read it from input form enter it by user.

webleb avatar Apr 08 '23 21:04 webleb

I suggest you learn what is a STUN/TURN server here https://blog.ivrpowers.com/post/technologies/what-is-stun-turn-server/ STUN server must know the ip of each client, it's the main job of a STUN server

ROBERT-MCDOWELL avatar Apr 08 '23 22:04 ROBERT-MCDOWELL

@ROBERT-MCDOWELL I know what is STUN server. i just want use same mechanism to pass the ip to webRTC. i dont want that my new "STUN" to know the ip but just read it from a file or input form.

webleb avatar Apr 08 '23 22:04 webleb

i just want a way to pass the ip to RTCMulticonnection without using stun and turn and signal server. @ROBERT-MCDOWELL @grimace @killmenot @muaz-khan

webleb avatar Apr 08 '23 22:04 webleb

you cannot, it's sandboxed! you have no other way to to get the ip but from STUN!

ROBERT-MCDOWELL avatar Apr 09 '23 00:04 ROBERT-MCDOWELL

@ROBERT-MCDOWELL suppose that i know the ip and i just want to pass it to webRTC (if it is complex i will use same mechanism that stun use it to pass it to webRTC).

webleb avatar Apr 09 '23 01:04 webleb

do you understand when I say "sandboxed"?? it means you CANNOT hardcode p2p ips into webrtc, it's a security prevention

ROBERT-MCDOWELL avatar Apr 09 '23 01:04 ROBERT-MCDOWELL

@ROBERT-MCDOWELL i know sandboxed , it is used also in iframe in some case for security. i just want to know where the ip is sandboxed ? in STUN? if it is not sandboxed in STUN i can use the same mechanism that STUN use it to pass it to RTCMulticonnection.

webleb avatar Apr 09 '23 01:04 webleb

what you call "mechanism" is the ICE protocol, through UDP / TCP. better you just install an stun server locally and the discovery willl be ok since (again) you cannot manipulate ips in webrtc as ICE stun is encrypted between peers.

ROBERT-MCDOWELL avatar Apr 09 '23 01:04 ROBERT-MCDOWELL

can i install stun on users mobile by downloading my app? @ROBERT-MCDOWELL

webleb avatar Apr 09 '23 01:04 webleb

this is off topic... better you go to stun server developers.... please close this issue now thanks

ROBERT-MCDOWELL avatar Apr 09 '23 01:04 ROBERT-MCDOWELL