Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Vitaly Shukela
    @vi
    Added SSL listener and SOCKS5 proxy support.
    Raine Virta
    @raine
    @vi much better
    (wrt. installation section)
    although I would place the section above Usage
    one of the most important bits of information user will be looking for on that page
    Vitaly Shukela
    @vi
    Done.
    Vitaly Shukela
    @vi
    Cooking a new release with -k (--insecure) option to force connecting to development wss://. It also should be buildable with newer OpenSSL.
    Vitaly Shukela
    @vi
    Websocat 1.2.0 now in Homebrew.
    Vitaly Shukela
    @vi
    Websocat in master now uses tokio instead of tokio-core. But still hyper 0.10 instead of 0.12 unfortunately.
    dsboo
    @dsboo
    hi:) thanks to websocket(your program). i want to send binary msg using this tool in client mode. but i can't find how to send binary msg from file or cli. could you give me a example?
    Vitaly Shukela
    @vi
    dsboo, cat myfile | websocat -b ws://destination/ or websocat -b readfile:myfile ws://destination ?
    If file is big, it would be split in mutliple WebSocket messages. Use -B option to override maximum message size.
    dsboo
    @dsboo
    thanks!
    is it impossible cli interaction?
    Vitaly Shukela
    @vi
    Do you mean interactively sending text messages, then send one-off message from file, then continue interactively typing text WebSocket messages?
    Kevin Elliott
    @kevinelliott
    Hello, I'm trying to use websocat to capture a stream at http://websdr.ewi.utwente.nl:8901/?tune=3715usb which has an embedded websocket at ws://websdr.ewi.utwente.nl:8901/~~stream?v=11 ... any thoughts?
    Vitaly Shukela
    @vi
    @kevinelliott You need to specify origin: websocat -b --origin http://websdr.ewi.utwente.nl:8901 ws://websdr.ewi.utwente.nl:8901/~~stream?v=11
    Kevin Elliott
    @kevinelliott
    Thanks, that worked. Looks like the data needs to get converted to audio somehow
    Vitaly Shukela
    @vi
    kevinelliott, If binary websocket message boundaries are significant then using websocat to decode that to audio may be problematic.
    David Cole
    @hadavarbarak
    We are trying to start a docker container with two listen proxy between tcp and ws. But when we connect to either opened port we get an immediate connection reset. When we do the same with the natively installed version of websocat it works fine. Has anyone else run into this?
    Vitaly Shukela
    @vi
    @hadavarbarak , What is a "natively installed version of websocat"? What is the other (non-natively installed) version of Websocat? What is the command line?
    藤原太一殺す
    @idontforgivefujiwara_gitlab
    Documented example for connecting with websocat as a client panics!() immediately on illumos. Works for me on linux. Is this known? thread 'main' panicked at 'called Result::unwrap() on an Err value: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-signal-0.2.7/src/unix.rs:118:38
    Vitaly Shukela
    @vi
    Maybe try building without signal_handler feaure?
    Is there a ready-made KVM-runnable VM with development (ideally also Rust development) tools available inside for trying things for Illumos?
    藤原太一殺す
    @idontforgivefujiwara_gitlab
    @vi Building without signal_handler made the panic go away and the client usable. Thanks!
    @vi Dunno about KVM-images, I'm afraid. I found it trivial to install omniosce from the installer though, and it does have an up-to-date rust toolchain in the default repository.
    Vitaly Shukela
    @vi
    Note that without signal_handler it may leave terminal's filehandle in nonblocking state (and break further commands you type) if you terminate websocat with ^C.
    mygizli04
    @mygizli04
    I'm trying to send a message from a websocket, i tried -n1 which does send the message, but closes before the response arrives. Is there a way i can make it so it waits for the response before closing the connection ( like curl )
    oh wait last message is from august :/
    Jan Langrehr
    @strgalt-t
    Hello, I'm not sure if people still read this room but I have a question: is there any documentation about how to use websocat in library mode ? I can't find code examples and crates.io says that there are no reverse dependencies. If someone could link me to something that would be great! Thank you in advance
    Vitaly Shukela
    @vi

    @mygizli04 -n1 should be what you need. If it does not work, further debugging should be needed. It should wait to response.

    For example, I can type on line into websocat -n1 ws://echo.websocket.org and receive the reply.

    @mygizli04 > oh wait last message is from august :/

    That's what the chat title is for: you are welcome to create question Github issues if chat looks inactive.

    @strgalt-t websocat is not intended to library usage.

    I remember replying in detail in e-mail, so won't repeat it here unless explicitly asked.

    dakman
    @dakman
    hey websocat is awesome.. question i have a node js program that outputs to console .. i need to server a broadcast stream (one way only, and client disconnects or connections) wont disrupt the stream.. ... i tried websocketd but it apparently creates a new instance of my "node app.js" per connection
    im confident that websocat is what i need.. eg trying to just pipe stdout from node's console log to a wss://localhost:<port>
    FWIW im using the latest static version on AWS Linux 2 ami ( redhat /centos-ish) .. if there is a different pkg or repo lemme know
    Vitaly Shukela
    @vi
    I remember answering this question on e-mail.
    Joe23232
    @Joe23232
    Hi guys , so is this made to be imported as a library to my existing code?
    AugmentedPhoenix
    @AugmentedPhoenix
    Hi all, I was wondering if there is a way to send 1 message with websocat without having to close the client manually?
    Vitaly Shukela
    @vi
    @Joe23232 No, websocat is meant to be used as a CLI tool.
    Maybe Websocta3 would be more library-friendly.
    1 reply
    @AugmentedPhoenix, Maybe you want -1 (--one-message) option?
    limenleap
    @limenleap
    Pardon me if this question was asked before. Is it possible to use websocat to receive a message from a wss:// websocket endpoint and send the received message to a localhost http:// server? I would be very grateful if this is possible. Thanks
    limenleap
    @limenleap

    I think I got the answer. This is what I did (hope it helps others in similar situations):

    For websocat:

    websocat -t "wss://wsendpoint"  foreachmsg:cmd:d:\apps\echoe.bat

    The contents of echoe.bat is this:

    @echo off
    setlocal
    for /F "tokens=*" %%a in ('more') do (
        curl -X POST "https://wherever.com/testwsoc.php" -d "%%a"
     )
    limenleap
    @limenleap
    In the above batch file, "tokens=*" will remove leading spaces of the line. But if those leading spaces are important then use "delimiters=" instead. See https://stackoverflow.com/a/51009073 Note that in both the cases; if the line is empty curl will not get called. If the line starts with a semicolon also the curl will not get called.
    yoavm
    @chat:yoavmoshe.com
    [m]
    Hello! I'm using websocat -Et unix-l:/tmp/mysocket.socket reuse-raw:wss://my.web.socket/endpoint to communicate with my websocket server over a UNIX socket. All works great for sending messages, but I want to also do something whenever a message is received. I'm trying to use foreachmsg but can't seem to figure out where exactly to place it. I want websocat to pass the incoming message to my script. what's the right way of doing this? Is foreachmsg even it?
    (and I did try the example in the message above but it seem to not work when I also have the unix socket there?)
    yoavm
    @chat:yoavmoshe.com
    [m]
    for future reference, solved here: vi/websocat#131
    Joe23232
    @Joe23232
    I know this is a bit off topic but in regards to smithay, through smithay, would I be able to directly output graphics to it, like lets say I made a taskbar, would I be able to directly output it to smithay
    Don Kackman
    @dkackman
    Hi - I am trying to connect to a wss websocket that uses mutual TLS auth; meaning both a shared cert and key are used to authenticate the client connection. In curl it would look something like this:
    curl --cert /path/to/file.crt --key /path/to/file.key etc etc
    Does websocat support this approach to auth form the client?
    Vitaly Shukela
    @vi
    @dkackman You need to use external SSL client such as openssl s_client or socat in combination with Websocat, as currently TLS features are limited in Websocat 1. Websocat 3 may be more TLS-related features like client certificates.