Introducing build-off project: Nano RPC Proxy - A fully customizable and secure backend for any remote node RPC communication including free public API for everyone

NanoRPCProxy is a relay and protection system that sits between a client and a Nano node RPC interface. It makes it possible to set the RPC interface public to the Internet without compromising the security of the node itself. The Nano node has no built-in functionality for user authentication, rate-limiting or caching which makes it dangerous to open up without protection as this proxy provides. With NanoRPCProxy you can, for example, serve a mobile app or web frontend with indirect node calls.

In reality, it can be used for Nano wallets, exchanges, block explorers, public APIs, monitor systems, Point of Sale or anything that communicates with a node.

Part 2 with the introduction of a public websocket service can be found here:https://www.reddit.com/r/nanocurrency/comments/gq52fz/nanorpcproxy_part2_now_with_a_secure_websocket/

​

Possible use cases

The built-in token system makes it possible to serve premium requests beyond the default limits and monetize your backend via direct Nano token purchases.

Demo clients/code for Curl, JS, REACT, Python and Flask are available to test your own server.

I know a lot have asked for it so here it is: A free public API including token purchases for the live Nano network:https://api.nanos.cc/

​

https://preview.redd.it/9kjn5c8xbhz41.png?width=972&format=png&auto=webp&s=8974676d012a913f95329ac72ad9efc1295e3a88

Please note that while this project provides a fully working public API for anyone to use, that is not the aim of the project itself. The real aim is to provide a secure node communication platform for ANY developer or service provider to utilize independent of the purpose. That includes running your own public API with or without a competing token price or settings for rate limitations. I haven't decided yet for how long my public API will run but before I shut it down it will be hosted by at least one "well-known entity" in our community.

Features

  • Fully customizable via a settings file
  • Supports any RPC command for any remote client, like wallets, exchanges, apps, games, bots or public API
  • Caching of certain request actions to lower the RPC burden
  • Limits the number of response objects, like the number of pending transactions
  • Slows down IPs that doing requests above the limit (Overridden by purchased tokens)
  • Rate limiting for max allowed requests per time window (Overridden by purchased tokens)
  • Extra DDOS protection layer (defaults to max 2 requests/sec, also for purchased tokens)
  • IP blacklist (also for purchased tokens)
  • Supports basic authentication (username / password)
  • Supports multiple users via authentication
  • User-specific settings override
  • Optional token system for requests with built-in Nano purchases => independent of any 3rd party payment processors => unlimited implementation possibilities
  • Supports POST requests like the RPC, ie. payload = {"action":"block_count"}
  • Supports GET requests, ie. URL query = /proxy/?action=block_count
  • Listens on http and/or https with your own SSL cert (or use another proxy like Cloudflare to serve https)
  • Works with both beta and main Nano network
  • Demo clients/code
  • 100% free to use, develop or sell with open-source MIT license

​

https://preview.redd.it/b1krd6tzbhz41.png?width=3756&format=png&auto=webp&s=c0ac2d169d33abbe12f9f52dd82dad92f0c07591

Demo videos

Source Code

https://github.com/joohansson/nanorpcproxy

And as usual, if you find anything suspicious please let me know below.

Posted May 18, 2020, 8:14 AM UTC · edited

19931
DotcomL:n1: Guilherme Lawless | Dev | DPoW•

This is one of those projects which will be universally useful to the whole ecossystem. I hope other developers can contribute to the codebase as well.

Thanks for your hard work!

50
nanoissuperiorthenanobot.com•

This is dope, good job!

27
ThatBriandude•

An API! Yes!

23
Tipanano•

This is huge and a fantastic resource for everyone that wants to integrate Nano!

22
frakilkNano Charts :n1: Nano Donate•

Amazing! I think you may have surpassed yourself this time u/Joohansson. Good luck in the competition!

22
[deleted]•

Wow! Another great development!

19
t_j_l_•

Wow great job! I have to say, one part of this is very closely related to my project, which I'm planning to submit this week.

19
JoohanssonOP:n3:Community Manager•

Sounds exciting, looking forward to seeing it!

14
throwawayxooox•

Which part?

5
t_j_l_•

The second part

8
renesqnanex.cc / nanoo.tools•

I also made such an API a while back for the other contest

1
realMikeRow•

u/Joohansson Good job, btw isnt' auth coming with with RPC 2.0?

14
JoohanssonOP:n3:Community Manager•

Thanks! Probably is but we don't know when. Either way, I think one should try to avoid direct contact with the node from the outside world as much as possible for security reasons.

10
realMikeRow•

Ok, maybe I'll release a NanoRPCProxy.php class for interfacing with it. Cya in the code =)

8
TutawezaCommunity Developer•

Great work! I was actually searching for an API like this the other day — somewhere to test things out before running a node.

This simplifies NANO integration for developers and could very well drive the next wave of innovation in our community.

14
renesqnanex.cc / nanoo.tools•
2
[deleted]•

[removed]

12
SonderDevTetraLoom.com/paint•

This is absolutely fantastic. I can’t wait to see people putting it to use and creating interesting things. You’ve just made nano development easier across the board, and the community will be grateful such problems were figured out for them. Well done Johansson!

10
2D3S3RTMyNano.Ninja•

Great to see another open API project!

I've built the My Nano Ninja RPC API https://mynano.ninja/api/node a while ago which works similar to your project but does not have as many options in the backend.

A Docker image would be cool so you can plug it right beside a Docker node. I can create a PR after the Build-Off.

10
JoohanssonOP:n3:Community Manager•

Yeah agree, sounds good. We can talk about that!

9
BasicCustomer•

Thanks for your work! Amazing !

7
DerPapillus•

Amazing work! Looking at all contributions lately, it's really only obvious what fantastic future lie ahead for Nano as a mechanism of exchanging value as a first step towards adoption (before store of value and unit of account).

7
GeographicalGPolyrun•

Good job! I'll add an Angular client after you publish it for good measure

7
JoohanssonOP:n3:Community Manager•

Sounds lovely!

2
MagicBreath•

Very good!

6
satoshizzle•

Wow so much going on lately, it's hard to keep up!

6
whale_machinehttps://powernode.nanos.cc/•

Awesome, been hoping for something pretty much exactly like this to pop up!

5
Podcastsandpot•

So dope

4
[deleted]•

[removed]

4