JamesTheAwesomeDude / mentalDarkChess

trustless implementation of Dark Chess
0 stars 0 forks source link

Can't play if both players behind non-UPnP-enabled NATs #4

Open JamesTheAwesomeDude opened 2 years ago

JamesTheAwesomeDude commented 2 years ago

idk sheit about pier to pyer networking (yet) -- I am currently reading this fascinating document:
ØMQ: The Guide - Chapter 8: A Framework for Distributed Computing

note we have no actual requirement to use zmq; libp2p would be just as well, I suppose

JamesTheAwesomeDude commented 2 years ago

libp2p

The interface looks absolutely hellish, but it surely can't be worse than DIY holepunching with zeromq?

JamesTheAwesomeDude commented 2 years ago

https://www.reddit.com/r/libp2p/comments/srqp3w/possible_to_use_pylibp2p_as_an_alternative_to_holepunching/

the example programs seem to just be using libp2p as an additional abstraction layer "inside of" a connection the clients already negotiated (in that case, a TCP connection to localhost), and I cannot find any examples showcasing the ability of the py-libp2p library to connect remote users to one another.

JamesTheAwesomeDude commented 2 years ago

OK, libp2p won't work for now since apparently they support no form of NAT traversal (all of: nat-pmp, upnp, ext addr discovery, STUN-like, line-switch relay, pkt-switch relay were listed as "not planned" on the homepage)

if all else fails, I suppose the nuclear option would be opening a "hidden service" socket

or we could punt the issue for a while by using something like mDNS discovery to limp along with "LAN games" for a while

JamesTheAwesomeDude commented 2 years ago

https://github.com/JamesTheAwesomeDude/miranda-upnp
https://web.archive.org/web/20210120043643/www.ethicalhacker.net/columns/heffner/plug-n-play-network-hacking/

JamesTheAwesomeDude commented 2 years ago

leaps and vague bounds on this in ae6df7e779732350270d2d400dbb3573c089fc09

JamesTheAwesomeDude commented 2 years ago

Fixed in 0940348f3a11fbeb5f41061969ac79a392da6ea5 (and b5d233c0017cd8ac90d3439b395f32f51e48eab2)