Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HTTPS proxy #72

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

kelunik
Copy link

@kelunik kelunik commented Nov 13, 2019

Can be used with php leproxy.php 'https://127.0.0.1:5512?local_cert=/home/kelunik/GitHub/amphp/http-server/tools/tls/localhost.pem'

See https://github.com/amphp/http-client/blob/58c0c19767cb6ade95f29983f0cb540a83dde752/examples/basic/8-proxy.php for a client implementation.

@clue
Copy link
Member

clue commented Nov 14, 2019

@kelunik Thank you for looking into, this looks interesting!

There's also #53 which discussed always enabling TLS by default and making encrypted and unencpryted connections work on the same port. What do you think about this?

@kelunik
Copy link
Author

kelunik commented Nov 14, 2019

@clue There have been vulnerabilities and weaknesses due to one port being used for both. I think these were mostly due to the client using opportunistic TLS, so they might not be applicable if the client knows whether it wants to use TLS or not. Maybe @paragonie-scott has some input here.

@kelunik
Copy link
Author

kelunik commented Nov 15, 2019

@clue Even if both might be used at the same port in the future, there should be a way to force TLS being used.

We can add same port plain and TLS later using http+https as scheme or similar.

@kelunik
Copy link
Author

kelunik commented Nov 19, 2019

@clue What's required to get this in?

@clue
Copy link
Member

clue commented Nov 29, 2019

@kelunik Thanks for the friendly reminder. I'd rather not rush this and break this feature again in the future. Instead, I'd like to properly address the underlying feature request in #53 (which in turn depends on reactphp/socket#89 and possibly others).

Rest assured, this is definitely on the roadmap and I'm planning to pick this up as soon as time permits. In the meantime, you can always keep using your forked version.

I hope this helps 👍

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

Successfully merging this pull request may close these issues.

2 participants