Openp2p - an open source, free, and lightweight P2P sharing network

Related tags

Network openp2p
Overview

English|中文

What is OpenP2P

It is an open source, free, and lightweight P2P sharing network. As long as any device joins in, you can access them anywhere

Why OpenP2P

Free

Totaly free, fullfills most of users(especially free-rider). Unlike other similar products, we don't need a server with public IP, and don't need to pay for services.

Safe

Open source, trustable(see details below)

Lightweight

2MB+ filesize, 2MB+ memory. It runs at appllication layer, no vitrual NIC, no kernel driver.

Cross-platform

Benefit from lightweight, it easily supports most of major OS, like Windows, Linux, MacOS, also most of CPU architecture, like 386、amd64、arm、arm64、mipsle、mipsle64、mips、mips64.

Efficient

P2P direct connection lets your devices make good use of bandwidth. Your device can be connected in any network environments, even supports NAT1-4 (Cone or Symmetric). Relying on the excellent congestion algorithm of the Quic protocol, high bandwidth and low latency can be obtained in a bad network environment.

Integration

Your applicaiton can call OpenP2P with a few code to make any internal networks communicate with each other.

Get Started

A common scenario to introduce OpenP2P: remote work. At home connects to office's Linux PC . Under the outbreak of covid-19 pandemic, surely remote work becomes a fundamental demand.

  1. Make sure your office device(Linux) has opened the access of ssh.

    netstat -nl | grep 22
    

    Output sample image

  2. Download the latest version of OpenP2P,unzip the downloaded package, and execute below command line.

    tar xvf openp2p0.95.3.linux-amd64.tar.gz
    openp2p -d -node OFFICEPC1 -user USERNAME1 -password PASSWORD1
    

    ⚠️ Must change the parameters marked in uppercase to your own

    Output sample image

  3. Download the same package of OpenP2P on your home device,unzip and execute below command line.

    openp2p.exe -d -node HOMEPC123 -user USERNAME1 -password PASSWORD1 --peernode OFFICEPC1 --dstip 127.0.0.1 --dstport 22 --srcport 22022 --protocol tcp
    

    ⚠️ Must change the parameters marked in uppercase to your own

    Output sample
    image
    The log of LISTEN ON PORT 22022 START indicates P2PApp runs successfully on your home device, listing port is 22022. Once connects to local ip:port,127.0.0.1:22022, it means the home device has conneccted to the office device's port, 22.
    image

  4. Test the connection between office device and home device.In your home deivce, run SSH to login the office device.

    ssh -p22022 [email protected]:22022
    

    image

Usage

Scenarios

Especially suitable for large traffic intranet access.

Remote work

Windows MSTSC, VNC and other remote desktops, SSH, various ERP systems in the intranet

Remote Access NAS

Manage a large number of videos and pictures

Remote Access Camera

Remote Flashing Phone

Remotely Data Backup


Overview Design

Prototype

image

Client architecture

image

P2PApp

P2PAPP is the most import concept in this project, one P2PApp is able to map the remote service(mstsc/ssh) to the local listening. The main job of re-development or restful API we provide is to manage P2PApp.

image

Share

10mbps is its default setting of share speed limit. Only when your users have shared their nodes, they are allowed to use others' shared nodes. This is very fair, and it is also the original intention of this project. We recommend that you join a shared network in a place with sufficient bandwidth (such as an office or home with 100M optical fiber). If you are still not willing to contribute any node to the OpenP2P share network, please refer to the operating parameters for your own setting.

Safety

The nodes which have joined the OpenP2P share network can vist each other by authentications. Shared nodes will only relay data, and others cannot access any resources in the intranet.

TLS1.3+AES

The communication data between the two nodes uses the industry's most secure TLS1.3 channel. The communication content will also use AES encryption, double security, the key is exchanged through the server. Effectively prevent man-in-the-middle attacks.

Will the shared node capture my data?

That's right, the relay node is naturally an man-in-middle, so AES encryption is added to ensure the security of the communication content. The relay node cannot obtain the plaintext.

How does the shared relay node verify the authority?

The server side has a scheduling model, which calculate bandwith, ping value,stability and service duration to provide a well-proportioned service to every share node. It uses TOTP(Time-based One-time Password) with hmac-sha256 algorithem, its theory as same as the cellphone validation code or bank cipher coder.

Build

cd root directory of the socure code and execute

export GOPROXY=https://goproxy.io,direct
go mod tidy
go build

TODO

Short-Term:

  1. Support IPv6.
  2. Support auto run when system boot, setup system service.
  3. Provide free servers to some low-performance network.
  4. Build website, users can manage all P2PApp and devices via it. View devices' online status, upgrade, restart or CURD P2PApp .
  5. Provide wechat official account, user can manage P2PApp nodes and deivce as same as website.
  6. Provide WebUI on client side.
  7. Support high concurrency on server side.
  8. Optimize our share scheduling model for different network operators.
  9. Provide REST APIs and libary for secondary development.
  10. Support UDP at application layer, it is easy to implement but not urgent due to only a few applicaitons using UDP protocol.
  11. Support KCP protocol underlay, currently support Quic only. KCP focus on delay optimization,which has been widely used as game accelerator,it can sacrifice part of bandwidth to reduce timelag.
  12. Support Android platform, let the phones to be mobile gateway .
  13. Support SMB Windows neighborhood.
  14. Direct connection on intranet, for testing.

Long-Term:

  1. Decentration and distribution.
  2. Enterprise-level product can well manage large scale equipment and ACL.

Contribute

If the items in TODO or ISSUE is your domain, or you have sepical good idea, welcome to join this OpenP2P project and contribute your code. When this project grows stronger, you will be the major outstanding contributors. That's cool.

Contact

QQ Group: 16947733

Email: [email protected] [email protected]

Disclaimer

This project is open source for everyone to learn and use for free. It is forbidden to be used for illegal purposes. Any loss caused by improper use of this project or accident, this project and related personnel will not bear any responsibility.

You might also like...
A decentralized P2P networking stack written in Go.

noise noise is an opinionated, easy-to-use P2P network stack for decentralized applications, and cryptographic protocols written in Go. noise is made

A major platform Remote Access Terminal Tool based by Blockchain/P2P.
A major platform Remote Access Terminal Tool based by Blockchain/P2P.

NGLite A major platform Remote Access Terminal Tool based by Blockchain/P2P. No public IP address required.More anonymity Example Detection Warning!!!

A minimal IPFS replacement for P2P IPLD apps

IPFS-Nucleus IPFS-Nucleus is a minimal block daemon for IPLD based services. You could call it an IPLDaemon. It implements the following http api call

P2P Forwarder - a tool for farwarding tcp/udp ports. Made using libp2p.
P2P Forwarder - a tool for farwarding tcp/udp ports. Made using libp2p.

P2P Forwarder A tool for farwarding ports. Made using libp2p. How it works A: opens desired ports ports inside P2P Forwarder A: shares it's id from P2

Schema-free, document-oriented streaming database that optimized for monitoring network traffic in real-time

Basenine Schema-free, document-oriented streaming database that optimized for monitoring network traffic in real-time. Featured Aspects Has the fastes

🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.

gev 中文 | English gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily bui

Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and deadline support. MIT Licensed.

socket Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and d

Zero Trust Network Communication Sentinel provides peer-to-peer, multi-protocol, automatic networking, cross-CDN and other features for network communication.
Zero Trust Network Communication Sentinel provides peer-to-peer, multi-protocol, automatic networking, cross-CDN and other features for network communication.

Thank you for your interest in ZASentinel ZASentinel helps organizations improve information security by providing a better and simpler way to protect

Comments
  • Server status?

    Server status?

    Software Version: 3.1.0 OS: Windows 10 Pro / Home China

    自从昨天上午开始我的所有p2p app都无法连接成功。所有机器都能检测到在线,但是所有app一直显示正在连接。 使用了不同网络下的几台设备测试,全都一样一直无法连接,因此暂时考虑服务器方面原因可能性更大。 想询问一下当前的服务器状态? 此外,如果可以的话,是否可以做一个简单的服务器状态/数量显示功能?这样用户可以知道是自己的网络问题还是服务器问题。

    Since yesterday morning, all my p2p apps couldn't establish connection. Console shows that all machines are online but all apps are "connecting". I've tested on several devices under difference networks. The results are the same - unable to connect. So IMO it is more likely due to the server(s). Could you please tell me the current status of servers? By the way, is it possible to implement a function that shows server numbers / status so that users could know if the problem is on their network or servers?

    opened by penglb3 8
  • v2.0.1 build failed

    v2.0.1 build failed

    $ export GOPROXY=https://goproxy.io,direct
    $ go mod tidy
    $ go build
    # openp2p
    ./underlay_quic.go:22:5: quicVersion redeclared in this block
            ./quic.go:22:5: other declaration of quicVersion
    ./underlay_quic.go:105:6: listenQuic redeclared in this block
            ./quic.go:101:6: other declaration of listenQuic
    ./underlay_quic.go:115:6: dialQuic redeclared in this block
            ./quic.go:111:6: other declaration of dialQuic
    ./underlay_quic.go:134:6: generateTLSConfig redeclared in this block
            ./quic.go:130:6: other declaration of generateTLSConfig
    ./util_linux.go:13:2: defaultInstallPath redeclared in this block
            ./sysinfolinux.go:16:2: other declaration of defaultInstallPath
    ./util_linux.go:14:2: defaultBinName redeclared in this block
            ./sysinfolinux.go:17:2: other declaration of defaultBinName
    ./util_linux.go:17:6: getOsName redeclared in this block
            ./sysinfolinux.go:20:6: other declaration of getOsName
    ./util_linux.go:58:6: setRLimit redeclared in this block
            ./sysinfolinux.go:61:6: other declaration of setRLimit
    ./util_linux.go:71:6: setFirewall redeclared in this block
            ./sysinfolinux.go:74:6: other declaration of setFirewall
    ./quic.go:28:7: undefined: quic.Session
    ./quic.go:28:7: too many errors
    $ go version
    go version go1.18.2 linux/amd64
    
    opened by foobartech 1
  • 自己创建了一个docker镜像,有需要的可以使用

    自己创建了一个docker镜像,有需要的可以使用

    运行命令

    /home/openp2p/config.json && docker run --name mynginx -d -v /home/openp2p/config.json :/config.json -e HostName="随便一个名字" -e token="你的token" bd111/openp2p 具体可以去 https://hub.docker.com/r/bd111/openp2p 查看

    opened by dl280 6
  • can't run on android

    can't run on android

    ./openp2p --token xxxxxxxxxxxxxxxx --loglevel 0
    2022/06/15 09:09:23 9797 INFO openp2p start. version: 3.1.0
    2022/06/15 09:09:23 9797 INFO Contact: QQ: 477503927, Email: [email protected]
    2022/06/15 09:09:23 9797 INFO &{{15555067135758357827 localhost      0 0  0 10 api.openp2p.cn 27183 27182 27183 60532} [] 0 false {0 0}}
    2022/06/15 09:09:23 9797 INFO init start
    2022/06/15 09:09:23 9797 DEBUG local port:51409  nat port:0
    2022/06/15 09:09:23 9797 DEBUG detect NAT type error:lookup api.openp2p.cn on [::1]:53: read udp [::1]:57202->[::1]:53: read: connection refused
    2022/06/15 09:09:23 9797 ERROR P2PNetwork init error:lookup api.openp2p.cn on [::1]:53: read udp [::1]:57202->[::1]:53: read: connection refused
    2022/06/15 09:09:23 9797 INFO autorunApp start
    2022/06/15 09:09:53 9797 INFO init start
    2022/06/15 09:09:53 9797 ERROR echo server listen error:listen udp 0.0.0.0:60532: bind: address already in use
    2022/06/15 09:09:53 9797 DEBUG local port:50315  nat port:0
    2022/06/15 09:09:53 9797 DEBUG detect NAT type error:lookup api.openp2p.cn on [::1]:53: read udp [::1]:55662->[::1]:53: read: connection refused
    2022/06/15 09:09:53 9797 ERROR P2PNetwork init error:lookup api.openp2p.cn on [::1]:53: read udp [::1]:55662->[::1]:53: read: connection refused
    2022/06/15 09:09:53 9797 ERROR P2PNetwork init error:lookup api.openp2p.cn on [::1]:53: read udp [::1]:55662->[::1]:53: read: connection refused
    2022/06/15 09:09:53 9797 ERROR P2PNetwork login error
    

    test on android termux with arm64

    opened by never-afk 7
Releases(v3.5.5)
Owner
null
fetch and serve papers in p2p network

sci-hub P2P A project aims to fetch paper from the BitTorrent network. This is not a cli client of sci-hub website. English Introduction 中文简介 Contribu

Sci-Hub on P2P 186 Oct 8, 2022
fetch papers from p2p network

sci-hub P2P A project aims to fetch paper from the BitTorrent network. According to this Reddit post, currently, all `sci-hub's papers are available i

Trim21 186 Oct 8, 2022
A modular is an opinionated, easy-to-use P2P network stack for decentralized applications written in Go.

xlibp2p xlibp2p is an opinionated, easy-to-use P2P network stack for decentralized applications written in Go. xlibp2p is made to be minimal, robust,

XFS Network 62 Nov 9, 2022
Educational project to build a p2p network

Template go Repository tl;dr This is a template go repository with actions already set up to create compiled releases What does this Template provide?

Marco Siebecke 0 Dec 2, 2021
Xlibp2p: an opinionated, easy-to-use P2P network stack for decentralized applications written in Go

xlibp2p xlibp2p is an opinionated, easy-to-use P2P network stack for decentraliz

null 1 Nov 9, 2022
Steve - A peer-to-peer (p2p) decentralized network

Steve Steve is a peer-to-peer (p2p) decentralized network that enables people to

Steve Care Software Inc 4 Feb 5, 2022
mysshw - a free and open source ssh cli client soft.

mysshw install go version <= 1.16.* use go get go get -u github.com/cnphpbb/mysshw go version >= 1.17.* use go install go install github.com/cnphpbb/

cnphpbb 2 Dec 16, 2021
Open source 5G core network base on 3GPP R15

What is free5GC The free5GC is an open-source project for 5th generation (5G) mobile core networks. The ultimate goal of this project is to implement

free5GC 1.5k Nov 21, 2022
Apache Traffic Control is an Open Source implementation of a Content Delivery Network

Apache Traffic Control Apache Traffic Control is an Open Source implementation of a Content Delivery Network. Documentation Intro CDN Basics Traffic C

The Apache Software Foundation 833 Nov 18, 2022
GO2P is a P2P framework, designed with flexibility and simplicity in mind

go2p golang p2p framework By v-braun - viktor-braun.de. Description GO2P is a P2P framework, designed with flexibility and simplicity in mind. You can

Viktor Braun 89 Nov 9, 2022