ffi-tox 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/ProjectTox-Core/CMakeLists.txt +28 -0
  2. data/ProjectTox-Core/COPYING +674 -0
  3. data/ProjectTox-Core/INSTALL.md +91 -0
  4. data/ProjectTox-Core/README.md +54 -0
  5. data/ProjectTox-Core/core/CMakeLists.txt +17 -0
  6. data/ProjectTox-Core/core/DHT.c +1104 -0
  7. data/ProjectTox-Core/core/DHT.h +111 -0
  8. data/ProjectTox-Core/core/LAN_discovery.c +79 -0
  9. data/ProjectTox-Core/core/LAN_discovery.h +50 -0
  10. data/ProjectTox-Core/core/Lossless_UDP.c +749 -0
  11. data/ProjectTox-Core/core/Lossless_UDP.h +106 -0
  12. data/ProjectTox-Core/core/Messenger.c +581 -0
  13. data/ProjectTox-Core/core/Messenger.h +157 -0
  14. data/ProjectTox-Core/core/friend_requests.c +131 -0
  15. data/ProjectTox-Core/core/friend_requests.h +51 -0
  16. data/ProjectTox-Core/core/net_crypto.c +564 -0
  17. data/ProjectTox-Core/core/net_crypto.h +134 -0
  18. data/ProjectTox-Core/core/network.c +188 -0
  19. data/ProjectTox-Core/core/network.h +134 -0
  20. data/ProjectTox-Core/other/CMakeLists.txt +9 -0
  21. data/ProjectTox-Core/other/DHT_bootstrap.c +139 -0
  22. data/ProjectTox-Core/testing/CMakeLists.txt +18 -0
  23. data/ProjectTox-Core/testing/DHT_cryptosendfiletest.c +228 -0
  24. data/ProjectTox-Core/testing/DHT_sendfiletest.c +176 -0
  25. data/ProjectTox-Core/testing/DHT_test.c +182 -0
  26. data/ProjectTox-Core/testing/Lossless_UDP_testclient.c +214 -0
  27. data/ProjectTox-Core/testing/Lossless_UDP_testserver.c +201 -0
  28. data/ProjectTox-Core/testing/Messenger_test.c +145 -0
  29. data/ProjectTox-Core/testing/misc_tools.c +40 -0
  30. data/ProjectTox-Core/testing/misc_tools.h +29 -0
  31. data/ProjectTox-Core/testing/nTox.c +381 -0
  32. data/ProjectTox-Core/testing/nTox.h +50 -0
  33. data/ProjectTox-Core/testing/nTox_win32.c +323 -0
  34. data/ProjectTox-Core/testing/nTox_win32.h +31 -0
  35. data/ProjectTox-Core/testing/rect.py +45 -0
  36. data/ext/ffi-tox/extconf.rb +16 -0
  37. data/interfaces/libtox.i +18 -0
  38. data/lib/ffi-tox/libtox.rb +37 -0
  39. data/lib/ffi-tox.rb +1 -0
  40. metadata +116 -0
@@ -0,0 +1,91 @@
1
+ ##Installation
2
+
3
+ ###Linux:
4
+
5
+ Build dependencies:
6
+
7
+ ```bash
8
+ apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev cmake
9
+ ```
10
+
11
+ You should get and install [libsodium](https://github.com/jedisct1/libsodium):
12
+ ```bash
13
+ git clone git://github.com/jedisct1/libsodium.git
14
+ cd libsodium
15
+ git checkout tags/0.4.2
16
+ ./autogen.sh
17
+ ./configure && make check
18
+ sudo make install
19
+ sudo ldconfig
20
+ ```
21
+
22
+ Then clone this repo and run:
23
+ ```bash
24
+ mkdir build && cd build
25
+ cmake ..
26
+ ```
27
+
28
+ Then you can build any of the [`/testing`](/testing) and [`/other`](/other) that are currently supported on your platform by running:
29
+ ```bash
30
+ make name_of_c_file
31
+ ```
32
+ For example, to build [`Messenger_test.c`](/others/Messenger_test.c) you would run:
33
+ ```bash
34
+ make Messenger_test
35
+ ```
36
+
37
+ Or you could just build everything that is supported on your platform by running:
38
+ ```bash
39
+ make
40
+ ```
41
+
42
+ ###OSX:
43
+
44
+ Much the same as above, remember to install the latest XCode and the developer tools (Preferences -> Downloads -> Command Line Tools).
45
+ Users running Mountain Lion and the latest version of XCode (4.6.3) will also need to install libtool, automake and autoconf.
46
+ 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:
47
+
48
+ ```bash
49
+ ./configure
50
+ make
51
+ sudo make install
52
+ ```
53
+
54
+ Do not install them from macports (or any dependencies for that matter) as they get shoved in the wrong directory
55
+ and make your life more annoying.
56
+
57
+ Another thing you may want to install is the latest gcc, this caused me a few problems as XCode from 4.3
58
+ no longer includes gcc and instead uses LLVM-GCC, a nice install guide can be found at
59
+ http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42
60
+
61
+ ###Windows:
62
+
63
+ You should install:
64
+ - [MinGW](http://sourceforge.net/projects/mingw/)'s C compiler
65
+ - [CMake](http://www.cmake.org/cmake/resources/software.html)
66
+
67
+ You have to [modify your PATH environment variable](http://www.computerhope.com/issues/ch000549.htm) so that it contains MinGW's bin folder path. With default settings, the bin folder is located at `C:\MinGW\bin`, which means that you would have to append `;C:\MinGW\bin` to the PATH variable.
68
+
69
+ Then you should either clone this repo by using git, or just download a [zip of current Master branch](https://github.com/irungentoo/ProjectTox-Core/archive/master.zip) and extract it somewhere.
70
+
71
+ After that you should get precompiled package of libsodium from [here](https://download.libsodium.org/libsodium/releases/libsodium-win32-0.4.2.tar.gz) and extract the archive into this repo's root. That is, `sodium` folder should be along with `core`, `testing` and other folders.
72
+
73
+ Navigate in `cmd` to this repo and run:
74
+ ```cmd
75
+ mkdir build && cd build
76
+ cmake -G "MinGW Makefiles" ..
77
+ ```
78
+
79
+ Then you can build any of the [`/testing`](/testing) and [`/other`](/other) that are currently supported on your platform by running:
80
+ ```cmd
81
+ mingw32-make name_of_c_file
82
+ ```
83
+ For example, to build [`Messenger_test.c`](/others/Messenger_test.c) you would run:
84
+ ```cmd
85
+ mingw32-make Messenger_test
86
+ ```
87
+
88
+ Or you could just build everything that is supported on your platform by running:
89
+ ```bash
90
+ mingw32-make
91
+ ```
@@ -0,0 +1,54 @@
1
+ ![Project Tox](https://rbt.asia/boards/g/img/0352/79/1373823047559.png "Project Tox")
2
+ Project Tox, _also known as Tox_, is a FOSS instant messaging application aimed to replace Skype.<br />
3
+
4
+ With 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
+
6
+
7
+
8
+
9
+ **IRC**: #tox on Freenode, alternatively, you can use the [webchat](http://webchat.freenode.net/?channels=#tox).<br />
10
+ **Website**: [http://tox.im](http://tox.im)
11
+
12
+ **Website translations**: [see stal888's repository](https://github.com/stal888/ProjectTox-Website)<br/>
13
+ **Qt GUI**: [see nurupo's repository](https://github.com/nurupo/ProjectTox-Qt-GUI)
14
+
15
+
16
+
17
+ ## The Complex Stuff:
18
+ + Tox must use UDP simply because you can't hole punch with TCP. It's possible, but it doesn't work all the time.
19
+ + Every peer is represented as a byte string (the public key of the peer [client id])
20
+ + We're using torrent-style DHT so that peers can find the IP of the other peers when they have their ID.
21
+ + 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
+ + When both peers are securely connect with the encryption, they can securely exchange messages, initiate a video chat, send files, etc.<br />
23
+ + Current build status: [![Build Status](https://travis-ci.org/irungentoo/ProjectTox-Core.png?branch=master)](https://travis-ci.org/irungentoo/ProjectTox-Core)
24
+
25
+ ## Roadmap:
26
+ - [x] Get our DHT working perfectly.(Done, needs large scale testing though.)
27
+ - [x] Reliable connection (See Lossless_UDP protocol) to other peers according to client id. (Done, see DHT_sendfiletest.c for an example)
28
+ - [x] Encryption. (Done)
29
+ - [ ] Get a simple text only im client working perfectly. (This is where we are)
30
+ - [ ] Streaming media
31
+ - [ ] ???
32
+
33
+ For further information, check our [To-do list](https://github.com/irungentoo/ProjectTox-Core/wiki/TODO)
34
+
35
+
36
+ ### Important-stuff:
37
+
38
+ Use the same UDP socket for everything
39
+
40
+ Keep everything really simple.
41
+
42
+ ### Details and Documents:
43
+
44
+ [DHT Protocol](https://github.com/irungentoo/ProjectTox-Core/wiki/DHT)<br />
45
+ [Lossless UDP Protocol](https://github.com/irungentoo/ProjectTox-Core/wiki/Lossless-UDP)<br />
46
+ [Crypto](https://github.com/irungentoo/ProjectTox-Core/wiki/Crypto)<br />
47
+ [Ideas](https://github.com/irungentoo/ProjectTox-Core/wiki/Ideas)
48
+
49
+ ### Why are you doing this? There are already a bunch of free skype alternatives.
50
+ The goal of this project is to create a configuration-free p2p skype
51
+ replacement. Configuration-free means that the user will simply have to open the program and
52
+ without any account configuration will be capable of adding people to his
53
+ friends list and start conversing with them. There are many so called skype replacements and all of them are either hard to
54
+ configure for the normal user or suffer from being much too centralized.
@@ -0,0 +1,17 @@
1
+ cmake_minimum_required(VERSION 2.6.0)
2
+ project(core C)
3
+
4
+ if(WIN32)
5
+ include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/)
6
+ endif()
7
+
8
+ set(core_sources
9
+ DHT.c
10
+ network.c
11
+ Lossless_UDP.c
12
+ net_crypto.c
13
+ friend_requests.c
14
+ LAN_discovery.c
15
+ Messenger.c)
16
+
17
+ add_library(core ${core_sources})