# ProxyServer

Canonical: <https://test-proxy-recorder.dev/docs/reference/api/classes/proxyserver/>
Docs index: <https://test-proxy-recorder.dev/docs/> · All docs as one file: <https://test-proxy-recorder.dev/llms-full.txt>

---

Defined in: [ProxyServer.ts:50](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/ProxyServer.ts#L50)

## Constructors

### Constructor

> **new ProxyServer**(`target`, `recordingsDir`, `timeoutMs?`, `redaction?`, `wsReplay?`): `ProxyServer`

Defined in: [ProxyServer.ts:70](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/ProxyServer.ts#L70)

#### Parameters

##### target

`string`

##### recordingsDir

`string`

##### timeoutMs?

`number`

##### redaction?

`false` \| [`RedactionConfig`](/docs/reference/api/interfaces/redactionconfig/)

##### wsReplay?

[`WebSocketReplayConfig`](/docs/reference/api/interfaces/websocketreplayconfig/)

#### Returns

`ProxyServer`

## Methods

### init()

> **init**(): `Promise`\<`void`\>

Defined in: [ProxyServer.ts:101](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/ProxyServer.ts#L101)

#### Returns

`Promise`\<`void`\>

***

### listen()

> **listen**(`port`): `Server`

Defined in: [ProxyServer.ts:105](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/ProxyServer.ts#L105)

#### Parameters

##### port

`number`

#### Returns

`Server`
