mirror of
https://gitee.com/chuangxxt/share-copilot
synced 2025-04-16 05:03:25 +00:00
update README.md.
原理解释 Signed-off-by: luyoyu <8829470+chuangxxt@user.noreply.gitee.com>
This commit is contained in:
parent
dbdd0adc73
commit
4fd2515d43
22
README.md
22
README.md
@ -15,6 +15,28 @@
|
||||
- 支持多用户共享一个token
|
||||
- 优化请求逻辑,降低suspended概率(别万人骑基本不会)
|
||||
|
||||
```sh
|
||||
简单说一下本地插件原本的请求逻辑:
|
||||
|
||||
1、本地插件携ghu_token请求github的API
|
||||
|
||||
2、返回带有时间戳的copilot的token(下面简称co_token),代码提示都是用的co_token
|
||||
|
||||
3、co_token到期->ghu_token重新请求->获得新的co_token
|
||||
-------------------------------------------------------------
|
||||
|
||||
代理服务器代理的是 ghu_token请求 这一环节:
|
||||
|
||||
1.携ghu_token请求github的API,暂存co_token
|
||||
|
||||
2.多用户请求时,判断co_token有没有过期,没过期直接返回,减少ghu_token的请求次数
|
||||
|
||||
至于本地co_token,也就是代码提示没有走代理
|
||||
|
||||
猜测风控目前也是停留在请求ghu_token这一层
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
***
|
||||
|
Loading…
Reference in New Issue
Block a user