
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A TypeScript HTTP client library with browser impersonation capabilities for Node.js.
npm install trimpts
import { AsyncClient } from 'trimpts';
// Create a client with browser impersonation
const client = new AsyncClient({
impersonate: 'chrome',
impersonate_os: 'windows'
});
// Make a simple GET request
const response = await client.get('https://api.example.com/users');
console.log(response.json());
AsyncClientPromise-based HTTP client with async/await support.
const client = new AsyncClient(options);
ClientCallback-based HTTP client.
const client = new Client(options);
interface ClientOptions {
timeout?: number; // Request timeout in milliseconds
headers?: Record<string, string>; // Custom headers
auth?: {
username?: string;
password?: string;
token?: string;
};
proxy?: {
host: string;
port: number;
auth?: {
username: string;
password: string;
};
};
cookies?: string; // Cookie string
ssl?: {
rejectUnauthorized?: boolean;
ca?: string;
cert?: string;
key?: string;
};
userAgent?: string; // Custom User-Agent
impersonate?: 'chrome' | 'safari' | 'edge' | 'firefox' | 'okhttp';
impersonate_os?: 'android' | 'ios' | 'linux' | 'macos' | 'windows';
}
All clients support the following methods:
get(url, options?) - GET requestpost(url, data?, options?) - POST requestput(url, data?, options?) - PUT requestpatch(url, data?, options?) - PATCH requestdelete(url, options?) - DELETE requesthead(url, options?) - HEAD requestoptions(url, options?) - OPTIONS requestinterface Response {
status: number;
headers: Record<string, string | string[] | undefined>;
data: string;
json<T = any>(): T; // Parse JSON response
text(): string; // Get text response
}
RequestError - General request errorsTimeoutError - Request timeout errorsTrimpTS can impersonate various browsers and operating systems:
// Chrome on Windows
const client = new AsyncClient({
impersonate: 'chrome',
impersonate_os: 'windows'
});
// Safari on macOS
const client = new AsyncClient({
impersonate: 'safari',
impersonate_os: 'macos'
});
// Firefox on Linux
const client = new AsyncClient({
impersonate: 'firefox',
impersonate_os: 'linux'
});
const client = new AsyncClient({
auth: {
username: 'user',
password: 'pass'
}
});
const client = new AsyncClient({
auth: {
token: 'your-jwt-token'
}
});
const response = await client.get('https://api.example.com/data', {
headers: {
'X-API-Key': 'your-api-key'
},
timeout: 10000
});
const response = await client.post('https://api.example.com/users', {
name: 'John Doe',
email: 'john@example.com'
});
const client = new AsyncClient({
ssl: {
rejectUnauthorized: false, // For self-signed certificates
ca: fs.readFileSync('ca.pem'),
cert: fs.readFileSync('cert.pem'),
key: fs.readFileSync('key.pem')
}
});
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see the LICENSE file for details.
FAQs
HTTP client with browser impersonation for Node.js
We found that trimpts 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.