
Product
Rubygems Ecosystem Support Now Generally Available
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
tcp-log-server
Advanced tools
Serve an append-only log over TCP.
npm install --global tcp-log-server
tcp-log-server
The server uses pino logging. To improve console log output:
npm install --global pino
tcp-log-server | tee server.log | pino
Configure tcp-log-server
with environment variables:
PORT
for TCPBLOBS
directory for entry JSON files, named by hash, or memory
to
store in memoryFILE
for the list of entriesThe package exports a factory function. Given a pino log, a file
path, an abstract-blob-store, and an EventEmitter
, it returns a TCP
connection handler function suitable for net.createServer(handler)
.
You may also provide a hash function and hash length.
The server accepts TCP connections. It enables keep-alive on each socket. All messages are newline-delimited JSON objects. tcp-log-client provides a high-level interface.
Clients can send:
{"from":1,"read":5}
On receipt, the server will begin sending up to read
log entries
with indices greater than or equal to from
, in ascending-index order.
(The lowest possible index is 1
.)
Each entry will be sent like:
{"index":"1","entry":{"some":"entry"}}
Servers may report errors reading specific log entries:
{"index":45,"error":"some-error"}
If the server reaches the head of its log before sending read
entries, it will send:
{"current":true}
Once the server has sent read
entries, it will report the index of
the head of its log:
{"head":100}
{"id":"some-id","entry":{"arbitrary":"data"}}
require('uuid').v4()
, with the uuid package, is an easy way to
generate id strings.
Once successfully appended to the log, the server will confirm the index of the newly appended entry.
{"id":"some-id","index":44}
If there is an error, the server will instead respond:
{"id":"some-id-string","error":"error-string"}
FAQs
serve an append-only log over TCP
The npm package tcp-log-server receives a total of 5 weekly downloads. As such, tcp-log-server popularity was classified as not popular.
We found that tcp-log-server 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.
Product
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
Research
The Socket Research Team investigates a malicious npm package that appears to be an Advcash integration but triggers a reverse shell during payment success, targeting servers handling transactions.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.