cnlimiter / onebot-client

基于java开发的onebot协议客户端
GNU Affero General Public License v3.0
33 stars 9 forks source link

OneBot 11 鉴权没有正确实现 #7

Closed iceBear67 closed 3 months ago

iceBear67 commented 4 months ago

https://github.com/cnlimiter/onebot-client/blob/9abf6b5050fcca1ca75f47618bb46d34e677da33/src/main/java/cn/evole/onebot/client/OneBotClient.java#L60-L62

根据 ob 11image

我比较好奇这个库的作者有没有用 onebot 11 测试过能不能用

iceBear67 commented 4 months ago

我的用例:

var cfg = new BotConfig("wss://SERVER:443/" or "ws://SERVER" or "wss://SERVER" or "ws://SERVER/" ,"TOKEN",QQL,true,false,true,500,"string");
        oneBot = OneBotClient.create(cfg);
        oneBot.open();

bot config 初始化参考自 https://github.com/Nova-Committee/McBot/blob/fabric/fabric/src/main/java/cn/evole/mods/mcbot/config/BotConfig.java

始终卡在 403 Forbidden, 是我看了假的 ob11?

Workaround

使用 wss://server/?access_token=

cnlimiter commented 3 months ago

已修复