GithubHelp home page GithubHelp logo

ctcp's Introduction

CTCP: Coded TCP

Provides reliable transport mechanism that uses error correction codes
to mask the adverse effects of packet loss. 

Authors:  Ali ParandehGheibi ([email protected])
          MinJi Kim ([email protected])
          Leonardo Urbina ([email protected])

OVERVIEW

You can compile and run CTCP in the "proxy" mode or "file transfer" mode. 

The proxy mode is more involved in terms system configuration, 
but allows SOCKS-enabled software tunnel their traffic over CTCP. 

The file transfer mode provides a simple file transfer client and server 
that perform a single file transfer session per execution and print some statistics. 
This mode does not need any configuration except for the command line arguments. 


FILES

src/*                      source code for CTCP core as well as the proxy solution
config/proxy_local.conf    config file for the client end of the proxy 
config/proxy_remote.conf   config file for the server end of the proxy

COMPILE

Proxy Mode:

      Simply run the followin in ctcp folder

      $ make 
      or 
      $ make proxy
      or
      $ make remake

      You should see two executable files. proxy_local and proxy_remote

File Transfer Mode:
     
      $ make nftp 

      You should see the executable files nftpServer and nftpClient.



SYSTEM CONFIGURATION

Proxy Mode:

       The system operates as a chained SOCKSv5 proxy, i.e., 
       proxy_local works as a SOCKS proxy server running on a local machine
       connected to proxy_remote that runs another upstream SOCKS server running on 
       another machine, which in turn establishes connections with content servers. 


       Client APP  <-----> proxy_local <----------------------> proxy_remote  <-----> Server

       Using proxy_local.conf setup proxy_local to listen to port XXXX

       Using proxy_remote.conf setup proxy_local to listen to port YYYY

       Using proxy_local.conf setup proxy_local to use the proxy_remote 
       as the upstream proxy by setting UP_PROXY_PORT To YYYY 
       and UP_PROXY_ADDR to the address of remote proxy

       Setup the Client app (e.g. a web browser) to point to proxy_local by 
       changing the proxy settings to SOCKS v5 proxy, with 
       address 127.0.0.1 (if proxy_local on the same machine as browser) and 
       port XXXX


File Transfer Mode:
     
     No extra configuration is required. 


OPERATION

Proxy Mode:

      First, run proxy_remote on the remote machine

      $ sudo ./proxy_remote start

      Second, run proxy_local on localhost

      $ sudo ./proxy_local start

      The open the Client App (e.g. browser) and start operating the app. 
      The traffic should now go through a CTCP tunnel.

      In order to stop the proxy applications use the following:

      $ sudo ./proxy_remote shutdown
      $ sudo ./proxy_local  shutdown

File Transfer Mode:

     First, on the server machine, run nftpServer as follows

     $ ./nftpServer -f file -p port

     where file is the name of local file to be sent over CTCP tunnel, 
     and port is the listening port. The default port is 8777.

     Second, on the client machine, run nftpClient as follows

     $ ./nftpClient -h server_address -p server_port
     
     where server-address is the IP address of the machine running nftpServer,
     and server_port is the port specified when running nftpServer.
     The default address is 127.0.0.1 and default port is 8777.

     You should see some logs printing on the server side, and after the session 
     is compelte, some logs on the client side. 


CREATING HIGH LOSS SCENARIOS

Use the script erasure_local.sh as follows
$ sudo ./erasure_local.sh 

to randomly drop incoming packets with certain probability. 
This should significantly reduce TCP throughput, but when CTCP tunnel is active.

ctcp's People

Contributors

doug-leith avatar parandeh avatar

Watchers

 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.