[Interest] QUdpSpcket connection between two public peers behind firewalls

Richard Moore rich at kde.org
Mon Dec 18 18:53:52 CET 2017


On 18 December 2017 at 16:25, Thiago Macieira <thiago.macieira at intel.com>
wrote:

> On Monday, 18 December 2017 01:55:49 PST Nuno Santos wrote:
> > I’m trying to establish a QUdpSocket connection between two peers that
> are
> > behind firewalls.
> >
> > From what I have been reading, one way of doing this is recurring to a
> STUN
> > Server, performing a bind request which will have as response our public
> IP
> > and a port and not closing the socket.
>
> I don't know what a STUN server is. I'm going to assume it's some kind of
> proxy that QUdpSocket does not support. The only type that it does support
> is
> SOCKS5, so if you have the option, use that.
>

​STUN is RFC 5389​ and is anything but simple. Consider using a library
that performs NAT traversal for you then wrapping the resulting socket in a
QUdpSocket if possible.

Cheers

​Rich.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171218/1fe02800/attachment.html>


More information about the Interest mailing list