mirror of
https://gitee.com/chuangxxt/share-copilot
synced 2025-04-16 10:23:25 +00:00
Merge branch 'master' of https://gitee.com/chuangxxt/share-copilot #
This commit is contained in:
commit
c774fda80f
22
README.md
22
README.md
@ -15,6 +15,28 @@
|
|||||||
- 支持多用户共享一个token
|
- 支持多用户共享一个token
|
||||||
- 优化请求逻辑,降低suspended概率(别万人骑基本不会)
|
- 优化请求逻辑,降低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的请求次数(大约10-20分钟过期)
|
||||||
|
|
||||||
|
至于本地co_token,也就是代码提示没有走代理(可以代理,但是要修改插件,jetbrains的插件还要重新build)
|
||||||
|
|
||||||
|
猜测风控目前也是停留在请求ghu_token这一层
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||

|

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