erebe / wstunnel

Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI - Static binary available
Other
3.22k stars 290 forks source link

100% virtual image usage in wstunnel service #207

Closed nvdmhd closed 4 months ago

nvdmhd commented 4 months ago

Hi I use this service on my ubuntu server but sometimes its virtual image usage come up to 100% as 1.0 TB and servers goes down... so what can I do about this problem?

erebe commented 4 months ago

Hello,

Can you describe a bit more the context ? Do you use the docker image, the binaries from the release ? Which version ? Do you have a lot of open connections when this happens ? After you transfer a lot of traffic ? What kind of tunnel do you use.

For the memory, only the virtual memory is increading ? or also the RSS one ?

nvdmhd commented 4 months ago

Hi again Thanks for your response, let me tell you more

  1. yes I install x-ui panel using docker and nginx, docker use host as network an not bridge, I used the version 5.0
  2. I almost have 60 people on my server and maybe 2-3 k TCP connections as my panel says, I transferes 150GB by now.
  3. I use wstunnel : wstunnel -L 0.0.0.0:443:localhost:443 wss://domain.com:2083 -v I transfer data using websocket over it and I created a new Origin SSL through tunnel using cloudflare
nvdmhd commented 4 months ago

sorry for being late responding

erebe commented 4 months ago

Hello,

No worries for the delay, I am not in a hurry. Regarding your issue of virtual memory, I may have managed to reproduce it. I am going to spare you the technical details, but if I am right, it is related to DNS resolution using the system/libc host resolver.

Would you mind trying this new release https://github.com/erebe/wstunnel/releases/tag/v8.5.3, and start your server by specifying a --dns-resolver option ? You can set the same --dns-resolver 'dns://8.8.8.8' or the one that is specified in /etc/resolv.conf

Let me know if it fixes your issue

erebe commented 4 months ago

In release https://github.com/erebe/wstunnel/releases/tag/v8.5.4, I changed the default behavior and don't the blocking/libc dns resolver. So you should be able to start your server as usual, without specifying a --dns-resolver option.

nvdmhd commented 4 months ago

that's interesting I am going to give it a try and I will let you know the result Appreciate your response

erebe commented 4 months ago

feel free to re-open if NOK