Skip to content

Jeffrey0117/modern-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

modern-proxy

Modern rewrite of TooTallNate's proxy-agents ecosystem.

One package replaces 9:

Original Status
agent-base βœ… Integrated
https-proxy-agent βœ… Integrated
http-proxy-agent βœ… Integrated
socks-proxy-agent βœ… Integrated
proxy-agent βœ… Integrated
pac-proxy-agent βœ… Integrated
pac-resolver βœ… Integrated
get-uri βœ… Integrated
data-uri-to-buffer βœ… Integrated

Packages

Package Description
@modern-proxy/core Unified proxy agent with HTTP, SOCKS, PAC support

Quick Start

npm install @modern-proxy/core
import { ProxyAgent } from '@modern-proxy/core';

// Auto-detect from environment
const agent = new ProxyAgent();

// Or specify proxy
const agent = new ProxyAgent({ proxy: 'http://proxy:8080' });
const agent = new ProxyAgent({ proxy: 'socks5://127.0.0.1:9050' });

// Use with fetch
await fetch('https://api.example.com', { agent });

Tree-shaking

Import only what you need:

// Only HTTP proxy (~6KB)
import { HttpsProxyAgent } from '@modern-proxy/core/http';

// Only SOCKS proxy (~6KB)
import { SocksProxyAgent } from '@modern-proxy/core/socks';

// Only PAC support
import { PacProxyAgent } from '@modern-proxy/core/pac';

// Auto-detect from env
import { ProxyAgent } from '@modern-proxy/core/auto';

License

MIT

About

🌐 Modern Proxy API - Advanced HTTP/HTTPS proxy utilities for Node.js with request interception

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors