Giter VIP home page Giter VIP logo

udptunnel's Introduction

=============================================================================

  UDPTUNNEL README

  Author: Daniel Meekins
  Contact: dmeekins - gmail

  Copyright (C) 2009 Daniel Meekins

=============================================================================

This project tunnels TCP data through a UDP tunnel. The executable can act as
the server or client. The server acts as a proxy for the client, listening
on a specified UDP port and creating a connection to a TCP server that the
client specifies. The client listens on a TCP port, acting as the server that
some TCP client connects to. The client recevies any TCP data on that port 
and sends the data to the udpserver, which sends it to the TCP connection it
made with the desired TCP server.


-----------------------------------------------------------------------------
1.) Building

On *nix systems in Makefile, make sure that the correct value is set for the 
"OS" variable. Then just run 'make'.

On Windows, if using GCC in Cygwin, make sure the "OS" variable is set to
CYGWIN in Makefile and run 'make'.

If using the VC++ compiler (cl.exe), make sure to be in the "Visual Studio
Command Prompt", or at least have all the environment variables set correctly,
then run 'nmake.exe /f Makefile.Win32'. Also make sure the location of 
WS2_32.Lib is specified correctly fo the LIBS variable (if building for x64,
set path to the 64-bit version of WS2_32.Lib).


-----------------------------------------------------------------------------
2.) Running

usage: ./udptunnel [-v] [-6] <-s|-c> <args>
  -c    client mode (default)
        <args>: [local host] <local port> <proxy host> <proxy port>
                <remote host> <remote port>
  -s    server mode
        <args>: [host] port [acl ...]
        acl: [s=<src ip>,][d=<dst ip>,][dp=<dst port>,][a=allow|deny]
  -6    use IPv6
  -v    show some debugging output (use up to 3 for increaing levels)
  -h    show this junks and exit


To run the server:

    udptunnel -s [-6] [host] port [acl ...]

where the port is a UDP port to listen for messages from the udpclient and host
is the address to listen on. Use the -6 option to listen on IPv6 addresses.

After the port, the rest of the arguments are the access control list, with
comma-separated parameters for each entry. Access can be control based on the
source IP, destination IP, source port, and destination port. A catch-all
entry is added at the end of every list that allows everything. To deny anything
that doesn't match your entries, put "a=deny" as the last entry. In a Window's
shell, each acl entry needs double quotes (") around them.

Server Examples:
    udptunnel -s 4444
    udptunnel -s -6 2001::10:3 4444
    udptunnel -s 4444 d=10.0.0.1,dport=80,a=deny dport=80,a=allow a=deny


To run the client:

    udptunnel -c [-6] [local host] <local port> <proxy host> <proxy port>
            <remote host> <remote port>

local host/port - Host and port for the TCP server to listen on. If the host
                  isn't supplied, it will listen on all available addresses.
proxy host/port - Host and port that udpserver is listening on.
remote host/port - Host and port to forward the received TCP data to. The host
                   is relative to the proxy machine (e.g. specifiying 127.0.0.1
                   is the proxy machine itself).
Use the -6 option to listen and connect using IPv6 addresses.

Example for tunneling ssh data through the tunnel between two computers with IP
addresses 192.168.1.2 (client) and 192.168.1.1 (server):

    server# ./udptunnel -s 192.168.1.1 4444
    client# ./udptunnel -c 127.0.0.1 3333 192.168.1.1 4444 127.0.0.1 22
    client# ssh -p 3333 [email protected]


This code has been tested and works on Linux, Solaris 10 x86, and Cygwin (but
requires the IPv6 extension - http://win6.jp/Cygwin/index.html). Please send
any bugs or issues to the contact listed above.

udptunnel's People

Watchers

James Cloos avatar

udptunnel's Issues

R18 does not work HTTP Proxy software such as tinyproxy

What steps will reproduce the problem?
1. on the server side, run tinyproxy on port 8080
2. run udptunnel server
3. run udptunnel client, point to 127.0.0.1:8080
4. Configure Firefox to use udptunnel as http proxy. 
5. Firefox will get an empty page on all web site browsing.

What is the expected output? What do you see instead?
--expected to see web browsing working in firefox


What version of the product are you using? On what operating system?
--latest version: r18

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 27 Jun 2011 at 10:40

Support PASSIVE mode (like FTP)

There should be a way to support passive mode where the SERVER starts the 
connection to the client.
Scenario: RSYNC server not reachable behind a NAT; RSYNC client reachable. The 
UDP proxy would server side would make a request to the proxy client side so 
that the UDP channel opens. A that point the client can communicate normally 
with the server.

Original issue reported on code.google.com by [email protected] on 23 Sep 2010 at 5:48

HTTPS traffic

I don't seem to be able to get HTTPS traffic to go through the UDP tunnel, is 
there some fundamental reason I'm missing why this wouldn't work? 

I'm using a windows VM running the udptunnel in server mode as well as a XAMP 
server to test it out and another Windows VM acting as the client. I can access 
the XAMP site over http, but can't access the secure https site. 

Original issue reported on code.google.com by [email protected] on 21 Feb 2013 at 7:36

Feature Request: Add UDP buffer

This is a feature request: is it possible to add a udp buffer for each udp link 
so that multiple udp packets can be transmitted and acked instead of waiting 
for ACK on the first packet before sending the second one?

Original issue reported on code.google.com by [email protected] on 27 Jun 2011 at 10:42

Doesn't work with HTTP protocol

What steps will reproduce the problem?
1. Launch udptunnel client "udptunnel.exe -c 127.0.0.1 8888
IP_UDPTUNNEL_SERVER 12345 127.0.0.1 80" . And the udptunnel server
./udptunnel -s 12345 (this server MUST have a httpd process running)
2. Open the browser and enter the url http://127.0.0.1:8888 : nothing
displayed.

What is the expected output? What do you see instead?
The expected output should be the web page. But here we see nothing

What version of the product are you using? On what operating system?
Latest version, r9

Please provide any additional information below.
This problem occurred due to the http protocol that has a multiple small
TCP request simultaneously and it seems that your program doesn't like that.
Thank a lot for providing an amazing program. ALl the best 


Original issue reported on code.google.com by [email protected] on 28 Oct 2009 at 11:20

Udpsever exits when the tcp connection dead on the server side

What steps will reproduce the problem?
1. start the sever on remotehost "./udptunnel -s 5050 -vv
2. start squid sever on the remote-host which would list on localhost:3128
3. start the client ./udptunnel -c 4455 remote-host 5050 localhost 3128
4. Now setup a http proxy on the browser as localhost:4455
5. Try to browse. It should fetch the webpage.
6. Stop squid server
7. Try to browse.

Now the sever sends the following output few lines and exits.
       recv: Transport endpoint is not connected

What is the expected output? What do you see instead?
      There server not should NOT exit when the tcp endpoint is closed.

What version of the product are you using? On what operating system?
        udptunnel-r13 on Linux - 2.6.33.3-85.fc13.i686.PAE


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 28 Sep 2010 at 10:31

Please consider renaming this project

There is already an existing project named 'udptunnel':
<http://www1.cs.columbia.edu/~lennox/udptunnel/> (which incidentally
tunnels UDP over TCP :-)) and it is already packaged for Debian. I think it
would make sense to think about a new name to avoid confusion, especially
once someone might want to add _this_ udptunnel to Debian.

I don't have any suggestions for the new name, but want to add that
'utunnel' is also already taken: <http://thebends.org/~allen/utunnel/>.

Original issue reported on code.google.com by [email protected] on 28 Oct 2009 at 3:14

bind: Address already in use

When I start udptunnel, and then close it, and run it again, I sometimes get 
this error.

$ udptunnel -vv -c 127.0.0.1 44444 192.168.1.1 44444 127.0.0.1 22
bind: Address already in use
Error: Error creating TCP socket.
Cleaning up...
Goodbye.

I have attached a patch that corrects this problem using setsockopt() and 
SO_REUSEADDR as referenced here 
http://beej.us/guide/bgnet/output/html/multipage/setsockoptman.html







Original issue reported on code.google.com by [email protected] on 27 Oct 2011 at 2:27

Attachments:

Please support fixed connection destination

It would be nice if udptunnel allowed to start the server such that the
destination host and port is fixed. The usecase for this is providing
access to a single service over UDP as well as TCP. For example to work
around your ISPs firewall rules that forbid incoming TCP connections.

Without that feature, udptunnel unnecessarily tears a big hole into your
network's security.

Original issue reported on code.google.com by [email protected] on 28 Oct 2009 at 12:00

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.