Skip to content

Commit

Permalink
reverse ws config convert supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrs4s committed Jul 26, 2020
1 parent 557400b commit 87beb55
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,26 @@
测试版可前往 Release 下载

# 兼容性

#### 接口
- [x] HTTP API
- [x] 反向HTTP POST
- [x] 正向Websocket
- [x] 反向Websocket (测试中)

#### 拓展支持
- [x] HTTP POST多点上报
- [x] 反向WS多点连接
- [x] 修改群名
- [x] 消息撤回事件
- [x] 解析/发送 回复消息
- [x] 解析合并转发

#### 实现
<details>
<summary>已实现API</summary>

##### 注意: 部分API实现与CQHTTP原版略有差异,请参考WIKI
##### 注意: 部分API实现与CQHTTP原版略有差异,请参考文档
| API | 功能 |
| ------------------------ | ------------------------------------------------------------ |
| /get_login_info | [获取登录号信息](https://cqhttp.cc/docs/4.15/#/API?id=get_login_info-获取登录号信息) |
Expand Down Expand Up @@ -47,7 +57,7 @@
<details>
<summary>已实现Event</summary>

##### 注意: 部分Event数据与CQHTTP原版略有差异,请参考WIKI
##### 注意: 部分Event数据与CQHTTP原版略有差异,请参考文档
| Event |
| ------------------------------------------------------------ |
| [私聊信息](https://cqhttp.cc/docs/4.15/#/Post?id=私聊消息) |
Expand Down
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ func init() {
if conf.PostUrl != "" {
goConf.HttpConfig.PostUrls[conf.PostUrl] = conf.Secret
}
if conf.UseWsReverse {
goConf.ReverseServers[0].Enabled = true
goConf.ReverseServers[0].ReverseUrl = conf.WSReverseUrl
goConf.ReverseServers[0].ReverseApiUrl = conf.WSReverseApiUrl
goConf.ReverseServers[0].ReverseEventUrl = conf.WSReverseEventUrl
goConf.ReverseServers[0].ReverseReconnectInterval = conf.WSReverseReconnectInterval
}
if err := goConf.Save("config.json"); err != nil {
log.Fatalf("保存 config.json 时出现错误: %v", err)
}
Expand Down

0 comments on commit 87beb55

Please sign in to comment.