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.
@ndn/cli-common
Advanced tools
This package is part of NDNts, Named Data Networking libraries for the modern web.
This package implements common routines for NDNts based CLI programs. In particular, it initializes KeyChain and uplink faces. These can be configured via environment variables. Moreover, environment variables in .env file will be loaded automatically.
NDNTS_KEYCHAIN
environment variable specifies the KeyChain locator, which is a filesystem path where KeyChain files are stored.
If empty, a temporary in-memory KeyChain will be used.
NDNTS_KEY
environment variable specifies the default signing key.
It's recommended to use a certificate name, but this can also be a key name or prefix of a subject name.
If empty, any key in the KeyChain may be used.
If the specified prefix does not match any existing key, digest signing will be used.
NDNTS_PKTTRACE=1
environment variable enables logical forwarder tracing.
NDNTS_UPLINK
environment variable creates an uplink to another forwarder/node.
It supports:
unix:///run/nfd.sock
tcp://192.0.2.1:6363
udp://192.0.2.1:6363
ndndpdk:
or ndndpdk-udp:
ndndpdk-memif:
autoconfig:
(prefer UDP) or autoconfig-tcp:
(prefer TCP)The default is:
unix:///run/nfd.sock
tcp://127.0.0.1:6363
unix:///var/run/nfd.sock
NDNTS_MTU
environment variable sets the MTU for fragmentation of outgoing packets, applicable to UDP and memif.
It must be a positive integer, and the default value is 1450.
It's recommended to increase this value when using memif.
NDNTS_NFDREG=0
environment variable disables prefix registration on the uplink using NFD management protocol.
The default is enabling NFD prefix registration if the uplink is possibly connected to NFD.
NDNTS_NFDREGKEY
environment variable specifies the signing key for prefix registration commands.
This accepts the same syntax as NDNTS_KEY
.
The default is using the same key as NDNTS_KEY
.
NDNTS_NDNDPDK_GQLSERVER
environment variable specifies the NDN-DPDK GraphQL server endpoint.
The default is http://127.0.0.1:3030
.
This is only used when NDNTS_UPLINK
is set to ndndpdk:
or ndndpdk-memif:
.
NDNTS_NDNDPDK_LOCAL
environment variable specifies a local IP address that is reachable from NDN-DPDK.
The default is auto-detected from GraphQL HTTP client.
NDNTS_NDNDPDK_MEMIF_SOCKETPATH
environment variable specifies a directory for memif control socket.
The default is /run/ndn
.
openKeyChain
function returns the specified KeyChain.
getSigner
function returns a signer using the default signing key.
openUplinks
function creates the uplink.
It also enables prefix registration unless explicitly disabled.
closeUplinks
function closes the uplink.
This is called automatically upon SIGINT; you may disable this behavior with process.off("SIGINT", closeUplinks)
.
FAQs
NDNts: common routines for CLI programs
The npm package @ndn/cli-common receives a total of 0 weekly downloads. As such, @ndn/cli-common popularity was classified as not popular.
We found that @ndn/cli-common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.