eclipse-thingweb / eclipse-thingweb/node-wot

[binding-http] Improve proxy support

Open
#118 1 comment 0 reactions 0 assignees View on GitHub
binding-http enhancement
Dominant language
TypeScript
Stars
192
Forks
100
Avg merge
3d 2h
Merged PRs (30d)
6

Description

The current proxy support in `binding-http` is rudimentary and does not support some often used scenarios, e.g. `https` requests over a `http` proxy as often used in corporate scenarios.

In this case, the client first has to send an unencrypted `CONNECT` request to the proxy and the use the established connection to setup the TLS encryption and make the `https` request to the target host.

Such use cases are not directly supported by the `http` and `https` packages of nodejs and are therefore also currently not supported by `binding-http`. See also the (quite old, but apparently still valid) discussion in https://github.com/nodejs/node-v0.x-archive/issues/2474, which was closed, because the issue can be resolved in userland, e.g. as shown in the reply https://github.com/nodejs/node-v0.x-archive/issues/2474#issuecomment-3481078.

Instead of implementing something similar I propose to use the `request` library. See https://github.com/request/request and https://www.npmjs.com/package/request, which implements all the necessary mechanisms and much more.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.