
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
@mjackson/fetch-proxy
Advanced tools
fetch-proxy
is an HTTP proxy for the JavaScript Fetch API.
In the context of servers, an HTTP proxy server is a server that forwards all requests it receives to another server and returns the responses it receives. When you think about it this way, a fetch
function is like a mini proxy server sitting right there in your code. You send it requests, it goes and talks to some other server, and it gives you back the response it received.
fetch-proxy
allows you to easily create fetch
functions that act as proxies to "target" servers.
Set-Cookie
headers received from target serverX-Forwarded-Proto
and X-Forwarded-Host
headersfetch
implementationsInstall from npm:
npm i @mjackson/fetch-proxy
import { createFetchProxy } from '@mjackson/fetch-proxy';
// Create a proxy that sends all requests through to remix.run
let proxy = createFetchProxy('https://remix.run');
// This fetch handler is probably running as part of your server somewhere...
function handleFetch(request: Request): Promise<Response> {
return proxy(request);
}
// Test it out by manually throwing a Request at it
let response = await handleFetch(new Request('https://shopify.com'));
let text = await response.text();
let title = text.match(/<title>([^<]+)<\/title>/)[1];
assert(title.includes('Remix'));
node-fetch-server
- Build HTTP servers for Node.js using the web fetch APISee LICENSE
FAQs
An HTTP proxy for the web Fetch API
The npm package @mjackson/fetch-proxy receives a total of 729 weekly downloads. As such, @mjackson/fetch-proxy popularity was classified as not popular.
We found that @mjackson/fetch-proxy demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.