Skip to content

feat: Block CONNECT requests for improved security - #218

Open
xkr47 wants to merge 1 commit into
junkurihara:developfrom
xkr47:feat/block-connect-method
Open

feat: Block CONNECT requests for improved security#218
xkr47 wants to merge 1 commit into
junkurihara:developfrom
xkr47:feat/block-connect-method

Conversation

@xkr47

@xkr47 xkr47 commented Nov 9, 2024

Copy link
Copy Markdown
Contributor

Hi, I found that the CONNECT http method is not blocked by rpxy. And imho it does not make sense to support them in a reverse proxy. So this PR just blocks all CONNECT requests outright.

But before I implemented that I tested it out, and rpxy did forward some of the test requests to the backend but did not handle 200 responses correctly, leaving the client and/or the server in funny situations (at least with HTTP/1.1).

Quoting the comment I added in the code:
// Block CONNECT requests because a) makes no sense to run a forward proxy behind a reverse proxy = fringe use case b) might have serious security implications for badly configured upstreams c) it doesn't work with current implementation (bodies are not forwarded)

@hiddify-com

Copy link
Copy Markdown

Blocking should not be done by default. It can be done by a configuration variable. In some usecases it is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants