-
Notifications
You must be signed in to change notification settings - Fork 887
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
About forwardproxy configuration multi-user #248
Comments
If you have created a working patch you can submit it to upstream and discuss the patch there. This part is not strictly related to naiveproxy and should be discussed upstream. |
I have not implemented it yet, because I am not familiar with the go language, and I am afraid that implementing multiple users may affect the security of forwardproxy, so I wonder if you can implement it? |
At present, I only provide ideas, and further implementation may require the author to consider and review whether this feature can be added. But I still hope to add it. |
One question I would like to ask is, once naive establishes a tls connection with the proxy server, every request of the proxy will automatically carry "Proxy-Authorization" for authentication? |
Multi user authentication would require the necessary next step of multi user accounting and the whole AAA management stuff, which is not the focus of this project. The main technical problem is how to do multi user authentication in constant time to prevent side channels. It does, but does so with 1 byte due to HPACK compression. |
It's possible to have multiple users with https://github.com/klzgrad/naiveproxy/wiki/HAProxy-Setup userlist in Haproxy. |
However, I read the source code of forwardproxy's caddy1 version and found that there is indeed a multi-user implementation, and the authentication information of multiple users is stored in the form of |
Due to special reasons, it may be necessary to configure multiple basic_auths on forwardproxy for some businesses. At present, I have found that the author's caddyserver/forwardproxy#81 has a description.
Since I am not an expert in go, I am just a front-end programmer. But I want to provide my own ideas, and I hope to discuss with the author, but as for the code implementation, the author may need to complete it.
I want to implement a similar configuration for Caddyfile:
Although I am not good at the go language, I looked through the caddy source code and found that basicauth.go can support multiple user configurations. https://github.com/caddyserver/caddy/blob/03b5debd958a324d5c00cc37f887130b0198e747/modules/caddyhttp/caddyauth/basicauth.go#L106
It made me out of a bud, so I simply implemented it based on basicauth.go through the go language. The idea is as follows:
The final output is:
And I found that forwardproxy.go contains the checkCredentials method, this is whether I can use multi-threaded authentication to authenticate users (specific difficulties need to be realized by the author, only to provide ideas):
The text was updated successfully, but these errors were encountered: