# @devhigley/parse-proxy

> Node.js proxy string parser

Latest version **1.0.3** (published 2021-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @devhigley/parse-proxy
pnpm add @devhigley/parse-proxy
yarn add @devhigley/parse-proxy
bun add @devhigley/parse-proxy
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-02-06 |
| First published | 2021-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Devin Higley |
| Maintainers | devhigley |
| Keywords | parse, proxy, typescript |

## Links

- npm: https://www.npmjs.com/package/@devhigley/parse-proxy
- Repository: https://github.com/DevHigley/parse-proxy
- Homepage: https://github.com/DevHigley/parse-proxy#readme
- Issues: https://github.com/DevHigley/parse-proxy/issues
- npm.io page: https://npm.io/package/@devhigley/parse-proxy

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2021-02-06
- 1.0.2 — 2021-01-21
- 1.0.1 — 2021-01-19
- 1.0.0 — 2021-01-18

## README

# parse-proxy [![Build Status](https://travis-ci.com/DevHigley/parse-proxy.svg?branch=master)](https://travis-ci.com/DevHigley/parse-proxy)

## Description

parse-proxy is a lightweight Node.js proxy string parsing library

### What it does:

-   parses a string of proxies into an array of proxy objects
-   supports multiple delimiters (comma, newline, space)
-   supports proxy authentication
-   supports proxy protocols

## Installation

```
npm install @devhigley/parse-proxy
yarn add @devhigley/parse-proxy
```

## Usage
### Basic example delimited by comma and space:
```js
const parseProxy = require("@devhigley/parse-proxy");

parseProxy(`1.1.1.1:80, 2.2.2.2:80, 3.3.3.3:80`);
```
#### Result:
```js
[
  { host: '1.1.1.1', port: 80, protocol: 'http' },
  { host: '2.2.2.2', port: 80, protocol: 'http' },
  { host: '3.3.3.3', port: 80, protocol: 'http' }
]
```
### Example with protocol and authentication, delimited by new line:
```js
const parseProxy = require("@devhigley/parse-proxy");

parseProxy(`https://user:pass@104.236.55.48:8080
            https://user:pass@213.105.29.14:3128`);
```
#### Result:
```js
[
  {
    host: '104.236.55.48',
    port: 8080,
    protocol: 'https',
    auth: { username: 'user', password: 'pass' }
  },
  {
    host: '213.105.29.14',
    port: 3128,
    protocol: 'https',
    auth: { username: 'user', password: 'pass' }
  }
]
```

---
_Source: https://npm.io/package/@devhigley/parse-proxy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
