📜 ⬆️ ⬇️

Isotoxin: a free multi-protocol messenger with Tox support

You must have heard about Tox. Let me remind you: this is a free protected p2p protocol for transferring messages, audio and video streams between members of the Tox network. In essence, this is an alternative to Skype. When I first heard about Tox, my degree of dislike for Skype was still not too high, but I had already begun searching for alternatives. I really liked the idea behind Tox: we write a protocol with all the necessary buns, and you write clients to it. When the first clients appeared for the Tox network, I thought: “damn it, I can do it no worse!”. In general, prompted by the hostility to Skype, I took up the project of the messenger of my dreams. Now, when in my local hg-repository, the first committee turned 19 months old and the 414th committee was made, I finally matured to talk about this client to a wide audience Habr.



What is done



more complete list
  • Search for contacts in the contact list
  • "Live" search for messages
  • Ability to NOT store message history
  • Contact tags and filtering by tags (made in the latest version)
  • You can see the contact data, including the client version (if it is Isotoxin) and its Tox ID (nospam will be shown only if you sent an add request)
  • You can write a comment to the contact (just a description, not sent anywhere)
  • Avatar and name can be specified for individual connections.
  • You can make an avatar with a webcam
  • Sound alerts. Ability to choose sounds for alerts
  • Smiley set support. Support for animated gif-smiles
  • Time of message creation is transmitted (add-on over tox protocol)
  • Support bb-codes in the message and name. If the client on the other side does not support bb codes, the name is sent to him blank
  • Multilingual. Language can be switched without rebooting
  • The status is automatically turned off (customizable)
  • Different ways of sending messages: Enter / Ctrl + Enter / Shift + Enter / Double Enter
  • Customized format for displaying the date and time of messages
  • Ability to export the message history to a txt or html file (if you wish, you can customize any file format for export)
  • Show and send a typing notification
  • Automatically receive files depending on the file extension
  • Display pictures in the list of messages, including animated
  • You can crop the picture before sending. The picture itself can be obtained from a file, from the clipboard, from a webcam, or to grab the desktop. After trimming, the jpg or png format is automatically selected, depending on the final size.
  • Auto-updates can be launched through a proxy
  • Setup autorun
  • Minimizing to “tray”
  • For individual contacts, you can enable automatic reception of a voice call with the microphone turned off
  • When transmitting video, the image is scaled at the source to the size of the receiver, so band saves
  • Generating a QR code from the message text, link, or contact ID or current Tox ID

Of course, much remains to be done, but what has been done is quite enough for comfortable use.

Development


I have quite a lot of experience in C ++ and programming under Windows. It is foolish to neglect this experience, so the development was started on C ++ and under Windows. However, realizing the importance of supporting different platforms, I immediately decided to minimize dependence on winapi and other windows-only features. I don't even have text rendering using GDI, but my own. For reading fonts library FreeType is used. All GUI, all controls - everything is written from scratch and is not tied to the system. All work with winapi windows is placed in a separate place and is abstract as much as possible from the logic of the interface. The problem is small - to learn how to write under Linux. So far I have no time for this. Maybe there are willing to port?
From the very beginning, I conceived a modular architecture. The executable file should have been able to only GUI and nothing more. All network files were assigned to the modules. Simply put - the usual plugin system.
One of the difficulties encountered during the development process is the complete unwillingness of the tox kernel to build under Visual Studio. The whole thing turned out to be in dynamic arrays of the C99 standard. irungentoo, the main developer of the kernel, rejects any requests to remove these arrays from the code, saying: “C99 is a standard. If msvc does not support it, then this is his problem. " If you are interested in my personal opinion, then I consider dynamic arrays to be evil, since they kill the constancy of the sizeof operator. So I fully understand the developers of the msvc compiler and their unwillingness to communicate with dynamic arrays. So, I had two ways: collect toxcore separately via cygwin (as other Tox client developers use under windows) or remove dynamic arrays from code myself. I chose the second path and as a result this repository came to light. This is not a direct toxcore fork , but some kind of build from the necessary libraries (libsodium, opus, vpx), which is easily and unscrupulously assembled by the msvc compiler (2013 and 2015 are supported).
Almost all the Isotoxin code is written by me alone, except for a few moments written by my friends, as well as third-party libraries. C ++ 11 features are actively used. In connection with the release of the update to the 2015 studio and fixing some bugs that are critical for me, I plan to completely switch to this compiler in order to use constexpr and C ++ 14 to the fullest.
')

Architecture


When I just started writing the first lines of the Isotoxin code, I had absolutely no desire to open the source code in my plans. However, there was a contradiction with the GPL3 license, under which the tox kernel was offered . What is the contradiction? In short, this license requires you to open the source code of the program that uses the library under this license. The obvious solution to this dilemma is to put the implementation of the protocol into a separate dynamic library (dll) and open the sources of this dll.
But I decided to go a little further and not limited to only dll-Coy. As a result, the following architecture was born.
1. isotoxin.exe is a clean GUI. At first, I did not want to open its source. To increase the level of trust in this file, I even decided to completely deny it the ability to work with the network. Later, when I still refused to be closed, work with the network was returned, but for only one purpose - checking and downloading updates.
2. plghost.exe - A small exe'shnik that loads dll protocols. More precisely - only one dll'ku. It is launched directly from isotoxin.exe and communicates with the latest interprocess communication tools, translating its commands into the dll protocol and sending back the result.
3. proto. *. Dll - Actually dll'ki protocols. Implement a single interface.

This architecture has advantages and disadvantages.

The merits.

Disadvantages. And what about without them.

The list of shortcomings turned out to be somehow small and frivolous. Nothing beyond this, I could not think of. And, therefore, I consider the choice of architecture correct.

Appearance


I admit, the designer of me is awful, so I immediately put in the program the possibility of changing the appearance. Simply put, skins are supported. So far, only one topic is available. Alas, my time for everything is not enough at once. In the near future I plan to make support for coloring the topic. Under the spoiler are a few Isotoxin screenshots.
Screenshots
The main window. The version is already outdated, but the appearance has not changed much.

Setting a password in the settings window

Preparing the image for sending - you can trim the excess

Benefits


It is clear that each developer tries to praise their product. I will try to be as objective as possible. Currently, qTox should be recognized as the most popular and rich in capabilities among all clients that support the tox network. However, Isotoxin bypasses qTox on almost all items (excluding, of course, non-windows support).

There is a lot more, but I will not describe everything in order not to litter the article and not turn it into an advertisement.

Plans


There are many plans for the future. In addition to adding protocols (I really want to add Telegram and Jabber), there is a great desire to port under Linux. For a knowledgeable person this should not be a problem. As I wrote above, I do not use any special features of the "Windows". In general, the idea is to make a full replacement for Skype.

Links


Project website: isotoxin.im
Project Forum: isotoxin.im/forum
Project site in the i2p network: isotoxin.i2p (here, it happens, intermediate versions appear)
Source Code: github.com/isotoxin/isotoxin
Blog dedicated to the project: isotoxin-dev.livejournal.com

Source: https://habr.com/ru/post/274417/


All Articles