English|中文
Website: openp2p.cn
It is an open source, free, and lightweight P2P sharing network. As long as any device joins in, you can access them anywhere. Our goal is to make full use of bandwidth, use shared nodes to relay data, and build a common infrastructure for remote connections.
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.By understanding its principle, you can understand why it can be done for free.
Open source, trustable(see details below)
2MB+ filesize, 2MB+ memory. It runs at appllication layer, no vitrual NIC, no kernel driver.
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.
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.
Your applicaiton can call OpenP2P with a few code to make any internal networks communicate with each other.
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.
⚠️ all commands in this doc, Windows env uses "openp2p.exe", Linux env uses "./openp2p"
-
Make sure your office device(Linux) has opened the access of ssh.
netstat -nl | grep 22
-
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 install -node OFFICEPC1 -user USERNAME1 -password PASSWORD1
⚠️ Must change the parameters marked in uppercase to your own -
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 ownOutput sample
The log ofLISTEN 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.
-
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
Especially suitable for large traffic intranet access.
Windows MSTSC, VNC and other remote desktops, SSH, various ERP systems in the intranet
Manage a large number of videos and pictures
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.
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.
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.
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.
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.
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.
cd root directory of the socure code and execute
export GOPROXY=https://goproxy.io,direct
go mod tidy
go build
Short-Term:
- Support IPv6.
- Support auto run when system boot, setup system service.
- Provide free servers to some low-performance network.
- Build website, users can manage all P2PApp and devices via it. View devices' online status, upgrade, restart or CURD P2PApp .
- Provide wechat official account, user can manage P2PApp nodes and deivce as same as website.
- Provide WebUI on client side.
- Support high concurrency on server side.
- Optimize our share scheduling model for different network operators.
- Provide REST APIs and libary for secondary development.
- Support UDP at application layer, it is easy to implement but not urgent due to only a few applicaitons using UDP protocol.
- 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.
- Support Android platform, let the phones to be mobile gateway .
- Support SMB Windows neighborhood.
- Direct connection on intranet, for testing.
Long-Term:
- Use blockchain technology to decentralize, so that users who share equipment have benefits, thereby promoting more users to share, and achieving a positive closed loop.
- Enterprise-level product can well manage large scale equipment and ACL.
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.
QQ Group: 16947733
Email: [email protected] [email protected]
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.