vless-proxy-agent
v0.0.1
Published
A VLESS proxy `http.Agent` implementation for HTTP and HTTPS
Downloads
22
Maintainers
Readme
vless-proxy-agent
A VLESS proxy http.Agent implementation for HTTP and HTTPS requests.
This package provides an http.Agent implementation that connects to a VLESS proxy server for HTTP and HTTPS requests.
Installation
npm install vless-proxy-agentUsage
import { VlessProxyAgent } from 'vless-proxy-agent';
import https from 'https';
const proxy = 'vless://uuid@host:port?security=reality&sni=example.com&type=tcp&encryption=none';
const agent = new VlessProxyAgent(proxy);
https.get('https://example.com', { agent }, (res) => {
console.log('"response" event!', res.headers);
res.pipe(process.stdout);
});API
new VlessProxyAgent(proxy[, options])
proxy{String|URL} - VLESS proxy URLoptions{Object} - Optional options object with standardhttp.Agentproperties
The VLESS proxy URL should follow this format:
vless://uuid@host:port?security=reality&sni=example.com&type=tcp&encryption=noneSupported URL parameters:
security:reality,tls, ornonesni: Server Name Indication for TLStype:tcp,ws, orgrpc(currently only TCP is supported)encryption:noneorautofp: Fingerprint for Reality securitypbk: Public key for Reality securitysid: Short ID for Reality securityspx: Spider X for Reality security
License
MIT
