diff options
-rw-r--r-- | INSTALL.md | 12 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c | 11 | ||||
-rw-r--r-- | start_guide.de.md | 40 | ||||
-rw-r--r-- | start_guide.md | 38 | ||||
-rw-r--r-- | testing/DHT_cryptosendfiletest.c | 4 | ||||
-rw-r--r-- | testing/nTox.c | 24 | ||||
-rw-r--r-- | testing/nTox_win32.c | 1 | ||||
-rw-r--r-- | testing/toxic/prompt.c | 4 |
9 files changed, 114 insertions, 24 deletions
@@ -42,7 +42,17 @@ make | |||
42 | 42 | ||
43 | ###OSX: | 43 | ###OSX: |
44 | 44 | ||
45 | Much the same as above, remember to install the latest XCode and the developer tools (Preferences -> Downloads -> Command Line Tools). | 45 | ####Homebrew: |
46 | ``` | ||
47 | brew install libtool automake autoconf libconfig libsodium | ||
48 | cmake . | ||
49 | make | ||
50 | sudo make install | ||
51 | ``` | ||
52 | |||
53 | ####Non-homebrew: | ||
54 | |||
55 | Much the same as Linux, remember to install the latest XCode and the developer tools (Preferences -> Downloads -> Command Line Tools). | ||
46 | Users running Mountain Lion and the latest version of XCode (4.6.3) will also need to install libtool, automake and autoconf. | 56 | Users running Mountain Lion and the latest version of XCode (4.6.3) will also need to install libtool, automake and autoconf. |
47 | They are easy enough to install, grab them from http://www.gnu.org/software/libtool/, http://www.gnu.org/software/autoconf/ and http://www.gnu.org/software/automake/, then follow these steps for each: | 57 | They are easy enough to install, grab them from http://www.gnu.org/software/libtool/, http://www.gnu.org/software/autoconf/ and http://www.gnu.org/software/automake/, then follow these steps for each: |
48 | 58 | ||
@@ -20,14 +20,14 @@ With the rise of governmental monitoring programs, Tox aims to be an easy to use | |||
20 | + Every peer is represented as a byte string (the public key of the peer [client id]) | 20 | + Every peer is represented as a byte string (the public key of the peer [client id]) |
21 | + We're using torrent-style DHT so that peers can find the IP of the other peers when they have their ID. | 21 | + We're using torrent-style DHT so that peers can find the IP of the other peers when they have their ID. |
22 | + 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/wiki/Crypto)) | 22 | + 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/wiki/Crypto)) |
23 | + When both peers are securely connect with the encryption, they can securely exchange messages, initiate a video chat, send files, etc.<br /> | 23 | + When both peers are securely connected, they can exchange messages, initiate a video chat, send files, etc, all using encrypted communications.<br /> |
24 | + Current build status: [![Build Status](https://travis-ci.org/irungentoo/ProjectTox-Core.png?branch=master)](https://travis-ci.org/irungentoo/ProjectTox-Core) | 24 | + Current build status: [![Build Status](https://travis-ci.org/irungentoo/ProjectTox-Core.png?branch=master)](https://travis-ci.org/irungentoo/ProjectTox-Core) |
25 | 25 | ||
26 | ## Roadmap: | 26 | ## Roadmap: |
27 | - [x] Get our DHT working perfectly.(Done, needs large scale testing though.) | 27 | - [x] Get our DHT working perfectly.(Done, needs large scale testing though.) |
28 | - [x] Reliable connection (See Lossless_UDP protocol) to other peers according to client id. (Done, see DHT_sendfiletest.c for an example) | 28 | - [x] Reliable connection (See Lossless_UDP protocol) to other peers according to client id. (Done, see DHT_sendfiletest.c for an example) |
29 | - [x] Encryption. (Done) | 29 | - [x] Encryption. (Done) |
30 | - [ ] Get a simple text only im client working perfectly. (This is where we are) | 30 | - [ ] Get a simple text only IM client working perfectly. (This is where we are) |
31 | - [ ] Streaming media | 31 | - [ ] Streaming media |
32 | - [ ] ??? | 32 | - [ ] ??? |
33 | 33 | ||
diff --git a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c index 8e278b28..4f28fb3c 100644 --- a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c +++ b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c | |||
@@ -123,11 +123,12 @@ void manage_keys(char *keys_file) | |||
123 | { | 123 | { |
124 | const uint32_t KEYS_SIZE = crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES; | 124 | const uint32_t KEYS_SIZE = crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES; |
125 | uint8_t keys[KEYS_SIZE]; | 125 | uint8_t keys[KEYS_SIZE]; |
126 | 126 | struct stat existence; | |
127 | /* TODO: stat the file before trying to open it. We aren't cave people! */ | 127 | FILE *keysf; |
128 | FILE *keysf = fopen(keys_file, "r"); | 128 | |
129 | if (keysf != NULL) { | 129 | /* Check if file exits, proceed to open and load keys */ |
130 | /* if file was opened successfully -- load keys */ | 130 | if(stat(keys_file,&existence) >= 0) { |
131 | keysf = fopen(keys_file, "r"); | ||
131 | size_t read_size = fread(keys, sizeof(uint8_t), KEYS_SIZE, keysf); | 132 | size_t read_size = fread(keys, sizeof(uint8_t), KEYS_SIZE, keysf); |
132 | if (read_size != KEYS_SIZE) { | 133 | if (read_size != KEYS_SIZE) { |
133 | printf("Error while reading the key file\nExiting.\n"); | 134 | printf("Error while reading the key file\nExiting.\n"); |
diff --git a/start_guide.de.md b/start_guide.de.md new file mode 100644 index 00000000..7dfd52ca --- /dev/null +++ b/start_guide.de.md | |||
@@ -0,0 +1,40 @@ | |||
1 | # Tox nutzen | ||
2 | 1. Tox erstellen | ||
3 | 2. Fehler korrigieren | ||
4 | 3. Im IRC nach Hilfe fragen | ||
5 | 4. Auf Debug-Reise für Entwickler | ||
6 | 5. Tox wirklich erstellen | ||
7 | 6. ??? | ||
8 | |||
9 | Trotz der ganzen Arbeit, die wir bisher in Tox | ||
10 | gesteckt haben, gibt es noch keine richtige | ||
11 | Anleitung, wie man Tox _benutzt_. | ||
12 | Dies ist ein anwenderfreundlicher Versuch. | ||
13 | |||
14 | 1. Verbinde dich zum Netzwerk! | ||
15 | + Du musst dich zu einem Bootstrap-Server verbinden, um einen öffentlichen Schlüssel zu erhalten. | ||
16 | + Wo finde ich einen öffentlichen Server? Zur Zeit hier: | ||
17 | (die Hilfe-Nachricht von nTox ohne Kommandos hilft auch) | ||
18 | + 198.46.136.167 33445 728925473812C7AAC482BE7250BCCAD0B8CB9F737BF3D42ABD34459C1768F854 | ||
19 | + 192.81.133.111 33445 8CD5A9BF0A6CE358BA36F7A653F99FA6B258FF756E490F52C1F98CC420F78858 | ||
20 | + 66.175.223.88 33445 AC4112C975240CAD260BB2FCD134266521FAAF0A5D159C5FD3201196191E4F5D | ||
21 | + 192.184.81.118 33445 5CD7EB176C19A2FD840406CD56177BB8E75587BB366F7BB3004B19E3EDC04143 | ||
22 | 2. Finde einen Freund! | ||
23 | + Jetzt, da du im Netzwerk bist, brauchst du einen Freund. Um einen zu bekommen, | ||
24 | musst du eine Anfrage senden oder erhalten. Was eine Anfrage ist? | ||
25 | Es ist wie eine Freundschaftsanfrage, jedoch benutzen wir unglaublich schaurige | ||
26 | und kryptische Nummern anstatt Namen. When nTox startet, erscheint _deine_ lange, | ||
27 | schaurige Nummer, auch *öffentlicher Schlüssel* genannt. Diesen kannst du an | ||
28 | andere Personen weitergeben und sie können dich als "Freund" hinzufügen. Oder du | ||
29 | fügst andere Personen mit dem */f*-Befehl hinzu, wenn du möchtest. | ||
30 | 3. Chatte drauf los! | ||
31 | + Benutze nun den */m*-Befehl, um eine Nachricht an jemanden zu senden. Wow, du chattest! | ||
32 | 4. Mach etwas kaputt! | ||
33 | + Jep, pre-alpha-alpha-Software stürzt manchmal ab. Wir arbeiten daran. | ||
34 | + Bitte melde alle Abstürze entweder an die GitHub-Seite oder #tox-dev im freenode-IRC. | ||
35 | 5. Nichts ist kaputt, aber was bedeutet */f*? | ||
36 | + nTox liest einen Text als Befehl, wenn das erste Zeichen ein Schrägstrich ist ('/'). | ||
37 | Du kannst alle Befehle in commands.md nachlesen. | ||
38 | 6. Benutze und unterstütze Tox! | ||
39 | + Programmiere, debugge, dokumentiere, übersetze für uns, oder sprich einfach über uns! | ||
40 | + Je mehr Interesse wir erhalten, desto mehr Arbeit wird getan und desto besser wird Tox. | ||
diff --git a/start_guide.md b/start_guide.md new file mode 100644 index 00000000..b4f4310d --- /dev/null +++ b/start_guide.md | |||
@@ -0,0 +1,38 @@ | |||
1 | # Using Tox | ||
2 | 1. Build Tox | ||
3 | 2. Fix errors | ||
4 | 3. Consult IRC for help | ||
5 | 4. Go on debugging journy for devs | ||
6 | 5. Build Tox for real | ||
7 | 6. ??? | ||
8 | |||
9 | For all the work we've put into Tox so far, | ||
10 | there isn't yet a decent guide for how you _use_ | ||
11 | Tox. Here's a user-friendly attempt at it. | ||
12 | |||
13 | 1. Connect to the network! | ||
14 | + You need to connect to a bootstrapping server, to give you a public key. | ||
15 | + Where can I find a public server? Right here, as of now: | ||
16 | (the help message from running nTox with no args will help) | ||
17 | + 198.46.136.167 33445 728925473812C7AAC482BE7250BCCAD0B8CB9F737BF3D42ABD34459C1768F854 | ||
18 | + 192.81.133.111 33445 8CD5A9BF0A6CE358BA36F7A653F99FA6B258FF756E490F52C1F98CC420F78858 | ||
19 | + 66.175.223.88 33445 AC4112C975240CAD260BB2FCD134266521FAAF0A5D159C5FD3201196191E4F5D | ||
20 | + 192.184.81.118 33445 5CD7EB176C19A2FD840406CD56177BB8E75587BB366F7BB3004B19E3EDC04143 | ||
21 | 2. Find a friend! | ||
22 | + Now that you're on the network, you need a friend. To get one of those, | ||
23 | you need to to send or receive a request. What's a request, you ask? | ||
24 | It's like a friend request, but we use really scary and cryptic numbers | ||
25 | instead of names. When nTox starts, it shows your _your_ long, scary number, | ||
26 | called your *public key*. Give that to people, and they can add you as | ||
27 | as "friend". Or, you can add someone else, with the */f* command, if you like. | ||
28 | 3. Chat it up! | ||
29 | + Now use the */m* command to send a message to someone. Wow, you're chatting! | ||
30 | 4. But something broke! | ||
31 | + Yeah, pre-alpha-alpha software tends to do that. We're working on it. | ||
32 | + Please report all crashes to either the github page, or #tox-dev on freenode. | ||
33 | 5. Nothing broke, but what does */f* mean? | ||
34 | + nTox parses text as a command if the first character is a forward-slash ('/'). | ||
35 | You can check all commands in commands.md. | ||
36 | 6. Use and support Tox! | ||
37 | + Code for us, debug for us, document for us, translate for us, even just talk about us! | ||
38 | + The more interest we get, the more work gets done, the better Tox is. | ||
diff --git a/testing/DHT_cryptosendfiletest.c b/testing/DHT_cryptosendfiletest.c index c7c33531..888dac0f 100644 --- a/testing/DHT_cryptosendfiletest.c +++ b/testing/DHT_cryptosendfiletest.c | |||
@@ -186,7 +186,7 @@ int main(int argc, char *argv[]) | |||
186 | fclose(file2); | 186 | fclose(file2); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | /* if buffer is empty and the connection timed out. */ | 189 | /* if buffer is empty and the connection timed out. */ |
190 | else if(is_cryptoconnected(inconnection) == 4) { | 190 | else if(is_cryptoconnected(inconnection) == 4) { |
191 | crypto_kill(inconnection); | 191 | crypto_kill(inconnection); |
192 | } | 192 | } |
@@ -209,7 +209,7 @@ int main(int argc, char *argv[]) | |||
209 | fclose(file2); | 209 | fclose(file2); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | /* if buffer is empty and the connection timed out. */ | 212 | /* if buffer is empty and the connection timed out. */ |
213 | else if(is_cryptoconnected(connection) == 4) { | 213 | else if(is_cryptoconnected(connection) == 4) { |
214 | crypto_kill(connection); | 214 | crypto_kill(connection); |
215 | } | 215 | } |
diff --git a/testing/nTox.c b/testing/nTox.c index 5c560079..6aef1d7b 100644 --- a/testing/nTox.c +++ b/testing/nTox.c | |||
@@ -35,6 +35,8 @@ | |||
35 | 35 | ||
36 | char lines[HISTORY][STRING_LENGTH]; | 36 | char lines[HISTORY][STRING_LENGTH]; |
37 | char line[STRING_LENGTH]; | 37 | char line[STRING_LENGTH]; |
38 | char *help = "[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status)\n" | ||
39 | "[i] /l list (list friends), /h for help, /i for info, /n nick (to change nickname), /q (to quit)"; | ||
38 | int x,y; | 40 | int x,y; |
39 | 41 | ||
40 | uint8_t pending_requests[256][CLIENT_ID_SIZE]; | 42 | uint8_t pending_requests[256][CLIENT_ID_SIZE]; |
@@ -72,13 +74,13 @@ void print_friendlist() | |||
72 | 74 | ||
73 | char *format_message(char *message, int friendnum) | 75 | char *format_message(char *message, int friendnum) |
74 | { | 76 | { |
75 | char name[MAX_NAME_LENGTH]; | 77 | char name[MAX_NAME_LENGTH]; |
76 | if(friendnum != -1) { | 78 | if(friendnum != -1) { |
77 | getname(friendnum, (uint8_t*)name); | 79 | getname(friendnum, (uint8_t*)name); |
78 | } else { | 80 | } else { |
79 | getself_name((uint8_t*)name); | 81 | getself_name((uint8_t*)name); |
80 | } | 82 | } |
81 | char *msg = malloc(100+strlen(message)+strlen(name)+1); | 83 | char *msg = malloc(100+strlen(message)+strlen(name)+1); |
82 | time_t rawtime; | 84 | time_t rawtime; |
83 | struct tm * timeinfo; | 85 | struct tm * timeinfo; |
84 | time ( &rawtime ); | 86 | time ( &rawtime ); |
@@ -129,7 +131,7 @@ void line_eval(char lines[HISTORY][STRING_LENGTH], char *line) | |||
129 | if(m_sendmessage(num, (uint8_t*) message, sizeof(message)) != 1) { | 131 | if(m_sendmessage(num, (uint8_t*) message, sizeof(message)) != 1) { |
130 | new_lines("[i] could not send message"); | 132 | new_lines("[i] could not send message"); |
131 | } else { | 133 | } else { |
132 | new_lines(format_message(message, -1)); | 134 | new_lines(format_message(message, -1)); |
133 | } | 135 | } |
134 | } | 136 | } |
135 | else if (line[1] == 'n') { | 137 | else if (line[1] == 'n') { |
@@ -176,8 +178,7 @@ void line_eval(char lines[HISTORY][STRING_LENGTH], char *line) | |||
176 | } | 178 | } |
177 | 179 | ||
178 | else if (line[1] == 'h') { //help | 180 | else if (line[1] == 'h') { //help |
179 | new_lines("[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status)"); | 181 | new_lines(help); |
180 | new_lines("[i] /l list (list friends), /h for help, /i for info, /n nick (to change nickname), /q (to quit)"); | ||
181 | } | 182 | } |
182 | 183 | ||
183 | else if (line[1] == 'i') { //info | 184 | else if (line[1] == 'i') { //info |
@@ -389,8 +390,7 @@ int main(int argc, char *argv[]) | |||
389 | raw(); | 390 | raw(); |
390 | getmaxyx(stdscr,y,x); | 391 | getmaxyx(stdscr,y,x); |
391 | new_lines(idstring0); | 392 | new_lines(idstring0); |
392 | new_lines("[i] commands: /f ID (to add friend), /m friendnumber message (to send message), /s status (to change status)"); | 393 | new_lines(help); |
393 | new_lines("[i] /l list (list friends), /h for help, /i for info, /n nick (to change nickname), /q (to quit)"); | ||
394 | strcpy(line, ""); | 394 | strcpy(line, ""); |
395 | IP_Port bootstrap_ip_port; | 395 | IP_Port bootstrap_ip_port; |
396 | bootstrap_ip_port.port = htons(atoi(argv[2])); | 396 | bootstrap_ip_port.port = htons(atoi(argv[2])); |
diff --git a/testing/nTox_win32.c b/testing/nTox_win32.c index 3a9caaf5..a870c210 100644 --- a/testing/nTox_win32.c +++ b/testing/nTox_win32.c | |||
@@ -317,6 +317,7 @@ int main(int argc, char *argv[]) | |||
317 | } | 317 | } |
318 | 318 | ||
319 | doMessenger(); | 319 | doMessenger(); |
320 | Sleep(1); | ||
320 | } | 321 | } |
321 | 322 | ||
322 | return 0; | 323 | return 0; |
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index 22d9eb9e..0cd10730 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c | |||
@@ -125,8 +125,8 @@ static void execute(ToxWindow* self, char* cmd) { | |||
125 | xx[2] = '\0'; | 125 | xx[2] = '\0'; |
126 | 126 | ||
127 | if(sscanf(xx, "%02x", &x) != 1) { | 127 | if(sscanf(xx, "%02x", &x) != 1) { |
128 | wprintw(self->window, "Invalid ID.\n"); | 128 | wprintw(self->window, "Invalid ID.\n"); |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | 131 | ||
132 | id_bin[i] = x; | 132 | id_bin[i] = x; |