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

增加代理认证模块 #137

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

增加代理认证模块 #137

wants to merge 8 commits into from

Conversation

consatan
Copy link

@consatan consatan commented Feb 23, 2017

增加了以下功能

  • 禁用 webUI 开关 (-I, --no-webinterfac)
  • 禁用日志开关 (-P, --no-persistence)
  • 代理认证模块,支持多个用户名 (-A, --auth)
    • 添加代理用户 (-a, --adduser)
    • 删除代理用户 (-d, --deluser)
    • 修改代理用户密码 (-m, --moduser)

代理用户信息使用 NeDB 库操作,数据库文件默认使用项目根目录的 auth.db,可通过 -F, --authFile 选项指定。

使用 -A, --auth 选项开启认证模块(只支持 Basic 认证)。当请求未带上用户信息时返回 407,当用户信息验证失败时返回 401,认证失败记录都将保存到日志中(如果有开启日志的话)。

请求https目标时将在 CONNECT 阶段进行验证,验证失败(401)或者未带验证信息(407)的话会导致cURL退出并返回 CURLE_RECV_ERROR (56) 错误代码。

@CLAassistant
Copy link

CLAassistant commented Feb 23, 2017

CLA assistant check
All committers have signed the CLA.

@consatan consatan changed the title 增加代理验证模块 增加代理认证模块 Feb 23, 2017
@KyleQiao1992
Copy link

能介绍一下这个怎么使用么

@consatan
Copy link
Author

consatan commented Mar 5, 2018

@KyleQiao1992
添加2个代理认证用户

anyproxy --adduser user1 password1 user2 password2

启动 anyproxy 并开启代理认证

anyproxy --auth --port 8080

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

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.

3 participants