Use auth_key authentication instead of HTTP Proxy authentication #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
新的身份校验
1.0版本使用HTTP的Proxy-Authentication进行身份校验,并且依赖浏览器等UI交互来实现账号、密码输入;对于一些没有UI界面的命令行应用会很不方便。
1.1版本开始修改成内建的AuthKey身份校验方案,客户端将AuthKey写在JSON配置文件中,不再依赖浏览器等UI交互。
配置文件改动
users
字段auth_key_list
字段auth_key
字段新老版本兼容性
当服务端不启用身份校验时(配置文件auth的值为false),1.1版本的服务端可以同时接收1.0和1.1版本客户端的请求;
当客户端不填auth_key时(配置文件没有auth_key字段或者auth_key的值为空字符串),1.1版本的客户端会使用1.0版本的格式进行请求来同时兼容1.0和1.1的服务端。