Talking about CLI features, I really miss a feature in CLI to create http web server on localhost:port that will enable browsing safenetwork from http protocol. This is very required feature to enable every possible software to download static content from safenet without need for heavy code refactoring. For example huge % of mobile apps are just a webview bundled to an app. Let say I want to store my videos and images on safenetwork. How will I load them on webview? Well there is no way. Webview reads only old internet. So I have to create a custom webserver in my app on localhost serving safenet videos and images. And instead of safe://file.path I will use http://localhost/safe/file.path. Now imagine there are millions of libraries, already done software that is compatible with http url format. Ok I understand safebrowser does not load old internet, but if I have app, I can do anything with users data. So there is no security reason to deny mixed content from both networks. Creating such web server is not hard, so there will be many custom implementations soon. Since common people are lazy, many will want to use simplest solution and will use such proxy servers for pretty everything where it is applicable. So I suggest to create a command in CLI that will create such webserver on localhost for everyone who needs it. This way every developer can use all possible libraries to read files from safenet. Even if it allows to load only content uploaded by myself in some custom path pattern it will be huge step forward for adoption.
There is though, If we allow that then it could cause many issues, if others do then we cannot stop them, but it could be a slippery slope back to google/facebook ? I hope though we can do much better.
I think you misunderstand what I am talking about. I am IOS and Android developer and I want to use safenetwork for serving images and videos to my apps. I can upload them by using safe libraries, no problem with that part. But I need to display them in my apps. How to do that? All libraries and frameworks support only URL format. It does not matter if I am using webview, native android UI, some 3d game engine or any other engine. All of them work with URL only. I am not able to display images, play music, show videos… How to do that? You want dews to use safenetwork, but 99% of apps is about displaying content. Preloading to disk and serving it from local disk does not work for simple reason, you don’t know what to preload and when. The only solution is local webserver running in the app which serves Safenetwork content for that app in http format. I think your argument with facebook/google does not apply here at all. How will facebook/ google know I have shown any video in my 3d game engine? How will they find out what I am showing users if the url is in format http://localhost/image.path ? There is not any domain name, so no cookies or session data is sent to them. Nobody can sniff on localhost session data. and if you are scarred of them because of image path this is the reason you should have create such webserver, because you can obfuscate localhost paths linking to safenetwork files by allowing user to config such proxy to accepts urls in some obfuscated way.
I think this is the confusion for me. If we had libs that could also handle safe:// etc. then would that satisfy your requirements? That may be better than a redirect, although a redirect as you are talking about may also work in the short term. I was thinking you were fetching from https (remote) instead of locally.
Absolutely yes. I just need to load that content in standard frameworks. I am not sure how are various libraries compatible with non standard protocols but if they are and safe:// on webserver will be awesome solution.
Will not the libraries that support SAFE, eventually be written? Perhaps even by you? That avoids opening up security holes.
I hope when SAFE becomes available, all sorts of libraries will begin to support it without resorting to hacks that rely on it pretending to be the unsafe internet.
Interesting and important to think about. I assume this would indeed be a very popular use case for the SAFE Network.
Perhaps a simpler solution would be using the
WebViewClient? I don’t know much about Android, so not sure if this works with the a