
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
@balena/eye-patch
Advanced tools
This package patches `http(s).Agent` to implement "happy eyeballs" ([rfc8305](https://datatracker.ietf.org/doc/html/rfc8305)), a standard published by the IETF.
This package patches http(s).Agent to implement "happy eyeballs" (rfc8305), a standard published by the IETF.
It improves client performance and reliability by trying concurrently trying multiple ip addresses for a given host name. See Explanation for more detail.
npm i --save-dev @balena/eye-patch
To use this library, simply import the module, and the prototype of http.Agent.createConnection and https.Agent.createConnection will be replaced.
import '@balena/eye-patch';
If you want to be more explicit, you can explicitly patch the http(s).Agent:
import { patch } from '@balena/eye-patch';
import { Agent as HttpAgent } from 'http';
import { Agent as HttpsAgent } from 'https';
patch(HttpAgent);
patch(HttpsAgent);
Although, this is exactly what the import '@balena/eye-patch/explicit'; does anyway.
You could also implement your own agent and replace the createConnection method:
import { createConnection } from '@balena/eye-patch/explicit';
import { Agent as HttpAgent } from 'http';
import { Agent as HttpsAgent } from 'https';
export class MyHttpAgent extends HttpAgent {
createConnection = createConnection;
}
export class MyHttpsAgent extends HttpsAgent {
createConnection = createConnection;
}
This does basically the same thing as the previous examples though.
Essentially, the algorithm amounts to this:
FAQs
This package patches `http(s).Agent` to implement "happy eyeballs" ([rfc8305](https://datatracker.ietf.org/doc/html/rfc8305)), a standard published by the IETF.
We found that @balena/eye-patch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.

Security News
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Googleâs UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.