Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/commenthol/got-proxy
proxy agent for got
https://github.com/commenthol/got-proxy
got http-proxy https-proxy no-proxy
Last synced: 4 days ago
JSON representation
proxy agent for got
- Host: GitHub
- URL: https://github.com/commenthol/got-proxy
- Owner: commenthol
- License: mit
- Created: 2024-07-16T18:24:00.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-18T19:45:12.000Z (4 months ago)
- Last Synced: 2024-09-19T14:48:07.332Z (about 2 months ago)
- Topics: got, http-proxy, https-proxy, no-proxy
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# got-proxy
> proxy agent for got
A proxy agent for [got](https://github.com/sindresorhus/got) which considers
`http(s)_proxy` and `no_proxy` env-vars or settings.# usage
```
npm i got-proxy
```## proxy settings in code
```js
import { gotProxy } from 'got-proxy'const got = gotProxy({
proxy: 'http://my-http.proxy',
noProxy: 'localhost,.my.domain'
})const res = await got('https://httpbin.org/anything')
```## proxy settings via env vars
```
http_proxy=http://my-http.proxy
no_proxy=localhost,.my.domain
``````js
import { gotProxy } from 'got-proxy'
const got = gotProxy()const res = await got('https://httpbin.org/anything')
```# license
MIT licensed