Skip to content

Commit fd50377

Browse files
committed
README++
1 parent 9efee98 commit fd50377

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,25 @@ socket.on('message', function (data, flags) {
9292
});
9393
```
9494

95+
API
96+
---
97+
98+
## new HttpsProxyAgent(opts)
99+
100+
The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
101+
to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
102+
requests. This is acheived by using the HTTP `CONNECT` method.
103+
104+
The `opts` argument may either be a string URI of the proxy server to use, or an
105+
"options" object with more specific properties:
106+
107+
* `host` - String - Proxy host to connect to (may use `hostname` as well). Required.
108+
* `port` - Number - Proxy port to connect to. Required.
109+
* `secureProxy` - Boolean - If `true`, then use TLS to connect to the proxy. Defaults to `false`.
110+
* `secureEndpoint` - Boolean - If `true` then then a TLS connection to the endpoint will be established on top of the proxy socket. Defaults to `true`.
111+
* Any other options given are passed to the `net.connect()`/`tls.connect()` functions.
112+
113+
95114
License
96115
-------
97116

0 commit comments

Comments
 (0)