Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Alkor San
    @alkorsan
    install it and run:
    git clone https://github.com/vi/websocat
    cd websocat
    cargo build --release --features=ssl
    this is how they do in other projects like in go
    Raine Virta
    @raine
    # Installation
    
    1. [Install rust](https://www.rust-lang.org/en-US/install.html) if necessary
    2. `cargo install websocat`
    This would have saved 5 minutes for me
    Vitaly Shukela
    @vi
    It may be a bit misleading, as it downloads a separate copy of websocat source code, not uses the one you are running cargo install from.
    It should also cover installing pre-built binaries distributed using Github Releases.
    Alkor San
    @alkorsan
    yes
    Raine Virta
    @raine
    How does one add headers to this command websocat 'ws://localhost:8003/socket.io/?EIO=3&transport=websocket'?
    Trying to add -H Cookie:foo before the url but it's saying websocat: No URL specified
    Presumably the "simple mode" doesn't work if you add headers
    Vitaly Shukela
    @vi
    Strange.
    Try specifying the option after URL, not before.
    It assumes the URL is a second header.
    Raine Virta
    @raine
    Hey, that works
    Vitaly Shukela
    @vi
    It is to be fixed in next release.
    Raine Virta
    @raine
    Thank you
    Vitaly Shukela
    @vi
    Another way to specify it is websocat -H=Cookie:foo ws://..., with the equal sign.
    Vitaly Shukela
    @vi
    Added installation section to the README. Is it OK?
    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.