-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
128 lines (75 loc) · 3.71 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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.