To trust or not to trust, that is the question today

The MuWire file sharing application
Post Reply
User avatar
lgillis
Posts: 48
Joined: 20 Oct 2018 12:52

To trust or not to trust, that is the question today

Post by lgillis »

So that everyone knows what it is about, I will first quote from the description.
In MuWire you can choose to trust or distrust other MuWire users. You can subscribe to the contact lists of users you trust and see who they trust and distrust in turn.

When you mark someone as trusted they get added to your MuWire contact list. You can then easily send them messages, chat with them, browse the files or collections they’re sharing. In the MuWire options you can choose to allow only trusted connections. If you enable that option your MuWire node will only connect to the nodes of users that you have marked Trusted. Keep in mind that you haven’t marked anyone as Trusted you will not be able to connect to anyone!

If for whatever reason you want to never see anything from a specific user (like search result or a message) you can mark them as Distrusted. They will not be able to interact with you in any way.

Be careful who you trust in an anonymous network! There is no single right answer as to whether you should trust someone or not. Ideally you should interact with them somehow before making a decision. Exchange files, messages, or chat with them. People can change MuWire identities easily, and also multiple humans can be behind the same MuWire identity. Be mindful of what information you give out, and be respectful if others do not want to give you information about themselves.
So much for the introduction. One question I asked myself was how I can recognize friend and foe. To make a pre-selection, the content control panel is a good choice. Maybe some users don't know this function yet, so I'll introduce it briefly. With the content control all received requests that are sent to the network can be made visible. It's kind of like the log file on your favorite I2P tracker for whatever, with the difference that with this free tool everyone can see their environment.

You can use this to optimize your own offer, for example by creating a sidecar file with corresponding keywords, or to connect people with the same interests. On the other hand, there are requests that you not only don't want to serve, but that are completely foreign to you. And with such people I want to have then simply nothing to do and I speak them my distrust. At this point I would like to show a picture for clarification, but with that I could already expose myself to prosecution due to idiotic laws, apart from the fact that this forum is subject to the same laws.

So I'll try to explain it as simply as possible. In the Content Control panel, which can be found under Tools, there is an input field for search terms or regular expressions in the lower left area, as you actually know it. Next to it is a button labeled "Regex". This is selected and the button to the right of it "Add rule" adds an empty rule. This empty rule already ensures that all queries are listed under "Hits" in the upper right field. If you have another version, try the expression ".*" which leads to the same result.

In the following, the list of hits will fill up. By selecting a participant from this list, it is now possible to express trust or mistrust in this participant. Then follows a security query with an optional indication of reasons. In any case, I advise you to always give a meaningful reason, because after a few days at the latest, you will have already forgotten what was so important to you today and what seemed so obvious.

If that was incomprehensible or I forgot something or just wrote nonsense ... please correct me.
User avatar
zlatinb
Posts: 111
Joined: 24 May 2018 17:14

Re: To trust or not to trust, that is the question today

Post by zlatinb »

Excellent post on what the Content Control function is intended to be used for. Thank you for writing it!

When I was deciding whether to add this functionality the choice was between letting only those who could write the needed code see what searches flow on the network, or enabling every user to see them.
GPG: https://keybase.io/zlatinb
blog: http://zab.i2p
mail: zab@mail.i2p
MuWire: https://muwire.com
mortense
Posts: 5
Joined: 22 Oct 2020 16:36

Re: To trust or not to trust, that is the question today

Post by mortense »

Could someone please clarify which OS, MuWire version and MuWire flavour that this applies to. There does not appear to be a 'Content Control' dialog or 'Tools' menu in the MuWire i2p plugin.

This is a timely topic for me. Currently there is a user downloading from me that seems to be unable to completely download a piece and I need to be able to block them until they notice the problem and fix it.

The problem is that the progress for uploads shows that they are receiving a piece of the file but it never completes. Once the progress gets to 100% the number of remote pieces would usually increment by one piece and the downloader would move on to downloading another piece. In this case progress increases to 100% but then the remote pieces does not increment. It is like they are stuck in a loop downloading the same piece forever.

This particular user was downloading normally for several hundreds of files and then all of a sudden this looping behaviour began. It may be that their hard drive filled up and they cannot save the new piece and MuWire just retries. Regardless of why it is happening it is turning into a 'Denial of Service' attack. Hundreds (thousands?) of files are stuck in this loop and it is clogging up the works, so to speak.

Any advice on how to block, at least temporarily, this loopy user from within the MuWire plugin?

Cheers, Mortense
User avatar
zlatinb
Posts: 111
Joined: 24 May 2018 17:14

Re: To trust or not to trust, that is the question today

Post by zlatinb »

mortense wrote: 13 Nov 2021 18:41 Could someone please clarify which OS, MuWire version and MuWire flavour that this applies to. There does not appear to be a 'Content Control' dialog or 'Tools' menu in the MuWire i2p plugin.
The plugin does not have this functionality yet, only the desktop client on all platforms. I don't want to make any promises as to when it will get it because there are some higher-priority issues that need to be resolved first.
mortense wrote: This is a timely topic for me. Currently there is a user downloading from me that seems to be unable to completely download a piece and I need to be able to block them until they notice the problem and fix it.
There is no way to do that easily from the plugin unfortunately. From the desktop client you can right-click on the upload and copy the other person's full ID which then you can use to block them, although a better approach would be to send them a message to alert them about the problem. (Messaging is also available only in the desktop client.) What you can do from the plugin is to try and find that user's id by searching for something they would have and then mark them Distrusted from the search results page.
mortense wrote: The problem is that the progress for uploads shows that they are receiving a piece of the file but it never completes. Once the progress gets to 100% the number of remote pieces would usually increment by one piece and the downloader would move on to downloading another piece. In this case progress increases to 100% but then the remote pieces does not increment. It is like they are stuck in a loop downloading the same piece forever.

This particular user was downloading normally for several hundreds of files and then all of a sudden this looping behaviour began. It may be that their hard drive filled up and they cannot save the new piece and MuWire just retries. Regardless of why it is happening it is turning into a 'Denial of Service' attack. Hundreds (thousands?) of files are stuck in this loop and it is clogging up the works, so to speak.
From the description of the problem it looks like the integrity check of the piece is failing. This happens most often when the contents of the file change after it has been shared. One way to verify if this is the case is to try to download that same file from another MuWire instance, which would get stuck in the same loop. If that's the case the only solution really is to unshare the file then share it again.
GPG: https://keybase.io/zlatinb
blog: http://zab.i2p
mail: zab@mail.i2p
MuWire: https://muwire.com
User avatar
lgillis
Posts: 48
Joined: 20 Oct 2018 12:52

Re: To trust or not to trust, that is the question today

Post by lgillis »

My description refers to MuWire-0.8.10.zip, which is the actual version at the moment. Content Control was added in 2019, as far as I know. Attached is a montage of completely innocuous screenshots for clarification. Unfortunately, I did not manage to switch the language during the installation, but that does not change the GUI structure.
Attachments
MuWire_Content-Control.png
MuWire_Content-Control.png (25.82 KiB) Viewed 538 times
mortense
Posts: 5
Joined: 22 Oct 2020 16:36

Re: To trust or not to trust, that is the question today

Post by mortense »

From the description of the problem it looks like the integrity check of the piece is failing. This happens most often when the contents of the file change after it has been shared. One way to verify if this is the case is to try to download that same file from another MuWire instance, which would get stuck in the same loop. If that's the case the only solution really is to unshare the file then share it again.
I just finished restarting MuWire and the router. When MuWire started it re-indexed the files. Should this not accomplish the same thing as unshare/share?

Cheers, Mortense
User avatar
zlatinb
Posts: 111
Joined: 24 May 2018 17:14

Re: To trust or not to trust, that is the question today

Post by zlatinb »

mortense wrote: 13 Nov 2021 19:37
From the description of the problem it looks like the integrity check of the piece is failing. This happens most often when the contents of the file change after it has been shared. One way to verify if this is the case is to try to download that same file from another MuWire instance, which would get stuck in the same loop. If that's the case the only solution really is to unshare the file then share it again.
I just finished restarting MuWire and the router. When MuWire started it re-indexed the files. Should this not accomplish the same thing as unshare/share?

Cheers, Mortense
On startup MuWire only "loads" the shared files which means reading some metadata about each file and doing some very basic sanity checks. Unshare + share on the other hand means a full re-hash of the file which is what is necessary to correct the issue if the file contents have changed.
GPG: https://keybase.io/zlatinb
blog: http://zab.i2p
mail: zab@mail.i2p
MuWire: https://muwire.com
mortense
Posts: 5
Joined: 22 Oct 2020 16:36

Re: To trust or not to trust, that is the question today

Post by mortense »

Oh, I was really hoping that this was not going to be the case.

Unsharing each file individually is not feasible. Clicking 'Sharing,Actions, Unshare" does not stop the sharing. Is there a file that I can delete that wipes everything and then cause MuWire to redo the hashes?

My apologies to the downloaders but it looks like the files may be unavailable for a day or so.

Cheers, Mortense
zlatinb wrote: 13 Nov 2021 20:59
mortense wrote: 13 Nov 2021 19:37
From the description of the problem it looks like the integrity check of the piece is failing. This happens most often when the contents of the file change after it has been shared. One way to verify if this is the case is to try to download that same file from another MuWire instance, which would get stuck in the same loop. If that's the case the only solution really is to unshare the file then share it again.
I just finished restarting MuWire and the router. When MuWire started it re-indexed the files. Should this not accomplish the same thing as unshare/share?

Cheers, Mortense
On startup MuWire only "loads" the shared files which means reading some metadata about each file and doing some very basic sanity checks. Unshare + share on the other hand means a full re-hash of the file which is what is necessary to correct the issue if the file contents have changed.
User avatar
zlatinb
Posts: 111
Joined: 24 May 2018 17:14

Re: To trust or not to trust, that is the question today

Post by zlatinb »

mortense wrote: 13 Nov 2021 21:49Is there a file that I can delete that wipes everything and then cause MuWire to redo the hashes?
For the plugin, you need to delete the contents of these two directories while MuWire is stopped:

Code: Select all

$HOME/.i2p/plugins/MuWire/files
$HOME/.i2p/plugins/MuWire/directories
When you restart the MuWire plugin its library will be empty and you will need to share the files you wish to share again.

This should really be in a separate thread, so if you need any further help please start a thread.
GPG: https://keybase.io/zlatinb
blog: http://zab.i2p
mail: zab@mail.i2p
MuWire: https://muwire.com
Post Reply