RFC proposal - tunnelling

I want to propose RFC, hopefully, not to write it because I’m too lazy, but the idea is very simple in a few words.

Make a simple tunnelling app on top of the platform like with ssh tunnelling to direct to arbitrary de-facto ports in a server.

I know that SAFE network is dedicated to get rid of servers, however, services running behind a tunnel would be a lot more secure than today’s servers, for the following reasons:

  1. Nobody has a clue what physical machine serves the port
  2. Port would not be even seen in the outside world
  3. Different safe network id’s could be used for different services (don’t have n ports exposed on one id)
  4. (HUUGE) Any standard server side app that was written or will be written could be plugged in into SAFE network seamlessly.

What do you think?

I actually recommended this idea in decentralized mmo thread. It will change gaming forever. No more ddosing. No more harassing. No more swatting.

There is nothing wrong with servers when it comes to gaming. It is specialized in those areas, and reduce the lag by greatly. I would like to see a competing gaming servers that does not provide IP address but rather, XOR address.

However, the downfall is that it encourages people to build a client - server type. That goes against SAFE philosophy.

Edited: on the topic of tunneling, I2P has the best tunneling system hands down. Much faster than tor, and scalable.

1 Like

It’s like using Bitmessage for data transport…
I think the economics of the network is already complicated and I wouldn’t want to see more data being shipped around for free.
From a tech perspective it might make sense for some slow running apps and I was thinking about this as well. If it makes sense then it’ll be done by somebody and there’s not much we can do except to dislike such use of the network :slight_smile:

I don’t know about the downfall of SAFE philosophy, is it me that I just can’t think of any other reasonable way of interacting than servers? I cannot think how things, like MMO server that you mentioned could work without a server. Even in real life when you go to a hospital you checkin with someone who serves you, same in restaurant, bank and anything else. I think that there’s some stuff that simply needs servers but I’m willing to be convinced otherwise by anyone.

Well, gets for any file would be free. And probably bazillions will be downloaded. I for one can’t see real difference between downloading/uploading files and serving requests. Requests I’d guess would be less than 0.00001 percent of network traffic, but just a guess.

From a dev perspective it would open a lot more opportunities.

I don’t think that’s a RFC, I think it’s just an app idea :slight_smile:

You should post it on the Most Wanted App thread instead!

1 Like

Decentralized computing/smart contracts (i.e. “close groups”) could run the server-side game code. Consensus takes time though, so for real-time MMO’s this may not be practical.

Edit: As for the OP idea, why not simply use SAFE messaging? Create a public ID for your server and let it actively listen to incoming messages.

1 Like

This sounds like a use for messaging. Messaging provides point to point comms/messaging of small amounts of data and could be adapted to something like mimicking a ssh “tunnel”. Low volume terminal style comms

  • Each message is limited, so approx one line of data per message. I am unsure on the total amount a message will hold, maybe a few K
  • server could guarantee that the other end is such-n-such since server only accepts messages from certain IDs. Or if you wish any ID
  • comms is fully encrypted and has the safenetwork security - noone else knows source/dest

Only draw back is the lag that may occur, but for terminal type i/o this hopefully is not an issue.

Files can be transferred by sending datamaps rather than the actual file broken up in messages.

the server would need safe client installed

So if I understand you correctly then this is more of a use case for messaging than a SAFE development suggestion. Really an APP could do this for you. The server runs the “server” APP and the users run the “users” APP.

1 Like

Well, yeah, I hardly imagine few servers calculating coordinates for MMO player in real time. It would be a lot simplier just to have one server handle that. I’m not even talking about FPS games, you think we could reach pings lower than 50 without using a server? I wonder how would that work.

Well, that is the 4th benefit I’ve mentioned. At this point in time almost no one has a clue what safenetwork is. If I wrote restful service for SAFE network using playframework (which I love for web development) then I’d need bindings, official/unofficial etc. This limits the toolkits you can use as a web dev for safe network. However, if there was this small feature that could simply tunnel to ports I and every developer out there can use bazillions of existing and their favorited toolkits. That lowers the barrier of entry for a dev into SAFE network drastically.

Yeah, I’m not suggesting to change SAFE core, I’d expect you could build this on top of the platform. But, as DNS service, which I assume is also built on top of the platform, not as a part of the platform, it is officially supported and on maidsafe github. I’d think it would be good to officially support such a generic service also.

The DNS service is indeed built into the core of the network (for the time being - see my Petname System pull request). The only thing “on top” of the network that MaidSafe (the company) has planned to build so far is “LiteStuff” -the dropbox replacement. Everything else that is in their repo is for the core of the network itself[1].

[1] Except for QA - that is their internal droplet setup repo for testing the network on the servers that they are renting while they build it.

1 Like

What do you mean by “built into the core of the network” ? Because when I say it is not part of the core I mean that it uses safe_core as it’s dependency and safe_core package has no idea that dns service runs on top of that. I’ve looked at code https://github.com/maidsafe/safe_dns/blob/master/src/dns_operations/mod.rs and indeed it only uses ::safe_core::client::Client to perform everything (correct me if I’m wrong). So, by this definition, it’s not part of the core implementation, it uses safe_core operations to perform its tasks.

Also, safe_ffi package exposes safe_dns functions, but by that definition it doesn’t make them part of the core either. Also, by that definition safe_ffi could expose tunnelling but it still wouldn’t make tunnelling part of the core.

Maybe I misunderstood, define what you mean by “built into the core of the network”.

1 Like

safe_launcher uses it. MPID messaging most likely will as well. These are both “core” applications to my point of view.

I’m not sure about that, when PC wants to communicate with another PC it just needs an ip address, that is obtained through dns. We don’t send packets to a domain name. I’m 90% sure the same would be with safenetwork, dns just obtains safe network id and sends packets there. I cannot think of reason why it wouldn’t be so.

And I think that this feature is generic enough to be included in the core by your definition. Because if we have email equivalent/dns we might as well have tunnelling - all of these are very generic and applicable applications. Other option is people will start reinventing their own wheels when it could just work seamlessly with existing applications without any modification and could be part of a solid foundation.

Your client ID is different every time you log on to SAFE, so the public names are used. Messaging sends a message to the close group surrounding the public ID, and any client from the network who can prove he has ownership of the public ID can retreive the message from that close group. This way off-line messaging is possible as well.

Oh, ok. Thanks for explaining that. I still need to learn a lot how this works.