https://github.com/awslabs/aws-sdk-v3-js-proxy

A wrapper for adding proxy configurations to AWS SDK v3 clients.

https://github.com/awslabs/aws-sdk-v3-js-proxy

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.9%) to scientific vocabulary

Keywords

aws-proxy aws-sdk aws-sdk-v3 hacktoberfest http-proxy https-proxy proxy

Keywords from Contributors

labels
Last synced: 5 months ago · JSON representation

Repository

A wrapper for adding proxy configurations to AWS SDK v3 clients.

Basic Info
  • Host: GitHub
  • Owner: awslabs
  • License: apache-2.0
  • Language: TypeScript
  • Default Branch: main
  • Homepage:
  • Size: 1.53 MB
Statistics
  • Stars: 20
  • Watchers: 4
  • Forks: 3
  • Open Issues: 2
  • Releases: 17
Topics
aws-proxy aws-sdk aws-sdk-v3 hacktoberfest http-proxy https-proxy proxy
Created over 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Code of conduct

README.md

AWS SDK v3 Proxy

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

A wrapper for adding proxy support to AWS SDK v3 clients

This wrapper adds a proxy configuration to AWS SDK clients by checking environment variables and attaching the necessary request handler. By default, an error will be thrown if no proxy is found in process.env, but also has options to not throw which can be useful when developing other node utilities using this library.

Note: http_proxy and HTTP_PROXY take precedence over https_proxy and HTTPS_PROXY. If you would like to change this behavior it can be specified in the options.

Install

bash npm install aws-sdk-v3-proxy

Usage

HTTP Proxy

```ts // process.env.HTTP_PROXY = 'http://127.0.0.1' import { S3Client } from '@aws-sdk/client-s3'; import { addProxyToClient } from 'aws-sdk-v3-proxy';

const client = addProxyToClient(new S3Client({})); // client now has HTTP proxy config at 'http://127.0.0.1' ```

or

```ts import { S3Client } from '@aws-sdk/client-s3'; import { addProxyToClient } from 'aws-sdk-v3-proxy';

const client = addProxyToClient(new S3Client({}), { httpProxy: 'http://127.0.0.1', }); // client now has HTTP proxy config at 'http://127.0.0.1' ```

HTTPS Proxy

```ts // process.env.HTTPS_PROXY = 'https://127.0.0.1' import { S3Client } from '@aws-sdk/client-s3'; import { addProxyToClient } from 'aws-sdk-v3-proxy';

const client = addProxyToClient(new S3Client({})); // client now has HTTPS proxy config at 'https://127.0.0.1' ```

or

```ts import { S3Client } from '@aws-sdk/client-s3'; import { addProxyToClient } from 'aws-sdk-v3-proxy';

const client = addProxyToClient(new S3Client({}), { httpsProxy: 'https://127.0.0.1', }); // client now has HTTPS proxy config at 'https://127.0.0.1' ```

No Proxy with exception disabled

```ts // process.env.HTTPSPROXY = undefined // process.env.HTTPPROXY = undefined import { S3Client } from '@aws-sdk/client-s3'; import { addProxyToClient } from 'aws-sdk-v3-proxy';

const client = addProxyToClient(new S3Client({}), { throwOnNoProxy: false }); // client has no proxy assigned and no error thrown ```

Proxy with certs in header

```ts // process.env.HTTPS_PROXY = 'https://127.0.0.1' import { readFileSync } from 'fs'; import { S3Client } from '@aws-sdk/client-s3'; import { addProxyToClient } from 'aws-sdk-v3-proxy';

const client = addProxyToClient(new S3Client({}), { agentOptions: { ca: [readFileSync('custom-proxy-cert.pem').toString()], }, });

// client now has HTTPS proxy config at 'https://127.0.0.1' with ca custom-proxy-cert.pem ```

API

addProxyToClient(client, options?)

client

Type: Object

Any client from @aws-sdk.

options

Type: object

throwOnNoProxy

Type: boolean Default: true

Throw an error if no proxy is found in the environment.

httpsOnly

Type: boolean Default: false

Can be specified in cases where you have both httpproxy and httpsproxy set, and would like to override the default behavior of the http_proxy taking precedence.

debug

Type: boolean Default: false

Toggles additional logging for debugging.

httpProxy

Type: string

The URL for the HTTP proxy server. If not specified, the value of process.env.http_proxy or process.env.HTTP_RPOXY will be used.

httpsProxy

The URL for the HTTPS proxy server. If not specified, the value of process.env.https_proxy or process.env.HTTPS_RPOXY will be used.

agentOptions

Type: HttpsProxyAgentOptions

Used to pass specific options to the proxy agent.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 47
  • Total Committers: 3
  • Avg Commits per committer: 15.667
  • Development Distribution Score (DDS): 0.532
Past Year
  • Commits: 15
  • Committers: 2
  • Avg Commits per committer: 7.5
  • Development Distribution Score (DDS): 0.4
Top Committers
Name Email Commits
Ryan Sonshine r****e@u****m 22
dependabot[bot] 4****]@u****m 15
Ryan Sonshine s****e@a****m 10
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 6
  • Total pull requests: 28
  • Average time to close issues: 5 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 6
  • Total pull request authors: 3
  • Average comments per issue: 2.5
  • Average comments per pull request: 1.29
  • Merged pull requests: 26
  • Bot issues: 1
  • Bot pull requests: 22
Past Year
  • Issues: 2
  • Pull requests: 1
  • Average time to close issues: 11 days
  • Average time to close pull requests: 11 days
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 3.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • fossamagna (1)
  • brandonregard (1)
  • AllanOricil (1)
  • github-actions[bot] (1)
  • gamliela (1)
  • rogerweb (1)
Pull Request Authors
  • dependabot[bot] (22)
  • ryansonshine (6)
  • fossamagna (2)
Top Labels
Issue Labels
bug (4) released (2) semantic-release (1) enhancement (1)
Pull Request Labels
dependencies (22) released (21)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 24,210 last-month
  • Total dependent packages: 7
  • Total dependent repositories: 5
  • Total versions: 22
  • Total maintainers: 2
npmjs.org: aws-sdk-v3-proxy

A wrapper for adding proxy support to AWS SDK v3 clients

  • Versions: 22
  • Dependent Packages: 7
  • Dependent Repositories: 5
  • Downloads: 24,210 Last month
Rankings
Downloads: 1.4%
Dependent packages count: 3.2%
Dependent repos count: 5.1%
Average: 5.8%
Stargazers count: 9.2%
Forks count: 9.9%
Maintainers (2)
Last synced: 6 months ago

Dependencies

package-lock.json npm
  • 961 dependencies
package.json npm
  • @aws-sdk/client-s3 ^3.16.0 development
  • @aws-sdk/types ^3.15.0 development
  • @ryansonshine/commitizen ^4.2.8 development
  • @ryansonshine/cz-conventional-changelog ^3.3.4 development
  • @types/jest ^27.5.2 development
  • @types/node ^12.20.11 development
  • @typescript-eslint/eslint-plugin ^4.22.0 development
  • @typescript-eslint/parser ^4.22.0 development
  • conventional-changelog-conventionalcommits ^5.0.0 development
  • eslint ^7.25.0 development
  • eslint-config-prettier ^8.3.0 development
  • eslint-plugin-node ^11.1.0 development
  • eslint-plugin-prettier ^3.4.0 development
  • husky ^6.0.0 development
  • jest ^27.2.0 development
  • lint-staged ^10.5.4 development
  • prettier ^2.2.1 development
  • semantic-release ^19.0.2 development
  • ts-jest ^27.0.5 development
  • ts-node ^10.2.1 development
  • typescript ^4.2.4 development
  • @aws-sdk/node-http-handler ^3.53.0
  • proxy-agent ^5.0.0
.github/workflows/auto-merge.yml actions
.github/workflows/codeql-analysis.yml actions
.github/workflows/pr.yml actions
.github/workflows/release.yml actions