Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
fluent-plugin-websocket
Advanced tools
= fluent-plugin-websocket {https://badge.fury.io/rb/fluent-plugin-websocket.svg}[https://badge.fury.io/rb/fluent-plugin-websocket]
Fluentd websocket output plugin.
This plugin works as websocket server which can output JSON string or {MessagePack}[http://msgpack.org/] binary.
In the current version, emitted data will be broadcasted to the all connected clients.
== Installation
gem install fluent-plugin-websocket
== Configuration <match foo.**> type websocket host 192.168.1.1 # default: 0.0.0.0 (ANY) port 8080 # default: 8080 use_msgpack false # default: false add_time false # default: false add_tag true # default: true buffered_messages 100 # default: 0 token SomeToken # default: nil
If there are no websocket connections, this plugin silently discards data. You may use out_copy plugin like this:
<match foo.**>
type copy
<store>
type file
path /var/log/foo/bar.log
</store>
<store>
type websocket
port 8080
</store>
</match>
If buffered_messages is greater than 0, the last stored data is sent to the client upon new connection.
== Data format [tag, timestamp, data_object]
=== Example curl -X POST -d 'json={"action":"login","user":6}' http://localhost:8888/foo/bar
["foo.bar",1364699026,{"action":"login","user":6}]
== Client sample === JSON format (use_msgpack: false) function onMessage(evt) { data = JSON.parse(evt.data); ... }
=== Msgpack format binary (use_msgpack: true) Extract data by {msgpack.js}[https://github.com/msgpack/msgpack-javascript].
websocket.binaryType = "arraybuffer"
...
function onMessage(evt) {
data = msgpack.unpack(new Uint8Array(evt.data))
...
}
=== Authentication and filtering
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: 127.0.0.1:8080" \
--header "Origin: http://127.0.0.1:8080" \
--header "Sec-WebSocket-Key: SGVabG8sIHOvcmxDIQ==" \
--header "Sec-WebSocket-Version: 13" \
"http://127.0.0.1:8888/?foo=bar&token=MyT0ken"
== Changelogs
See commit logs about contributors.
== Copyright
Copyright:: Copyright (c) 2013 Tetsu Izawa (@moccos) License:: Apache License, Version 2.0
FAQs
Unknown package
We found that fluent-plugin-websocket demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.