erebe / wstunnel

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

No file descriptors available Error #251

Closed V2RVPNShop closed 1 month ago

V2RVPNShop commented 1 month ago

Hi, After a few hours of running wstunnel as below, I got this error. wstunnel server wss://[::]:8443

image

This is my limits info: image

erebe commented 1 month ago

This is not related to wstunnel but to your system/workload, file descriptors are not infinite. Either spread the load on another machine, or if you have too many idle connections, use a reverse proxy to force close inactive connections after a timeout

V2RVPNShop commented 1 month ago

Hi, If I run wstunnel like this on the client side, will the problem be solved? wstunnel client -L 'tcp://0.0.0.0:80:localhost:80?timeout_sec=60' -L 'tcp://0.0.0.0:443:localhost:443?timeout_sec=60' wss://sub.domain.ir:8443

Thanks for your answer

erebe commented 1 month ago

It would indeed, but the timeout is only implemented for udp. As for Tcp we already know when to terminate the connection.

I strongly recommend you installing nginx/haproxy in front of wstunnel to handle those cases.