Git Product home page Git Product logo

zeronet-js's Introduction

ZeroNet JS

Waffle.io board Build Status Build status codecov Snap Status

Logo

A JS version of ZeroNet, using libp2p.

About

This project was mainly created to see how the zeronet protocol can be improved and to provide better programmaticall usage of zeronet.

But it will also be compatible with zeronet-py (and will have an uiserver).

CLI Usage

TODO...


Todos/Notes have been moved to the Roadmap

Running

Just run npm start and it should:

  • Launch a server on 0.0.0.0:15543
  • Launch a uiserver on 127.0.0.1:15544
  • Make itself visible in the mdns

This module uses pull-streams

We expose a streaming interface based on pull-streams, rather then on the Node.js core streams implementation (aka Node.js streams). pull-streams offers us a better mechanism for error handling and flow control guarantees.

You can learn more about pull-streams at:

Converting pull-streams to Node.js Streams

If you are a Node.js streams user, you can convert a pull-stream to a Node.js stream using the module pull-stream-to-stream, giving you an instance of a Node.js stream that is linked to the pull-stream. For example:

const pullToStream = require('pull-stream-to-stream')

const nodeStreamInstance = pullToStream(pullStreamInstance)
// nodeStreamInstance is an instance of a Node.js Stream

To learn more about this utility, visit https://pull-stream.github.io/#pull-stream-to-stream.


ZeroNetJS is developed independently from ZeroNet

Docs are autogenerated by a script

zeronet-js's People

Contributors

danimesq avatar kustomzone avatar mkg20001 avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zeronet-js's Issues

[Feature - Proxies] .txt login

After user receives his privatekey, a download button will appear. Also user will can login by simply uploading this file.

Pex command issues

OS: Linux

Bundle: Git

Steps to Reproduce:

  1. Forward the fileserver port
  2. Let your node running and add some zites via ui
  3. Wait for pex requests to come in

Affected Component(s): protocol

Expected Results:

Pex should display peers in ip:port arrays

Actual Results:

Peers get display as [ 'NaN.NaN.NaN.NaN:NaN' ]

Other information:

  zeronet:protocol:client got   request => /ip4/175.101.88.223/tcp/55103 pex need=5, peers=["%\u0017��Q<","3\u000f3Q<"], site="12FLtEHXP6R3GRipPxSjusRH2S2aT2cbaM", peers_onion=["G������\u0006E>Q<"] +130ms
Got peers [ 'NaN.NaN.NaN.NaN:NaN', 'NaN.NaN.NaN.NaN:NaN' ]

Possibly encoding issue

Branch target/loading-zites

2 site privatekey saving models

  • In content.json
  • Can copy the hidden privatekey to save in a password manager
  • Also, when marking a site as "own", prompt the options to save the key

Windows testing

hi, bot@zeroid here. good work dude! tried your exe on win10 & win7 but it links to missing folders. (crash)

also has issue with bunyan... "On Windows bunyan isn't recognized in the console as a program but as a command. So to invoke it the use of cmd was needed. I also had to install bunyan globally so that the console could access it." ...so disabled the logging and it works. (example below)

if (!/^win/.test(process.platform)) { // linux
    var sp = spawn('bunyan', ['-o', 'short'], {
        stdio: [null, process.stdout, process.stderr]
    });
} else { // windows
    var sp = spawn('cmd', ['/s', '/c', 'bunyan', '-o', 'short'], {
        stdio: [null, process.stdout, process.stderr]
    });
}

done small update... "disable bunyan logging for windoze, skip favicon.ico, Zite & addZite = newZite, random nonce." ...but won't PR until working better etc.

https://github.com/kustomzone/zeronet-js

Msgpack encoding issues

OS: Linux

Bundle: Git

Steps to Reproduce:

  1. Start the node
  2. Wait for requests with binary strings
  3. Look at the data

Affected Component(s): protocl

Expected Results:

The strings are valid decoded utf8 strings

Actual Results:

The strings contain EF BF BD which means they were decoded with the wrong encoding (or vice-versa)

Other information:
It's happening with msgpack and msgpack5

Faster page load times

At the moment at every click: Load wrapper -> Wrapper creates iframe and loads page html -> Init websocket connection -> Load page details using websocket api

It could be much faster by sharing the wrapper and the websocket connection between and only change the inner frame html.

Need a wrapper api command that allows change the url of the page.

Crypto

Support for working cryptography (Blocked by #1 and related bugs)

Tracker client shouldn't announce on startup

OS: Linux

Bundle: Git

Steps to Reproduce:

  1. Start the node
  2. Add many zites
  3. Restart

Affected Component(s): zite, common

Expected Results:

The tracker client only announces on discovery or through the announce loop

Actual Results:

The tracker client announces on creation which causes a client overload if the client has more than 20 zites

Other information:

Streams are broken

Currently sometimes when the stream is reattached data is transmitted unreliably.

[API request] Donate to seeders

When a custom blockchain comes to ZeroNet, will be nice a system where a site owner automatically donates tokens to users that are seeding. Also other seeders can donate to other seeders.

New 0 button options

We can have a option in the drawer 0 menu to can use a keyboard shortcut in PC.
Also, in mobile isn't needed the button, the user can just swipe from the right side.

New libp2p peer-id is slowing down startup

Steps to Reproduce:

  1. Run zeronet.js

Affected Component(s): swarm / cli

Actual Results:
The node takes 10s to generate a peer-id

Expected Results:
The node should start in 2000ms or less

Lazy sql updates

Currently the sqlite database is updated as the new file is written to the hdd.

Maybe it would be better to read the files when its required by the sql query:

  • data/user/data.json updated
  • The storage layer marks the data/user/data.json as updated
  • File written to disk, no sql connection made

When user tries to list the topics:

  • Storage layer loads the files to sql that marked as updated
  • Reset the files updated status
  • Run the query on updated database

Pros:

  • Lot faster data process by batching updates using BEGIN / COMMIT
  • Less CPU usage If you only "seed" the site
  • If the file updated more than once then only have to load 1 times

Cons:

  • Displaying the data could be slower if you have many pending updated files because it has to parse the updated files before display any result
  • Has to store somewhere the pending database updates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.