STUN/TURN servers
John Colvin via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 29 02:56:17 PDT 2014
On Tuesday, 29 April 2014 at 08:42:53 UTC, Radu wrote:
> On Tuesday, 29 April 2014 at 01:21:36 UTC, Vladimir Panteleev
> wrote:
>> On Monday, 28 April 2014 at 18:36:59 UTC, Radu wrote:
>> Every time I read anything related to STUN/TURN, it becomes
>> obvious that these technologies were designed by some
>> committee. Metric tons of technical jargon and bureaucratic
>> overhead with an absurdly overcomplicated protocol to achieve
>> such a simple thing.
>>
>> I implemented basic concept behind the TURN server, a TCP
>> relay:
>>
>> http://worms2d.info/WormNAT2
>>
>> The protocol is much simpler. As soon as a connection is
>> received, it allocates a port and sends it to the client. This
>> is the public port allocated for the connection - peers
>> wishing to connect to the client can connect to that port on
>> the relay server and talk as if they were talking to the
>> client directly. Every time a peer connects, the server
>> allocates a temporary port for the client to connect to, and
>> sends it over the original control connection. After the
>> client connects to said port, they can start talking to the
>> peer directly, as if there's no proxy in-between. This avoids
>> complicated handshakes, headers, and having to modify your
>> protocol and wrap every single packet in a stupid header. It's
>> also based on TCP, so you don't have to reimplement
>> reordering, retransmission etc. on top of UDP all over again.
>>
>> It's not open-source, and although I could share the source
>> code, it's not Vibe'd (D1 in fact). The implementation is very
>> simple, though.
>
> Vibed is in D1? Are you sure? I can't seem to find any mention
> of that, it works with the current DMD, but then again I've
> never tried to compile a D1 program with it.
No, he means that WormNAT2 is written in D1 and doesn't used
Vibe.d
Vibe.d is D2 only.
More information about the Digitalmars-d
mailing list