The response contains the IP addresses and port numbers of the following services:Īnd some other information which I’m not sure how is used. Notice how the XML element name in the response is the inverse of the request element name plus _R which I imagine stands for response or reply. While other IP addresses of the P2P server respond with: One of the P2P servers responds with the following payload: It appears to send these packet to all IP addresses of the name server A records. In cases where the client is connecting to a Reolink DVR (digital video recorder) or NVR (network video recorder) instead of a camera, the wrapping XML element is instead of. ![]() Where 123456789 is the camera UID and MAC is the platform identifier of the connecting client. It also sends the same packet to the local broadcast address 255.255.255.255 of the local network which allows local cameras to respond, too: The client app sends a UDP packet from local port 16577 to port 9999 of with the following XML body (encoded using the algorithm mentioned above). It is likely that the camera sends regular UDP pings to the public P2P server to keep an active connection with the server to enable incoming connections. The actual magic happens through the dynamic port numbers allocated by the routers between both communicating parties and the ability to route packets back to the originating device by re-using those port numbers. The encoding uses a shared secret key and some additional transformations. The payload is encoded to avoid network address translation (NAT) layers changing the IP addresses included in the payload. The communication uses UDP packets with special payload that contain the information to establish direct connection between the client and the camera. This article by Bryan Ford is the best explanation of network hole punching for peer-to-peer (P2P) access. The Reolink client app uses the publicly accesible Reolink relay to establish a direct connection to the camera for remote management and video/audio communication.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |