uNetworking / uNetworking/uWebSockets
CONNECT and HTTP Proxy
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 19k
- Forks
- 1.9k
- Avg merge
- 3h 24m
- Merged PRs (30d)
- 5
Description
I tried to setup a server with .connect("/") endpoint, to support HTTPS proxy. I dont think it works at all though, and I'm not even sure that method in the library is supposed to do that.
I'm building an app that requires capturing CONNECT event, so I'm curious to know if there is an easy enough way (in other words, having an api on HTTP level).
Because of the passthrough nature of the server, it is particularly important to have high performance, so I'm inclined to choose uWebSockets.
Here's my starting point :
auto app = uWS::App({
"",
"",
}).connect("/", [](auto *res, auto *req) {
// When a client connects to the HTTP proxy server. It should answer 200 OK.
LOG(INFO) << "CONNECT";
res->writeStatus("200 OK")->end();
}).get("/", [](auto *res, auto *req) {
// When a client connects to the HTTP proxy server. It should answer 200 OK.
LOG(INFO) << "GET";
res->writeStatus("200 OK")->end("Hello World!");
});
Get on localhost:8080 logs GET, get on google with HTTP/HTTPS proxy set to localhost:8080 doesnt log CONNECT (though, it does sends CONNECT according to Wireshark).
Is this feature lacking ? Or is it simply too high level of a library (I know CONNECT is a bit inbetween HTTP and plain TCP connection)
Thanks for clarifying
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the .connect("/") handler in the supplied uWS::App example and reproduce the proxy request against localhost:8080, comparing application logs with the Wireshark observation. Determine whether CONNECT requests are exposed at the HTTP level and document or implement the supported behavior and API needed to capture them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100