A method of managing content casting sessions between a source device and at least one media playback device, comprising: connecting the source device to a first network and to a proxy server via said first network; connecting the at least one media playback device to a second network and to a proxy server via said second network; relaying multicast service discovery messages from the source device to the at least one media playback device using address and port mapping to imitate the origin of the discovery messages as being inside the second network the multicast service discovery messages being implemented with the mDNS protocol; receiving multicast service advertisement messages from the at least one media playback device, in response to receiving at the at least one media playback device the relayed service discovery messages sent by the source device, the multicast service advertisement messages being implemented with the mDNS protocol; applying network rules to relay or block service advertisement messages from the at least one media playback device to the source device; modifying the multicast service advertisement messages from the at least one media playback device by converting the multicast service advertisement messages from the at least one media playback device to one of unicast L3, unicast L2, or multicast service advertisement packets by changing message content and using address and port mapping to imitate the origin of the advertisement messages as being inside the first network; modifying service, SRV, and address, A, records in the service advertisement messages; sending the modified service advertisement messages to the source device; authorizing the source device for connection to the at least one media playback device; pairing the source device with the at least one media playback device; applying network rules to regulate casting session protocol traffic and casting configuration protocol traffic; and opening a media casting session between the paired devices using virtual IPs and communication ports and performing Network Address Translation to transport session packets between the source device and the media playback device which devices are on different Layer 2 networks without a Layer 3 route between them. connecting the source device to a first network and to a proxy server via said first network; connecting the at least one media playback device to a second network and to a proxy server via said second network; relaying multicast service discovery messages from the source device to the at least one media playback device using address and port mapping to imitate the origin of the discovery messages as being inside the second network the multicast service discovery messages being implemented with the mDNS protocol; receiving multicast service advertisement messages from the at least one media playback device, in response to receiving at the at least one media playback device the relayed service discovery messages sent by the source device, the multicast service advertisement messages being implemented with the mDNS protocol; applying network rules to relay or block service advertisement messages from the at least one media playback device to the source device; modifying the multicast service advertisement messages from the at least one media playback device by converting the multicast service advertisement messages from the at least one media playback device to one of unicast L3, unicast L2, or multicast service advertisement packets by changing message content and using address and port mapping to imitate the origin of the advertisement messages as being inside the first network; modifying service, SRV, and address, A, records in the service advertisement messages; sending the modified service advertisement messages to the source device; authorizing the source device for connection to the at least one media playback device; pairing the source device with the at least one media playback device; applying network rules to regulate casting session protocol traffic and casting configuration protocol traffic; and opening a media casting session between the paired devices using virtual IPs and communication ports and performing Network Address Translation to transport session packets between the source device and the media playback device which devices are on different Layer 2 networks without a Layer 3 route between them.