diff --git a/Home.md b/Home.md index 28fe21e..8408c14 100644 --- a/Home.md +++ b/Home.md @@ -1,9 +1,11 @@ Welcome to the Wiki. -These wiki pages are from the original Toxygen project and may be out of date. -They are from the ```docs``` directory of the repo. +These wiki pages are from the original Toxygen project and are being updated. +They were from the ```docs``` directory of the repo. * [[CompilingToxygen]] * [[InstallingToxygen]] * [[CompilingToxygenPlugins]] * [[ToxygenPluginsApi]] + +* [[ToxygenWeechat]] diff --git a/InstallingToxygen.md b/InstallingToxygen.md index b3c5457..7d2b773 100644 --- a/InstallingToxygen.md +++ b/InstallingToxygen.md @@ -21,8 +21,8 @@ Note: 32-bit Python isn't supported due to bug with videocalls. It is strictly r 3. Install PyAudio: ``pip install pyaudio`` 4. Install numpy: ``pip install numpy`` 5. Install OpenCV: ``pip install opencv-python`` -6. [Download toxygen](https://github.com/toxygen-project/toxygen/archive/master.zip) -7. Unpack archive +6. git clone --depth=1 https://git.plastiras.org/emdee/toxygen/ +7. I don't know 8. Download latest libtox.dll build, download latest libsodium.a build, put it into \toxygen\libs\ 9. Run \toxygen\main.py. @@ -30,15 +30,22 @@ Note: 32-bit Python isn't supported due to bug with videocalls. It is strictly r 1. Install latest Python3: ``sudo apt-get install python3`` -2. Install PyQt5: ``sudo apt-get install python3-pyqt5`` or ``sudo pip3 install pyqt5`` +2. Install PyQt5: ``sudo apt-get install python3-pyqt5`` 3. Install [toxcore](https://github.com/TokTok/c-toxcore) with toxav support) -4. Install PyAudio: -``sudo apt-get install portaudio19-dev`` and ``sudo apt-get install python3-pyaudio`` (or ``sudo pip3 install pyaudio``) -5. Install NumPy: ``sudo pip3 install numpy`` -6. Install [OpenCV](http://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html) or via ``sudo pip3 install opencv-python`` -7. [Download toxygen](https://git.plastiras.org/emdee/toxygen/) -8. Unpack archive +4. Install PyAudio: ``sudo apt-get install portaudio19-dev python3-pyaudio`` (or ``sudo pip3 install pyaudio``) +5. Install toxygen_wrapper https://git.plastiras.org/emdee/toxygen_wrapper +6. Install the rest of the requirements: ``sudo pip3 install -m requirements.txt`` +7. git clone --depth=1 [toxygen](https://git.plastiras.org/emdee/toxygen/) +8. Look in the Makefile for the install target and type +`` +make install +`` +You should set the PIP_EXE_MSYS and PYTHON_EXE_MSYS variables and it does +`` + ${PIP_EXE_MSYS} --python ${PYTHON_EXE_MSYS} install \ + --target ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/ \ + --upgrade . +`` 9. Run app: -``python3 main.py`` +``python3 ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/bin/toxygen`` -Optional: install toxygen using setup.py: ``python3 setup.py install`` diff --git a/Toxygen.md b/Toxygen.md new file mode 100644 index 0000000..4ff45f3 --- /dev/null +++ b/Toxygen.md @@ -0,0 +1,122 @@ +# Toxygen + +Toxygen is powerful cross-platform [Tox](https://tox.chat/) client +written in pure Python3. + +### [Install](/docs/install.md) - [Contribute](/docs/contributing.md) - [Plugins](/docs/plugins.md) - [Compile](/docs/compile.md) - [Contact](/docs/contact.md) + +### Supported OS: Linux and Windows (only Linux is tested at the moment) + +### Features: + +- 1v1 messages +- File transfers +- Audio calls +- Video calls +- Group chats +- Plugins support +- Desktop sharing +- Chat history +- Emoticons +- Stickers +- Screenshots +- Name lookups (toxme.io support) +- Save file encryption +- Profile import and export +- Faux offline messaging +- Faux offline file transfers +- Inline images +- Message splitting +- Proxy support - runs over tor +- Avatars +- Multiprofile +- Multilingual +- Sound notifications +- Contact aliases +- Contact blocking +- Typing notifications +- Changing nospam +- File resuming +- Read receipts +- uses gevent +- NGC groups +- PyQt5, PyQt6, PySide2, PySide6 via qtpy + +### Screenshots +*Toxygen on Ubuntu and Windows* +![Ubuntu](/docs/ubuntu.png) +![Windows](/docs/windows.png) + +Windows was working but is not currently being tested. AV was working +but is not currently being tested: we're unsure of handling the AV devices +from the commandline. We need to get a working echobot that supports SOCKS5; +we were working on one in https://git.plastiras.org/emdee/toxygen_wrapper + +## Forked + +This hard-forked from the dead https://github.com/toxygen-project/toxygen +```next_gen``` branch. + +See ToDo.md to the current ToDo list. + +## Wechat + +You can have a [weechat](https://github.com/weechat/qweechat) +console so that you can have IRC and jabber in a window as well as Tox. +There's a copy of qweechat in ```thirdparty/qweechat``` backported to +PyQt5 and integrated into toxygen. Follow the normal instructions for +adding a ```relay``` to [weechat](https://github.com/weechat/weechat) +``` +/relay add ipv4.ssl.weechat 9000 +/relay start ipv4.ssl.weechat +``` +or +``` +/relay add weechat 9000 +/relay start weechat +``` +and use the Plugins/Weechat Console to start weechat under Toxygen. +Then use the File/Connect menu item of the Console to connect to weechat. + +Weechat has a Jabber plugin to enable XMPP: +``` +/python load jabber.el +/help jabber +``` +so you can have Tox, IRC and XMPP in the same application! +See docs/ToxygenWeechat.md + +## Install + +To install read the requirements.txt and look at the comments; there +may be things that need installing by hand or decisions to be made +on supported alternatives. + +https://git.plastiras.org/emdee/toxygen_wrapper needs packaging +on pypi as it is a dependency. Just download and install it from +https://git.plastiras.org/emdee/toxygen_wrapper + +This is being ported to Qt6 using qtpy https://github.com/spyder-ide/qtpy +It now runs on PyQt5 and should run on PyQt6, and may run on PySide2 and +PySide6 - YMMV. You will be able to choose between them by setting the +environment variable QT_API to one of: pyqt5 pyqt6 pyside2 pyside6. + +To install it, look in the Makefile for the install target and type +``` +make install +``` +You should set the PIP_EXE_MSYS and PYTHON_EXE_MSYS variables and it does +``` + ${PIP_EXE_MSYS} --python ${PYTHON_EXE_MSYS} install \ + --no-deps \ + --target ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/ \ + --upgrade . +``` +and installs into PREFIX which is usually /usr/local + +Up-to-date code is on https://git.plastiras.org/emdee/toxygen + +## MultiDevice + +Work on this project is suspended until the +[MultiDevice](https://git.plastiras.org/emdee/tox_profile/wiki/MultiDevice-Announcements-POC) problem is solved. Fork me! diff --git a/ToxygenPluginsApi.md b/ToxygenPluginsApi.md index 9eb30a4..32a27f8 100644 --- a/ToxygenPluginsApi.md +++ b/ToxygenPluginsApi.md @@ -53,5 +53,5 @@ Plugin's methods MUST NOT raise exceptions. # Examples -You can find examples in [official repo](https://github.com/toxygen-project/toxygen_plugins) +You can find examples in [official repo](https://git.plastiras.org/emdee/toxygen_plugins) diff --git a/ToxygenToDo.md b/ToxygenToDo.md index 4222944..91ec86b 100644 --- a/ToxygenToDo.md +++ b/ToxygenToDo.md @@ -53,7 +53,7 @@ line. ## Migration -Migrate PyQt5 to qtpy - almost done. +Migrate PyQt5 to qtpy - done. Maybe migrate gevent to asyncio, and migrate to [qasync](https://github.com/CabbageDevelopment/qasync) diff --git a/ToxygenWeechat.md b/ToxygenWeechat.md new file mode 100644 index 0000000..eb990e9 --- /dev/null +++ b/ToxygenWeechat.md @@ -0,0 +1,170 @@ +## Toxygen Weechat + +You can have a [weechat](https://github.com/weechat/qweechat) +console so that you can have IRC and jabber in a window as well as Tox. +There's a copy of qweechat in ```thirdparty/qweechat``` backported to +PyQt5 and integrated into toxygen. Follow the normal instructions for +adding a ```relay``` to [weechat](https://github.com/weechat/weechat) +``` +/relay add ipv4.ssl.weechat 9000 +/relay start ipv4.ssl.weechat +``` +or +``` +/set relay.network.ipv6 off +/set relay.network.password password +/relay add weechat 9000 +/relay start weechat +``` +and use the Plugins/Weechat Console to start weechat under Toxygen. +Then use the File/Connect menu item of the Console to connect to weechat. + +Weechat has a Jabber plugin to enable XMPP: +``` +/python load jabber.el +/help jabber +``` +so you can have Tox, IRC and XMPP in the same application! + +### Creating servers for IRC over Tor + +Create a proxy called tor +``` +/proxy add tor socks5 127.0.0.1 9050 +``` + +It should now show up in the list of proxies. +``` +/proxy list +``` + +``` +/nick NickName +``` + +## TLS certificates + +[Create a Self-signed Certificate](https://www.oftc.net/NickServ/CertFP/) + +Choose a NickName you will identify as. + +Create a directory for your certificates ~/.config/weechat/ssl/ +and make a subdirectory for each server ~/.config/weechat/ssl/irc.oftc.net/ + +Change to the server directory and use openssl to make a keypair and answer the questions: +``` +openssl req -nodes -newkey rsa:2048 -keyout NickName.key -x509 -days 3650 -out NickName.cer +chmod 400 NickName.key +``` +We now combine certificate and key to a single file NickName.pem +``` +cat NickName.cer NickName.key > NickName.pem +chmod 400 NickName.pem +``` + +Do this for each server you want to connect to, or just use one for all of them. + +### Libera TokTok channel + +The main discussion forum for Tox is the #TokTok channel on libera. + +https://mox.sh/sysadmin/secure-irc-connection-to-freenode-with-tor-and-weechat/ +We have to create an account without Tor, this is a requirement to use TOR: +Connect to irc.libera.chat without Tor and register +``` +/msg NickServ identify NickName password +/msg NickServ REGISTER mypassword mycoolemail@example.com +/msg NickServ SET PRIVATE ON +``` +Confirm registration after getting the mail with the code: +``` +/msg NickServ VERIFY REGISTER NickName code1235678 +``` + +Libera has an onion server so we can map an address in tor. Add this +to your /etc/tor/torrc +``` +MapAddress palladium.libera.chat libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion +``` +Or without the MapAddress just use +libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion +as the server address below, but set tls_verify to off. + +Define the server in weechat +https://www.weechat.org/files/doc/stable/weechat_user.en.html#irc_sasl_authentication +``` +/server remove libera +/server add libera palladium.libera.chat/6697 -tls -tls_verify +/set irc.server.libera.ipv6 off +/set irc.server.libera.proxy tor +/set irc.server.libera.username NickName +/set irc.server.libera.password password +/set irc.server.libera.nicks NickName +/set irc.server.libera.tls on +/set irc.server.libera.tls_cert "${weechat_config_dir}/ssl/libera.chat/NickName.pem" +``` + +``` +/set irc.server.libera.sasl_mechanism ecdsa-nist256p-challenge +/set irc.server.libera.sasl_username "NickName" +/set irc.server.libera.sasl_key "${weechat_config_dir}/ssl/libera.chat/NickName.pem" +``` + +Disconnect and connect back to the server. +``` +/disconnect libera +/connect libera +``` + +/msg nickserv identify password NickName + + +### oftc.net + +To use oftc.net over tor, you need to authenticate by SSL certificates. + + +Define the server in weechat +``` +/server remove irc.oftc.net +/server add OFTC irc.oftc.net/6697 -tls -tls_verify +/set irc.server.OFTC.ipv6 off +/set irc.server.OFTC.proxy tor +/set irc.server.OFTC.username NickName +/set irc.server.OFTC.nicks NickName +/set irc.server.OFTC.tls on +/set irc.server.OFTC.tls_cert "${weechat_config_dir}/ssl/irc.oftc.chat/NickName.pem" + +# Disconnect and connect back to the server. +/disconnect OFTC +/connect OFTC +``` +You must be identified in order to validate using certs +``` +/msg nickserv identify password NickName +``` +To allow NickServ to identify you based on this certificate you need +to associate the certificate fingerprint with your nick. To do this +issue the command cert add to Nickserv (try /msg nickserv helpcert). +``` +/msg nickserv cert add +``` + +### Privacy + +[Add somes settings bellow to weechat](https://szorfein.github.io/weechat/tor/configure-weechat/). +Detail from [faq](https://weechat.org/files/doc/weechat_faq.en.html#security). + +``` +/set irc.server_default.msg_part "" +/set irc.server_default.msg_quit "" +/set irc.ctcp.clientinfo "" +/set irc.ctcp.finger "" +/set irc.ctcp.source "" +/set irc.ctcp.time "" +/set irc.ctcp.userinfo "" +/set irc.ctcp.version "" +/set irc.ctcp.ping "" +/plugin unload xfer +/set weechat.plugin.autoload "*,!xfer" +```