Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ipfs-gateway-race
Advanced tools
npm install ipfs-gateway-race
Import the library in your application and create a gateway racer like:
import { createGatewayRacer } from 'ipfs-gateway-race'
const gwRacer = createGatewayRacer(
['https://ipfs.io', 'https://cf-ipfs.com']
)
Get a IPFS response by given CID.
interface IpfsGatewayRaceGetOptions {
pathname?: string
headers?: Headers
noAbortRequestsOnWinner?: boolean
onRaceEnd?: (gwResponsePromises: GatewayResponsePromise[], winnerResponse: GatewayResponse | undefined) => void
}
get(cid: string, options: IpfsGatewayRaceGetOptions): Promise<Response>
Example:
import { createGatewayRacer } from 'ipfs-gateway-race'
const gwRacer = createGatewayRacer(['https://ipfs.io', 'https://cf-ipfs.com'])
const response = await gwRacer.get(
'bafybeiedv7sowwxamly4oicivudp45rsfvbklnf3fvbvonxrwoxqylhtwq',
{ pathname: '/0.json' }
)
Feel free to join in. All welcome. Open an issue!
If you're opening a pull request, please see the guidelines in DEVELOPMENT.md on structuring your commit messages so that your PR will be compatible with our release process.
Dual-licensed under MIT + Apache 2.0
FAQs
Races given IPFS Gateways to resolve provided CID
The npm package ipfs-gateway-race receives a total of 1 weekly downloads. As such, ipfs-gateway-race popularity was classified as not popular.
We found that ipfs-gateway-race 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.