Giter Club home page Giter Club logo

udptunnel's Introduction

udptunnel

It allows TCP/UDP/ICMP traffic over UDP tunneling. It's useful to avoid Internet restrictions.

  • BSD & Mac OSX support
  • Auto-config scripts for routing

Mobile network prepaid

Requirements

  • A prepaid chip
  • Edge/3G Cellphone able to share Internet
  • A full access Internet connection (home ADSL?)

Usage

So far, I've tested this technique in an OSX machine (connected to cellphone) and a Linux machine (connected to full access Internet connection). Once you have access to mobile operator's portal cautivo, you can access to limited services, such as DNS, and TCP ports distinct to 80 (HTTP). I don't use proxy over TCP because TCP connections receive an arbitrary RESET at any time. Also, I figure out that 53 UDP port has the best performance, with lower packet loss.

You must:

  • identify the public IP address of the machine connected to full access Internet connection <public_address>
  • choose a common password <your_password>

On Linux server (with full access Internet connection)

./server 53 <your_password>

On OSX client (with limited Internet access)

./client <public_address> 53 <your_password>

Note: You may need a tuntap module for OSX http://tuntaposx.sourceforge.net/download.xhtml if you get an error saying open: No such file or directory

And that's all!!, you'll have a slow (just a bit) but full access Internet connection!. I've measured 0.210 MBPS in download.

How it works

By default mobile provider blocks any packet but UDP packet, unless you pay for the service. My method consists in sending TCP/UDP/ICMP frames as payload of an UDP packet to a known host (your server). Your server reinjects these frames to Internet.

PC to Internet
PC -> Cellphone -> [limited Internet] -> Your server -> [Internet]

Internet to PC
[Internet] -> Your server -> [limited Internet] -> Cellphone -> PC

UDP Packet payload

The messages between your server and PC are UDP packets with the next payload:

 ----------- ------------ --------------------------------------------
|     1    |        2    |                        3                   |
|PACKET_TYPE| PACKET_CMD |      TCP/UDP/ICMP Packet or control data   |
| (1 byte)  | (1 byte)   |               (variable size)              |
 ----------- ------------ --------------------------------------------

Each UDP packet arrives to your server or PC must be disassembled and reinjected to OS network stack.

There are 2 packet types:

  • CONTROL: For authentication and notification
  • TRAFFIC: For transporting another packet (TCP/UDP/ICMP).

It works transparently

For reinjecting to OS network stack I use tun driver. It helps to create virtual network interfaces that receive traffic from an userspace application.

Thanks to the routing scripts (in scripts/) you don't need do anything to get the whole system with Internet access. Routing scripts are called automatically.

Future

  • iPhone port (computer connected to cellphone will not be necessary)
  • Multi-client server (at this time, the server is one client only)
  • Data compressing

F. Astroza

udptunnel's People

Contributors

astroza avatar anmolsarma avatar explosivebattery avatar lga1150 avatar devops117 avatar shoaibali avatar

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.