Replies: 6 comments 4 replies
-
This has come up a few times in the past, and it comes down to defining an "URI" scheme. That in itself is not difficult, and the reason I haven't done it is because of all the plumbing required to get it working with browsers:
I used to work at LimeWire and remember that part of the code being particularly complex. But then again other Java applications do it - namely BiglyBT - so it's probably worth looking into how they've done it. As to the points 1-3, 2 and 3 can be solved by the "Collections" feature. The Collection metainfo is already kept in a descriptor file, so providing hash to that should be easy enough. It just needs to be distinguished from a single file, i.e. we would either need two separate schemes or use a part of the scheme to specify whether the URI is for a single file or for a collection. |
Beta Was this translation helpful? Give feedback.
-
For problem number 2 I would propose: On start, get the current application directory and attempt to open an "instance.lock" file from the location for writing but still allow reading, just like with a log file. If successful, then we are the only instance running. Write the current PID to that file. Working with a process ID has the advantage of being compatible with both standalone binaries(muwire.exe) and java-launched packages(java.exe muwire.jar). This should also work cross-platform. |
Beta Was this translation helpful? Give feedback.
-
I think I'll have a stab at this for the next release, mainly because I'm tired of having to search for hashes people paste in chat :) Such link would look like:
The I will not address the plumbing issues listed in the post above right away, the user will need to paste the link in MuWire manually. |
Beta Was this translation helpful? Give feedback.
-
Which params are mandatory and which are optional? Mandatory ones are better put into the base part of the URI. If you can search now by copy/paste of hashes from chat, then that tells me all of the params are optional. An unforgeable link is also an optional feature? Hashes are by definition unforgeable so why need a sig? magnet links are b32 to provide case-insensitivity which is a good thing for URIs, at least the base part if you are signing, need a spec on how to canonicalize the signed data |
Beta Was this translation helpful? Give feedback.
-
not sure if realistic for a human to look past dozens of b32/b64 chars to validate if something looks right farther to the right. If that is part of the goal, the human-readable part should be leftmost in the URI. While perhaps inconvenient, people are quite familiar with magnet links and searching by hash... perhaps a 2nd URI scheme, e.g. muwire:search:b32hash should also be supported? If inconvenient, why, and what could be done in the software to make it less so? Are there use cases for a search URI? |
Beta Was this translation helpful? Give feedback.
-
I have implemented a preliminary support for links to files in this CI build. There is a new option in the library right-click menu "copy link to clipboard" and if you paste that link in the search box of another MuWire instance it will start the download right away. This is the structure of a link to a file:
The The signature covers the file hash, file name, link type and file size. MuWire will refuse to open any links that do not verify. |
Beta Was this translation helpful? Give feedback.
-
Following the same format as magnet links or .torrent files, it would facilitate sharing if people could point other people to shared content via links or more elaborate data similar to .torrent files, that can then be easily shared across the many media of communication.
I would like to present several proposals:
The simplest proposal of all is perhaps the ability to "linkify" a shared file. This would be as simple as making it possible to create a protocol://b64hash of what is available on MuWire's network that can be clicked in browser and will initiate a search in MuWire.
This proposal builds on 1 but instead of search it is queue for download, and it allows for more than one file, so perhaps a protocol://hash1&hash2&hash3... type of link, except in this case it would really help if you also had the ability to specify what name each file should have since a download is likely to find the same file by hash on multiple sources with different filenames and for the sake of organization, it would help to be able to pre-plan their naming.
This further builds on point 2 and proposes a download plan with an entire folder tree list with filenames and the hashes of each file. This is much closer to how a .torrent works and in order to facilitate launching a download that may contain hundreds/thousands of files, it is better all organized into a small file that can be opened with MuWire to initiate the download. Since this type of collection could be quite large, this should all be placed in its own folder, so perhaps like torrents have names these download plans should also have names, which are used as the default download folder name, but user-changeable just before committing to download.
I believe any level of sophistication between 1 and 3 would be a net benefit to ease of sharing. What do you think?
Beta Was this translation helpful? Give feedback.
All reactions