Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/redhog/node-i2p
NodeJS api for communicating over i2p
https://github.com/redhog/node-i2p
i2p node-i2p nodejs
Last synced: 3 months ago
JSON representation
NodeJS api for communicating over i2p
- Host: GitHub
- URL: https://github.com/redhog/node-i2p
- Owner: redhog
- Created: 2015-05-21T08:23:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-29T09:48:34.000Z (almost 7 years ago)
- Last Synced: 2024-04-25T14:02:22.765Z (9 months ago)
- Topics: i2p, node-i2p, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/i2p
- Size: 25.4 KB
- Stars: 43
- Watchers: 6
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-i2p - node-i2p - NodeJS api for communicating over i2p (SAMv3 client). (Libraries / I2Pd)
README
# node-i2p
This module implements the https://nodejs.org/api/net.html API for the https://geti2p.net/en/docs/api/samv3 protocol. That is, it enables talking to an i2p peer node using the same API normally used for talking to other nodes on the open internet.
Client usage:
require("i2p");
conn = i2p.createConnection({DESTINATION:"bmmkyafw6os62qd7g6rhmuewgnbrcaa3eykyrnjyggjgzoo3gb7q.b32.i2p"}, function () {
console.log("Connected using local destination: " + conn.session.DESTINATION);
conn.on("data", function (data) {
console.log("Received: " + data.toString("utf-8"));
});
conn.write("Hello server");
});Server usage:
require("i2p");
var server = i2p.createServer();
server.on('listening', function () {
console.log("Listening using local destination: " + server.session.DESTINATION);
});
server.on('connection', function (client) {
console.log("Client connected from destination: " + client.DESTINATION);client.on('data', function (data) {
console.log("Received: " + data.toString("utf-8"));
});client.write("Hello client\n");
});server.listen({});