Skip to content

Commit

Permalink
ci: proxy username/pass
Browse files Browse the repository at this point in the history
  • Loading branch information
skilbjo committed Aug 7, 2024
1 parent e1a79ea commit 6cfb7b9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@
npm i
npm run exec -- src/index.ts
```

# or

```
npm test -- test/axios.test.ts --watch
```

### proxy

since repo is public, for proxy url, load creds in `PROXY_CREDS` env var

```bash
export PROXY_CREDS="user:pass" npm run exec -- src/index.ts
```

```bash
export PROXY_CREDS="user:pass" npm test -- test/axios.test.ts --watch
```
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type ResponseTypes =
| Record<string, unknown>
| Record<string, unknown>[];

const proxyUrl = 'https://[[[proxy-url-here]]]@pr.oxylabs.io:7777';
const proxyUrl = `https://${process.env.PROXY_CREDS}@pr.oxylabs.io:7777`;

const proxyConfig = (jar: CookieJar) => ({
httpAgent: new HttpProxyCookieAgent(proxyUrl, {
Expand Down

0 comments on commit 6cfb7b9

Please sign in to comment.