yacy / yacy_search_server

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
http://yacy.net
Other
3.33k stars 424 forks source link

To make peer reached from outside, is there any alternative to manually cancelling firewall? #634

Open RuikangSun opened 2 months ago

RuikangSun commented 2 months ago

To make peer reached from outside, the only solution now is manually cancelling firewall of 8090 port. However, in some cases (especially home PCs), only ISP super administrators are privileged to edit firewall settings. Technically, users can use servers or change ISP. But these methods are inconvenient, which may make yacy network weaker. Another successful P2P network is bittorrent. Users of bittorrent are not required to edit firewall settings. Instead, bittorrent uses NAT hole punching to make peers connected across firewalls. Concerning yacy network is partially based on senior and principal peers, to make peer reached from outside, is there any alternative to manually cancelling firewall?

okybaca commented 2 months ago

There is a workaround using ssh tunneling in a case you have access to some ssh account on a server in public internet. But, definitely, piercing a firewall in a way bittorrent does would be a huge improvement. Do you have any idea, how BT does that?

RuikangSun commented 2 months ago

There is a workaround using ssh tunneling in a case you have access to some ssh account on a server in public internet. But, definitely, piercing a firewall in a way bittorrent does would be a huge improvement. Do you have any idea, how BT does that?

Here is a discussion: [How does BitTorrent work with only outbound connections?](https://superuser.com/questions/104462/how-does-bittorrent-work-with-only-outbound-connections)

okybaca commented 2 months ago

Here is a discussion:

Looks pretty usable!

So the keywords are hole punching and STUN protocol.

I'm not a developer myself, but let's keep the idea. Is there anyone java-skilled to code a solution?

RuikangSun commented 2 months ago

I am not familiar with Java, but it looks not THAT difficult: Java hole punching Java STUN