From 9c1014ee5e6f9c9eb4a04f84f264d7906c2e3559 Mon Sep 17 00:00:00 2001 From: "emdee@spm.plastiras.org" Date: Sat, 17 Feb 2024 20:02:30 +0000 Subject: [PATCH] update --- .rsync.sh | 2 +- README.md | 28 +++++++++++++++++++++------- docs/ToxygenWeechat.md | 1 + toxygen/__main__.py | 5 ++++- toxygen/app.py | 2 +- 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.rsync.sh b/.rsync.sh index f29cc52..06ad4db 100644 --- a/.rsync.sh +++ b/.rsync.sh @@ -3,6 +3,6 @@ #find * -name \*.py | xargs grep -l '[ ]*$' | xargs sed -i -e 's/[ ]*$//' rsync "$@" -vaxL --include \*.py \ --exclude Toxygen.egg-info --exclude build \ - --exclude \*.pyc --exclude .pyl\* --exclude \*~ \ + --exclude \*.pyc --exclude .pyl\* --exclude \*.so --exclude \*~ \ --exclude __pycache__ --exclude \*.egg-info --exclude \*.new \ ./ ../toxygen.git/|grep -v /$ diff --git a/README.md b/README.md index 6e10a29..86664fb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Toxygen Toxygen is powerful cross-platform [Tox](https://tox.chat/) client -written in pure Python3. +for Tox and IRC/weechat written in pure Python3. ### [Install](/docs/install.md) - [Contribute](/docs/contributing.md) - [Plugins](/docs/plugins.md) - [Compile](/docs/compile.md) - [Contact](/docs/contact.md) @@ -9,6 +9,9 @@ written in pure Python3. ### Features: +- PyQt5, PyQt6, and maybe PySide2, PySide6 via qtpy +- IRC via weechat /relay +- NGC groups - 1v1 messages - File transfers - Audio calls @@ -39,8 +42,6 @@ written in pure Python3. - File resuming - Read receipts - uses gevent -- NGC groups -- PyQt5, PyQt6, PySide2, PySide6 via qtpy ### Screenshots *Toxygen on Ubuntu and Windows* @@ -119,11 +120,24 @@ and installs into PREFIX which is usually /usr/local Up-to-date code is on https://git.plastiras.org/emdee/toxygen -Although Tox works over Tor, we do not recommend its usage for -anonymity as it leaks DNS requests due to a 6-year old known security -issue: https://github.com/TokTok/c-toxcore/issues/469 Do not use it for -anonymous communication unless you have a TCP and UDP firewall in place. +Tox works over Tor, and the c-toxcore library can leak DNS requests +due to a 6-year old known security issue: +https://github.com/TokTok/c-toxcore/issues/469 but toxygen looksup +addresses before calling c-toxcore. This also allows us to use onion +addresses in the DHTnodes.json file. Still for anonymous communication +we recommend having a TCP and UDP firewall in place. +Although Tox works with multi-user group chat, there are no checks +against impersonation of a screen nickname, so you may not be chatting +with the person you think. For the Toxic client, the (closed) issue is: +https://github.com/JFreegman/toxic/issues/622#issuecomment-1922116065 +Solving this might best be done with a solution to MultiDevice q.v. + +The Tox project does not follow semantic versioning so the project may +break the underlying ctypes wrapper at any time; it's not possible to +use Tox version numbers to tel what the API will be. In which case +you'll have to go into the tox.py file in +https://git.plastiras.org/emdee/toxygen_wrapper to fix it yourself. ## MultiDevice diff --git a/docs/ToxygenWeechat.md b/docs/ToxygenWeechat.md index eb990e9..1694669 100644 --- a/docs/ToxygenWeechat.md +++ b/docs/ToxygenWeechat.md @@ -76,6 +76,7 @@ Connect to irc.libera.chat without Tor and register /msg NickServ REGISTER mypassword mycoolemail@example.com /msg NickServ SET PRIVATE ON ``` +You'll get an email with a registration code. Confirm registration after getting the mail with the code: ``` /msg NickServ VERIFY REGISTER NickName code1235678 diff --git a/toxygen/__main__.py b/toxygen/__main__.py index 73c4785..406726f 100644 --- a/toxygen/__main__.py +++ b/toxygen/__main__.py @@ -83,10 +83,13 @@ def setup_video(oArgs): video = setup_default_video() # this is messed up - no video_input in oArgs # parser.add_argument('--video_input', type=str,) + print(video) + if not video or not video['output_devices']: + video['device'] = -1 if not hasattr(oArgs, 'video_input'): video['device'] = video['output_devices'][0] elif oArgs.video_input == '-1': - video['device'] = video['output_devices'][1] + video['device'] = video['output_devices'][-1] else: video['device'] = oArgs.video_input return video diff --git a/toxygen/app.py b/toxygen/app.py index 17921bc..54417b7 100644 --- a/toxygen/app.py +++ b/toxygen/app.py @@ -2,6 +2,7 @@ import os import sys import traceback +import logging from random import shuffle import threading from time import sleep, time @@ -79,7 +80,6 @@ import styles.style # TODO: dynamic loading import toxygen_wrapper.tests.support_testing as ts global LOG -import logging LOG = logging.getLogger('app') IDLE_PERIOD = 0.10