nwtgck / go-piping-tunnel

Tunneling from anywhere via Piping Server
MIT License
20 stars 3 forks source link

[ERR] yamux: Failed to read header: invalid content-type: text/html; charset=utf-8 #17

Open m2acgi opened 1 year ago

m2acgi commented 1 year ago

If the server or client shutdown, the clienet or server will shutdown also, log show [ERR] yamux: Failed to read header: invalid content-type: text/html; charset=utf-8, it won't connect auto. So the go-piping-tunnel not suitable for long time running in backgroud. Please fix. Thanks.

# serer
piping-tunnel server --port 1234 --yamux --server https://piping.example.com mypaht1 mypaht2

# client
piping-tunnel client --port 1234 --yamux --server https://piping.example.com mypaht1 mypaht2
nwtgck commented 1 year ago

The server may not support streaming request or response.

Try the following commands in different terminals.

seq inf | curl -T- https://piping.example.com/mypath
curl https://piping.example.com/mypath

The expected behavior is as follows.

https://user-images.githubusercontent.com/10933561/185754080-4f89dd70-cdad-41ca-b131-ed9aa1c8f3f8.mp4

m2acgi commented 1 year ago

The server if official server: https://piping.nwtgck.repl.co/

nwtgck commented 1 month ago

So the go-piping-tunnel not suitable for long time running in backgroud.

I understand what the issue is now. I have been thinking about a feature for long time running. It will repeatedly connect Piping Server in a loop. For now, --pmux is for long time running, but it is experimental feature.

m2acgi commented 1 month ago

Thanks, looking forward to the updated version with this new feature.