Comments (6)
What OS do you use? Is it reproducible on Linux?
Is wss://
(i.e. TLS) necessary for the hang? Or does it also hang with plain ws://
?
when the target is a remote host and not localhost
It is the only difference, not e.g. ws://
on localhost vs wss://
on remote host?
from websocat.
What OS do you use? Is it reproducible on Linux?
Yes, it happens on Linux 6.6.7 for me.
It is the only difference, not e.g.
ws://
on localhost vswss://
on remote host?
Yes; if I point websocat
at a locally running TCP proxy (like socat
) which always accepts & buffers input then redirects to the remote host, the problem doesn't occur.
Is
wss://
(i.e. TLS) necessary for the hang? Or does it also hang with plainws://
?
I can test this but it will take some time.
from websocat.
If you are open for testing, you can try early Websocat4 build - does it flush properly?
websocat4 --binary tcp-l:127.0.0.1:1234 wss://1.2.3.4:1234/url
--exit-on-eof
is not yet supported though.
websocat4early.zip - linux x86_64 executable, you can also built yourself from websocat4
branch.
from websocat.
Or does it also hang with plain
ws://
?
It hangs with plain ws://
as well.
If you are open for testing, you can try early Websocat4 build - does it flush properly?
I am, but, sorry, I can't use that binary.
e6a57f3 does not hang.
from websocat.
Is a significantly older pre-built Websocat version (e.g. https://github.com/vi/websocat/releases/tag/v1.8.0) also buggy?
Is the problem also reproducible locally if one uses network namespaces, veth and netem to emulate a non-perfect network?
What does "send a large packet to 127.0.0.1:1234" mean from a user perspective? Is something like cat /dev/zero | nc 127.0.0.1 1234
that or one needs something more specific?
For me running websocat --binary tcp-l:127.0.0.1:1234 wss://ws.vi-server.org/mirror
and testing performance with cat /dev/zero | nc 127.0.0.1 1234 | pv > /dev/null
does not show hangs.
Fixing it for Websocat1 may be nontrivial (especially without a good repro), and Websocat1 may be nearing sunset.
Is your use case already covered by a workaround, so that proper fix can wait, i.e. consist of abandoning legacy version and finishing and releasing (an alpha version of) Websocat4?
from websocat.
Is a significantly older pre-built Websocat version (e.g. https://github.com/vi/websocat/releases/tag/v1.8.0) also buggy?
Yes. I tested 1.8.0 and 1.3.0 and they hang.
Is the problem also reproducible locally if one uses network namespaces, veth and netem to emulate a non-perfect network?
I would need to set that up 👀
What does "send a large packet to 127.0.0.1:1234" mean from a user perspective? Is something like
cat /dev/zero | nc 127.0.0.1 1234
that or one needs something more specific?
On the other side of the WebSocket is an SQL server. The hang happens when, after a handshake and authentication, I send a large query (120 KiB). I have not tried piping /dev/zero
.
For me running
websocat --binary tcp-l:127.0.0.1:1234 wss://ws.vi-server.org/mirror
and testing performance withcat /dev/zero | nc 127.0.0.1 1234 | pv > /dev/null
does not show hangs.
I think the difference is that there isn't a finite amount of data on input (there's always more data to push out any stuck previous data). A better chance to reproduce this would be to connect two echo servers, and then send an initial large packet; it should bounce infinitely.
Is your use case already covered by a workaround, so that proper fix can wait, i.e. consist of abandoning legacy version and finishing and releasing (an alpha version of) Websocat4?
websocat4
and enabling --ping-interval
both seem to work...
from websocat.
Related Issues (20)
- Question: how do websocat know the other one reached EOF ?
- How do websocat know the other one reached EOF ? HOT 3
- Print more details on I/O failure
- websocat does not report errors when the connection dies HOT 1
- Is there any way to print plain text of request and response when connecting to wss endpoint ? HOT 1
- Pkcs12 compatibility issues on OpenSSL 1.x.x HOT 5
- Consider allowing basic auth to be passed in environment variable to hide it from the rest of users HOT 4
- Saving Response from Websocat on windows OS HOT 1
- [v1.13.1] Release Date Request HOT 3
- Websocat client cannot connect even though wscat does? HOT 2
- pipe commands to websocat? HOT 3
- Cannot install in Fedora 40 container HOT 2
- Feature request: Filter out whitespace from CLI HOT 4
- support overlay abstract-dgram-listen & unix-dgram-listen HOT 1
- Process does not terminate HOT 3
- How can I pass an argument with websocat without using echo? HOT 2
- Feature request: handle Unix Domain Socket (UDS) HOT 1
- Need help on compile HOT 2
- Connection closed unexpected HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocat.