Giter Club home page Giter Club logo

nodejs-httpp's Introduction

nodejs-httpp - Run HTTP over UDP based transport and Bring Web in Peer or P2P styles

test-linux test-macOS build-windows

  • main js modules: udt.js, httpp.js, udts.js and httpps.js, that's compatible to net.js,http.js,tls.js and https.js

  • HTTP over UDP Wiki page

Features

  • Node.js v12.x API compatible
  • Support UDT(UDP-based transport) protocol
  • Run HTTP and HTTPS over UDT over UDP, taking UDP high performance
  • Support high-performance multi-process/multi-thread UDP server by utilizing multi-cores' CPU
  • Configurable Congestion Control
  • Per-Socket network performance monitor
  • Extend client/server web service to peer-to-peert style transparently
  • Easy to use API, reuse existing http/web and node.js technology
  • Support Windows/Linux/OSx, RaspberryPi, Android

TODO

  • Add more test cases
  • Improve documents
  • RFC protocol draft

third-party source

Support us

  • Welcome contributing on document, codes, tests and issues

To checkout the sourcecode:

git clone --recursive https://github.com/InstantWebP2P/nodejs-httpp.git

Build on Linux with Docker

building:

./appbld

packaging and start Node.js REPL:

./appkg

To build on other platforms

Unix/MacOs:

./configure
make
make install

Windows:

vcbuild.bat

Resources for Newcomers

Node.js

Node.js is an open-source, cross-platform, JavaScript runtime environment. It executes JavaScript code outside of a browser. For more information on using Node.js, see the Node.js Website.

The Node.js project uses an open governance model. The OpenJS Foundation provides support for the project.

This project is bound by a Code of Conduct.

Table of Contents

Support

Looking for help? Check out the instructions for getting support.

Release Types

  • Current: Under active development. Code for the Current release is in the branch for its major version number (for example, v10.x). Node.js releases a new major version every 6 months, allowing for breaking changes. This happens in April and October every year. Releases appearing each October have a support life of 8 months. Releases appearing each April convert to LTS (see below) each October.
  • LTS: Releases that receive Long-term Support, with a focus on stability and security. Every even-numbered major version will become an LTS release. LTS releases receive 12 months of Active LTS support and a further 18 months of Maintenance. LTS release lines have alphabetically-ordered codenames, beginning with v4 Argon. There are no breaking changes or feature additions, except in some special circumstances.
  • Nightly: Code from the Current branch built every 24-hours when there are changes. Use with caution.

Current and LTS releases follow Semantic Versioning. A member of the Release Team signs each Current and LTS release. For more information, see the Release README.

Download

Binaries, installers, and source tarballs are available at https://nodejs.org/en/download/.

Current and LTS Releases

https://nodejs.org/download/release/

The latest directory is an alias for the latest Current release. The latest-codename directory is an alias for the latest release from an LTS line. For example, the latest-carbon directory contains the latest Carbon (Node.js 8) release.

Nightly Releases

https://nodejs.org/download/nightly/

Each directory name and filename contains a date (in UTC) and the commit SHA at the HEAD of the release.

API Documentation

Documentation for the latest Current release is at https://nodejs.org/api/. Version-specific documentation is available in each release directory in the docs subdirectory. Version-specific documentation is also at https://nodejs.org/download/docs/.

Verifying Binaries

Download directories contain a SHASUMS256.txt file with SHA checksums for the files.

To download SHASUMS256.txt using curl:

$ curl -O https://nodejs.org/dist/vx.y.z/SHASUMS256.txt

To check that a downloaded file matches the checksum, run it through sha256sum with a command such as:

$ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c -

For Current and LTS, the GPG detached signature of SHASUMS256.txt is in SHASUMS256.txt.sig. You can use it with gpg to verify the integrity of SHASUM256.txt. You will first need to import the GPG keys of individuals authorized to create releases. To import the keys:

$ gpg --keyserver hkps://keys.openpgp.org --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D

See the bottom of this README for a full script to import active release keys.

Next, download the SHASUMS256.txt.sig for the release:

$ curl -O https://nodejs.org/dist/vx.y.z/SHASUMS256.txt.sig

Then use gpg --verify SHASUMS256.txt.sig SHASUMS256.txt to verify the file's signature.

Building Node.js

See BUILDING.md for instructions on how to build Node.js from source and a list of supported platforms.

Security

For information on reporting security vulnerabilities in Node.js, see SECURITY.md.

Contributing to Node.js

Current Project Team Members

For information about the governance of the Node.js project, see GOVERNANCE.md.

TSC (Technical Steering Committee)

TSC Emeriti

Collaborators

Collaborator Emeriti

Collaborators follow the Collaborator Guide in maintaining the Node.js project.

Triagers

Release Keys

Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):

To import the full set of trusted release keys:

gpg --keyserver hkps://keys.openpgp.org --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C
gpg --keyserver hkps://keys.openpgp.org --recv-keys 141F07595B7B3FFE74309A937405533BE57C7D57
gpg --keyserver hkps://keys.openpgp.org --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5
gpg --keyserver hkps://keys.openpgp.org --recv-keys 74F12602B6F1C4E913FAA37AD3A89613643B6201
gpg --keyserver hkps://keys.openpgp.org --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
gpg --keyserver hkps://keys.openpgp.org --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
gpg --keyserver hkps://keys.openpgp.org --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
gpg --keyserver hkps://keys.openpgp.org --recv-keys C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C
gpg --keyserver hkps://keys.openpgp.org --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D
gpg --keyserver hkps://keys.openpgp.org --recv-keys A48C2BEE680E841632CD4E44F07496B3EB3C1762
gpg --keyserver hkps://keys.openpgp.org --recv-keys 108F52B48DB57BB0CC439B2997B01419BD92F80A
gpg --keyserver hkps://keys.openpgp.org --recv-keys B9E2F5981AA6E0CD28160D9FF13993A75599653C

See the section above on Verifying Binaries for how to use these keys to verify a downloaded file.

Other keys used to sign some previous releases:

nodejs-httpp's People

Contributors

addaleax avatar apapirovski avatar bnoordhuis avatar bridgear avatar cjihrig avatar danbev avatar evanlucas avatar fishrock123 avatar indutny avatar isaacs avatar jasnell avatar joyeecheung avatar koichik avatar mhdawson avatar mscdex avatar mylesborins avatar piscisaureus avatar refack avatar richardlau avatar rvagg avatar ry avatar sam-github avatar shigeki avatar targos avatar tjfontaine avatar tniessen avatar tootallnate avatar trevnorris avatar trott avatar vsemozhetbyt 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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

nodejs-httpp's Issues

Port to Android

official node.js v0.10/v0.11 has supported Android with path below
nodejs#5514

Ongoing merge android path with node-httpp

Is this being maintained?

Hello,

My company desires to use QUIC and this is one of the few projects I can find that makes it available. However, it's built against a version of node that's too old for us to use.

Is this ever going to be rebuilt against a modern version of node? Otherwise, are there any other projects you know about that would allow me to easily use QUIC with node.js?

Thanks for everything you've done,

Aaron

Wiki example not working on Mac

The first wiki example echo_srv.js is not running on Mac. I get the following error when I give the following command on Terminal:

node echo_srv.js

events.js:71
throw arguments[1]; // Unhandled 'error' event
^
Error: listen ENOTSOCK
at errnoException (udt.js:826:11)
at Server._listen2 (udt.js:1076:19)
at listen (udt.js:1120:10)
at Server.listen (udt.js:1169:5)
at Object. (/Users/Admin/Documents/node_workspace/server.js:6:6)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)

Migrate to node.js v18.x

Is your feature request related to a problem? Please describe.
Not yet. just migrate node-httpp to Node.js v18.x LTS

Describe the solution you'd like
Align to Node.js v18.x

Describe alternatives you've considered
NO

Migrate to node.js v20.x

Is your feature request related to a problem? Please describe.
upgrade nodejs-httpp to v20.x

Describe the solution you'd like
make nodejs-httpp as v20.x module

Describe alternatives you've considered
make nodejs-httpp builtin with v20.x nodejs

meet 5G App

5G low latency/high bandwidth feature will change networking application EOS.

Use case for udt reversal proxy

Hi Tom,

I checked out several projects you built arround httpp-node.

I would like to implement the following scenario, could you help me to tell me if it is feasible with httpp-node.

I am trying to move the http traffic from TCP to UDP/UDT.

Multiple client --> (connect to local proxy, say 127.0.0.1) --> UDP traffic --> Proxy Server -->TCP traffic --> Web server.

Therefore the client will browse on 127.0.0.1 for specific website.

If it is feasible, could you tell me what are the correct modules I should use?

Thank you very much.

Regards,

Bo

Tom said:

it's straightforward.

there are two pattern to forward http/tcp traffic over httpp/udp. you case is case 2.

case 1:

browser -> local proxy server -> httpp/udp -> httpp enabled web server / service

case 2:

browser -> local proxy server -> httpp/udp -> httpp enabled web server reverse proxy -> original http/tcp web server

for local proxy server on browser side, use module : https://github.com/InstantWebP2P/httpp-forward

for httpp enabled web server on server side, use module: https://github.com/InstantWebP2P/connect-httpp

in case 2: you can use httpp-proxy to implement httpp/udp to http/tcp reverse proxy service: https://github.com/InstantWebP2P/node-httpp-proxy

And, please create issue on github is better : https://github.com/InstantWebP2P/node-httpp

Best regards

Unable to build on windows

I am using VS2010 build tools, node version:v6.9.1 , after running the vcbuild command I get the following error:

Creating library C:\Users\bhowmiks\Experiments\node-httpp\Release\node.lib and object C:\Users\bhowmiks\Experiments\node-httpp\Release\node.exp
Generating code
Finished generating code
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:\Users\bhowmiks\Experiments\node-httpp\node.vcxproj]

connect not emitting error event if host and port are wrong or not reachable

Hi,

In connect method, if I give wrong host or port, as per doc error event should be emitted but not happening. The client process gets hanged.

Here is my code:

/**

  • New node file
    */
    var udt = require("udts");
    var serialize = require('node-serialize');

if (process.argv.length < 4) {
console.log("Usage: node client_udt_secure host-or-ip port\n ");
process.exit(-1);
}
var host = process.argv[2];
var port = parseInt(process.argv[3],10);

var cln = udt.connect({host:host, port:port}, function(){
console.log('UDPs file client connected to '+host+':'+port);
var data = { action: 'VERIFY', msg:"Hello from client"};
cln.write(serialize.serialize(data));

});

cln.on('data', function(data){
commRes = serialize.unserialize(data);
console.log(commRes.toString());
});

cln.on('error', function(err){
console.log(err);
});

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.