dashpay / platform

L2 solution for seriously fast decentralized applications for the Dash network
https://dashplatform.readme.io/docs/introduction-what-is-dash-platform
MIT License
72 stars 39 forks source link

bug(dashmate): Port check may return closed in case VPS is configured for IPv6 #2100

Closed kxcd closed 1 month ago

kxcd commented 2 months ago

Expected Behavior

The port check should reveal if a listening port is able to be connected to from the outside world, eg 9999 for the dashd.

Current Behavior

It works fine for 99% of people, however, some people have not disabled IPv6 at the VPS level and for some users this defaults traffic through IPv6, which mnowatch.org rightly responds to as CLOSED because Dash and Platform both only run on legacy networks, ie IPv4 and NOT over IPv6!

Possible Solution

Replace domain mnowatch.org with apogee.dynu.net which goes to the same replace, however, that DNS resolver will only give out IPv4 IP which will force the client to use the legacy IPv4 protocol.

Steps to Reproduce (for bugs)

Easiest way is curl the below commands from a IPv6 configured server listening on a port, eg 22.

curl -s https://apogee.dynu.net/22/
curl -s https://mnowatch.org/22/

Context

This is a 'bug' in Dashmate. Also, (e)MNOs should be strongly advised to NOT enable IPv6 as it messes up their ability to provide good service to the network.

Your Environment

IPv6 enabled VPS, eg Hetzner instance.

PastaPastaPasta commented 2 months ago

Too just to clarify? this isn't really an issue correct? it's just that dash mate may report your port as being closed when it's properly open?

Note; when using curl, you can simply do curl -s --ipv4 https://mnowatch.org/22/ but it seems that fetch in javascript has no such ability

shumkov commented 1 month ago

Fetch can't but you can use https module https://github.com/dashpay/platform/pull/2162