Page 1 of 1

USE YSFLIGHT with the UDP protocol

Posted: Wed Jul 27, 2011 6:50 am
by vincent
What is the UDP protocol?
The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet.
UDP uses a simple transmission model without implicit hand-shaking dialogues for guaranteeing reliability, ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice. UDP assumes that error checking and correction is either not necessary or performed in the application, avoiding the overhead of such processing at the network interface level. Time-sensitive applications often use UDP because dropping packets is preferable to waiting for delayed packets, which may not be an option in a real-time system. If error correction facilities are needed at the network interface level, an application may use the Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed for this purpose.
source: Wikipedia

How to tunnel TCP connections to UDP and vice-versa?
Let's say you have a server set on and we have said the users they can use the port 7916 to connect trough UDP.

So, the server must listen on port 7916 and tunnel the information to 7915, and the client must listen on port 7915 and tunnel on port 7916.

There are several ways to do it:

- UNIX users

-> with socat:
---> for the server:
socat udp4-listen:7916 tcp4:

---> for the client:
socat tcp4-listen:7915

-> With netcat:
---> for the server:
mkfifo /tmp/fifo # we need to create a fifo to have two-way communication between the two channels
sudo nc -l -p -u 7916 < /tmp/fifo | nc 7915 > /tmp/fifo

---> for the client:
mkfifo /tmp/fifo
sudo nc -l -p 7915 < /tmp/fifo | nc -u 7916 > /tmp/fifo

- Windows users
-> with Netcat (not tested)
--> for the server:
netcat -L -p -u 7916 -vvv

--> for the client:
netcat -L -u -p 7916 -vvv

Else, you can find others programs with a Google search...

Re: USE YSFLIGHT with the UDP protocol

Posted: Wed Jul 27, 2011 6:51 am
by Eric

Re: USE YSFLIGHT with the UDP protocol

Posted: Tue Jun 18, 2013 4:11 pm
by Danny

Has anyone tried this with any success? I think it could potentially solve the age-old distance lag problem.

Re: USE YSFLIGHT with the UDP protocol

Posted: Fri Jul 12, 2013 10:56 am
by Martin-Dutchie
TheJuli and I tried setting this up, ending in a failure sadly. YS was bypassing the port detour for some reason...

Re: USE YSFLIGHT with the UDP protocol

Posted: Sat Jul 13, 2013 8:54 pm
by Eric
I'll be testing this on my server. I have a feeling it won't do much though...

Re: USE YSFLIGHT with the UDP protocol

Posted: Sun Jul 14, 2013 5:16 am
by Flake
I think the effort of converting/calculating TCP to UDP and back again negates the benefit.

It's a shame YSF doesn't use UDP instead of TCP natively. If soji wished it to happen, I'd gladly help him.

Re: USE YSFLIGHT with the UDP protocol

Posted: Mon Jun 02, 2014 8:14 pm
by Scarecrow
As an update, Flake worked a couple of nights ago regarding this and trying to get rid of the distance lag issue. However, after a testing by the Blue Dolphins Jet Team, we were unable to find any increase in the distance lag problem that we face in YS.

However, it was a very good attempt and I applaud his efforts.