GithubHelp home page GithubHelp logo

cylenet's Introduction

cylenet

What...?

cylenet is an experiment, in which I build my own internet-like thing. It (currently) has two primary features:

  • WiNS, AKA Winners Name Service, a DNS-like service that expects hostnames and responds with IP addresses.
  • CTP, AKA Cyle's Transfer Protocol, an HTTP-like service that expects requests for files and responds with the contents of those files.

Both are meant to be top-to-bottom SSL-encrypted.

Why...?

Because why not.

Requirements

  • node.js 7.x or later (at least, that's what I built it with)

How do I use this?

Right now it's all very, very simple. It's currently configured to work on your own computer only (all localhost pretty much). And these instructions are written assuming you're on a Mac.

First of all, clone this repository somewhere on your computer.

Open three Terminal windows. Using one of them, you need to make some self-signed SSL certificates:

  1. cd into the cylenet folder you cloned.
  2. Run openssl genrsa -out cylenet.key.pem 2048
  3. Next, run openssl req -new -key cylenet.key.pem -out cylenet.csr.pem
  4. Next, run openssl x509 -req -in cylenet.csr.pem -signkey cylenet.key.pem -out cylenet.crt.pem

Yes, you just made a self-signed certificate, which isn't great for "verified" authorized encrypted traffic, but for now it'll have to do until I come with a cylenet SSL alternative.

Now that you have your cert set up, here's what you do with the project to test this out and see it work:

  1. in one Terminal window, go to the WiNS-SSL folder, and run node server.js
  2. in another Terminal window, go to the CTP-SSL folder, and run node server.js
  3. in the final Terminal window, go to the CTP-SSL folder, and run node client.js "cyle.lol"

That final step does the following...

  1. uses my WiNS-SSL module to translate the desired server hostname "cyle.lol" to the IP "127.0.0.1"
  2. sends the request req cyle.lol/ to the CTP server at that IP.
  3. renders out the response, which should be a simple text file, in Markdown format, from the "ctproot" folder.

The Browser

There are two CyleNet GUI browsers included here, but they're still in development. There's one browser-old which is node-webkit based. There's a newer one that actually works and it's Electron based.

To use the new one, make sure you're running your WiNS and CTP services locally. It mainly only works in local mode right now.

  1. Go to the browser-electron folder in this repo.
  2. Run npm install to install local dependencies.
  3. Run npm start to open the browser.

It's very simple right now... there's a window to manage which WiNS servers you're using, but only the first one in the list is currently used. You can navigate anywhere you'd like using the address bar. If the response is in Markdown, it'll be rendered as markdown in the main browser window. If there's an error of some kind, it'll be shown.

Technical crap

  • WiNS-SSL runs on port 21335 by default
  • CTP-SSL runs on port 21337 by default
  • all of this is still TCP-based... not sure how I feel about that part yet, if I want to dive deeper
  • "real" TLS certificates still rely on old ideas, kind of, which I don't want, so I may accept the reality of self-signed certs
  • WiNS and CTP are standard specifications much like DNS and HTTP, and I've started documenting them in the docs folder.
  • ctproot is the folder the CTP server uses as a base for requests. A "lol" file is the default "index" file equivalent.

To-do list

  • Loading/progress indicator in browser UI.
  • Update browser to support multiple WiNS servers; add UI to show attempts and which one ended up working.
  • Add to demo WiNS client support for following "try" responses.
  • Update browser to use "try" WiNS responses.
  • Add in some kind of memcache-based rate limiting to CTP and WiNS ?
  • Make the GUI browser run a WiNS and CTP server, or make it a separate bundle.
  • Add some kind of wildcard functionality to WiNS records? as in * try 192.168.1.1 as a fallback at the end of a file?
  • Add some kind of client-side caching of WiNS records? if so, add a TTL to the server and client...?
  • Need to compress CTP traffic with gzip or something.
  • Update WiNS-SSL to use the text file format described in the spec
  • Update WiNS-SSL to send back try responses
  • Update the GUI browser, add some kind of way to manage what WiNS servers you trust

cylenet's People

Watchers

 avatar  avatar

Forkers

therealelyayo

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.