프로젝트
소개
Go로 만든 또 하나의 P2P 네트워크 라이브러리 🌍
시스템 및 인프라What you can do
- Elegantly simple architecture (pgcli & pgmap & OpenID Connect)
- NAT traversal with high success rate (STUN & UPnP & PortScan & BirthdayParadox)
- Full support for IPv4/IPv6 dual stack
- Easy-to-use library (net.PacketConn)
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
PeerGuard
Another p2p network library in Go. Committed to direct communication between devices.
[简体中文]
Features
- Elegantly simple architecture (pgcli & pgmap & OpenID Connect)
- NAT traversal with high success rate (STUN & UPnP & PortScan & BirthdayParadox)
- Full support for IPv4/IPv6 dual stack
- Easy-to-use library (net.PacketConn)
- Transport layer security (curve25519 & chacha20poly1305 for end-to-end encryption)
- RDT protocol for reliable data transfer
- Cross-platform compatibility (linux/windows/macOS/iOS/android)
Get Started
[!NOTE] Time synchronization between nodes is crucial; the difference should not exceed 10 seconds
# node1
pgcli vpn -s wss://openpg.in/pg -4 100.64.0.1/24
# node2
pgcli vpn -s wss://openpg.in/pg -4 100.64.0.2/24
Advanced
Self-hosted peermap server
1. run the pgmap daemon
$ pgmap -l 127.0.0.1:9987 --secret-key 5172554832d76672d1959a5ac63c5ab9 \
--stun 111.206.174.2:3478 --stun 106.13.249.54:3478 --stun 106.12.251.52:3478 --stun 106.12.251.31:3478
2. wrap pgmap as an https server
$ caddy reverse-proxy --from https://openpg.in --to 127.0.0.1:9987
P2P file sharing
# share
$ pgcli share -s wss://openpg.in/pg ~/my-show.pptx
ShareURL: pg://DJX2csRurJ3DvKeh63JebVHFDqVhnFjckdVhToAAiPYf/0/my-show.pptx
# download
$ pgcli download -s wss://openpg.in/pg pg://DJX2csRurJ3DvKeh63JebVHFDqVhnFjckdVhToAAiPYf/0/my-show.pptx
Shortcut pgvpn
ln -sf /usr/sbin/pgcli /usr/sbin/pgvpn
You can now use pgvpn instead of pgcli vpn.
Use IPC to query the found peers.
pgvpn --peers
Rootless mode VPN
pgvpn -s wss://openpg.in/pg -4 100.64.0.1/24 --proxy-listen 127.0.0.1:4090 --forward tcp://127.0.0.1:80 --forward udp://8.8.8.8:53
Uses pre-shared secret file instead of OIDC auth
first
$ export PG_SECRET_KEY=5172554832d76672d1959a5ac63c5ab9
$ export PG_SERVER=wss://openpg.in/pg
$ pgcli admin secret --network "<email>" --duration 24h > psns.json
then
sudo pgcli vpn -s wss://openpg.in/pg -4 100.64.0.1/24 -f psns.json
License
GNU General Public License v3.0
Contributing
Contributions welcome! Have an improvement? Submit a pull request.
[!NOTE] I also maintain a closed-source version, and contributions to the open-source project may be included in the closed-source version.
Contact
- Telegram Group: https://t.me/+-S5L6ZCBxlxkMTRl
- QQ Group: 1039776116
관련 프로젝트 살펴보기
불러오는 중…