jpillora / chisel

A fast TCP/UDP tunnel over HTTP
MIT License
12.78k stars 1.35k forks source link

Client process dead unexpectedly on Win10 #201

Open gaorui84 opened 3 years ago

gaorui84 commented 3 years ago

I set up a chisel server with SSL and connect it from my local end (on Windows 10) via SOCKS5 w/ the parameter "--keepalive 60s". It works but the client process gets terminated unexpectedly at times and has to be restarted. Should I adjust the parameters?

aus commented 3 years ago

60s keepalive is ok. Adjusting the keepalive can reduce the amount of reconnects, but it shouldn't crash the client process. Do you have any stack traces from the client? If the process is crashing, then it's likely a bug.

gaorui84 commented 3 years ago

I tried to save the verbose log to a file by adding parameters "-v ... >" but it doesn't work. The output is not correctly re-directed to the log file as expected. Do I have to keep an eye in the command line window to find out how it crashes?

jpillora commented 3 years ago

Logs go to stderr, try -v ... 2> /tmp/myfile

On Sat, 10 Oct 2020 at 03:24, gaorui84 notifications@github.com wrote:

I tried to save the verbose log to a file by adding parameters "-v ... >" but it doesn't work. The output is not correctly re-directed to the log file as expected. Do I have to keep an eye in the command line window to find out how it crashes?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jpillora/chisel/issues/201#issuecomment-706276773, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X43EZVFO5UQGRDY25Q3SJ42KHANCNFSM4SILGTCA .

gaorui84 commented 3 years ago

Got it! The last stack traces right before the process crash are as follows:


2020/10/12 00:00:35 client: tun: proxy#127.0.0.1:1081=>socks: conn#950: Open 2020/10/12 00:01:38 client: tun: proxy#127.0.0.1:1081=>socks: conn#950: Close (sent 1.12KB received 6.13KB) 2020/10/12 00:02:48 client: tun: proxy#127.0.0.1:1081=>socks: conn#951: Open 2020/10/12 00:02:54 client: tun: proxy#127.0.0.1:1081=>socks: conn#952: Open 2020/10/12 00:03:08 client: tun: proxy#127.0.0.1:1081=>socks: conn#949: Close (sent 14KB received 7.43MB) 2020/10/12 00:03:13 client: tun: proxy#127.0.0.1:1081=>socks: conn#945: Close (sent 26.1KB received 15.6MB) 2020/10/12 00:03:14 client: tun: proxy#127.0.0.1:1081=>socks: conn#953: Open 2020/10/12 00:03:16 client: tun: proxy#127.0.0.1:1081=>socks: conn#954: Open 2020/10/12 00:03:16 client: tun: proxy#127.0.0.1:1081=>socks: conn#955: Open 2020/10/12 00:03:19 client: tun: proxy#127.0.0.1:1081=>socks: conn#956: Open 2020/10/12 00:03:43 client: tun: proxy#127.0.0.1:1081=>socks: conn#953: Close (sent 6.13KB received 2.04MB) 2020/10/12 00:05:31 client: tun: proxy#127.0.0.1:1081=>socks: conn#957: Open 2020/10/12 00:05:31 client: tun: proxy#127.0.0.1:1081=>socks: conn#958: Open 2020/10/12 00:05:31 client: tun: proxy#127.0.0.1:1081=>socks: conn#959: Open 2020/10/12 00:05:31 client: tun: proxy#127.0.0.1:1081=>socks: conn#960: Open 2020/10/12 00:05:31 client: tun: proxy#127.0.0.1:1081=>socks: conn#961: Open 2020/10/12 00:05:31 client: tun: proxy#127.0.0.1:1081=>socks: conn#962: Open 2020/10/12 00:05:33 client: tun: proxy#127.0.0.1:1081=>socks: conn#963: Open 2020/10/12 00:05:35 client: tun: proxy#127.0.0.1:1081=>socks: conn#964: Open 2020/10/12 00:05:50 client: tun: SSH disconnected 2020/10/12 00:05:50 client: Disconnected 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#925: Close (sent 19.9KB received 8MB) 2020/10/12 00:05:50 client: Connection error: read tcp 192.168.0.100:4173->XXX.XXX.XXX.XXX:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#924: Close (sent 48.7KB received 22.1MB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#963: Stream error: ssh: unexpected packet in response to channel open: 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#934: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#922: Close (sent 11.4KB received 5.64KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#964: Stream error: ssh: unexpected packet in response to channel open: 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#921: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#920: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#910: Close (sent 540B received 5.2KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#909: Close (sent 540B received 5.2KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#919: Close (sent 1.93KB received 7.25KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#962: Close (sent 21B received 2B) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#961: Close (sent 21B received 2B) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#960: Close (sent 21B received 2B) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#959: Close (sent 21B received 2B) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#918: Close (sent 2.01KB received 7.39KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#954: Close (sent 3.26KB received 244KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#916: Close (sent 42.4KB received 205KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#957: Close (sent 21B received 2B) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#894: Close (sent 17.7KB received 49.4KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#958: Close (sent 21B received 2B) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#935: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#956: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#955: Close (sent 3.34KB received 1.08MB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#929: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#952: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#951: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: proxy#127.0.0.1:1081=>socks: conn#928: Close (sent 623B received 5.16KB) 2020/10/12 00:05:50 client: tun: Unbound proxies


gaorui84 commented 3 years ago

Note: The issue still exists with v1.7.2 (both server and client upgraded)

jpillora commented 3 years ago

Will look into it soon

On Thu, 22 Oct 2020 at 7:57 pm gaorui84 notifications@github.com wrote:

Note: The issue still exists with v1.7.2 (both server and client upgraded)

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jpillora/chisel/issues/201#issuecomment-714342811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X44RNFEFWPAC5U62NQ3SL7XYDANCNFSM4SILGTCA .