Coder Social home page Coder Social logo

openp2p-cn / openp2p Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 174.0 2.71 MB

OpenP2P is a lightweight P2P sharing network. Support Cone,Symmetric(NAT1-NAT4),UPNP,IPv6,both UDP&TCP punch. You can build you private sharing network, or uses the public sharing network

License: MIT License

Go 89.27% Makefile 0.05% Kotlin 10.05% Dockerfile 0.16% Shell 0.36% C++ 0.11%

openp2p's People

Contributors

ahackerl avatar caesius-tim avatar tenderironh avatar tenderironhanhan avatar w192547975 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openp2p's Issues

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

自建server

请问一下什么时候能开源服务端呢

移动家庭宽带无法访问openp2p.cn?

尝试在家中电脑上使用openp2p,但是浏览器始终无法访问openp2p.cn。
更换为手机热点后能正常使用。
家中的网络是移动宽带。
想问是运营商或是openp2p做了限制?

P2PNetwork init error

2022/12/19 18:02:50 11224 INFO init start
2022/12/19 18:02:55 11224 ERROR NAT detect error:read udp [::]:57994: i/o timeout
2022/12/19 18:03:02 11224 ERROR P2PNetwork init error:read udp [::]:57994: i/o timeout
2022/12/19 18:03:02 11224 INFO init start
2022/12/19 18:03:02 11224 INFO autorunApp start

无法连上网络,求大佬解决

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

物理地址(Mac)问题

我使用了虚拟网络组网功能,然后发现默认是没有Mac的,导致:
[2024:03:16:17:37:36]: Warning: Unable to find MAC address for 10.2.3.12
有些需要获取mac的软件无法正确获取到mac。
image

功能性建议

-添加更改登录账号名称
-添加注销账号
遇到了个因为账号名称错误,一直登录不上的(本应账号是设置的同QQ账号,结果打错了个数字,电脑端记住账号可以正常登录,手机一直无法登录,后来发现他打错了)
此功能可以起到补救这种情况

建议公布个防火墙端口放行规则

如题,在部分FTTR和大部分专业防火墙进行NAT的环境中,需要对打洞的通讯端口进行映射来获取Cone NAT,不然默认是Symmetric NAT

比如zerotier的9993,以及tailscale的udp41641。

目前这个软件的通讯发起端口不明确,就导致了只能通过设置DMZ来获取Cone NAT,但是这样意味着只有一台设备能Cone NAT,别的设备都只能Symmetric NAT

OpenP2P映射出的ss端口以及SSH端口连不上,但是openvpn端口和http端口正常

办公室局域网有一台电脑一台手机,电脑A是192.168.1.2,手机B是192.168.1.100,其中B安装了openp2p。这个局域网是Symmetric NAT的
家里有一台openwrt旁路由C,也安装了openp2p。这个局域网是Fullcone的。旁路由C上跑了OpenVPN服务(端口TCP 1194)、ss-server服务(端口TCP 10808)

在OpenP2P控制台设置手机B映射21194->1194、10808->10808、22280->80、22222->22,均映射到旁路由C本机
c083d8be26a1e5309e107772e86fe958

电脑A:
1、通过192.168.1.100:21194连接OpenVPN,正常
2、通过192.168.1.100:10808连接ss,断断续续,v2rayN日志发现出现大量以下信息
2023/10/19 13:42:54 [Warning] [540697957] app/proxyman/outbound: failed to process outbound traffic > proxy/shadowsocks: failed to find an available destination > common/retry: [dial tcp 192.168.1.100:10808: connectex: No connection could be made because the target machine actively refused it. dial tcp 192.168.1.100:10808: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. dial tcp 192.168.1.100:10808: connectex: No connection could be made because the target machine actively refused it.] > common/retry: all retry attempts failed
2023/10/19 13:42:54 [Warning] [694399326] app/proxyman/outbound: failed to process outbound traffic > proxy/shadowsocks: failed to find an available destination > common/retry: [dial tcp 192.168.1.100:10808: connectex: No connection could be made because the target machine actively refused it. dial tcp 192.168.1.100:10808: operation was canceled] > common/retry: all retry attempts failed
2023/10/19 13:42:54 [Warning] [3421391436] app/proxyman/outbound: failed to process outbound traffic > proxy/shadowsocks: failed to find an available destination > common/retry: [dial tcp 192.168.1.100:10808: connectex: No connection could be made because the target machine actively refused it. dial tcp 192.168.1.100:10808: operation was canceled] > common/retry: all retry attempts failed
2023/10/19 13:42:54 [Warning] [2388999361] app/proxyman/outbound: failed to process outbound traffic > proxy/shadowsocks: failed to find an available destination > common/retry: [dial tcp 192.168.1.100:10808: connectex: No connection could be made because the target machine actively refused it. dial tcp 192.168.1.100:10808: operation was canceled] > common/retry: all retry attempts failed
3、浏览器输入192.168.1.100:22280,可以正常打开旁路由C的
luci页面
4、putty连接192.168.1.100:22222,一直连不上
SSH,最后超时错误

手机B:
1、通过127.0.0.1:21194连接OpenVPN,正常
2、通过127.0.0.1:10808连接ss,断断续续,客户端使用clash和v2rayN均如此
3、浏览器输入127.0.0.1:22280,可以正常打开旁路由C的
luci页面
4、putty连接127.0.0.1:22222,一直连不上SSH,直到超时错误
b0b321b445c265947ec6dd641f9119a8

windows远程桌面问题

我的win11系统开启了remoteFx用于远程玩游戏。
使用frp内网穿透连接时没有问题(就是可能因为服务器带宽问题有些卡顿)
本想使用openp2p连接提升流畅度
但是连接成功后一打开游戏后连接就断掉
猜想可能是openp2p无法处理remoteFx连接
期待修复~
大佬辛苦~

MIUI14应用退到后台就无法使用了

解除了后台省电策略限制。任务卡片栏也把客户端固定后台了,但是只要APP不在最前端运行,就无法建立P2P应用链接。将openp2p放到浮窗又可以用。

调度器构思

首先应该根据需求(APP和组网)确定所有需要连接的节点列表(动态维护更新),然后尝试创建链接。上层需求应该通过调度器访问这些连接。发送数据时,如果有可用连接,调度器从连接中择优发送数据,如失败则切换连接重传,无法重传则向上层报错。

映射ipv4端口后同时映射到ipv6

用openp2p把A电脑映ipv4的端口到B电脑,B电脑ipv6公网,使其他设备能通过ipv6访问映射到B电脑的ipv4端口的建议
谢谢~

关于协议支持的问题

在创建P2P应用时,只能选择TCP或者UDP协议。请问可以支持同时使用两种协议吗?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.