Comments (5)
You should probably use --base64
together with --binary-prefix
. That would enable you to both send and receive binary messages in otherwise text stream. If you type a line starting with B:
, it is interpreted as base64 to be decoded and sent as a binary WebSocket message. If incoming WebSocket message is binary then it would be base64-encoded and B:
prepended.
a hex representation too
Currently it is not implemented.
is there a way to hook input and output conversion functions where the binary in/out conversion is handled by somthing of my choice?
You can, for example, use base64 everywhere (i.e. --base64 --base64-text --binary-prefix='B:' --text-prefix='T:'
) and use custom script that would re-encode things to/from base64 from/to hex.
-k
...wss://domain.tld
Usage of --insecure
with real domains (not just internal or localhost ports) is not recommended outside of some quick tests. If you use self-signed certificates, you can specify certificate of your CA as SSL_CERT_FILE
environment variable.
from websocat.
You should probably use
--base64
together with--binary-prefix
. That would enable you to both send and receive binary messages in otherwise text stream. If you type a line starting withB:
, it is interpreted as base64 to be decoded and sent as a binary WebSocket message. If incoming WebSocket message is binary then it would be base64-encoded andB:
prepended.
atm, I've made a simple python script that popen's this one, and i'm doing the base64 with binary prefix in order to handle this, and it starts to work well, and I noticed that my text mode commands fail, and now i understand why;
It seems that the newline is also passed on, eg: i'm trying a websocket server command device list
which is 11 bytes long, but 12 bytes is sent (i'm assuming the newline is also sent), which fails with the command comparison functions in the websocket server. is there a way to not send the newline from the input to the websocket?
a hex representation too
Currently it is not implemented.
is there a way to hook input and output conversion functions where the binary in/out conversion is handled by somthing of my choice?
You can, for example, use base64 everywhere (i.e.
--base64 --base64-text --binary-prefix='B:' --text-prefix='T:'
) and use custom script that would re-encode things to/from base64 from/to hex.
-k
...wss://domain.tld
Usage of
--insecure
with real domains (not just internal or localhost ports) is not recommended outside of some quick tests. If you use self-signed certificates, you can specify certificate of your CA asSSL_CERT_FILE
environment variable.
this is for internal use only, and I have a wildcard signed by a cacert (which is selfsigned), but not all of my machines have the cacert CA installed...
from websocat.
11 bytes long, but 12 bytes is sent (i'm assuming the newline is also sent)
You may want to use --binary
mode, --no-fixups
to avoid automatic insertion of overlays and adding msg2line:
/ line2msg:
overlays manually.
from websocat.
not send the newline from the input to the websocket
--base64-text
is supposed to enable base64 for text messages, so you can control whitespace in them precisely.
from websocat.
i ended up using --linemode-strip-newlines
in the --text
mode with --base64
and --binary-prefix B:
, that seemed to work
from websocat.
Related Issues (20)
- Need help to debug a websocket HOT 9
- handshake with text and then pipe binary output to ffmpeg HOT 1
- Websocat server with base64 encoded file HOT 4
- piping with tcp reuse-raw splits payload HOT 2
- Connection Error HOT 2
- i need help with es-sh over wabsoket over see-dee-yen HOT 10
- Binary websocat.x86_64-pc-windows-gnu.exe version v1.11.0 is flagged as a virus HOT 3
- Support HTTP Redirection at Handshake HOT 2
- Latest release branded as malware HOT 3
- Broken when running against solana-test-validator HOT 2
- Line feed (\n) sent instead of carriage return (\r) HOT 2
- Error when running example, artifact not found on Clojars HOT 1
- Is there a way to keep websocat receiving content from named pipe? HOT 4
- panic when trying to run the wss broadcast example HOT 1
- WebsocketError: Received unexpected status code (200 OK) when proxying with nginx HOT 4
- Does not detect connection close in double-listen configuration HOT 3
- send body? HOT 4
- No http proxy support HOT 3
- Infinite loop with autoreconnect:reuse HOT 3
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.