HelloZeroNet / ZeroNet

ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.io
Other
18.35k stars 2.27k forks source link

Cross site image link does not work (also for merger sites) #1992

Open slrslr opened 5 years ago

slrslr commented 5 years ago

Rev3860, when i add to my ZeroBlog an image linked from external site:

![text](/otherziteaddress/data/users/userid/image.jpg)

then image not show up until (i think) i visit that site at least once ? I hope you can make the zeronet download linked file/site automaticaly when it is linked like that.

It is similar with merger sites i think. For example Millchan discussion board. When i not visit the hub site, the link to the merger site, which points to a content on that hub will show "Not Found" error. I think this is important thing to the TODO list to fix.

HelloZeroNet commented 5 years ago

This is intentional: Otherwise if someone create a page that has 100 files from 100 different sites, then you would end up serving 100 more sites.

slrslr commented 5 years ago

@HelloZeroNet I do not see anything bad on ZN to download 100s of sites, if zeronet is intended to be used by active users, it should be able to host 1000s of sites on regular or low end computer.

If 100s of sites is a problem, then maybe create a limit on amount of requests one page can create or ask confirmation from user to download external site. Showing fake message "Not found" is not good, because content exist, only zeronet is not made to show it. I think cross content linking is good, why to build duplicity.

HelloZeroNet commented 5 years ago

Unfortunately it's not possible to find out which browser window did the request, so it's not possible to show confirmation. To be able to receive site updates you need at least 5 connection per site, which can be problematic with 1000s of sites. The solution to this problem could be adding non-mutable file support. For that files the client would not need to keep open connections, because the would not be updates for the files.

ghost commented 5 years ago

I think we should not let zites automatically download other zites - especially since every zite you download is one you seed (you have to keep in mind illegal content is more likely on ZeroNet and even having this illegal content on your computer may get you in trouble from your ISP, country, or service provider in the case of servers - so we don't want zites to automatically download illegal content without us being aware). It should show a confirmation thing at the very least (which zites can already do I believe by using a ZeroFrame command, not sure though).

slrslr commented 5 years ago

@Krixano you are right, though interlinking images and videos is imporant. Uploading duplicate/already posted images/videos seems waste/stupid in many cases.

Unsure if there can be made the way zeronet download only linked media content / json files, instead of full site. It may be made even the way that such downloaded/partialy-downloaded site will be downloaded only temporarily and then automaticaly deleted and maybe made not to be seeded.

purplesyringa commented 5 years ago

This might actually become a problem - if a malicious site links to hundreds of different zites, all with 10MB images, you have to download several gigabytes.

slrslr commented 5 years ago

@imachug

hundreds of different zites

possibly zeronet can be made to connect maximum let's say 20 external sites per page load. For others admin would have to see the problem and self host the images

you have to download several gigabytes.

I do not think so, because

  1. number of external hot-linked images (jpeg|jpg|png|gif|webp) loaded from single page can(?) be limitted to something like 70
  2. page visit may not take enough time to download that much data and the third party site may(?) be made to stop downloading (& possibly delete with some timeout) once parent site (that linked to a image) was closed
  3. zeronet would download external site special way - only download things like maybe content.json and the requested image/video file (known extensions).
  4. unsure if zeronet can show one prompt per external site triggered and say: "Can this site download 20 image files (123 MB) from external site? OK" else user would have to click the image to load manually (like on ZeroMe).
slrslr commented 5 years ago

"ZeroBlog++" (by @geekless ) has the feature to ask visitor if he want to grant the permission to download external site images, but unfortunately if the external site is bigger than 10MB, i think it may break/stop loading of image/s until visitor go to zerohello and increase the limit. I increased the limit a few times and refreshed blog page to see external images. Zeronet should load images hotlinked from external sites better way. Some "lame" suggestions one post up.