All Projects → danoctavian → Bluntly

danoctavian / Bluntly

Licence: mit
serverless, encrypted, NAT-breaking p2p connections - DEPRECATED

Programming Languages

javascript
184084 projects - #8 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Bluntly

Bt
BitTorrent library and client with DHT, magnet links, encryption and more
Stars: ✭ 2,011 (+644.81%)
Mutual labels:  dht, p2p, bittorrent, encryption
Torrent Discovery
Discover BitTorrent and WebTorrent peers
Stars: ✭ 177 (-34.44%)
Mutual labels:  dht, p2p, bittorrent
Lbry Sdk
The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
Stars: ✭ 7,169 (+2555.19%)
Mutual labels:  dht, p2p, bittorrent
Phpspidermagnetbittorrent
php实现p2p中DHT网络爬虫,并提供搜索下载
Stars: ✭ 64 (-76.3%)
Mutual labels:  dht, p2p, bittorrent
Bittorrent Dht
🕸 Simple, robust, BitTorrent DHT implementation
Stars: ✭ 1,004 (+271.85%)
Mutual labels:  dht, p2p, bittorrent
Snail
基于Java、JavaFX开发的下载工具,支持下载协议:BT(BitTorrent、磁力链接、种子文件)、HLS(M3U8)、FTP、HTTP。人家才不要你的⭐⭐呢,哼
Stars: ✭ 102 (-62.22%)
Mutual labels:  dht, p2p, bittorrent
torrent-spider
基于DHT的p2p网络资源爬虫
Stars: ✭ 65 (-75.93%)
Mutual labels:  bittorrent, p2p, dht
Zx Bt
一个基于BitTorrent协议的DHT磁力嗅探器,并基于Elasticsearch存储/检索Torrent的Metadata信息
Stars: ✭ 244 (-9.63%)
Mutual labels:  dht, bittorrent
Phpdhtspider
php实现的dht爬虫
Stars: ✭ 248 (-8.15%)
Mutual labels:  dht, p2p
tinyBT
Implementation of the Bittorrent and Mainline DHT protocol for Distributed Computing applications
Stars: ✭ 30 (-88.89%)
Mutual labels:  bittorrent, dht
swarm-peer-server
🖧 A network swarm for creating secure P2P connections over BitTorrent DHT, DNS, and mDNS.
Stars: ✭ 41 (-84.81%)
Mutual labels:  bittorrent, p2p
bthello
Python3 DHT 磁力种子爬虫 种子解析 种子搜索 演示地址
Stars: ✭ 43 (-84.07%)
Mutual labels:  bittorrent, dht
Instant.io
🚀 Streaming file transfer over WebTorrent (torrents on the web)
Stars: ✭ 2,954 (+994.07%)
Mutual labels:  p2p, bittorrent
Magnetico
Autonomous (self-hosted) BitTorrent DHT search engine suite.
Stars: ✭ 2,626 (+872.59%)
Mutual labels:  dht, bittorrent
Dht
dht is used by anacrolix/torrent, and is intended for use as a library in other projects both torrent related and otherwise
Stars: ✭ 184 (-31.85%)
Mutual labels:  dht, bittorrent
dhtrobot
A kademila DHT implement in go
Stars: ✭ 40 (-85.19%)
Mutual labels:  bittorrent, dht
MlDHT
MLDHT is an elixir package that provides a mainline DHT implementation according to BEP 05.
Stars: ✭ 88 (-67.41%)
Mutual labels:  bittorrent, dht
jackpair
p2p speech encrypting device with analog audio interface suitable for GSM phones
Stars: ✭ 26 (-90.37%)
Mutual labels:  encryption, p2p
ipvpn
[WIP] Easy-to-use decentralized secure overlay private network (for any device)
Stars: ✭ 24 (-91.11%)
Mutual labels:  p2p, dht
secure-webrtc-swarm
💢 Create a swarm of p2p connections with invited peers using WebRTC.
Stars: ✭ 23 (-91.48%)
Mutual labels:  encryption, p2p

bluntly - DEPRECATED

  • The prototype is no longer functioning and we strongly recommend you use something like this https://github.com/orbitdb/orbit which achieves the same goal but much better.

talk to whoever, wherever safely.

Bluntly allows you to setup a secure connection to a peer by only knowing its public key (and it knowing yours).

No servers needed, no NAT getting in the way. It's a POC (proof-of-concept) so don't start talking with snowden with this.

alt text

Important note

Bluntly is currently undergoing a rewrite from javascript to Golang. the old javascript code is in node-bluntly. the rest of the code is work in progress.

Reasons for rewriting: the first version was an unstable POC, meant to showcase what's possible and explore the problem space.

Why Golang? Has all necessary libraries (dht, crypto, except for a good implementation of UTP), has reliable cryptography libraries, has good networking libraries and chans/green threads, is a simple programming language that allows individuals with no experience in Golang to verify the app for correctness and security.

How?

  • exchange pub keys with your partner (i don't know how, figure it out)

  • client looks up listener in bittorrent DHT by his pubkey (Lpk) using info_hash = sha1(Lpk)

  • once you it has its IP, connect (if there's a NAT in the way, just penetrate it. see how below)

  • client sends encrypted handshake (with RSA pub key) to listener containing your curve25519 pub key

  • listener responds with its curve25519 pub key in a handshake response encrypted with your RSA pubkey

  • both do Diffie hellman and derive shared secret. encrypt all messages from here on using that.

RUN IT

Install dependencies.

Get code dependencies:

cd node-bluntly
npm install 

for a quick run, use the RSA key pair checked in the repo for both parties. Get 2 machines and do

Go to the test-data directory:

cd test-data

For the server:

node ../index.js -s 5678 # or whatever ports you want to listen on

For the client:

node ../index.js -c myself

Obviously the above is not secure, because the private key is in the open.

RUNTIME REQUIREMENTS

bluntly expects you provide with a config file containing:

{
  "dhtPort": 20000, // the port 
  "ownKey": {"pub": "mypub.rsa", "priv": "mypriv.rsa"}, // filepaths to your pub and private rsa keys
  "ID": "myself", // your bluntly name
  "contactsDir": "contacts", // the path of the directory containing your friends' pub keys
  // if you're holepunching through NAT, the port you want other peers to UDP connect to
  // if it's not specified, hole punch will not be attempted at all and it will fail if 
  // no direct TCP connection is possible
  "holePunch": {"recvPort": 23456}  
}

If you don't explicitly specify a path to a config file with --config=myconfigfile it will look for a file blunt-conf.json in the current directory and use that as a config file.

contactsDir contains a json file called index.json which specifies a mapping from friend ids to the file containing their pub key in the contactsDir directory (it's a relative path) as such

{
  "yourmom": "mom.rsa",
  "yourdad": "dad.rsa",
  "myself": "myself.rsa"
}

A good example is the test-data directory, containing a conf file and a contacts dir.

NAT penetration

Client notifies listener of interest to connect by announcing itself to rendezvous_info_hash = reverse(sha1(Spk)) (the reverse function is kind of arbitrary)

Listener constantly polls the bittorrent DHT for peers announced rendezvous_info_hash . Learns about the intention of a peer to connect.

They both know each other's IPs and proceed to do UDP NAT penetration as done by chownat.

once the hole punch succeeds, the 2 parties switch to UTP protocol running over UDP for reliability.

What would be nice: not have the rendezvous info hash and use the technique presented used by pwnat

Motivation

Just wanted smth to easily use without making accounts here and there and having end to end encryption.

I wanted to hack something in javascript to see how it's like to build prototypes with it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].