Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MystNodes on Socks5 #10

Closed
SkullFace141 opened this issue May 25, 2023 · 18 comments
Closed

MystNodes on Socks5 #10

SkullFace141 opened this issue May 25, 2023 · 18 comments

Comments

@SkullFace141
Copy link

Hi

Did you test MystNodes on Socks5 and it worked for you?

My socks5 provider has UDP enabled and I asked about it and the provider confirmed that UDP is enabled and supported.

My Myst Node shows online in the browser (127.0.0.1:2000) but on mystnodes show Monitoring failed, i got 0 connections to the node since i created it.

Thanks

@engageub
Copy link
Owner

Hello,
Could you please enable enable logs and check your tun2socks container logs.
You will see if there are any connections failing? Paste the logs here.
Also, is it working with your LXC containers through proxy?

Thank you

@SkullFace141
Copy link
Author

didn't test in LXC i think its not possible with proxies.

@engageub
Copy link
Owner

engageub commented May 25, 2023

Please paste the logs so that we know what connections are failing and what your proxy is missing.

Thank you

@SkullFace141
Copy link
Author

logs are disabled

@engageub
Copy link
Owner

Please enable the logs and delete and start the container. Myst data will remain the same the same. We cannot discuss anything about this unless the logs are pasted here.

Thank you

@engageub
Copy link
Owner

Also note that once it shows monitoring failed. It may take upto 24 hours to show online if your IP is fine. In the mysterium dashboard from https://mystnodes.com/nodes . Click on services and click on test node and then look into logs.

Thank you

@SkullFace141
Copy link
Author

SkullFace141 commented May 27, 2023

tun2socks

time="2023-05-27T14:28:14Z" level=warning msg="[UDP] dial 23.105.165.21:32066: client handshake: socks version mismatched" time="2023-05-27T14:28:32Z" level=warning msg="[UDP] dial 23.105.165.21:37940: client handshake: rejected username/password" time="2023-05-27T14:28:34Z" level=warning msg="[UDP] dial 23.105.165.21:33173: client handshake: socks version mismatched" time="2023-05-27T14:30:46Z" level=warning msg="[TCP] dial 51.158.129.204:443: CONNECT: connection refused" time="2023-05-27T14:30:48Z" level=warning msg="[TCP] dial 51.158.129.204:443: CONNECT: connection refused" time="2023-05-27T14:33:21Z" level=warning msg="[UDP] dial 51.15.87.217:56108: client handshake: EOF" time="2023-05-27T14:33:21Z" level=warning msg="[UDP] dial 51.15.87.217:40979: client handshake: EOF" time="2023-05-27T14:46:52Z" level=warning msg="[UDP] dial 51.15.87.217:11110: client handshake: EOF" time="2023-05-27T14:46:55Z" level=warning msg="[UDP] dial 51.15.87.217:36156: client handshake: read tcp 172.17.0.203:47496->64.52.24.1:63619: read: connection reset by peer" time="2023-05-27T14:46:55Z" level=warning msg="[UDP] dial 51.15.87.217:55309: client handshake: read tcp 172.17.0.203:47490->64.52.24.1:63619: read: connection reset by peer" time="2023-05-27T14:46:55Z" level=warning msg="[UDP] dial 51.15.87.217:40017: client handshake: read tcp 172.17.0.203:47536->64.52.24.1:63619: read: connection reset by peer" time="2023-05-27T14:46:56Z" level=warning msg="[UDP] dial 51.15.87.217:40781: client handshake: read tcp 172.17.0.203:47392->64.52.24.1:63619: read: connection reset by peer" time="2023-05-27T14:47:03Z" level=warning msg="[UDP] dial 23.21.92.55:3478: client handshake: read tcp 172.17.0.203:43488->64.52.24.1:63619: read: connection reset by peer" time="2023-05-27T14:47:03Z" level=warning msg="[TCP] dial 51.15.23.14:443: read tcp 172.17.0.203:43472->64.52.24.1:63619: read: connection reset by peer" time="2023-05-27T14:47:03Z" level=warning msg="[UDP] dial 23.88.56.5:3478: client handshake: read tcp 172.17.0.203:43498->64.52.24.1:63619: read: connection reset by peer"
mystnode

2023-05-27T14:33:14.665 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.666 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.666 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.666 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.669 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.669 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.669 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.669 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.669 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.669 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.669 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.669 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.672 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.672 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.672 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.672 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.672 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.673 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.673 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.673 WRN ../../nat/traversal/pinger.go:138 > One of the pings has error error="ping receiver error: context deadline exceeded" 2023-05-27T14:33:14.673 ERR ../../p2p/listener.go:167 > Could not ping peer error="too few connections were built" 2023-05-27T14:33:18.177 ERR ../../core/quality/mysterium_morqa.go:191 > Failed to sent batch metrics request, 23 error="Post \"https://quality.mysterium.network/api/v3/batch\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" 2023-05-27T14:33:55.254 ERR ../../session/pingpong/consumer_balance_tracker.go:462 > align with hermes failed with a critical error, offchain balance out of sync error="could not request consumer data from hermes: could not execute request: Get \"https://hermes3.mysterium.network/api/v2/data/consumer/0x5d30eb47ee74fb952c9bac286084c00e862864d7\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" 2023-05-27T14:33:58.178 ERR ../../core/quality/mysterium_morqa.go:191 > Failed to sent batch metrics request, 23 error="Post \"https://quality.mysterium.network/api/v3/batch\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"

@engageub
Copy link
Owner

Thank you for providing the logs. Please raise an issue with your tun2socks logs to https://github.com/xjasonlyu/tun2socks
Your UDP connections are failing which are visible from the logs. Its shows socks version mismatched and rejected username/password.

Thank you

@engageub
Copy link
Owner

Would you mind mentioning the proxy provider you purchased proxies from.

Thank you

@SkullFace141
Copy link
Author

Thank you for providing the logs. Please raise an issue with your tun2socks logs to https://github.com/xjasonlyu/tun2socks Your UDP connections are failing which are visible from the logs. Its shows socks version mismatched and rejected username/password.

Thank you

Can you please do that properly?
I think you can explain this better

@engageub
Copy link
Owner

engageub commented Jun 1, 2023

It is already mentioned about the need of UDP over socks5 in FAQ. The responsibility of the script is to create isolated containers and redirect traffic over proxy. If there is any issue with proxy, there can't be support provided in the issues.
You just need to paste the logs and see if you can get further information from xjasonlyu/tun2socks to resolve your proxy issue or contact your proxy provider.
The logs are sufficient for explanation and any further required information would need to be provided for which ownership on the proxy is with you.
Also, please note that socks4 does not support UDP and use only socks5 to make UDP requests.

Thank you

@engageub
Copy link
Owner

engageub commented Jun 1, 2023

The error message "client handshake: socks version mismatched" typically occurs when there is a mismatch between the SOCKS (Socket Secure) version supported by the client and the server. SOCKS is a protocol that allows a client to establish a secure connection through a proxy server.

The version mismatch can happen if the client and server are using different versions of the SOCKS protocol. There are several versions of SOCKS, including SOCKS4, SOCKS4a, and SOCKS5. Each version has its own specifications and capabilities.

To resolve the "client handshake: socks version mismatched" error, you need to ensure that the client and server are using the same SOCKS version. You may need to check the configuration settings or the software documentation to determine the supported SOCKS version and update the client or server accordingly.

Additionally, it's worth noting that SOCKS version 5 (SOCKS5) is the most commonly used version and offers more features and security enhancements compared to previous versions. Therefore, if possible, it's recommended to use SOCKS5 for better compatibility and functionality.

Closing this since this is not an issue with the script and is working as expected or designed to do so.

@engageub engageub closed this as completed Jun 1, 2023
@SkullFace141
Copy link
Author

I tested with another provider with UDP enabled and still monitoring failed

@SkullFace141
Copy link
Author

SkullFace141 commented Jun 4, 2023

tun2socks log
time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" time="2023-06-04T11:37:26Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159" .................................... time="2023-06-04T11:37:36Z" level=warning msg="[UDP] symmetric NAT 198.18.0.1:56945->108.177.102.127:19302: drop packet from 51.15.87.217:22159"

@engageub
Copy link
Owner

engageub commented Jun 5, 2023

Thank you for the logs. It shows that symmetric NAT is being used.

Could you please check if you still see the following in the MYST node logs.
"One of the pings has error error="ping receiver error: context deadline exceeded".

If you do not see the errors then you may wait for upto 24 hours to see if the node comes online.

Would you mind providing the proxy provider from where you purchased proxies.

Can you try using your LXC containers with this proxy directly. If it works there then configuration has to be changed in docker network creation. There may also be problem in the NAT configuration of your ISP provider.

Since you have already raised a request to tun2socks support, lets wait for his answer also.

Here is the summary from mysterium docs.
https://docs.mysterium.network/troubleshooting/troubleshooting-connection-issues

When your node is behind a Port Restricted Cone/Symmetric NAT
You will still be able to make a P2P connection with the majority of consumers, but not with those who have Symmetric NAT Routers (which are not that common, fortunately).

A symmetric NAT is one where all requests from the same internal IP address and port, to a specific destination IP address and port, are mapped to the same external IP address and unpredicted port. If the same host sends a packet with the same source address and port, but to a different destination, a different mapping is used. Furthermore, only the external host that receives a packet can send a UDP packet back to the internal host thus making it a non-routable combination with Port Restricted NAT type.

The solution to this problem will involve you adjusting Mysterium config file and configuring your router.
When your node is behind the Mobile Router (extra tips)
If you are running the node behind the Mobile Router (cellular network), then you need to take into account the following:

Check that "Cone NAT" is used instead of "Symmetric NAT" under "NAT settings/NAT type" of the Router;
Check the "Firewall" settings of the Router, that it's not blocking the traffic;
Check your "IP filter" settings, that there are no special rules for the packets;
Check your "MAC Address Filter" settings, that there are no special rules for the device you are running node on.


Could you please change the order in the Advanced Options in your node UI as mentioned and see if it works.

  1. Visit your node UI dashboard, click on settings-->Advanced-
  2. On the NAT Traversal order, drag items to change the order to holepunching,manual, upnp.
  3. Save the configuration by clicking "Save" Button
  4. Stop and start the node and login to the dashboard again and see if the configuration for NAT Traversal order is same as mentioned in step 2.
  5. Check the logs if you still the same error or it is working fine.

Thank you

@engageub
Copy link
Owner

engageub commented Jun 5, 2023

Hi,
A replica of socks5 server was created using the following.
https://www.digitalocean.com/community/tutorials/how-to-set-up-dante-proxy-on-ubuntu-20-04

There were no UDP errors found while using this but your logs show errors related to NAT.
It means that your proxy provider has implemented rules related to NAT.

Thank you

@SkullFace141
Copy link
Author

xjasonlyu commented Jun 7, 2023

This behavior is expected. Currently, tun2socks has only symmetric NAT for UDP packets.

For example, there is a mapping of 198.18.0.1:56945 <--> 108.177.102.127:19302 UDP tunnel, but a packet from 51.15.87.217:22159 want to be sent to 198.18.0.1:56945, so the packet will be dropped automatically by tun2socks.

@engageub
Copy link
Owner

engageub commented Jun 8, 2023

There seems to be problem with your proxy provider. The socks5 proxy server created using Dante is working with no errors and the UDP requests are being sent. You may test it by creating it on other VPS server.

Another issue has already been raised related to mysterium. Please see below. There is a deep investigation going on to understand why garbage/truncated responses are received.

xjasonlyu/tun2socks#262

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants