Commit graph

4,268 commits

Author SHA1 Message Date
Goffi
3bf2fd93c7 docker (backend): set +use_local_shared_tmp in conf. 2024-06-13 13:22:41 +02:00
Goffi
594112fed1 tools (common/data_objects): set attachments url from sources if missing. 2024-06-12 23:06:10 +02:00
Goffi
e7d240b7e4 core (main): add a mechanism to have a shared temp directory:
this directory may be used to share files between backend and frontends. Normally, an
os-dependent temporary directory is created for that, but if this option is set, the
directory will be created in <local_dir>/<cache_dir>, which may be useful in some use case
(e.g. containerized frontends and backend).
2024-06-12 22:47:34 +02:00
Goffi
03a8fc983e core (xmpp): fix message workflow interruption from trigger. 2024-06-12 22:37:04 +02:00
Goffi
1c1f617cdf plugin XEP-0048: don't fail if a type is missing in bookmark data. 2024-06-12 22:36:15 +02:00
Goffi
a6059161bb plugin XEP-470: Don't file configuration on feature-not-implemented. 2024-06-12 22:35:13 +02:00
Goffi
f97ed65a7a component AP Gateway: log invalid account in case of error. 2024-06-12 22:34:19 +02:00
Goffi
eb00eb4b71 doc (configuration): replace deprecated SafeConfigParser. 2024-06-12 22:33:10 +02:00
Goffi
5a0a68e358 doc (components/AP Gateway): document new http_sign_get configuration option. 2024-06-05 22:34:43 +02:00
Goffi
b402be2a7a component AP Gateway: implement HTTP GET signature. 2024-06-05 22:34:09 +02:00
Goffi
99b218fca4 plugin text syntaxes: fix empty string handling in _remove_markups. 2024-06-05 22:33:37 +02:00
Goffi
4e1f991e3b doc (installation): use [all] in extra arguments. 2024-06-05 22:24:18 +02:00
Goffi
8752c60a84 core: fix SCRAM challenge parsing. 2024-06-01 22:35:47 +02:00
Goffi
3d30449a93 app (weblate): use application weblate section 2024-05-31 15:15:42 +02:00
Goffi
47a29aa5ce app (peertube): environment variable must be strings (bis) 2024-05-31 11:24:12 +02:00
Goffi
3fc429a781 cli (base): catch all failure on plugin importing. 2024-05-31 11:22:10 +02:00
Goffi
187c09204c app (peertube): environment variable must be strings 2024-05-31 11:18:12 +02:00
Goffi
4fb87fb4c1 tools (common/async_process): show command and arguments used in error message in case a failure. 2024-05-31 11:08:23 +02:00
Goffi
6fc76d1a0b plugin app manager: Add an app configuration file for PeerTube. 2024-05-31 11:08:22 +02:00
Goffi
4c7d4de032 doc: style/typos/URL fixes 2024-05-31 11:08:20 +02:00
Goffi
b1b2fe1aa8 doc: documentation to create a Libervia app, first draft 2024-05-31 11:08:18 +02:00
Goffi
da80cae625 plugin app manager: various improvements:
- Generated password must now be named and are stored, so they are re-used on following
  restarts. Password size can now be specified.
- New `not` filter for `!libervia_param` to inverse a boolean value.
- Former `front_url` field has been renamed to `web_url_path` as it is the URL path used
  for web frontend. All Web frontend related field are prefixed with `web_`.
- `front_url` is now used to specify a whole front URL (notably useful if an app uses its
  own domain). A list can be used to retrieve a key, like for `url_prefix`, and `https`
  scheme is added if no scheme is specified.
- An abstract class is now used for App Managers.
- Last application start time is stored in persistent data.
2024-05-31 11:08:14 +02:00
Goffi
b81a931867 tests (unit/XEP-0272): XEP-0272 tests:
fix 429
2024-05-15 17:35:16 +02:00
Goffi
0e23b8c1b0 plugin XEP-0272: implement XEP-0272: Multiparty Jingle (Muji)
rel 429
2024-05-15 17:34:46 +02:00
Goffi
ba7cec65a0 doc (cli): remote-control documentation
Document the new remote control commands.

rel 436
2024-05-11 13:52:43 +02:00
Goffi
425499398d cli (remote-control): new remote-control command:
2 subcommands are available: `send` to control remotely a device, and `receive` to be
controlled.

Documentation will follow.

rel 436
2024-05-11 13:52:43 +02:00
Goffi
b259137603 frontends: remote control implementation:
This is the frontends common part of remote control implementation. It handle the creation
of WebRTC session, and management of inputs. For now the reception use freedesktop.org
Desktop portal, and works mostly with Wayland based Desktop Environments.

rel 436
2024-05-11 13:52:43 +02:00
Goffi
ed7a2fa132 core: Jingle Remote Control implementation:
This is an implementation of the protoXEP that will be submitted to XSF. It handle
establishment of a remote control session, and the management of A/V calls with XEP-0167.

rel 436
2024-05-11 13:52:43 +02:00
Goffi
de7260bfb9 backend, frontend: prepare remote control:
This is a series of changes necessary to prepare the implementation of remote control
feature:

- XEP-0166: add a `priority` attribute to `ApplicationData`: this is needed when several
  applications are working in a same session, to know which one must be handled first.
  Will be used to make Remote Control have precedence over Call content.
- XEP-0166: `_call_plugins` is now async and is not used with `DeferredList` anymore: the
  benefit to have methods called in parallels is very low, and it cause a lot of trouble
  as we can't predict order. Methods are now called sequentially so workflow can be
  predicted.
- XEP-0167: fix `senders` XMPP attribute <=> SDP mapping
- XEP-0234: preflight acceptance key is now `pre-accepted` instead of `file-accepted`, so
  the same key can be used with other jingle applications.
- XEP-0167, XEP-0343: move some method to XEP-0167
- XEP-0353: use new `priority` feature to call preflight methods of applications according
  to it.
- frontend (webrtc): refactor the sources/sink handling with a more flexible mechanism
  based on Pydantic models. It is now possible to have has many Data Channel as necessary,
  to have them in addition to A/V streams, to specify manually GStreamer sources and
  sinks, etc.
- frontend (webrtc): rework of the pipeline to reduce latency.
- frontend: new `portal_desktop` method. Screenshare portal handling has been moved there,
  and RemoteDesktop portal has been added.
- frontend (webrtc): fix `extract_ufrag_pwd` method.

rel 436
2024-05-11 13:52:41 +02:00
Goffi
8a7a9eb966 core: remove legacy VERSION file. 2024-05-11 13:25:45 +02:00
Goffi
5bf34b4744 core: update pygobject version and replace deprecated configparser.SafeConfigParser 2024-05-11 13:16:13 +02:00
Goffi
5b60aaf83c core: implement SCRAM-SHA auth algorithm:
Twisted auth mechanism are outdated, and as a result, Libervia was not supporting the
mandatory SCRAM-SHA auth mechanism. This patch implements it for SCRAM-SHA-1,
SCRAM-SHA-256 and SCRAM-SHA-512 variants.
2024-04-08 12:29:40 +02:00
Goffi
f1cc67fd46 test (unit/cli): Add a file send/receive test for WebRTC:
fix 442
2024-04-06 15:21:00 +02:00
Goffi
6634c917bd install (pyproject): update lxml and add lxml_html_clean which is now a separate project. 2024-04-06 15:04:07 +02:00
Goffi
586b1f1440 docker (e2e): add GStreamer dependencies to test WebRTC stack:
rel 424
2024-04-06 15:04:01 +02:00
Goffi
728b01d236 cli (call, file), frontends: implement webRTC data channel transfer:
- file send/receive commands now supports webRTC transfer. In `send` command, the
  `--webrtc` flags is currenty used to activate it.

- WebRTC related code have been factorized and moved to `libervia.frontends.tools.webrtc*`
  modules.

rel 442
2024-04-06 13:43:09 +02:00
Goffi
27b66b3fb2 tests (unit/webrtc,XEP-0176, XEP-0234): Fix tests and add webrtc file transfer tests:
fix 441
2024-04-06 12:59:50 +02:00
Goffi
e8fb0a8a28 plugin XEP-0353, XEP-0234, jingle: WebRTC data channel signaling implementation:
Implement XEP-0343: Signaling WebRTC Data Channels in Jingle. The current version of the
XEP (0.3.1) has no implementation and contains some flaws. After discussing this on xsf@,
Daniel (from Conversations) mentioned that they had a sprint with Larma (from Dino) to
work on another version and provided me with this link:
https://gist.github.com/iNPUTmice/6c56f3e948cca517c5fb129016d99e74 . I have used it for my
implementation.

This implementation reuses work done on Jingle A/V call (notably XEP-0176 and XEP-0167
plugins), with adaptations. When used, XEP-0234 will not handle the file itself as it
normally does. This is because WebRTC has several implementations (browser for web
interface, GStreamer for others), and file/data must be handled directly by the frontend.
This is particularly important for web frontends, as the file is not sent from the backend
but from the end-user's browser device.

Among the changes, there are:

- XEP-0343 implementation.
- `file_send` bridge method now use serialised dict as output.
- New `BaseTransportHandler.is_usable` method which get content data and returns a boolean
  (default to `True`) to tell if this transport can actually be used in this context (when
  we are initiator). Used in webRTC case to see if call data are available.
- Support of `application` media type, and everything necessary to handle data channels.
- Better confirmation message, with file name, size and description when available.
- When file is accepted in preflight, it is specified in following `action_new` signal for
  actual file transfer. This way, frontend can avoid the display or 2 confirmation
  messages.
- XEP-0166: when not specified, default `content` name is now its index number instead of
  a UUID. This follows the behaviour of browsers.
- XEP-0353: better handling of events such as call taken by another device.
- various other updates.

rel 441
2024-04-06 12:57:23 +02:00
Goffi
ca7c061986 core (xmpp): Add a timeout for messages processing to avoid blocking the queue. 2024-04-06 12:21:04 +02:00
Goffi
0ee6a64e3b core (constants): use bool_type:
Using `bool` for type hint in `Const.bool_const` if conflicting with `Const.bool` method.
To avoid this, `bool_type` is used as an alias to `bool`.
2024-04-06 12:14:10 +02:00
Goffi
188c2c97ba migration: fix migration when XEP-0373 or XEP-0384 can't be imported:
Those plugins are using optional modules, and if their importation fails, there is
probably no data to migrate either.
2024-03-09 15:13:14 +01:00
Goffi
48201780de tests: fix and update tests:
- update code to newer version of `sh`
- update code to newer version of `selenium`
- update names of OMEMO algorithms
- fix paths and names used to mount source to the test container
- skip modules using `Gst` and `PyQt` when they are not available.
2024-03-05 17:31:56 +01:00
Goffi
fa55bc6fb9 cli (pubsub): use PEP when service is not specified in error message. 2024-03-05 17:31:56 +01:00
Goffi
dec2fa48bc cli (file/receive): handle CONFIRM dialog received in pre-flight. 2024-03-05 17:31:56 +01:00
Goffi
8db12deaff cli (base): fix exit code transmission when SystemExit is catched. 2024-03-05 17:31:56 +01:00
Goffi
25aedf57d7 plugin XEP-0391: remove the need to have a OLDMEMO session started to decrypt:
It should not be mandatory to have an OLDMEMO session started to decrypt JET files, and
this was actually making a test failing.
2024-03-05 17:31:56 +01:00
Goffi
bb57b12329 plugin XEP-0313: fix value used in msg_from when from is not explicitely specified. 2024-03-05 17:31:56 +01:00
Goffi
b6383c557e plugin XEP-0060: fix incorrect type hint. 2024-03-05 17:31:56 +01:00
Goffi
a804e6a9dc plugin XEP-0234: fix action type when pre-flight file confirmation is confirmed:
the `C.META_TYPE_FILE` can't be used in this case as it is a preflight and we don't have
yet data such as progress ID. `C.META_TYPE_FILE` is used as a sub-type to help with dialog
management in frontend.
2024-03-05 17:31:49 +01:00
Goffi
f20e5d6103 plugin XEP-0384, XEP-0391: download missing devices list:
when a peer jid was not in our roster, devices list was not retrieved, resulting in failed
en/decryption. This patch does check it and download missing devices list in necessary.

There is no subscription managed yet, so the list won't be updated in case of new devices,
this should be addressed at some point.
2024-03-05 17:31:36 +01:00