Convert UDP to TCP - Ngrok TCP => UDP

18,203

Solution 1

Checkout DatagramTunnneler (on github). It is an open-source c++ program which simply listens to UDP traffic and forwards it to a TCP endpoint of your choice. On that TCP endpoint another instance of the DatagramTunneler publishes the UDP data back onto a UDP channel.
Disclaimer: I wrote that tool.

Solution 2

You can use https://localtonet.com instead of ngrok. Supports udp and tcp

Share:
18,203
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I'm in a hurry at the moment.

    My Question is, is there a way to forward UDP to TCP port? I need this for hosting a game server for my friends, I want to host Counter-Strike server for example, but it uses UDP (User Datagram Protocol) for server port, but NGROK only supports TCP (Transmission Control Protocl) & HTTP (HyperText Transfer Protocol).

    I tried this while ago..

    ngrok tcp 127.0.0.1:27015
    

    and as usually it will start :

    ngrok by @inconshreveable                                       (Ctrl+C to quit)
    
    Session Status                online
    Account                       Soricy Infinitive (Plan: Free)
    Version                       2.2.8
    Region                        United States (us)
    Web Interface                 http://127.0.0.1:4040
    Forwarding                    tcp://0.tcp.ngrok.io:18833 -> 127.0.0.1:27015
    
    Connections                   ttl     opn     rt1     rt5     p50     p90
                                  0       0       0.00    0.00    0.00    0.00
    

    But fails to connect to 0.tcp.ngrok.io:18833 in the game, and displays that there is no UDP configured on the server side.

    Is there any way I could do this differently? UDP=>TCP?

    • David Hoelzer
      David Hoelzer over 6 years
      The short answer is "No." You'd have to write some kind of proxy handler for yourself to forward it.
  • Admin
    Admin over 6 years
    Never mind, got myself a VPS and now I can host the server using Wine :) If NGROK ever implements UDP support, I will try that too!
  • Admin
    Admin almost 2 years
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.