Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Vitaly Shukela
    @vi
    Shiny new option: --jsonrpc. It turns qwe 4,5,6 into {"jsonrpc":"2.0","id":1, "method":"qwe", "params":[4,5,6]} automatically.
    Alkor San
    @alkorsan
    fantastic , it works good in windows
    echo "qwe 4,5,6" | websocat.exe --jsonrpc  ws://echo.websocket.org/
    {"jsonrpc":"2.0","id":1, "method":"qwe", "params":[4,5,6]}
    thank you
    Vitaly Shukela
    @vi
    id increments automatically.
    Alkor San
    @alkorsan
    oh I didn t notice that. well done
    is it posible to remove the "jsonrpc":"2.0" part?
    because it is added without asking them to do , and if the server can t parse it then one have to remove it first before sending
    Vitaly Shukela
    @vi
    It's part of JSON RPC 2.0. What server fails when this is present?
    I checked that it works with Chromium remote debug mode.
    Alkor San
    @alkorsan
    sorry i thought it will not work with chromium server
    thank you very much
    Vitaly Shukela
    @vi
    If you find a server that really fails when this field is present (or, for example, requires "1.1" instead of "2.0"), give a notice and I make it overridable.
    Alkor San
    @alkorsan
    yes ok
    Raine Virta
    @raine
    please add installation instructions in the readme
    even if it's just "build from source like this"
    Raine Virta
    @raine
    okay, after doing the building from source part, I realized you can do cargo install websocat (I'm new to rust)
    Alkor San
    @alkorsan
    i m a user too like you and don t know rust too. the owner "Vitaly Shukela" explained to me to do this too if you want ssl
    cargo build --release --features=ssl
    --release makes the final exe smaller but it takes a litle bit more time to compile
    Vitaly Shukela
    @vi
    cargo install websocat should work even without manually downloading the source code.
    Added a step about finding the built executable in README.
    Raine Virta
    @raine
    it's fairly common for project's to have "Installation" section in the README at close to top with instructions on how to install
    Alkor San
    @alkorsan
    me too i vote to add this
    Vitaly Shukela
    @vi
    Should it be something like "add this to $PATH or use cargo install" or something more elaborate?
    Alkor San
    @alkorsan
    when we install rust it adds automatically the PATH, i think adding the commands to build is suficient + a link to download rust
    something like this maybe:
    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