ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.22k stars 935 forks source link

frp n2n #693

Open zjbdiy opened 3 years ago

zjbdiy commented 3 years ago

Text from translator, sorry I compiled the same version of n2n (latest dev branch) I try to make a connection edge> frps > frpc > supernode does not work edge > supernode works Iperf3c - > frps - > frpc - > iperf3s works

//edge log 13/May/2021 18:36:14 [edge_utils.c:3381] Adding supernode = n2n.zjbdiy.com:10500 13/May/2021 18:36:14 [edge.c:927] WARNING: Switching to AES as key was provided. 13/May/2021 18:36:14 [edge.c:938] Starting n2n edge 2.9.0.r914.ab8155b May 13 2021 17:34:42 13/May/2021 18:36:14 [edge.c:944] Using compression: none. 13/May/2021 18:36:14 [edge.c:945] Using AES cipher. 13/May/2021 18:36:14 [edge_utils.c:326] Number of supernodes in the list: 1 13/May/2021 18:36:14 [edge_utils.c:328] supernode 0 => n2n.zjbdiy.com:10500 13/May/2021 18:36:14 [edge.c:968] Use manually set IP address. Open device [name={FBE214AE-ED2A-4C27-B63D-C723343C39BF}][ip=172.10.10.4][ifName=本地连接 2][MTU=1290][mac=00:FF:FB:E2:14:AE] 13/May/2021 18:36:14 [edge.c:1083] Created local tap device IP: 172.10.10.4, Mask: 255.255.255.0, MAC: 00:FF:FB:E2:14:AE 13/May/2021 18:36:14 [edge.c:1177] edge started 13/May/2021 18:36:14 [edge_utils.c:950] Successfully joined multicast group 224.0.0.68:1968 13/May/2021 18:36:26 [edge_utils.c:1335] WARNING: Supernode not responding, now trying n2n.zjbdiy.com:10500 13/May/2021 18:36:42 [edge_utils.c:1335] WARNING: Supernode not responding, now trying n2n.zjbdiy.com:10500

//supernode root@debian:/home/zjb/n2n# lsof -i:1234 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME supernode 1069 nobody 3u IPv4 26651 0t0 UDP :1234 supernode 1069 nobody 5u IPv4 26653 0t0 TCP :1234 (LISTEN)

I see that the new version has monitored UDP and TCP How to select the client Whether two ports are needed for communication, which makes the agent unable to reply

Thank you very much for any help

Logan007 commented 3 years ago

I see that the new version has monitored UDP and TCP How to select the client

The supernode listens on both UDP and TCP (same port number). The edge connects to the supernode via UDP by default. -S2 makes the edge use TCP connection.

frps > frpc

I have never used frp and cannot really speak for it. But it seems that the .ini files support the protocol-defining type=UDP (...or TCP) line.

Has anyone collected more specific experience?