briar issueshttps://code.briarproject.org/groups/briar/-/issues2022-08-16T14:17:39Zhttps://code.briarproject.org/briar/briar/-/issues/2174Check own mailbox when coming online2022-08-16T14:17:39ZakwizgranCheck own mailbox when coming onlineCheck our mailbox for incoming data when coming online. Keep checking periodically until our direct hidden service has been available for some overlap period, to avoid races where the contact fails to connect to our hidden service and up...Check our mailbox for incoming data when coming online. Keep checking periodically until our direct hidden service has been available for some overlap period, to avoid races where the contact fails to connect to our hidden service and uploads data to our mailbox instead.
We should also check periodically (perhaps with a longer interval) while we're online, so that we can warn the user if the mailbox becomes unreachable.
Depends on #2170, #2171.Mailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2302Update contacts about change in mailbox versions that our mailbox (server) su...2022-08-16T13:49:46ZDaniel LublinUpdate contacts about change in mailbox versions that our mailbox (server) supports
When we connect to the Mailbox, we should get the fresh list of mailbox api versions that it supports. Then check it against the latest mailbox properties update sent to each contact, and send a new update if the serverSupports doesn't ...
When we connect to the Mailbox, we should get the fresh list of mailbox api versions that it supports. Then check it against the latest mailbox properties update sent to each contact, and send a new update if the serverSupports doesn't match.
Depends on https://code.briarproject.org/briar/briar/-/issues/2299 https://code.briarproject.org/briar/briar/-/issues/2261 https://code.briarproject.org/briar/briar/-/issues/2290Mailbox: Sync mailbox propertiesakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2188Update mailbox's contact list when connecting to own mailbox2022-08-12T12:45:14ZakwizgranUpdate mailbox's contact list when connecting to own mailboxDepends on #2182, #2183, #2187, #2184.Depends on #2182, #2183, #2187, #2184.Mailbox: Contact management APIhttps://code.briarproject.org/briar/briar/-/issues/2294Mailbox worker for updating our own mailbox's contact list2022-08-12T12:44:41ZakwizgranMailbox worker for updating our own mailbox's contact listThe mailbox client for our own mailbox (#2290) has a worker for updating the mailbox's contact list. The worker is started when the client is created and destroyed when the client is destroyed.
The worker runs in parallel with the uploa...The mailbox client for our own mailbox (#2290) has a worker for updating the mailbox's contact list. The worker is started when the client is created and destroyed when the client is destroyed.
The worker runs in parallel with the upload and download workers. If a task belonging to an upload or download worker tries to access the inbox or outbox of a contact that hasn't been added to the mailbox's contact list, the task will fail and retry until the mailbox's contact list is brought up to date. If a task belonging to an upload or download worker tries to access the inbox or outbox of a contact that's been removed from the mailbox's contact list, the task will fail and retry until the contact is deassigned from the client, causing the task to be cancelled.
The worker keeps a reference to its current API task, if any, so the task can be cancelled when the worker is destroyed.
The worker's lifecycle is:
1. Check connectivity
2. Fetch and store the mailbox's supported API versions (#2299, #2302)
3. Reconcile the mailbox's contact list with the local contact list (#2182, #2183, #2187)
3. Wait for the local contact list to change
The worker can be in the following states:
* Waiting for connectivity check
* Fetching API versions
* Updating contact list
* Waiting for changes
When the worker is created:
* Set the current state to "waiting for connectivity check"
* Call the client's connectivity check method
When the worker is destroyed:
* Set the current state to "destroyed"
* Cancel the current API task, if any
When a connectivity check succeeds:
* If the current state is "waiting for connectivity check":
* Set the current state to "updating contact list"
* Start a fetch-api-versions task
When a fetch-api-versions task succeeds:
* If the current state is "fetching API versions":
* Store the mailbox's supported API versions
* Start a get-contact-list task
When a get-contact-list task succeeds:
* If the current state is "updating contact list":
* Load the local contact list
* Compare the remote contact list to the local contact list
* Load the mailbox properties for any contacts that are in the local list but not the remote list
* If any contacts need to be added or deleted:
* Start an add-contact or delete-contact task
* Else:
* Set the current state to "waiting for changes"
When an add-contact or delete-contact task succeeds:
* If the current state is "updating contact list":
* If any more contacts need to be added or deleted:
* Start an add-contact or delete-contact task
* Else:
* Start a get-contact-list task
When an event indicates that a contact has been added or removed:
* If the current state is "waiting for changes":
* Set the current state to "updating contact list"
* Start a get-contact-list taskMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2290Mailbox client for our own mailbox2022-08-12T12:44:40ZakwizgranMailbox client for our own mailboxMailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with our own mailbox. Some code will be shared wit...Mailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with our own mailbox. Some code will be shared with the client for communicating with a contact's mailbox (#2289). The shared code is covered by #2229.
The client's connectivity check will use #2170.
* At any given time the client has zero or more contacts assigned for upload and zero or more contacts assigned for download
* Each contact assigned for upload has its own upload worker
* The client has a single download worker that's shared by all contacts assigned for download
* The client also has a single contact list worker
When the client is created:
* Create and start the contact list worker (#2294)
When the client is destroyed:
* Do all the stuff the superclass does when it's destroyed
* Destroy the contact list worker
When a contact is assigned for upload:
* Create and start the contact's upload worker (#2291)
When a contact is deassigned for upload:
* Destroy the contact's upload worker
When a contact is assigned for download:
* If this is the only contact assigned for download:
* Create and start the shared download worker (#2293)
When a contact is deassigned for download:
* If there are no more contacts assigned for download:
* Destroy the shared download workerMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1812Update own mailbox's contact list when contacts are added or removed2022-08-12T12:44:40ZakwizgranUpdate own mailbox's contact list when contacts are added or removedWhen a contact is added, updated or deleted, queue an update on any open connections to the user's own mailbox.
Related to briar-mailbox#4, #2188. Depends on #2182, #2183, #2187, #2184.When a contact is added, updated or deleted, queue an update on any open connections to the user's own mailbox.
Related to briar-mailbox#4, #2188. Depends on #2182, #2183, #2187, #2184.Mailbox: Contact management API2022-10-31https://code.briarproject.org/briar/briar/-/issues/2291Mailbox upload worker2022-08-05T14:19:56ZakwizgranMailbox upload workerThe upload worker implementation is shared between the client for our own mailbox (#2290) and the client for a contact's mailbox (#2289). The worker's lifecycle is managed by the mailbox client, which in turn is managed by the mailbox cl...The upload worker implementation is shared between the client for our own mailbox (#2290) and the client for a contact's mailbox (#2289). The worker's lifecycle is managed by the mailbox client, which in turn is managed by the mailbox client manager (#2228).
Each upload worker is associated with a contact that has been assigned to a mailbox for upload. When a contact is reassigned to a different mailbox for upload, the old worker is destroyed and a new worker is created.
The worker can be in the following states:
* Checking for data to send
* Waiting for data to send
* Waiting for connectivity check
* Writing and uploading
* Destroyed
When the worker is created:
* Set the current state to "checking for data to send"
* Check for data to send
When the worker is destroyed:
* Set the current state to "destroyed"
* Cancel the current upload task, if any
To check for data to send:
* Load the time when data will next be ready to send to the contact
* If data is ready to send now:
* Set the current state to "waiting for connectivity check"
* Call the client's connectivity check method
* Else:
* Set the current state to "waiting for data to send"
* Schedule a wakeup task for the time when data will next be ready to send
When an event indicates that new data may be ready to send:
* If the current state is "waiting for data to send":
* Cancel the wakeup task
* Set the current state to "checking for data to send"
* Check for data to upload
When a wakeup task runs:
* If the current state is "waiting for data to send":
* Set the current state to "checking for data to send"
* Check for data to upload
When a connectivity check succeeds:
* If the current state is "waiting for connectivity check":
* Set the current state to "writing and uploading"
* Write and upload a file
To write and upload a file:
* Create a temporary file in the upload directory
* Pass the file's path to the mailbox plugin to get a transport connection writer
* Decorate the transport connection writer to handle disposal
* Create a deferred send handler
* Pass the decorated transport connection writer and the deferred send handler to the connection manager
* Data will be written to the file asynchronously
* The IDs of any sent/acked messages will be recorded by the deferred send handler
When the transport connection writer is disposed of:
* If the write succeeded:
* Start an upload task to upload the file to the mailbox (#2231)
* Else:
* Delete the file
* Set the current state to "checking for data to send"
* Check for data to send
When an upload task succeeds:
* Retrieve the sent/acked message IDs from the deferred send handler
* Mark the messages as sent/acked
* Delete the file
* Set the current state to "checking for data to send"
* Check for data to send
When an upload task is cancelled:
* Delete the fileMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2293Mailbox download worker for our own mailbox2022-08-05T13:40:22ZakwizgranMailbox download worker for our own mailboxThe mailbox client for our own mailbox (#2290) has a single download worker that's shared between all contacts assigned to the mailbox for download. The worker is started when the first contact is assigned for download and destroyed when...The mailbox client for our own mailbox (#2290) has a single download worker that's shared between all contacts assigned to the mailbox for download. The worker is started when the first contact is assigned for download and destroyed when the last contact is deassigned for download or the client is destroyed.
The worker keeps a reference to its current API task, if any, so the task can be cancelled when the worker is destroyed.
The worker's lifecycle is:
1. Check connectivity
2. Download and delete all files from all contacts' outboxes
3. Wait until our hidden service has been reachable for at least the overlap duration
4. Download and delete all files from all contacts' outboxes again, in case any arrived during the overlap period
Downloading and deleting files is more complex for this worker than for the download worker for a contact's mailbox (#2292), firstly because this worker needs to download files from multiple outboxes, and secondly because it needs to ensure fairness between contacts, so that a malicious contact can't deny service to other contacts by flooding its own outbox with files.
The worker ensures fairness in two ways:
1. To ensure that every contact receives service even if some contacts have flooded their own outboxes, the worker lists the outboxes that contain files, lists the files in each of those outboxes, then downloads from the outboxes in round-robin order.
2. To ensure that every contact receives service even if they upload files to their outboxes after the initial check, and if some contacts had already flooded their own outboxes at the time of the initial check, the worker restarts the round-robin after downloading a certain number of files: it lists the outboxes that contain files, lists the files in each of those outboxes, then downloads from the outboxes in round-robin order.
The worker can be in the following states:
* Waiting for connectivity check
* First download
* Waiting for hidden service
* Second download
* Destroyed
When the worker is created:
* Set the current state to "waiting for connectivity check"
* Call the client's connectivity check method
When the worker is destroyed:
* Set the current state to "destroyed"
* Cancel the current API task, if any
When a connectivity check succeeds:
* If the current state is "waiting for connectivity check":
* Set the current state to "first download"
* Start a find-outboxes-with-available-files task (#2170)
When a find-outboxes-with-available-files task succeeds:
* If the current state is "first download" or "second download":
* If there are any outboxes with available files:
* Start a list-outbox task for the first outbox with available files
* Else if the current state is "first download":
* Set the current state to "waiting for hidden service"
When a list-outbox tasks succeeds:
* If the current state is "first download" or "second download":
* If there are files in the outbox:
* Sort the files by timestamp
* Add the file list to the round-robin queue
* If there are more outboxes with available files:
* Start a list-outbox task for the next outbox with available files
* Else if there are any files in the round-robin queue:
* Trim the round-robin queue to ensure fairness (see item 2 above)
* Start a download-file task for the first file in the round-robin queue (#2232)
* Else if the current state is "first download":
* Set the current state to "waiting for hidden service"
* (Note: It's surprising if we reach this branch, and should probably be logged. The find-outboxes-with-available-files task found some outboxes, but after listing those outboxes we didn't find any files)
When a download-file task succeeds:
* Pass the local file's path to the mailbox plugin to get a transport connection reader
* Decorate the transport connection reader to handle disposal
* Pass the decorated transport connection reader to the connection manager
* Data will be read from the local file asynchronously
* If the current state is "first download" or "second download":
* Start a delete-file task for the current file (#2233)
When the transport connection reader is disposed of:
* Delete the local file
When a delete-file task succeeds or tolerably fails:
* If the current state is "first download" or "second download":
* If there are more files in the round-robin queue:
* Start a download-file task for the next file
* Else:
* Start a find-outboxes-with-available-files task
When an event indicates that the hidden service has been reachable for at least the overlap duration:
* If the current state is "waiting for hidden service":
* Set the current state to "second download"
* Start a find-outboxes-with-available-files taskMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2292Mailbox download worker for a contact's mailbox2022-08-05T13:38:01ZakwizgranMailbox download worker for a contact's mailboxWhen a contact is assigned to a contact's mailbox for download, the mailbox client (#2289) creates a download worker. The worker is destroyed when the contact is unassigned for download or the client is destroyed.
The worker keeps a ref...When a contact is assigned to a contact's mailbox for download, the mailbox client (#2289) creates a download worker. The worker is destroyed when the contact is unassigned for download or the client is destroyed.
The worker keeps a reference to its current API task, if any, so the task can be cancelled when the worker is destroyed.
The worker's lifecycle is:
1. Check connectivity
2. Download and delete all files from the inbox
3. Wait until our hidden service has been reachable for at least the overlap duration
4. Download and delete all files from the inbox again, in case any arrived during the overlap period
The worker can be in the following states:
* Waiting for connectivity check
* First download
* Waiting for hidden service
* Second download
* Destroyed
When the worker is created:
* Set the current state to "waiting for connectivity check"
* Call the client's connectivity check method
When the worker is destroyed:
* Set the current state to "destroyed"
* Cancel the current API task, if any
When a connectivity check succeeds:
* If the current state is "waiting for connectivity check":
* Set the current state to "first download"
* Start a list-inbox task
When a list-inbox tasks succeeds:
* If the current state is "first download" or "second download":
* If there are files in the inbox:
* Sort the files by timestamp
* Start a download-file task for the first file (#2232)
* Else if the current state is "first download":
* Set the current state to "waiting for hidden service"
When a download-file task succeeds:
* Pass the local file's path to the mailbox plugin to get a transport connection reader
* Decorate the transport connection reader to handle disposal
* Pass the decorated transport connection reader to the connection manager
* Data will be read from the local file asynchronously
* If the current state is "first download" or "second download":
* Start a delete-file task for the current file (#2233)
When the transport connection reader is disposed of:
* Delete the local file
When a delete-file task succeeds or tolerably fails:
* If the current state is "first download" or "second download":
* If there are more files to download:
* Start a download-file task for the next file
* Else:
* Start a list-inbox task
When an event indicates that the hidden service has been reachable for at least the overlap duration:
* If the current state is "waiting for hidden service":
* Set the current state to "second download"
* Start a list-inbox taskMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2189Check contacts' mailboxes when coming online2022-08-05T13:38:00ZakwizgranCheck contacts' mailboxes when coming onlineIf we don't have our own mailbox, check our contacts' mailboxes for incoming data when coming online. Keep checking periodically until our hidden service has been available for some overlap period, to avoid races where the contact fails ...If we don't have our own mailbox, check our contacts' mailboxes for incoming data when coming online. Keep checking periodically until our hidden service has been available for some overlap period, to avoid races where the contact fails to connect to our hidden service and uploads data to their mailbox instead.
Depends on #2186.Mailbox: Manage mailbox connectionshttps://code.briarproject.org/briar/briar-mailbox/-/issues/143Upgrade Ktor library to version 2.x2022-08-01T13:43:34ZTorsten GroteUpgrade Ktor library to version 2.xWe are still on 1.6 and going to v2 now before release makes the mailbox more future proof and the webserver easier to upgrade in the future.We are still on 1.6 and going to v2 now before release makes the mailbox more future proof and the webserver easier to upgrade in the future.Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1995Test sharing an app when offline2022-07-20T10:38:40ZTorsten GroteTest sharing an app when offlineYou will need *two* Android phones to help with testing sharing an app in an offline scenario.
It starts by download this test app on the first phone: https://grobox.de/tmp/hotspot.apk
Then please respond to this ticket, copying and pa...You will need *two* Android phones to help with testing sharing an app in an offline scenario.
It starts by download this test app on the first phone: https://grobox.de/tmp/hotspot.apk
Then please respond to this ticket, copying and pasting the text below into your response, giving the phone models in the first line.
You can check boxes by replacing `[ ]` with `[x]` or sending your response and then go through the steps, checking boxes by clicking them.
If you don't have or want an account to respond here, you can also send your response to `contact@briarproject.org` via email.
Please also respond, if you fail to complete all the steps. We would especially like to hear from you!
If something didn't go as expected, please feel free to add extra info to the questionnaire.
This is an example, how going through these steps could look like on the first phone:
[<img src="/uploads/b78344755319ed1b0830ce528b8c9637/device-2021-04-13-141128.png" width="200">](/uploads/b78344755319ed1b0830ce528b8c9637/device-2021-04-13-141128.png)
[<img src="/uploads/cdf3ae921106e98ee9dabbec2dfb3ac8/device-2021-04-13-141146.png" width="200">](/uploads/cdf3ae921106e98ee9dabbec2dfb3ac8/device-2021-04-13-141146.png)
[<img src="/uploads/750cd78087a215ede1c8a295eb9eb8a2/device-2021-04-13-142703.png" width="200">](/uploads/750cd78087a215ede1c8a295eb9eb8a2/device-2021-04-13-142703.png)
[<img src="/uploads/2e720826106e1fbedad1dde85b1683cd/device-2021-04-13-142720.png" width="200">](/uploads/2e720826106e1fbedad1dde85b1683cd/device-2021-04-13-142720.png)
[<img src="/uploads/6ccedfa1a0f8475383e43eb202645258/device-2021-04-14-102618.png" width="200">](/uploads/6ccedfa1a0f8475383e43eb202645258/device-2021-04-14-102618.png)
```
1. My phone models are: **[ModelOfPhone1]** and **[ModelOfPhone2]** running **[AndroidVersion1]** and **[AndroidVersion2]**
1. Download and install app on the first phone only
1. Start app and allow location permission (if requested)
1. [ ] Below the `START HOTSPOT` button, it says that `5GHz Wi-Fi is supported`.
1. Press the `START HOTSPOT` button
1. [ ] A QR code for a Wi-Fi appears
1. [ ] The Wi-Fi's name starts with `DIRECT-`
1. [ ] Below the `START HOTSPOT` button, it says `Hotspot started` and there's this text behind: **[no text]**
1. With a second phone I was able to connect to this Wi-Fi by
1. [ ] Scanning the QR code with a reader app
1. [ ] Entering the Wi-Fi data manually in the phone's Wi-Fi settings
1. Once the second phone is connected, press the `PEER CONNECTED` button
1. [ ] The app shows `http://192.168.49.1:9999` at the bottom
1. Press the menu/overflow icon and select `Network interfaces`
1. [ ] A new page shows text that includes the line `p2p0: /192.168.49.1`
1. Press the back button to come back to the (second) QR code screen
1. I was able to visit the shown site with the second phone by
1. [ ] Scanning the QR code with a reader app
1. [ ] Entering the link manually in my browser app
1. [ ] I could not visit this site
1. [ ] I could download the app on the second phone
1. [ ] I could install and open the app on the second phone
1. [ ] The second phone stayed connected to the first phone's Wi-Fi and I did not need to reconnect
1. While still connected to the first phone's Wi-Fi, go to system settings on the second phone.
* Open Wi-Fi settings and select the first phone's Wi-Fi.
* Try to find the `Frequency` (e.g. `5 GHz`) the Wi-Fi is using and write it down here: **[frequency]**
1. [ ] Bonus step: I could repeat the process by switching phones and it works the same or different in what aspect?
```
You can see how this will look like below or when using the "Preview" tab in your response.
Subtask of #1992Install via Bluetooth or Wi-FiTorsten GroteTorsten Grote2021-07-31https://code.briarproject.org/briar/briar-mailbox/-/issues/136Adapt Xiaomi power setup for MIUI 12.52022-07-14T17:46:03ZTorsten GroteAdapt Xiaomi power setup for MIUI 12.5backport: https://code.briarproject.org/briar/briar/-/merge_requests/1667backport: https://code.briarproject.org/briar/briar/-/merge_requests/1667Mailbox: Manage app lifecycleTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1280Support v3 hidden services2022-07-13T11:20:27ZakwizgranSupport v3 hidden servicesTor's v3 hidden service protocol has several security improvements over the legacy v2 protocol. We should make a planned migration from v2 to v3 hidden services:
1. Add support for connecting to v3 hidden services (depends on #1279)
2. ...Tor's v3 hidden service protocol has several security improvements over the legacy v2 protocol. We should make a planned migration from v2 to v3 hidden services:
1. Add support for connecting to v3 hidden services (depends on #1279)
2. Create v3 hidden services for all new and existing Briar accounts
3. After a reasonable time, remove support for v2 hidden services
Each account will have two hidden services during the transition period. This will increase our bandwidth usage, but most of the bandwidth cost comes from downloading the consensus, which will be shared between the two services.Android 1.4https://code.briarproject.org/briar/briar/-/issues/2338Building headless platform jars should depend on jar task2022-07-13T11:16:37ZSebastianBuilding headless platform jars should depend on jar taskI think the tasks created using `jarFactory` such as `x86LinuxJar` and `windowsJar` should depend on the jar task.
Otherwise, if not building the jars using an additional clean target (e.g. `./gradlew clean windowsJar`), it will use a p...I think the tasks created using `jarFactory` such as `x86LinuxJar` and `windowsJar` should depend on the jar task.
Otherwise, if not building the jars using an additional clean target (e.g. `./gradlew clean windowsJar`), it will use a potentially outdated jar for producing the platform jar.Android 1.4https://code.briarproject.org/briar/briar-mailbox/-/issues/103API endpoint for getting the API versions supported by the mailbox2022-07-13T11:14:54ZakwizgranAPI endpoint for getting the API versions supported by the mailboxThe endpoint should return a list of (major, minor) pairs.The endpoint should return a list of (major, minor) pairs.MailboxSebastianSebastianhttps://code.briarproject.org/briar/briar-mailbox/-/issues/104Include supported API versions in pairing response2022-07-13T11:14:30ZakwizgranInclude supported API versions in pairing responseUpdate the pairing endpoint to return the API versions supported by the mailbox, as a list of (major, minor) pairs.Update the pairing endpoint to return the API versions supported by the mailbox, as a list of (major, minor) pairs.Mailbox: PairingSebastianSebastianhttps://code.briarproject.org/briar/briar-mailbox/-/issues/105Limit the size of uploaded files2022-07-13T11:13:19ZakwizgranLimit the size of uploaded filesThe mailbox shouldn't allow clients to upload files larger than 1 MiB.The mailbox shouldn't allow clients to upload files larger than 1 MiB.Mailbox: File management APITorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar-mailbox/-/issues/41Implement mailbox status screen2022-07-13T11:12:06ZakwizgranImplement mailbox status screenDepends on #33, #40. Subtask of #7.Depends on #33, #40. Subtask of #7.Mailbox: Status UI for Mailbox appSebastianSebastianhttps://code.briarproject.org/briar/briar/-/issues/2289Mailbox client for a contact's mailbox2022-07-13T11:07:36ZakwizgranMailbox client for a contact's mailboxMailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with a contact's mailbox. Some code will be shared...Mailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with a contact's mailbox. Some code will be shared with the client for communicating with our own mailbox (#2290). The shared code is covered by #2229.
The client's connectivity check will use #2186.
* The client always has one contact assigned for upload
* At any given time the client may have one contact assigned for download, depending on whether we have our own mailbox
When the client is created:
* Create and start the upload worker (#2291)
When a contact is assigned for download:
* Create and start the download worker (#2292)
When a contact is deassigned for download:
* Destroy the download workerMailbox: Manage mailbox connections