summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-19 10:57:23 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-19 10:57:23 -0400
commit8a50c0472501f4d5ccf3714b7499fc1575c09a6c (patch)
treeea722441ef2bccb2ad8cb2bb82a1eab843bff528
parentd792247dd8c5c4742f3d74fda3442e29da22467a (diff)
parent8744bcdc610994fd5ea83173bc53f52bc974d063 (diff)
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core
-rw-r--r--README.md70
-rw-r--r--docs/WHY.txt10
-rw-r--r--other/DHT_bootstrap.c44
3 files changed, 67 insertions, 57 deletions
diff --git a/README.md b/README.md
index 1bd13fe4..8650ebde 100644
--- a/README.md
+++ b/README.md
@@ -1,40 +1,34 @@
1Tox 1![Project Tox](https://rbt.asia/boards/g/img/0352/79/1373823047559.png "Project Tox")
2=== 2Project Tox, _also known as Tox_, is a FOSS instant messaging application aimed to replace Skype.<br />
3 3
4[![Build Status](https://travis-ci.org/irungentoo/ProjectTox-Core.png?branch=master)](https://travis-ci.org/irungentoo/ProjectTox-Core) 4With the rise of governmental monitoring programs, Tox aims to be an easy to use application that allows people to connect with friends and loved ones without the worry of privacy.<br /> <br />
5 5
6Current IRC: #InsertProjectNameHere
7on Freenode or [webchat](https://webchat.freenode.net/)
8 6
9 7
10Proposal of a free as in freedom skype replacement:
11 8
12## Basics: 9**IRC**: #InsertProjectNameHere on Freenode, alternatively, you can use the [webchat](https://webchat.freenode.net/).<br />
10**Website**: [http://projecttox.org](http://projecttox.org)
13 11
14UDP must be used for everything simply because you can't do hole punching with TCP (well you can but it doesn't work all the time) 12
15 13
16Every peer is represented as a byte string (the client id) (It is the public key of the peer.). (if you want to add someone you need that id (either ask that person directly or maybe through some kind of search engine?)) 14## The Complex Stuff:
17 15+ Tox must use UDP simply because you can't hole punch with TCP. It's possible, but it doesn't work all the time.
18Use something torrent DHT style so that peers can find the ip of the other peers when they have their id. 16+ Every peer is represented as a byte string (the public key of the peer [client id])
19 17+ We're using torrent-style DHT so that peers can find the IP of the other peers when they have their ID.
20Once the client has the ip of that peer they start initiating a secure connection with each other.(See Crypto.) 18+ Once the client has the IP of that peer, they start initiating a secure connection with each other. (See [Crypto](https://github.com/irungentoo/ProjectTox-Core/blob/master/docs/Crypto.txt))
21 19+ When both peers are securely connect with the encryption, they can securely exchange messages, initiate a video chat, send files, etc.<br />
22When both peers are securely connected with the encryption they can securely exchange messages, initiate a video chat, send files, etc... 20+ Current build status: [![Build Status](https://travis-ci.org/irungentoo/ProjectTox-Core.png?branch=master)](https://travis-ci.org/irungentoo/ProjectTox-Core)
23
24Your client stores the public keys/id of the peers used to initiate the connection (this is your contacts list)
25 21
26## Roadmap: 22## Roadmap:
23- [x] Get our DHT working perfectly.(Done, needs large scale testing though.)
24- [x] Reliable connection (See Lossless_UDP protocol) to other peers according to client id. (Done, see DHT_sendfiletest.c for an example)
25- [x] Encryption. (Done)
26- [ ] Get a simple text only im client working perfectly. (This is where we are)
27- [ ] Streaming media
28- [ ] ???
27 29
281. Get our DHT working perfectly.(Done, needs large scale testing though.) 30For further information, check our [To-Do list](https://github.com/irungentoo/InsertProjectNameHere/blob/master/docs/TODO.txt).
292. Reliable connection (See Lossless_UDP protocol) to other peers according to client id. (Done, see DHT_sendfiletest.c for an example)
303. Encryption. (Done)
314. Get a simple text only im client working perfectly. (This is where we are)
325. Streaming media
336.
34 31
35## TODO:
36
37See: [docs/TODO.txt](https://github.com/irungentoo/InsertProjectNameHere/blob/master/docs/TODO.txt)
38 32
39### Important-stuff: 33### Important-stuff:
40 34
@@ -42,18 +36,16 @@ Use the same UDP socket for everything
42 36
43Keep everything really simple. 37Keep everything really simple.
44 38
45### Details: 39### Details and Documents:
46 40
47DHT protocol: 41[DHT Protocol](/docs/DHT.txt)<br />
48 see: [docs/DHT.txt](/docs/DHT.txt) 42[Lossless UDP Protocol](/docs/Lossless_UDP.txt)<br />
49 43[Crypto](/docs/Crypto.txt)<br />
50Lossless UDP protocol: 44[Ideas](/docs/IDEAS.txt)
51 Either we find one with an already working implementation (Didn't find a good implementation, writing my own)
52 see also: [docs/Lossless_UDP.txt](/docs/Lossless_UDP.txt)
53
54Crypto:
55 see: [docs/Crypto.txt](/docs/Crypto.txt)
56 45
57### Why are you doing this? There are already a bunch of free skype alternatives. 46### Why are you doing this? There are already a bunch of free skype alternatives.
58 47The goal of this project is to create a configuration free p2p skype
59see: [docs/WHY.txt](/docs/WHY.txt) 48replacement. Configuration free means that the user will simply have to open the program and
49without any account configuration will be capable of adding people to his
50friends list and start conversing with them. There are many so called skype replacements and all of them are either hard to
51configure for the normal user or suffer from being much too centralized.
diff --git a/docs/WHY.txt b/docs/WHY.txt
deleted file mode 100644
index 7be4f896..00000000
--- a/docs/WHY.txt
+++ /dev/null
@@ -1,10 +0,0 @@
1The goal of this project is to create a configuration free p2p skype
2replacement.
3
4Configuration free means that the user will simply have to open the program and
5without any account configuration will be capable of adding people to his
6friends list and start conversing with them.
7
8There are many so called skype replacements and all of them are either hard to
9configure for the normal user or suffer from being much too centralized.
10
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c
index 3e8858dc..deecda87 100644
--- a/other/DHT_bootstrap.c
+++ b/other/DHT_bootstrap.c
@@ -1,13 +1,13 @@
1/* DHT boostrap 1/* DHT boostrap
2 * 2 *
3 * A simple DHT boostrap server for tox. 3 * A simple DHT boostrap server for tox.
4 * 4 *
5 * Build commands (use one or the other): 5 * Build commands (use one or the other):
6 * gcc -O2 -Wall -D VANILLA_NACL -o bootstrap_server ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/Messenger.c ../core/DHT.c ../nacl/build/${HOSTNAME%.*}/lib/amd64/{cpucycles.o,libnacl.a,randombytes.o} DHT_bootstrap.c 6 * gcc -O2 -Wall -D VANILLA_NACL -o bootstrap_server ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/Messenger.c ../core/DHT.c ../nacl/build/${HOSTNAME%.*}/lib/amd64/{cpucycles.o,libnacl.a,randombytes.o} DHT_bootstrap.c
7 * 7 *
8 * gcc -O2 -Wall -o bootstrap_server ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/Messenger.c ../core/DHT.c -lsodium DHT_bootstrap.c 8 * gcc -O2 -Wall -o bootstrap_server ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/Messenger.c ../core/DHT.c -lsodium DHT_bootstrap.c
9 */ 9 */
10 10#include <arpa/inet.h>
11#include "../core/DHT.h" 11#include "../core/DHT.h"
12 12
13 13
@@ -21,7 +21,19 @@
21 21
22#define PORT 33445 22#define PORT 33445
23 23
24 24unsigned char * hex_string_to_bin(char hex_string[])
25{
26 unsigned char * val = malloc(strlen(hex_string));
27 char * pos = hex_string;
28 int i=0;
29 while(i < strlen(hex_string))
30 {
31 sscanf(pos,"%2hhx",&val[i]);
32 pos+=2;
33 i++;
34 }
35 return val;
36}
25 37
26int main(int argc, char *argv[]) 38int main(int argc, char *argv[])
27{ 39{
@@ -42,13 +54,29 @@ int main(int argc, char *argv[])
42 init_networking(ip, PORT); 54 init_networking(ip, PORT);
43 55
44 perror("Initialization"); 56 perror("Initialization");
57
58 if (argc > 3) {
59 printf("Trying to bootstrap into the network...\n");
60 IP_Port bootstrap_info;
61 bootstrap_info.ip.i = inet_addr(argv[1]);
62 bootstrap_info.port = htons(atoi(argv[2]));
63 uint8_t *bootstrap_key = hex_string_to_bin(argv[3]);
64 DHT_bootstrap(bootstrap_info, bootstrap_key);
65 free(bootstrap_key);
66 }
45 67
46 IP_Port ip_port; 68 IP_Port ip_port;
47 uint8_t data[MAX_UDP_PACKET_SIZE]; 69 uint8_t data[MAX_UDP_PACKET_SIZE];
48 uint32_t length; 70 uint32_t length;
49 71
72 int is_waiting_for_dht_connection = 1;
50 while(1) 73 while(1)
51 { 74 {
75 if (is_waiting_for_dht_connection && DHT_isconnected())
76 {
77 printf("Connected to other bootstrap server successfully.\n");
78 is_waiting_for_dht_connection = 0;
79 }
52 doDHT(); 80 doDHT();
53 81
54 while(receivepacket(&ip_port, data, &length) != -1) 82 while(receivepacket(&ip_port, data, &length) != -1)
@@ -58,5 +86,5 @@ int main(int argc, char *argv[])
58 c_sleep(1); 86 c_sleep(1);
59 } 87 }
60 shutdown_networking(); 88 shutdown_networking();
61 return 0; 89 return 0;
62} \ No newline at end of file 90} \ No newline at end of file