7.0.2 • Published 6 days ago

http-proxy-agent v7.0.2

Weekly downloads
9,076,750
License
MIT
Repository
github
Last release
6 days ago

http-proxy-agent

An HTTP(s) proxy http.Agent implementation for HTTP

This module provides an http.Agent implementation that connects to a specified HTTP or HTTPS proxy server, and can be used with the built-in http module.

Note: For HTTP proxy usage with the https module, check out https-proxy-agent.

Example

import * as http from 'http';
import { HttpProxyAgent } from 'http-proxy-agent';

const agent = new HttpProxyAgent('http://168.63.76.32:3128');

http.get('http://nodejs.org/api/', { agent }, (res) => {
  console.log('"response" event!', res.headers);
  res.pipe(process.stdout);
});

API

new HttpProxyAgent(proxy: string | URL, options?: HttpProxyAgentOptions)

The HttpProxyAgent class implements an http.Agent subclass that connects to the specified "HTTP(s) proxy server" in order to proxy HTTP requests.

The proxy argument is the URL for the proxy server.

The options argument accepts the usual http.Agent constructor options, and some additional properties:

  • headers - Object containing additional headers to send to the proxy server in each request. This may also be a function that returns a headers object.

    NOTE: If your proxy does not strip these headers from the request, they will also be sent to the destination server.

jsdompac-proxy-agentproxy-agentteeny-request@prisma/fetch-engine@june21x/semantic-release-github-no-commentarchetype-library@teambit/legacy@sap-cloud-sdk/core@theia/coreeasy-select-rnkilli8n-react-native-fast-imagewstunnelcookie@cashremit/cr-streamline-icons@simon-id/temp-testiot_modulesnickvanw-octokit-rest@frxf/frxf@vscode/monaco-editor-corego-ipfs-dep-agent@ntt_app/react-native-custom-notificationreact-native-covid-sdkvscode-test-webbitgethttpyacdtranslation-api@saeon/ol-react@saeon/quick-form@iobroker-community-adapters/iobroker.device-watcher@olivervorasai/sliderreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutils@ndpnt/open-terms-archivewilscanner@oiti/documentoscopy-react-nativestretch-rollup@mink-opn/build-tokensquoc-testnh-teeny-requestopen-terms-archivesvelte-slime@baotg/http-client@prodam/prodam-types@saaspe/componentsplginexpand-react-bridgebrequest-challengenode-gioluminos-ui-coresklif-ui-kitsklif-api@adobe/helix-cli@everything-registry/sub-chunk-1871jawwy-sdkjawwy_gamification_releasepuppeteer-page-proxy-fixreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgzzzxxxyyy321123@brantalikp/rn-resize@brownpapertickets/shovel@bud-tools/requestcometd-nodejs-clientcoderteq_financementorbox@cs6/react-native-test-native-view-libraryckeditor5-custom-build-tn-pluginckeditor5-custom-build-megampire@ciro99678_net/node-red-contrib-mssql-rai@ciro99678_net/red-contrib-mssql-rai@cybermega/flutter-resource-manager-rs@cubbles/webpackage-uploadercordova-plugin-demotoast@damruravihara/react-native-testing-packageconway-game@bbc/http-transport@bjacobel/cloudformer-node@batbayar/superset-plugin-chart-hello-world@badpingpong/placeholderimagecheckbox-component@catalinaquinteror/mdlinks@cdk8s-extensions/argo-rollout@buganto/clientcgpt-token@castrum-nubis/bulma@cdevine49/react-numeric-inputdanger@doridian/puppeteer-page-proxy@dorfire/pkg-vscode-depscubx-http-servercubx-webpackage-uploader@dnlowman/dangerdfeuk-frontenddfeuk-frontend-manualdemo-test-scrndeliverect-jwks-rsacustom-widgets-librarycustom-roulette
7.0.2

6 days ago

7.0.1

9 days ago

6.1.0

9 months ago

6.1.1

9 months ago

7.0.0

9 months ago

6.0.1

10 months ago

6.0.0

10 months ago

5.0.0

2 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.0.0

4 years ago

2.1.0

6 years ago

2.0.0

7 years ago

1.0.0

9 years ago

0.2.7

9 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.2

11 years ago

0.0.1

11 years ago