GithubHelp home page GithubHelp logo

vpnubt's Introduction

VPNubt (VPN-udp-broadcast-tunneler)

Our tool "copies" udp broadcasts on the selected port to udp unicasts which are sent to the specific IP address to bypass the VPN router barrier.

Background

We love to play old school games like Warcraft 3 with friends. Since we can't do a LAN session like in our youth, we play over the internet via VPN without using Battle.Net. The problem with e.g. Warctaft 3 is that the server could not be found even if we are connected via VPN.

(VPN means here classic OSI layer 3 VPNs and not a OSI layer 2 bridge VPN.)

What is the reason for that?

The game server sends an udp broadcast to notify all player in the LAN. When you play over internet via VPN there is normaly a consumer router which do not relay this braodcast otherwise the network/internet would be flooded.

(Only professional routers could do this with a directed broadcast)

How we solved the problem

We have programmed a tool that listen on the selected network interface for udp broadcasts. If an udp broadcast is detected, its payload is copied into an udp unicast packet and then sent to the VPN receiver, because a unicast is not filtered by the router.

Are there other solutions for this problem?

All of the following tools solve the problem, but in a different way. They do not "convert" the broadcast and instead send an fixed predefined communication specifically for Warcraft 3.

Why a new tool?

Some of the programs mentioned above only work specifically for one game. Our tool on the other hand can be used universally and is not limited to Warcraft 3, for example. In addition, we wanted to realize the implementation in a current programming language (GO).


Reverse enigneering (of Warcraft 3)

If you want to know how we reengineered it, read on here.

  1. Identify the communication port of the game (on Windows 10)

    • Start the game (Warcraft 3) and entert he multiplayer lobby
    • Switch to windows and open the command line and type: tasklist | findstr war3.exe
    • Note the displayed process id of Warcraft 3
    • Type in command line: netstat -ano | findstr <Warcraft 3 process id>
    • So finally we find out that Warcraft is listen only for UDP communication on port 6112
  2. Understand the Warcraft 3 communication on UDP port 6112

    • Install and start Wireshark

    • Set the Wireshark displayfilter to: udp.port == 6112

    • You can divide it in 3 Parts:

      1. "Hello" information"
        When you enter the network lobby, Warcraft will only send a notifcation boradcast once:

        • Source: local IP of client
        • Destination: 255.255.255.255
        • Port: UDP 6112
        • Data: 0xf72f1000505833571b00000000000000

        (the data is always the same for each warcraft pc)

      2. "Server waiting"
        When you open a LAN game, the server sends every 5 seconds (may depend on the patch version) a notifcation boradcast:

        • Source: local IP of server

        • Destination: 255.255.255.255

        • Port: UDP 6112

        • Data: 0xf7321000010000000100000003000000
          The data is defined as:

          # (byte) Data dynamic Description
          01 f7 no W3 identification (fix)
          02 32 no W3 identification (fix)
          03 10 no W3 identification (fix)
          04 00 no Reserved
          05 01 yes Number of opened LAN games since Warcraft started. (here 1)
          06 00 no Reserved
          07 00 no Reserved
          08 00 no Reserved
          09 01 no Total number of (joined) players in the game. (here only the server himself)
          10 00 no Reserved
          11 00 no Reserved
          12 00 no Reserved
          13 03 no Number of possible players on the map. (here 3)
          14 00 no Reserved
          15 00 no Reserved
          16 00 no Reserved
      3. "Abort"
        When you abort the open game:

        • Source: local IP of client
        • Destination: 255.255.255.255
        • Port: UDP 6112
        • Data: 0xf733080001000000
  3. Proof of Concept
    Try to inform the game server by sending an unicast instead of broadcast by an external tool. For this PoC we used the software nping

    • Start on the remote computer (server) Warcraft 3.
    • Call nping (C:\Program Files (x86)\Nmap\nping) from command line on the client:
      • nping -c 1 --udp --source-port 6112 --dest-port 6112 --source-ip 192.168.1.2 --dest-ip 192.168.1.10 --data f72f1000505833571b00000000000000

    We got the answer from the server with the information about the open LAN game. So we could join the game.
    The PoC works! 👍 😄

vpnubt's People

Contributors

kingkeule avatar jokr4 avatar kant avatar

Stargazers

 avatar Just.me.907 avatar  avatar Matthäus J. N. Beyrle avatar Sergio Oller avatar S.W. avatar

Watchers

Sergio Oller avatar  avatar  avatar  avatar

Forkers

kant ndo360

vpnubt's Issues

Cannot See LAN server unless both are running it.

Greetings.

I tested the program today and I discovered that, after port forwarding everything, if my friend is running the program trying to connect to me he will not see the game. The log shows the packets were sent and received though. The only way for us to play was with both of us to enter each other's IP, use the same port, and run the program.

While it working was great... this means that it only supports two players at a maximum. Is there anything we are doing wrong on our end? Would love to use this program if it supported more one active connection at a time.

Reduce/move README Content

The current toplevel README is way to large

It should just show the mandatory information and explain the usage of the tool, maybe by screenshot

The rest could be moved to another README file in doc/ subfolder or similar

Tool does not launch due to missing png's for UI

2020/11/12 18:24:18 Could not find the ressource
2020/11/12 18:24:18 open img\icons8-tunnel-24.png: Das System kann den angegebenen Pfad nicht finden.

This file should be part of release package.

Fix for now is to download the png and place it manually in a new folder "img" next to the exe

Missleading UI Label

"Tunneling Service" should be renamed to "Broadcast Service" or similar

It's not (yet) a VPN Tunnel Client, although Plans exist to integrate Wireguard natively

32bit-Version to run on Linux/Wine

I wanted to try VPNubt for Wine on Linux to run Windows games.

For example, Lancraft worked fine so far, but i want to have a universal tool, so other games might work with that as well.

Unfortunately lots of games need to run in win32 WINEARCH, so your 64bit compilation in your releases is not starting at all.

I would like to have a 32bit-Version to run on 32bit systems.

So could you provide a 32bit release as well, please?

Logviewer decision

I created a new branch "logviewer" for the new feature log view window.
2 options:
a) use the windows console
b) create a new fyne window

Please check both options and let me know which option you prefer!

Internet Usage Clarification

Greetings!

I wanted to verify and ask a few questions about this project.

  1. Pure Internet Usage
    Could this program be used purely over the Internet without the use of a proper VPN connecting the clients together? (Assuming ports were forwarded.)

1a) Limited to 1 on 1? [EDITED]
If the answer above is yes then would it be limited to one-on-one connections? As currently, if my understanding is correct, you can only forward the packet to one ip address right?

[EDIT: After looking over the program I believe the intent is that anyone can attempt a connection with a host who has open ports. The host themselves does not run the program. So the question is really "Many-To-One" setup.]

1b) Dynamic Hub Creation [EDITED]
If the answer to 1 & 1a is yes then could there be an addition for this project be a "dynamic hub?"

This would allow for one host, if they have the 'dynamic hub' setting enabled, log the ip address of whomever sent a incoming unicast packet to them on the specified port and proceed to then forward any and all future unicast packets it receives to all the addresses it has logged.

[EDIT: To better clarify this idea I posted a revised description below:

There would be an option to run this program in HUB mode. What HUB mode does is log the IP & Port of whoever tunnels to it. Afterwards any unicasts sent by clients to the HUB will be relayed, via multicast, to everyone else who is connected on that port.]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.