1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-07-08 23:28:31 +00:00

174 Commits

Author SHA1 Message Date
102bda2cfa network: move server addr list to transport 2022-02-03 22:10:08 +08:00
aa4e0e0bbe network: replace Params with Request 2022-01-28 22:54:32 +08:00
c1cbb69110 Merge remote-tracking branch 'origin/master' into network 2022-01-28 22:17:44 +08:00
3b461554b7 fix highway memory leak 2022-01-18 00:50:08 +08:00
38bb31b5a6 feat(image): drop redundant bytewise comparing of gif (#243)
* feat(image): drop rebundant bytewise comparing of gif

* feat(image): drop redundant bytewise comparing of gif
2022-01-15 18:37:26 +08:00
c000bf3596 Merge pull request #230 from fumiama/master
fix(Mrs4s/go-cqhttp#1267): icmp need su permission
2022-01-15 17:17:29 +08:00
49cec45733 fix: rename icmp to tcp 2022-01-15 17:15:27 +08:00
82a55321e5 Merge branch 'master' of https://github.com/Mrs4s/MiraiGo 2022-01-15 11:12:02 +08:00
Lin
4f3862fd87 fix socket block (#236) 2022-01-15 11:11:48 +08:00
7bec167fa7 Revert "message: remove GroupImage Width & Height"
This reverts commit 9d618e2d9f.

handle zero width and height in another way.
2022-01-15 11:11:48 +08:00
e22965eb0c message: remove GroupImage Width & Height
sometimes these fields may be zero causing send failures
2022-01-15 11:11:48 +08:00
a5670ccc43 feat: use the decoder which only parses size info (#238)
* fix: add GroupImage Width & Height for webp

* fix: 简化写法

* feat: use imgsz package and drop image
2022-01-14 20:21:06 +08:00
9a45e430f1 fix 0x545 (#242) 2022-01-14 20:16:41 +08:00
Lin
41a6cb05a7 fix socket block (#236) 2022-01-06 20:52:09 +08:00
ab72f3dc28 Revert "message: remove GroupImage Width & Height"
This reverts commit 9d618e2d9f.

handle zero width and height in another way.
2021-12-28 22:09:53 +08:00
9d618e2d9f message: remove GroupImage Width & Height
sometimes these fields may be zero causing send failures
2021-12-28 21:48:23 +08:00
6a71884235 refactor: handle decode func in Request 2021-12-27 15:41:59 +08:00
LXY
f5b16b19c2 Network refactor (#229)
* 重构:netLoop下移到Listener

* 格式:修正NewClient中注释段缩进

* 格式:更名&将代码移动到对应位置

* 格式:TCPListener去锁化

* 修正:netLoop中的错误调用

* 修正:使其可用

* 修正:使功能一致

* 修正:现在可正常运行

* 优化:更早的释放锁(?

* 修正:未写完的部分

* 修正:潜在的断线时仍然认为在线这件事&删除空重复文件

* 文档:添加部分注释

* 修正:CoverError可能引起死锁

* 修正:永远不会被触发的DisconnectEvent

* 文档:将注释移动至对应位置
2021-12-27 15:36:52 +08:00
9bd6b38f90 refactor: handle params in request 2021-12-27 15:36:47 +08:00
435d2fd85f refactor: 手动指定decode函数
(cherry picked from commit 13d6711f27)
2021-12-27 15:36:44 +08:00
723563415f client: refactor decoder
(cherry picked from commit 3e201bd449)
2021-12-27 15:36:38 +08:00
2c56abf4d8 fix: add wait 2021-12-26 14:15:10 +08:00
b8023f445a feat: use tcp handshake to simulate icmp echo 2021-12-26 13:32:51 +08:00
d72696a0c8 feat: use udp to simulate icmp echo 2021-12-26 13:08:38 +08:00
9946b404ae fix: heartbeat command name 2021-12-25 23:00:59 +08:00
8ba8d118ae Merge pull request #228 from wfjsw/patch-2
GuildSender的nickname给“我的频道昵称”
2021-12-25 17:56:25 +08:00
a154a63772 GuildSender的nickname给“我的频道昵称” 2021-12-25 11:15:34 +08:00
a3b4e1b994 client: move parse packet logic to transport 2021-12-24 17:18:42 +08:00
dd17e12e1b Merge pull request #227 from LXY1226/qr-param
feat: 现可使用不同的二维码生成参数获取二维码
2021-12-24 14:38:15 +08:00
LXY
6dd575b200 fix: FetchQRCode 2021-12-24 14:36:51 +08:00
LXY
1b3e84baf0 feat: change to FetchQRCodeCustomSize 2021-12-24 14:34:30 +08:00
Lin
b5697b24c5 feat: 现可使用不同的二维码生成参数获取二维码 2021-12-24 14:28:00 +08:00
254eef3a5a internal/oicq: reduce lambda 2021-12-24 14:22:10 +08:00
cf864799cb fix: WriteIntLvPacket length error (#226) 2021-12-23 23:04:13 +08:00
3e84f279c1 fix: use general write at method (#225)
* fix: use general write at method

* fix: drop WriteShortBufLenExcludeSelfAfterPos
2021-12-23 22:09:04 +08:00
b1279cf08f perf(writer): drop some lambda expressions (#224)
* perf(writer): drop some lambda expressions

* perf(writer): drop more lambda expressions

* fix: resolve conflicts

* perf(writer): drop more lambda expressions

* fix: modify function name

* perf(writer): drop more lambda expressions

* fix: some error
2021-12-23 21:04:15 +08:00
24b75e45c7 internal/oicq: refactor & support unmarshal 2021-12-23 17:04:37 +08:00
5dfa4528dd fix: fix group unmute all 2021-12-23 14:03:09 +08:00
c51e1956e8 feat: add util function to split long message (#184)
* feat: add util function to split long message

* fix: move util to message/message.go to avoid import cycle

* fix: review opinions and add test
2021-12-23 12:57:18 +08:00
ffc6cc1861 return init error (#208) 2021-12-23 12:56:04 +08:00
d2dc2e472d client: pack packet by transport 2021-12-22 22:47:00 +08:00
3e2b57eab5 internal/network: first version of transport send 2021-12-22 20:13:23 +08:00
21f8feb419 fix sso frame panic 2021-12-21 13:15:59 +08:00
afb81a32aa fix: fix private ptt 2021-12-19 15:29:30 +08:00
72ffc08b72 ci(chore): Fix stylings 2021-12-18 09:39:50 +00:00
39bea4b399 Merge pull request #222 from icarus-ai/master
石头剪子布&随机骰子
2021-12-18 17:39:29 +08:00
e700751008 解析猜拳&随机骰子
安卓QQ发来的骰子Name值是随机骰子
2021-12-18 17:35:32 +08:00
75d9c4deb4 石头剪子布
生成石头剪子布
2021-12-18 17:31:11 +08:00
950567e4b7 refactor: move Device&loginSigInfo to internal/auth 2021-12-18 15:36:52 +08:00
6b5ba9f9c4 refactor: move c.nextSeq to c.uniPacket 2021-12-17 23:50:30 +08:00
1c29ac7d96 refactor: packets.BuildUniPacket -> c.uniPacket
mostly auto-generated by

```
rf '
ex {
    var c QQClient
    var seq uint16
    var payload []byte
    var command string
    BuildUniPacket(c.Uin, seq, command, 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload) -> c.uniPacket(seq, command, payload)
}
'
```
2021-12-17 22:58:41 +08:00
f464a0d474 fix: highway upload
caused by uin didn't set
2021-12-17 22:19:20 +08:00
6179d2d351 fix: ignore guild msg sending by self 2021-12-17 21:43:42 +08:00
cf49727531 fix: use go.uber.org/atomic to force atomic 2021-12-17 21:01:10 +08:00
10bac416ce Merge pull request #214 from lz1998/protocol
update protocol id
2021-12-17 17:48:30 +08:00
dc66c61d57 feat: link nested forward message 2021-12-17 12:27:14 +08:00
a5410846cb fix: decodeSidExpiredPacket response 2021-12-17 01:12:28 +08:00
6650184a1b feat: decodeSidExpiredPacket 2021-12-17 00:38:46 +08:00
d8cae988c6 Merge branch 'master' of github.com:/Mrs4s/MiraiGo 2021-12-17 00:20:48 +08:00
68e387e91b feat: at channel support 2021-12-17 00:20:27 +08:00
ff9ef5135c remove: stash.go
these function seems not useful
2021-12-16 21:47:48 +08:00
8b99d3147e style: fix issues reported by golangci-lint 2021-12-16 20:21:49 +08:00
58e81648e5 Merge pull request #218 from LXY1226/chore-examp
chore: 将exchange_emp的错误码塞在error中
2021-12-16 18:37:33 +08:00
66ad12db03 fix: panic on PushNotify decoder 2021-12-16 18:35:20 +08:00
5a59cc656c feat: dump packet on decoder panic 2021-12-16 15:26:07 +08:00
6c1b622107 remove PttStore.GroupPttUp 2021-12-16 14:27:26 +08:00
Lin
b929afd424 chore: 将exchange_emp的错误码塞在error中 2021-12-15 19:34:03 +08:00
2e6b21bfef remove 256k & 128k pool 2021-12-15 19:20:30 +08:00
b398cec6a5 refactor: move highway.go to client/internal/highway 2021-12-15 19:13:52 +08:00
ed979508cf proto: update channel/common.proto 2021-12-14 16:43:25 +08:00
5eb78e427c fix: nil pointer error on guild channel message parser 2021-12-14 16:37:05 +08:00
d55929cf12 feat: PullGuildChannelMessage 2021-12-13 20:53:55 +08:00
f66f2b7d78 fix: fix GroupFileSystem.GetDownloadUrl error 2021-12-13 16:51:29 +08:00
5d7cb85b1e update: unknown group system msg log level updated Error -> Debug 2021-12-13 01:42:29 +08:00
06bc0bba17 feat: GuildMessageRecalledEvent 2021-12-13 01:34:54 +08:00
abe1fe7770 feat: support send guild music share 2021-12-12 17:12:47 +08:00
503db83375 fix: drop oneof in oidb.D89AGroupinfo
RomiChan/protobuf don't support oneof now
2021-12-12 14:58:30 +08:00
5ff69f3c3a binary/jce: use go/parser generator 2021-12-12 14:38:03 +08:00
45692b75f8 fix(jce): ToByes lost some fields of SvcReqRegisterNew (#217) 2021-12-12 00:04:15 +08:00
416a6c17be fix build 2021-12-11 02:36:55 +08:00
a206b0077c feat: update FetchGuildMemberProfileInfo api 2021-12-11 02:34:32 +08:00
be7293b1c0 Merge pull request #215 from fumiama/master
perf(jce): drop reflect in writer
2021-12-11 02:16:01 +08:00
bcde705a75 fix: codegen error & drop all reflect in jce 2021-12-10 14:49:53 +08:00
ed7199def8 fix: gen rely on jce 2021-12-09 23:30:12 +08:00
f1d2259956 fix(jce): replacment not equivalent 2021-12-09 22:47:16 +08:00
b041fc20e8 perf(jce): drop most reflect in writer
name                           old time/op    new time/op     delta
JceWriter_WriteMap-8             2.34µs ± 2%     0.69µs ± 4%   -70.63%  (p=0.008 n=5+5)
JceWriter_WriteJceStructRaw-8    1.28µs ± 1%     0.42µs ± 1%   -66.86%  (p=0.008 n=5+5)

name                           old speed      new speed       delta
JceWriter_WriteMap-8           39.7MB/s ± 2%  135.4MB/s ± 4%  +240.56%  (p=0.008 n=5+5)
JceWriter_WriteJceStructRaw-8  82.3MB/s ± 1%  219.9MB/s ± 1%  +167.32%  (p=0.008 n=5+5)

name                           old alloc/op   new alloc/op    delta
JceWriter_WriteMap-8             1.30kB ± 0%     0.21kB ± 0%   -84.05%  (p=0.008 n=5+5)
JceWriter_WriteJceStructRaw-8      640B ± 0%       208B ± 0%   -67.50%  (p=0.008 n=5+5)

name                           old allocs/op  new allocs/op   delta
JceWriter_WriteMap-8               30.0 ± 0%        2.0 ± 0%   -93.33%  (p=0.008 n=5+5)
JceWriter_WriteJceStructRaw-8      15.0 ± 0%        2.0 ± 0%   -86.67%  (p=0.008 n=5+5)
2021-12-09 22:25:53 +08:00
8cd25e02fc feat: FetchGuildMemberListWithRole api 2021-12-08 21:25:33 +08:00
25c67a3ee1 fix: MessageSvc.PushNotify decode error 2021-12-08 16:02:34 +08:00
2caf71a0bb fix: sso frame head parse error 2021-12-08 13:47:42 +08:00
59471c51cf update protocol id 2021-12-08 00:48:28 +08:00
2d17133a7b fix: reconnect on decrypt flag error 2021-12-07 13:29:01 +08:00
355fe4a410 Merge branch 'master' of github.com:/Mrs4s/MiraiGo 2021-12-06 21:57:01 +08:00
d094d0483d Merge pull request #210 from fumiama/master
fix(#209): OpenWriterF encode error
2021-12-04 20:40:55 +08:00
d3ab5965d5 fix(#209): OpenWriterF encode error 2021-12-04 20:31:11 +08:00
c73026ce09 update dep 2021-12-04 18:08:59 +08:00
a2e7548a2b ref: remove guild FindMember func & remove guild members cache 2021-12-04 18:08:20 +08:00
34bb74d1d1 fix: lz4 decode error 2021-12-04 17:43:00 +08:00
e043181fc1 Merge pull request #203 from fumiama/master
perf: on jce & tea & pool & writer
2021-12-03 12:30:19 +08:00
96fd4d32e7 fix: nil pointer panic on guild event flow decoder 2021-12-02 12:00:17 +08:00
c0713ba75d ci(chore): Fix stylings 2021-12-01 17:04:11 +00:00
d08d9dbddd feat: decode compressed guild event packet. close #207 2021-12-02 01:03:10 +08:00
9778dd2369 feat: MemberJoinedGuildEvent 2021-11-27 20:28:46 +08:00
524b2b7881 update protobuf 2021-11-27 17:25:29 +08:00
5c5e61d279 fix build 2021-11-27 02:04:57 +08:00
14bb70f1f0 Merge branch 'master' of github.com:/Mrs4s/MiraiGo 2021-11-27 02:02:32 +08:00
67bf336f22 feat: PostTopicChannelFeed 2021-11-27 02:02:13 +08:00
88279a654a ci(chore): Fix stylings 2021-11-26 17:21:51 +00:00
8b4b8269f3 feat: GetTopicChannelFeeds 2021-11-27 01:21:04 +08:00
b27ab903f1 Merge branch 'master' into master 2021-11-26 15:06:02 +08:00
13a9d087e7 perf(jce): drop reflect in reader
name                   old time/op    new time/op    delta
JceReader_ReadSlice-8    1.53ms ±90%    0.82ms ±86%  -46.30%  (p=0.017 n=16+16)

name                   old speed      new speed      delta
JceReader_ReadSlice-8   117MB/s ± 3%   228MB/s ± 4%  +94.43%  (p=0.000 n=16+16)

name                   old alloc/op   new alloc/op   delta
JceReader_ReadSlice-8     516kB ±88%     536kB ±85%     ~     (p=0.780 n=16+16)

name                   old allocs/op  new allocs/op  delta
JceReader_ReadSlice-8     25.6k ±88%     26.6k ±85%     ~     (p=0.780 n=16+16)
2021-11-26 15:02:44 +08:00
e8e50b5062 ci(chore): Fix stylings 2021-11-26 02:22:51 +00:00
915d2da4cc Merge remote-tracking branch 'origin/master'
# Conflicts:
#	client/guild.go
#	client/pb/channel/GuildChannelBase.pb.go
#	client/pb/channel/GuildFeedCloudMeta.pb.go
#	client/pb/channel/GuildFeedCloudRead.pb.go
#	client/pb/channel/MsgResponsesSvr.pb.go
#	client/pb/qweb/protocol.pb.go
2021-11-26 10:21:59 +08:00
6514cd144e protocol: update protobuf files 2021-11-26 10:19:08 +08:00
59a3a3b2c0 ci(chore): Fix stylings 2021-11-26 01:58:28 +00:00
ce23185cde protocol: update protobuf files & save work progress 2021-11-26 09:57:41 +08:00
797a912b6d protocol: update protobuf files & save work progress 2021-11-26 09:54:46 +08:00
b483e44f9c proto: use protoc-gen-golite generated files 2021-11-25 21:23:49 +08:00
4bdb791334 dep: use RomiChan/protobuf 2021-11-24 21:57:13 +08:00
4c60c8ee47 Merge branch 'master' of github.com:/Mrs4s/MiraiGo 2021-11-24 00:04:12 +08:00
9c5515ca9f fix typo 2021-11-24 00:03:56 +08:00
a70e0f20de perf: add 0 alloc func OpenWriterF 2021-11-23 16:21:06 +08:00
26579583cc drop(pool): unnecessay nil judge 2021-11-23 15:35:52 +08:00
ec053573f1 perf(tea): use runtime.fastrand
name          old time/op    new time/op    delta
TEAen/16-8       242ns ± 1%     225ns ± 2%  -6.98%  (p=0.008 n=5+5)
TEAen/256-8     1.71µs ± 0%    1.68µs ± 0%  -1.58%  (p=0.008 n=5+5)
TEAen/4K-8      25.0µs ± 1%    25.0µs ± 0%    ~     (p=1.000 n=5+5)
TEAen/32K-8      202µs ± 1%     202µs ± 0%    ~     (p=0.548 n=5+5)
TEAde/16-8       208ns ± 0%     207ns ± 0%    ~     (p=0.198 n=5+5)
TEAde/256-8     1.65µs ± 0%    1.64µs ± 0%  -0.39%  (p=0.048 n=5+5)
TEAde/4K-8      24.6µs ± 0%    24.6µs ± 1%    ~     (p=1.000 n=5+5)
TEAde/32K-8      199µs ± 0%     199µs ± 0%    ~     (p=0.905 n=4+5)

name          old speed      new speed      delta
TEAen/16-8    66.2MB/s ± 1%  71.2MB/s ± 2%  +7.51%  (p=0.008 n=5+5)
TEAen/256-8    150MB/s ± 0%   152MB/s ± 0%  +1.61%  (p=0.008 n=5+5)
TEAen/4K-8     164MB/s ± 1%   164MB/s ± 0%    ~     (p=1.000 n=5+5)
TEAen/32K-8    162MB/s ± 1%   162MB/s ± 0%    ~     (p=0.548 n=5+5)
TEAde/16-8     154MB/s ± 0%   154MB/s ± 0%    ~     (p=0.222 n=5+5)
TEAde/256-8    165MB/s ± 0%   165MB/s ± 0%    ~     (p=0.056 n=5+5)
TEAde/4K-8     167MB/s ± 0%   167MB/s ± 1%    ~     (p=1.000 n=5+5)
TEAde/32K-8    165MB/s ± 0%   165MB/s ± 0%    ~     (p=0.825 n=4+5)
2021-11-23 13:18:58 +08:00
ec4cd4a6f3 style: internal/proto
use this package for conveniently replacing proto package
in the future.
2021-11-22 22:05:19 +08:00
6e33d2fc34 feat: stash client functions
when we restart a client, it takes too long to sync the friend & group lists. This stash functions will help us to reduce sync time when in development.

DON'T USE THIS, this is not checked.
2021-11-21 23:25:52 +08:00
e50f46a111 ci(chore): Fix stylings 2021-11-21 13:20:37 +00:00
dd5435de62 Merge pull request #202 from Kengxxiao/upstream-dev
feat: GetUserRoles
2021-11-21 21:20:10 +08:00
0ac2dad0ee Merge pull request #201 from Blackjack200/master
rename NewWriter to SelectWriter
2021-11-21 21:19:26 +08:00
56d2280cde feat: GetUserRoles 2021-11-21 17:10:44 +08:00
70af1fee57 rename NewWriter to SelectWriter 2021-11-21 12:58:34 +08:00
7e6eaa7627 Merge branch 'master' of github.com:/Mrs4s/MiraiGo 2021-11-21 01:13:23 +08:00
a807e8ea7e feat: new channel type 2021-11-21 01:13:01 +08:00
eb705deb07 ci(chore): Fix stylings 2021-11-20 14:43:41 +00:00
0329290276 feat: GetGuildMembers page up 2021-11-20 22:42:54 +08:00
f5ff7695da Merge pull request #199 from LXY1226/md5-on-newclient
perf: no md5 on EmptyClient
2021-11-20 21:09:51 +08:00
97dcddb6d4 jce: speed up read
don't use bytes.Buffer to inline more functions

name                            old time/op    new time/op    delta
JceReader_ReadSlice-8              614µs ±68%     523µs ±70%     ~     (p=0.690 n=5+5)
RequestDataVersion2_ReadFrom-8    3.98µs ± 1%    3.54µs ± 2%  -10.96%  (p=0.008 n=5+5)

name                            old speed      new speed      delta
JceReader_ReadSlice-8            104MB/s ± 7%   121MB/s ± 2%  +16.68%  (p=0.008 n=5+5)
RequestDataVersion2_ReadFrom-8  23.4MB/s ± 1%  26.3MB/s ± 2%  +12.33%  (p=0.008 n=5+5)

name                            old alloc/op   new alloc/op   delta
JceReader_ReadSlice-8              196kB ±67%     184kB ±67%     ~     (p=0.690 n=5+5)
RequestDataVersion2_ReadFrom-8    2.59kB ± 0%    2.62kB ± 0%   +1.04%  (p=0.008 n=5+5)

name                            old allocs/op  new allocs/op  delta
JceReader_ReadSlice-8              9.02k ±67%     9.02k ±67%     ~     (p=1.000 n=5+5)
RequestDataVersion2_ReadFrom-8      46.0 ± 0%      44.0 ± 0%   -4.35%  (p=0.008 n=5+5)
2021-11-20 20:54:19 +08:00
Lin
0cb45e1d20 perf: no md5 on EmptyClient 2021-11-20 19:07:24 +08:00
43b23f4e6f jce: speed up write
name                           old time/op    new time/op    delta
JceWriter_WriteMap-8             2.46µs ± 1%    2.37µs ± 1%   -3.88%  (p=0.000 n=9+9)
JceWriter_WriteJceStructRaw-8    1.78µs ± 1%    1.29µs ± 1%  -27.38%  (p=0.000 n=9+10)

name                           old speed      new speed      delta
JceWriter_WriteMap-8           37.7MB/s ± 1%  39.3MB/s ± 1%   +4.04%  (p=0.000 n=9+9)
JceWriter_WriteJceStructRaw-8  59.0MB/s ± 1%  81.3MB/s ± 1%  +37.70%  (p=0.000 n=9+10)

name                           old alloc/op   new alloc/op   delta
JceWriter_WriteMap-8             1.30kB ± 0%    1.30kB ± 0%     ~     (all equal)
JceWriter_WriteJceStructRaw-8      724B ± 0%      640B ± 0%  -11.60%  (p=0.000 n=10+10)

name                           old allocs/op  new allocs/op  delta
JceWriter_WriteMap-8               30.0 ± 0%      30.0 ± 0%     ~     (all equal)
JceWriter_WriteJceStructRaw-8      29.0 ± 0%      15.0 ± 0%  -48.28%  (p=0.000 n=10+10)
2021-11-20 11:38:24 +08:00
3216c69d46 feat: support receive Animated Sticker 2021-11-19 23:02:45 +08:00
b9f70f7d4c ci(chore): Fix stylings 2021-11-19 14:08:44 +00:00
aa92a8bb6c feat: support send Animated Stickers 2021-11-19 22:07:46 +08:00
1f8edc2de3 update some tlv packet 2021-11-19 20:12:56 +08:00
19e2050004 feat: upload guild short video 2021-11-18 21:28:17 +08:00
574c4e57b1 perf(tea): unrolling encode
name         old time/op    new time/op    delta
TEAen/16-8      237ns ± 0%     227ns ± 1%  -4.03%  (p=0.008 n=5+5)
TEAen/256-8    1.69µs ± 0%    1.60µs ± 1%  -4.83%  (p=0.008 n=5+5)
TEAen/4K-8     25.0µs ± 1%    23.8µs ± 2%  -4.73%  (p=0.008 n=5+5)
TEAen/32K-8     199µs ± 1%     188µs ± 1%  -5.30%  (p=0.008 n=5+5)
TEAde/16-8      196ns ± 1%     194ns ± 1%  -0.89%  (p=0.016 n=5+5)
TEAde/256-8    1.56µs ± 0%    1.54µs ± 0%  -1.50%  (p=0.008 n=5+5)
TEAde/4K-8     23.5µs ± 0%    23.2µs ± 0%  -1.46%  (p=0.008 n=5+5)
TEAde/32K-8     187µs ± 1%     184µs ± 1%  -1.50%  (p=0.008 n=5+5)

name         old speed      new speed      delta
TEAen/16-8   67.6MB/s ± 1%  70.5MB/s ± 1%  +4.20%  (p=0.008 n=5+5)
TEAen/256-8   152MB/s ± 0%   160MB/s ± 1%  +5.07%  (p=0.008 n=5+5)
TEAen/4K-8    164MB/s ± 1%   172MB/s ± 2%  +4.98%  (p=0.008 n=5+5)
TEAen/32K-8   165MB/s ± 1%   174MB/s ± 1%  +5.60%  (p=0.008 n=5+5)
TEAde/16-8    163MB/s ± 1%   165MB/s ± 1%  +0.90%  (p=0.016 n=5+5)
TEAde/256-8   174MB/s ± 0%   177MB/s ± 0%  +1.51%  (p=0.008 n=5+5)
TEAde/4K-8    175MB/s ± 0%   177MB/s ± 0%  +1.48%  (p=0.008 n=5+5)
TEAde/32K-8   175MB/s ± 1%   178MB/s ± 1%  +1.52%  (p=0.008 n=5+5)
2021-11-17 13:33:25 +08:00
95364f1ff8 ci(chore): Fix stylings 2021-11-16 15:55:14 +00:00
782422fca1 Merge pull request #196 from Kengxxiao/master
频道身份组操作
2021-11-16 23:54:45 +08:00
13d2fd51da fix 2021-11-16 23:48:04 +08:00
273dac82f8 remove unused struct 2021-11-16 23:21:41 +08:00
870922b5b6 feat: ModifyRoleInGuild 2021-11-16 23:19:05 +08:00
5181282bc5 feat: support roles management 2021-11-16 23:03:10 +08:00
5ba00392ba add create role packet 2021-11-16 22:10:18 +08:00
a69487056d drop unsafe in TEA encryption
name         old time/op    new time/op    delta
TEAen/16-8      245ns ± 0%     237ns ± 0%  -3.29%  (p=0.008 n=5+5)
TEAen/256-8    1.73µs ± 0%    1.69µs ± 0%  -2.77%  (p=0.008 n=5+5)
TEAen/4K-8     24.9µs ± 0%    25.0µs ± 1%    ~     (p=0.690 n=5+5)
TEAen/32K-8     198µs ± 0%     199µs ± 1%  +0.73%  (p=0.008 n=5+5)
TEAde/16-8      215ns ± 1%     196ns ± 1%  -8.93%  (p=0.008 n=5+5)
TEAde/256-8    1.70µs ± 0%    1.56µs ± 0%  -8.08%  (p=0.008 n=5+5)
TEAde/4K-8     24.9µs ± 1%    23.5µs ± 0%  -5.50%  (p=0.008 n=5+5)
TEAde/32K-8     198µs ± 0%     187µs ± 1%  -5.34%  (p=0.008 n=5+5)

name         old speed      new speed      delta
TEAen/16-8   65.4MB/s ± 0%  67.6MB/s ± 1%  +3.39%  (p=0.008 n=5+5)
TEAen/256-8   148MB/s ± 0%   152MB/s ± 0%  +2.84%  (p=0.008 n=5+5)
TEAen/4K-8    164MB/s ± 0%   164MB/s ± 1%    ~     (p=0.587 n=5+5)
TEAen/32K-8   166MB/s ± 0%   165MB/s ± 1%  -0.72%  (p=0.008 n=5+5)
TEAde/16-8    149MB/s ± 1%   163MB/s ± 1%  +9.81%  (p=0.008 n=5+5)
TEAde/256-8   160MB/s ± 0%   174MB/s ± 0%  +8.80%  (p=0.008 n=5+5)
TEAde/4K-8    165MB/s ± 1%   175MB/s ± 0%  +5.81%  (p=0.008 n=5+5)
TEAde/32K-8   166MB/s ± 0%   175MB/s ± 1%  +5.70%  (p=0.008 n=5+5)
2021-11-16 20:54:40 +08:00
96489d00f6 add role packet 2021-11-16 20:21:18 +08:00
511e8c41ed feat: guild at encode 2021-11-15 01:08:54 +08:00
55ba62e4b8 Merge branch 'master' of github.com:/Mrs4s/MiraiGo 2021-11-14 22:51:40 +08:00
28e93a7e2c fix: sync logic error 2021-11-14 22:50:54 +08:00
2e441ed925 drop SendGroupGift support
QQ no longer provide free group gifts, so we should drop it
2021-11-14 21:52:09 +08:00
54b035657c ci(chore): Fix stylings 2021-11-14 09:17:54 +00:00
baf792f68a Merge branch 'master' of github.com:/Mrs4s/MiraiGo 2021-11-14 17:17:16 +08:00
8427db5347 feat: support guild at message decode 2021-11-14 17:16:01 +08:00
1ea4f641d4 fix: better error handle for upload long message 2021-11-14 12:06:50 +08:00
c0ade34f1d fix: panic on get non admin-role-group guild members 2021-11-14 04:53:13 +08:00
e8cf25f6f4 fix: send guild channel message response decoder panic error 2021-11-14 04:50:06 +08:00
849be61d5a feat: GuildChannelDestroyedEvent 2021-11-14 04:46:57 +08:00
c149f28fb8 feat: GuildChannelCreatedEvent 2021-11-14 04:33:02 +08:00
d3a21e577b fix: guild image type error 2021-11-13 02:30:36 +08:00
7b125259d6 style: sort imports 2021-11-12 23:43:22 +08:00
96f4e74496 style: rename packets2 to packets 2021-11-12 16:30:20 +08:00
2a92b2755f perf: speed up tea encrypt & decrypt
name         old time/op    new time/op    delta
TEAen/16-8      260ns ± 0%     245ns ± 0%   -5.83%  (p=0.008 n=5+5)
TEAen/256-8    1.86µs ± 0%    1.73µs ± 0%   -6.86%  (p=0.008 n=5+5)
TEAen/4K-8     27.8µs ± 0%    24.9µs ± 0%  -10.19%  (p=0.008 n=5+5)
TEAde/16-8      223ns ± 1%     215ns ± 1%   -3.24%  (p=0.008 n=5+5)
TEAde/256-8    1.88µs ± 0%    1.70µs ± 0%   -9.49%  (p=0.000 n=4+5)
TEAde/4K-8     28.1µs ± 1%    24.9µs ± 1%  -11.43%  (p=0.008 n=5+5)

name         old speed      new speed      delta
TEAen/16-8   61.6MB/s ± 0%  65.4MB/s ± 0%   +6.19%  (p=0.008 n=5+5)
TEAen/256-8   138MB/s ± 0%   148MB/s ± 0%   +7.35%  (p=0.008 n=5+5)
TEAen/4K-8    147MB/s ± 0%   164MB/s ± 0%  +11.34%  (p=0.008 n=5+5)
TEAde/16-8    144MB/s ± 1%   149MB/s ± 1%   +3.34%  (p=0.008 n=5+5)
TEAde/256-8   145MB/s ± 0%   160MB/s ± 0%  +10.47%  (p=0.016 n=4+5)
TEAde/4K-8    146MB/s ± 1%   165MB/s ± 1%  +12.90%  (p=0.008 n=5+5)
2021-11-12 11:40:40 +08:00
b85fc25cd5 ci(chore): Fix stylings 2021-11-11 18:17:49 +00:00
9350021852 feat: SendGuildChannelMessage return *message.GuildChannelMessage 2021-11-12 02:17:01 +08:00
19b2c4c5c8 ci(chore): Fix stylings 2021-11-11 17:51:34 +00:00
b644f5c158 feat: UploadGuildImage 2021-11-12 01:50:30 +08:00
e3411adb3d feat: GuildChannelUpdatedEvent 2021-11-11 19:25:59 +08:00
260 changed files with 28881 additions and 38724 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.idea
vendor/
.DS_Store

View File

@ -1,15 +1,15 @@
package jce
import (
"bytes"
goBinary "encoding/binary"
"io"
"math"
"reflect"
"github.com/Mrs4s/MiraiGo/utils"
)
type JceReader struct {
buf *bytes.Reader
buf []byte
off int
}
type HeadData struct {
@ -18,30 +18,38 @@ type HeadData struct {
}
func NewJceReader(data []byte) *JceReader {
buf := bytes.NewReader(data)
return &JceReader{buf: buf}
return &JceReader{buf: data}
}
func (r *JceReader) readHead() (hd HeadData, l int32) {
b, _ := r.buf.ReadByte()
hd.Type = b & 0xF
hd.Tag = (int(b) & 0xF0) >> 4
if hd.Tag == 15 {
b, _ = r.buf.ReadByte()
hd.Tag = int(b) & 0xFF
return hd, 2
}
return hd, 1
}
func (r *JceReader) peakHead() (h HeadData, l int32) {
h, l = r.readHead()
_, _ = r.buf.Seek(int64(-l), io.SeekCurrent)
func (r *JceReader) readHead() (hd HeadData, l int) {
hd, l = r.peakHead()
r.off += l
return
}
func (r *JceReader) peakHead() (hd HeadData, l int) {
b := r.buf[r.off]
hd.Type = b & 0xF
hd.Tag = int(uint(b) >> 4)
l = 1
if hd.Tag == 0xF {
b = r.buf[r.off+1]
hd.Tag = int(uint(b))
l = 2
}
return
}
func (r *JceReader) skipHead() {
l := 1
if int(uint(r.buf[r.off])>>4) == 0xF {
l = 2
}
r.off += l
}
func (r *JceReader) skip(l int) {
r.readBytes(l)
r.skipBytes(l)
}
func (r *JceReader) skipField(t byte) {
@ -55,10 +63,9 @@ func (r *JceReader) skipField(t byte) {
case 3, 5:
r.skip(8)
case 6:
b, _ := r.buf.ReadByte()
r.skip(int(b))
r.skip(int(r.readByte()))
case 7:
r.skip(int(r.readInt32()))
r.skip(int(r.readUInt32()))
case 8:
s := r.ReadInt32(0)
for i := 0; i < int(s)*2; i++ {
@ -70,7 +77,7 @@ func (r *JceReader) skipField(t byte) {
r.skipNextField()
}
case 13:
r.readHead()
r.skipHead()
s := r.ReadInt32(0)
r.skip(int(s))
case 10:
@ -89,73 +96,70 @@ func (r *JceReader) SkipField(c int) {
}
}
func (r *JceReader) readBytes(len int) []byte {
if len == 0 {
return nil
}
b := make([]byte, len)
_, err := r.buf.Read(b)
if err != nil {
panic(err)
func (r *JceReader) readBytes(n int) []byte {
if r.off+n > len(r.buf) {
panic("readBytes: EOF")
}
b := make([]byte, n)
r.off += copy(b, r.buf[r.off:])
return b
}
func (r *JceReader) readByte() byte {
b, err := r.buf.ReadByte()
if err != nil {
panic(err)
func (r *JceReader) skipBytes(n int) {
if r.off+n > len(r.buf) {
panic("skipBytes: EOF")
}
lremain := len(r.buf[r.off:])
if lremain < n {
n = lremain
}
r.off += n
}
func (r *JceReader) readByte() byte {
if r.off >= len(r.buf) {
panic("readByte: EOF")
}
b := r.buf[r.off]
r.off++
return b
}
func (r *JceReader) readUInt16() uint16 {
f, _ := r.buf.ReadByte()
s, err := r.buf.ReadByte()
if err != nil {
panic(err)
}
return uint16((int32(f) << 8) + int32(s))
return goBinary.BigEndian.Uint16(r.readBytes(2))
}
func (r *JceReader) readInt32() int32 {
b := r.readBytes(4)
return int32(goBinary.BigEndian.Uint32(b))
func (r *JceReader) readUInt32() uint32 {
return goBinary.BigEndian.Uint32(r.readBytes(4))
}
func (r *JceReader) readInt64() int64 {
b := r.readBytes(8)
return int64(goBinary.BigEndian.Uint64(b))
func (r *JceReader) readUInt64() uint64 {
return goBinary.BigEndian.Uint64(r.readBytes(8))
}
func (r *JceReader) readFloat32() float32 {
b := r.readInt32()
return math.Float32frombits(uint32(b))
return math.Float32frombits(r.readUInt32())
}
func (r *JceReader) readFloat64() float64 {
b := r.readInt64()
return math.Float64frombits(uint64(b))
return math.Float64frombits(r.readUInt64())
}
func (r *JceReader) skipToTag(tag int) bool {
for {
hd, l := r.peakHead()
if tag <= hd.Tag || hd.Type == 11 {
return tag == hd.Tag
}
r.skip(int(l))
hd, l := r.peakHead()
for tag > hd.Tag && hd.Type != 11 {
r.skip(l)
r.skipField(hd.Type)
hd, l = r.peakHead()
}
return tag == hd.Tag
}
func (r *JceReader) skipToStructEnd() {
for {
hd, _ := r.readHead()
hd, _ := r.readHead()
for hd.Type != 11 {
r.skipField(hd.Type)
if hd.Type == 11 {
return
}
hd, _ = r.readHead()
}
}
@ -208,7 +212,7 @@ func (r *JceReader) ReadInt32(tag int) int32 {
case 1:
return int32(r.readUInt16())
case 2:
return r.readInt32()
return int32(r.readUInt32())
default:
return 0
}
@ -227,9 +231,9 @@ func (r *JceReader) ReadInt64(tag int) int64 {
case 1:
return int64(int16(r.readUInt16()))
case 2:
return int64(r.readInt32())
return int64(r.readUInt32())
case 3:
return r.readInt64()
return int64(r.readUInt64())
default:
return 0
}
@ -274,9 +278,9 @@ func (r *JceReader) ReadString(tag int) string {
hd, _ := r.readHead()
switch hd.Type {
case 6:
return string(r.readBytes(int(r.readByte())))
return utils.B2S(r.readBytes(int(r.readByte())))
case 7:
return string(r.readBytes(int(r.readInt32())))
return utils.B2S(r.readBytes(int(r.readUInt32())))
default:
return ""
}
@ -296,13 +300,32 @@ func (r *JceReader) ReadBytes(tag int) []byte {
}
return b
case 13:
r.readHead()
r.skipHead()
return r.readBytes(int(r.ReadInt32(0)))
default:
return nil
}
}
func (r *JceReader) ReadByteArrArr(tag int) (baa [][]byte) {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
baa = make([][]byte, s)
for i := 0; i < int(s); i++ {
baa[i] = r.ReadBytes(0)
}
return baa
default:
return nil
}
}
/*
// ReadAny Read any type via tag, unsupported JceStruct
func (r *JceReader) ReadAny(tag int) interface{} {
if !r.skipToTag(tag) {
@ -315,17 +338,17 @@ func (r *JceReader) ReadAny(tag int) interface{} {
case 1:
return r.readUInt16()
case 2:
return r.readInt32()
return r.readUInt32()
case 3:
return r.readInt64()
return r.readUInt64()
case 4:
return r.readFloat32()
case 5:
return r.readFloat64()
case 6:
return string(r.readBytes(int(r.readByte())))
return utils.B2S(r.readBytes(int(r.readByte())))
case 7:
return string(r.readBytes(int(r.readInt32())))
return utils.B2S(r.readBytes(int(r.readUInt32())))
case 8:
s := r.ReadInt32(0)
m := make(map[interface{}]interface{})
@ -343,12 +366,13 @@ func (r *JceReader) ReadAny(tag int) interface{} {
case 12:
return 0
case 13:
r.readHead()
r.skipHead()
return r.readBytes(int(r.ReadInt32(0)))
default:
return nil
}
}
*/
func (r *JceReader) ReadJceStruct(obj IJceStruct, tag int) {
if !r.skipToTag(tag) {
@ -362,41 +386,339 @@ func (r *JceReader) ReadJceStruct(obj IJceStruct, tag int) {
r.skipToStructEnd()
}
func (r *JceReader) ReadMap(i interface{}, tag int) {
v := reflect.ValueOf(i)
if v.Kind() != reflect.Map {
return
}
func (r *JceReader) ReadMapStrStr(tag int) map[string]string {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 8:
s := r.ReadInt32(0)
m := make(map[string]string, s)
for i := 0; i < int(s); i++ {
m[r.ReadString(0)] = r.ReadString(1)
}
return m
default:
return nil
}
}
func (r *JceReader) ReadMapStrByte(tag int) map[string][]byte {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 8:
s := r.ReadInt32(0)
m := make(map[string][]byte, s)
for i := 0; i < int(s); i++ {
m[r.ReadString(0)] = r.ReadBytes(1)
}
return m
default:
return nil
}
}
func (r *JceReader) ReadMapStrMapStrByte(tag int) map[string]map[string][]byte {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 8:
s := r.ReadInt32(0)
m := make(map[string]map[string][]byte, s)
for i := 0; i < int(s); i++ {
m[r.ReadString(0)] = r.ReadMapStrByte(1)
}
return m
default:
return nil
}
}
/*
func (r *JceReader) ReadMap(i interface{}, tag int) {
r.readMap(reflect.ValueOf(i), tag)
}
func (r *JceReader) readMap(v reflect.Value, tag int) {
if v.Kind() != reflect.Map || !r.skipToTag(tag) {
return
}
t := v.Type()
kt := t.Key()
kv := reflect.New(kt)
vt := t.Elem()
vv := reflect.New(vt)
r.readHead()
r.skipHead()
s := r.ReadInt32(0)
// map with string key or string value is very common.
// specialize for string
if kt.Kind() == reflect.String && vt.Kind() == reflect.String {
for i := 0; i < int(s); i++ {
kv := reflect.ValueOf(r.ReadString(0))
vv := reflect.ValueOf(r.ReadString(1))
v.SetMapIndex(kv, vv)
}
return
}
if kt.Kind() == reflect.String {
vv := reflect.New(vt)
for i := 0; i < int(s); i++ {
kv := reflect.ValueOf(r.ReadString(0))
r.readObject(vv, 1)
v.SetMapIndex(kv, vv.Elem())
}
return
}
kv := reflect.New(kt)
vv := reflect.New(vt)
for i := 0; i < int(s); i++ {
r.ReadObject(kv.Interface(), 0)
r.ReadObject(vv.Interface(), 1)
r.readObject(kv, 0)
r.readObject(vv, 1)
v.SetMapIndex(kv.Elem(), vv.Elem())
}
}
*/
func (r *JceReader) ReadSlice(i interface{}, tag int) {
t := reflect.TypeOf(i)
v := reflect.ValueOf(i).Elem()
if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Slice {
return
}
t = t.Elem()
func (r *JceReader) ReadFileStorageServerInfos(tag int) []FileStorageServerInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]FileStorageServerInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadBigDataIPLists(tag int) []BigDataIPList {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]BigDataIPList, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadBigDataIPInfos(tag int) []BigDataIPInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]BigDataIPInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadOnlineInfos(tag int) []OnlineInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]OnlineInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadInstanceInfos(tag int) []InstanceInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]InstanceInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadSsoServerInfos(tag int) []SsoServerInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]SsoServerInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadFriendInfos(tag int) []FriendInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]FriendInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadTroopNumbers(tag int) []TroopNumber {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]TroopNumber, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadTroopMemberInfos(tag int) []TroopMemberInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]TroopMemberInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadPushMessageInfos(tag int) []PushMessageInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]PushMessageInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
func (r *JceReader) ReadSvcDevLoginInfos(tag int) []SvcDevLoginInfo {
if !r.skipToTag(tag) {
return nil
}
hd, _ := r.readHead()
switch hd.Type {
case 9:
s := r.ReadInt32(0)
sl := make([]SvcDevLoginInfo, s)
for i := 0; i < int(s); i++ {
r.skipHead()
sl[i].ReadFrom(r)
r.skipToStructEnd()
}
return sl
default:
return nil
}
}
/*
func (r *JceReader) ReadSlice(i interface{}, tag int) {
r.readSlice(reflect.ValueOf(i), tag)
}
func (r *JceReader) readSlice(v reflect.Value, tag int) {
t := v.Type()
if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Slice || !r.skipToTag(tag) {
return
}
v = v.Elem()
t = t.Elem()
hd, _ := r.readHead()
if hd.Type == 9 {
s := r.ReadInt32(0)
@ -404,56 +726,65 @@ func (r *JceReader) ReadSlice(i interface{}, tag int) {
t = t.Elem()
val := reflect.New(t)
for i := 0; i < int(s); i++ {
r.ReadObject(val.Interface(), 0)
r.readObject(val, 0)
sv.Index(i).Set(val.Elem())
}
v.Set(sv)
}
if hd.Type == 13 && t.Elem().Kind() == reflect.Uint8 {
r.readHead()
r.skipHead()
arr := r.readBytes(int(r.ReadInt32(0)))
v.SetBytes(arr)
}
}
func (r *JceReader) ReadObject(i interface{}, tag int) {
va := reflect.ValueOf(i)
if va.Kind() != reflect.Ptr || va.IsNil() {
return
}
if ve := va.Elem(); ve.Kind() == reflect.Map {
ve.Set(reflect.MakeMap(ve.Type()))
r.ReadMap(ve.Interface(), tag)
return
}
switch o := i.(type) {
case *byte:
*o = r.ReadByte(tag)
case *bool:
*o = r.ReadBool(tag)
case *int16:
*o = r.ReadInt16(tag)
case *int:
*o = int(r.ReadInt32(tag))
case *int32:
*o = r.ReadInt32(tag)
case *int64:
*o = r.ReadInt64(tag)
case *float32:
*o = r.ReadFloat32(tag)
case *float64:
*o = r.ReadFloat64(tag)
case *string:
*o = r.ReadString(tag)
case *[]byte:
r.ReadSlice(o, tag)
case IJceStruct:
r.readHead()
o.ReadFrom(r)
r.skipToStructEnd()
}
r.readObject(reflect.ValueOf(i), tag)
}
func (r *JceReader) ReadAvailable() []byte {
return r.readBytes(r.buf.Len())
func (r *JceReader) readObject(v reflect.Value, tag int) {
if v.Kind() != reflect.Ptr || v.IsNil() {
return
}
elemType := v.Type().Elem()
if elemType.Kind() == reflect.Map {
elem := v.Elem()
elem.Set(reflect.MakeMap(elem.Type()))
r.readMap(elem, tag)
return
} else if elemType.Kind() == reflect.Slice && // *[]byte
elemType.Elem().Kind() == reflect.Uint8 {
elem := v.Elem()
elem.SetBytes(r.ReadBytes(tag))
return
}
switch elemType.Kind() {
case reflect.Uint8, reflect.Int8:
*(*uint8)(pointerOf(v)) = r.ReadByte(tag)
case reflect.Bool:
*(*bool)(pointerOf(v)) = r.ReadBool(tag)
case reflect.Uint16, reflect.Int16:
*(*int16)(pointerOf(v)) = r.ReadInt16(tag)
case reflect.Uint32, reflect.Int32:
*(*int32)(pointerOf(v)) = r.ReadInt32(tag)
case reflect.Uint64, reflect.Int64:
*(*int64)(pointerOf(v)) = r.ReadInt64(tag)
case reflect.String:
*(*string)(pointerOf(v)) = r.ReadString(tag)
default:
// other cases
switch o := v.Interface().(type) {
case IJceStruct:
r.skipHead()
o.ReadFrom(r)
r.skipToStructEnd()
case *float32:
*o = r.ReadFloat32(tag)
case *float64:
*o = r.ReadFloat64(tag)
}
}
}
*/

View File

@ -2,21 +2,26 @@ package jce
import (
"math/rand"
"reflect"
"strconv"
"sync"
"testing"
"unsafe"
"github.com/stretchr/testify/assert"
)
func TestJceReader_ReadSlice(t *testing.T) {
s := make([]int64, 50)
s := make([][]byte, 50)
for i := range s {
s[i] = rand.Int63()
b := make([]byte, 64)
_, _ = rand.Read(b)
s[i] = b
}
w := NewJceWriter()
w.WriteObject(s, 1)
w.WriteBytesSlice(s, 1)
r := NewJceReader(w.Bytes())
var result []int64
r.ReadSlice(&result, 1)
result := r.ReadByteArrArr(1)
assert.Equal(t, s, result)
}
@ -35,10 +40,9 @@ func BenchmarkJceReader_ReadSlice(b *testing.B) {
src := w.Bytes()
b.SetBytes(int64(len(src)))
b.StartTimer()
result := make([]BigDataIPInfo, 0)
for i := 0; i < b.N; i++ {
r := NewJceReader(src)
r.ReadSlice(&result, 1)
_ = r.ReadBigDataIPInfos(1)
}
}
@ -59,12 +63,13 @@ var req = RequestDataVersion2{
"5": {
"123": []byte(`123`),
},
}}
},
}
func TestRequestDataVersion2_ReadFrom(t *testing.T) {
// todo(wdv): fuzz test
w := NewJceWriter()
w.WriteObject(req.Map, 0)
w.writeMapStrMapStrBytes(req.Map, 0)
src := w.Bytes()
result := RequestDataVersion2{}
result.ReadFrom(NewJceReader(src))
@ -73,7 +78,7 @@ func TestRequestDataVersion2_ReadFrom(t *testing.T) {
func BenchmarkRequestDataVersion2_ReadFrom(b *testing.B) {
w := NewJceWriter()
w.WriteObject(req.Map, 0)
w.writeMapStrMapStrBytes(req.Map, 0)
src := w.Bytes()
b.SetBytes(int64(len(src)))
result := &RequestDataVersion2{}
@ -93,3 +98,210 @@ func TestJceReader_ReadBytes(t *testing.T) {
assert.Equal(t, b, rb)
}
func (w *JceWriter) WriteObject(i interface{}, tag byte) {
t := reflect.TypeOf(i)
if t.Kind() == reflect.Map {
w.WriteMap(i, tag)
return
}
if t.Kind() == reflect.Slice {
if b, ok := i.([]byte); ok {
w.WriteBytes(b, tag)
return
}
w.WriteSlice(i, tag)
return
}
switch o := i.(type) {
case byte:
w.WriteByte(o, tag)
case bool:
w.WriteBool(o, tag)
case int16:
w.WriteInt16(o, tag)
case int32:
w.WriteInt32(o, tag)
case int64:
w.WriteInt64(o, tag)
case float32:
w.WriteFloat32(o, tag)
case float64:
w.WriteFloat64(o, tag)
case string:
w.WriteString(o, tag)
case IJceStruct:
w.WriteJceStruct(o, tag)
}
}
func (w *JceWriter) writeObject(v reflect.Value, tag byte) {
k := v.Kind()
if k == reflect.Map {
switch o := v.Interface().(type) {
case map[string]string:
w.writeMapStrStr(o, tag)
case map[string][]byte:
w.writeMapStrBytes(o, tag)
case map[string]map[string][]byte:
w.writeMapStrMapStrBytes(o, tag)
default:
w.writeMap(v, tag)
}
return
}
if k == reflect.Slice {
switch o := v.Interface().(type) {
case []byte:
w.WriteBytes(o, tag)
case []IJceStruct:
w.WriteJceStructSlice(o, tag)
default:
w.writeSlice(v, tag)
}
return
}
switch k {
case reflect.Uint8, reflect.Int8:
w.WriteByte(*(*byte)(pointerOf(v)), tag)
case reflect.Uint16, reflect.Int16:
w.WriteInt16(*(*int16)(pointerOf(v)), tag)
case reflect.Uint32, reflect.Int32:
w.WriteInt32(*(*int32)(pointerOf(v)), tag)
case reflect.Uint64, reflect.Int64:
w.WriteInt64(*(*int64)(pointerOf(v)), tag)
case reflect.String:
w.WriteString(v.String(), tag)
default:
switch o := v.Interface().(type) {
case IJceStruct:
w.WriteJceStruct(o, tag)
case float32:
w.WriteFloat32(o, tag)
case float64:
w.WriteFloat64(o, tag)
}
}
}
type decoder struct {
index int
id int
}
var decoderCache = sync.Map{}
// WriteJceStructRaw 写入 Jce 结构体
func (w *JceWriter) WriteJceStructRaw(s interface{}) {
t := reflect.TypeOf(s)
if t.Kind() != reflect.Ptr {
return
}
t = t.Elem()
v := reflect.ValueOf(s).Elem()
var jceDec []decoder
dec, ok := decoderCache.Load(t)
if ok { // 从缓存中加载
jceDec = dec.([]decoder)
} else { // 初次反射
jceDec = make([]decoder, 0, t.NumField())
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
strId := field.Tag.Get("jceId")
if strId == "" {
continue
}
id, err := strconv.Atoi(strId)
if err != nil {
continue
}
jceDec = append(jceDec, decoder{
index: i,
id: id,
})
}
decoderCache.Store(t, jceDec) // 存入缓存
}
for _, dec := range jceDec {
obj := v.Field(dec.index)
w.writeObject(obj, byte(dec.id))
}
}
func (w *JceWriter) WriteJceStruct(s IJceStruct, tag byte) {
w.writeHead(10, tag)
w.WriteJceStructRaw(s)
w.writeHead(11, 0)
}
func (w *JceWriter) WriteSlice(i interface{}, tag byte) {
va := reflect.ValueOf(i)
if va.Kind() != reflect.Slice {
panic("JceWriter.WriteSlice: not a slice")
}
w.writeSlice(va, tag)
}
func (w *JceWriter) writeSlice(slice reflect.Value, tag byte) {
if slice.Kind() != reflect.Slice {
return
}
w.writeHead(9, tag)
if slice.Len() == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
return
}
w.WriteInt32(int32(slice.Len()), 0)
for i := 0; i < slice.Len(); i++ {
v := slice.Index(i)
w.writeObject(v, 0)
}
}
func (w *JceWriter) WriteJceStructSlice(l []IJceStruct, tag byte) {
w.writeHead(9, tag)
if len(l) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
return
}
w.WriteInt32(int32(len(l)), 0)
for _, v := range l {
w.WriteJceStruct(v, 0)
}
}
func (w *JceWriter) WriteMap(m interface{}, tag byte) {
va := reflect.ValueOf(m)
if va.Kind() != reflect.Map {
panic("JceWriter.WriteMap: not a map")
}
w.writeMap(va, tag)
}
func (w *JceWriter) writeMap(m reflect.Value, tag byte) {
if m.IsNil() {
w.writeHead(8, tag)
w.writeHead(12, 0) // w.WriteInt32(0, 0)
return
}
if m.Kind() != reflect.Map {
return
}
w.writeHead(8, tag)
w.WriteInt32(int32(m.Len()), 0)
iter := m.MapRange()
for iter.Next() {
w.writeObject(iter.Key(), 0)
w.writeObject(iter.Value(), 1)
}
}
type value struct {
typ unsafe.Pointer
data unsafe.Pointer
flag uintptr
}
func pointerOf(v reflect.Value) unsafe.Pointer {
return (*value)(unsafe.Pointer(&v)).data
}

View File

@ -1,10 +1,11 @@
package jce
type IJceStruct interface {
// ToBytes() []byte
ToBytes() []byte
ReadFrom(*JceReader)
}
//go:generate go run github.com/Mrs4s/MiraiGo/internal/generator/jce_gen -file=structs.go -o structs_tobytes.go
type (
RequestPacket struct {
IVersion int16 `jceId:"1"`
@ -74,7 +75,6 @@ type (
}
SvcReqRegister struct {
IJceStruct
Uin int64 `jceId:"0"`
Bid int64 `jceId:"1"`
ConnType byte `jceId:"2"`
@ -139,7 +139,6 @@ type (
}
SvcReqRegisterNew struct {
IJceStruct
RequestOptional int64 `jceId:"0"`
C2CMsg IJceStruct `jceId:"1"` // SvcReqGetMsgV2
GroupMsg IJceStruct `jceId:"2"` // SvcReqPullGroupMsgSeq
@ -173,7 +172,6 @@ type (
}
PullGroupSeqParam struct {
IJceStruct
GroupCode int64 `jceId:"0"`
LastSeqId int64 `jceId:"1"`
}
@ -251,7 +249,6 @@ type (
}
SvcRespPushMsg struct {
IJceStruct
Uin int64 `jceId:"0"`
DelInfos []IJceStruct `jceId:"1"`
Svrip int32 `jceId:"2"`
@ -299,7 +296,6 @@ type (
}
FriendListRequest struct {
IJceStruct
Reqtype int32 `jceId:"0"`
IfReflush byte `jceId:"1"`
Uin int64 `jceId:"2"`
@ -381,7 +377,6 @@ type (
}
TroopListRequest struct {
IJceStruct
Uin int64 `jceId:"0"`
GetMSFMsgFlag byte `jceId:"1"`
Cookies []byte `jceId:"2"`
@ -432,7 +427,6 @@ type (
}
TroopMemberListRequest struct {
IJceStruct
Uin int64 `jceId:"0"`
GroupCode int64 `jceId:"1"`
NextUin int64 `jceId:"2"`
@ -482,7 +476,6 @@ type (
}
ModifyGroupCardRequest struct {
IJceStruct
Zero int64 `jceId:"0"`
GroupCode int64 `jceId:"1"`
NewSeq int64 `jceId:"2"`
@ -501,7 +494,6 @@ type (
}
SummaryCardReq struct {
IJceStruct
Uin int64 `jceId:"0"`
ComeFrom int32 `jceId:"1"`
QzoneFeedTimestamp int64 `jceId:"2"`
@ -523,7 +515,6 @@ type (
}
SummaryCardReqSearch struct {
IJceStruct
Keyword string `jceId:"0"`
CountryCode string `jceId:"1"`
Version int32 `jceId:"2"`
@ -531,7 +522,6 @@ type (
}
DelFriendReq struct {
IJceStruct
Uin int64 `jceId:"0"`
DelUin int64 `jceId:"1"`
DelType byte `jceId:"2"`
@ -539,48 +529,27 @@ type (
}
)
func (pkt *RequestPacket) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *RequestPacket) ReadFrom(r *JceReader) {
pkt.SBuffer = []byte{}
pkt.Context = make(map[string]string)
pkt.Status = make(map[string]string)
pkt.IVersion = r.ReadInt16(1)
pkt.CPacketType = r.ReadByte(2)
pkt.IMessageType = r.ReadInt32(3)
pkt.IRequestId = r.ReadInt32(4)
pkt.SServantName = r.ReadString(5)
pkt.SFuncName = r.ReadString(6)
r.ReadSlice(&pkt.SBuffer, 7)
pkt.SBuffer = r.ReadBytes(7)
pkt.ITimeout = r.ReadInt32(8)
r.ReadMap(pkt.Context, 9)
r.ReadMap(pkt.Status, 10)
}
func (pkt *RequestDataVersion3) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
// r.ReadMap(pkt.Context, 9)
pkt.Context = r.ReadMapStrStr(9)
// r.ReadMap(pkt.Status, 10)
pkt.Status = r.ReadMapStrStr(10)
}
func (pkt *RequestDataVersion3) ReadFrom(r *JceReader) {
pkt.Map = make(map[string][]byte)
r.ReadMap(pkt.Map, 0)
}
func (pkt *RequestDataVersion2) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
pkt.Map = r.ReadMapStrByte(0)
}
func (pkt *RequestDataVersion2) ReadFrom(r *JceReader) {
pkt.Map = make(map[string]map[string][]byte)
r.ReadMap(pkt.Map, 0)
pkt.Map = r.ReadMapStrMapStrByte(0)
}
func (pkt *SsoServerInfo) ReadFrom(r *JceReader) {
@ -590,22 +559,15 @@ func (pkt *SsoServerInfo) ReadFrom(r *JceReader) {
}
func (pkt *FileStoragePushFSSvcList) ReadFrom(r *JceReader) {
pkt.UploadList = []FileStorageServerInfo{}
pkt.PicDownloadList = []FileStorageServerInfo{}
pkt.GPicDownloadList = []FileStorageServerInfo{}
pkt.QZoneProxyServiceList = []FileStorageServerInfo{}
pkt.UrlEncodeServiceList = []FileStorageServerInfo{}
pkt.UploadList = r.ReadFileStorageServerInfos(0)
pkt.PicDownloadList = r.ReadFileStorageServerInfos(1)
pkt.GPicDownloadList = r.ReadFileStorageServerInfos(2)
pkt.QZoneProxyServiceList = r.ReadFileStorageServerInfos(3)
pkt.UrlEncodeServiceList = r.ReadFileStorageServerInfos(4)
pkt.BigDataChannel = &BigDataChannel{}
pkt.VipEmotionList = []FileStorageServerInfo{}
pkt.C2CPicDownList = []FileStorageServerInfo{}
r.ReadSlice(&pkt.UploadList, 0)
r.ReadSlice(&pkt.PicDownloadList, 1)
r.ReadSlice(&pkt.GPicDownloadList, 2)
r.ReadSlice(&pkt.QZoneProxyServiceList, 3)
r.ReadSlice(&pkt.UrlEncodeServiceList, 4)
r.ReadJceStruct(pkt.BigDataChannel, 5)
r.ReadSlice(&pkt.VipEmotionList, 6)
r.ReadSlice(&pkt.C2CPicDownList, 7)
pkt.VipEmotionList = r.ReadFileStorageServerInfos(6)
pkt.C2CPicDownList = r.ReadFileStorageServerInfos(7)
pkt.PttList = r.ReadBytes(10)
}
@ -615,8 +577,7 @@ func (pkt *FileStorageServerInfo) ReadFrom(r *JceReader) {
}
func (pkt *BigDataChannel) ReadFrom(r *JceReader) {
pkt.IPLists = []BigDataIPList{}
r.ReadSlice(&pkt.IPLists, 0)
pkt.IPLists = r.ReadBigDataIPLists(0)
pkt.SigSession = r.ReadBytes(1)
pkt.KeySession = r.ReadBytes(2)
pkt.SigUin = r.ReadInt64(3)
@ -625,9 +586,8 @@ func (pkt *BigDataChannel) ReadFrom(r *JceReader) {
}
func (pkt *BigDataIPList) ReadFrom(r *JceReader) {
pkt.IPList = []BigDataIPInfo{}
pkt.ServiceType = r.ReadInt64(0)
r.ReadSlice(&pkt.IPList, 1)
pkt.IPList = r.ReadBigDataIPInfos(1)
pkt.FragmentSize = r.ReadInt64(3)
}
@ -637,12 +597,6 @@ func (pkt *BigDataIPInfo) ReadFrom(r *JceReader) {
pkt.Port = r.ReadInt64(2)
}
func (pkt *SvcReqRegister) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *SvcRespRegister) ReadFrom(r *JceReader) {
pkt.Uin = r.ReadInt64(0)
pkt.Bid = r.ReadInt64(1)
@ -664,24 +618,6 @@ func (pkt *SvcRespRegister) ReadFrom(r *JceReader) {
pkt.ExtOnlineStatus = r.ReadInt64(17)
}
func (pkt *FriendListRequest) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *SummaryCardReq) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *SummaryCardReqSearch) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *FriendInfo) ReadFrom(r *JceReader) {
pkt.FriendUin = r.ReadInt64(0)
pkt.GroupId = r.ReadByte(1)
@ -692,14 +628,7 @@ func (pkt *FriendInfo) ReadFrom(r *JceReader) {
pkt.Nick = r.ReadString(14)
pkt.Network = r.ReadByte(20)
pkt.NetworkType = r.ReadInt32(24)
pkt.CardID = []byte{}
r.ReadObject(&pkt.CardID, 41)
}
func (pkt *TroopListRequest) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
pkt.CardID = r.ReadBytes(41)
}
func (pkt *TroopNumber) ReadFrom(r *JceReader) {
@ -712,12 +641,6 @@ func (pkt *TroopNumber) ReadFrom(r *JceReader) {
pkt.MaxGroupMemberNum = r.ReadInt64(29)
}
func (pkt *TroopMemberListRequest) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *TroopMemberInfo) ReadFrom(r *JceReader) {
pkt.MemberUin = r.ReadInt64(0)
pkt.FaceId = r.ReadInt16(1)
@ -750,8 +673,7 @@ func (pkt *PushMessageInfo) ReadFrom(r *JceReader) {
func (pkt *SvcDevLoginInfo) ReadFrom(r *JceReader) {
pkt.AppId = r.ReadInt64(0)
pkt.Guid = []byte{}
r.ReadSlice(&pkt.Guid, 1)
pkt.Guid = r.ReadBytes(1)
pkt.LoginTime = r.ReadInt64(2)
pkt.LoginPlatform = r.ReadInt64(3)
pkt.LoginLocation = r.ReadString(4)
@ -763,7 +685,6 @@ func (pkt *SvcDevLoginInfo) ReadFrom(r *JceReader) {
}
func (pkt *SvcRespParam) ReadFrom(r *JceReader) {
pkt.OnlineInfos = []OnlineInfo{}
pkt.PCStat = r.ReadInt32(0)
pkt.IsSupportC2CRoamMsg = r.ReadInt32(1)
pkt.IsSupportDataLine = r.ReadInt32(2)
@ -771,7 +692,7 @@ func (pkt *SvcRespParam) ReadFrom(r *JceReader) {
pkt.IsSupportViewPCFile = r.ReadInt32(4)
pkt.PcVersion = r.ReadInt32(5)
pkt.RoamFlag = r.ReadInt64(6)
r.ReadSlice(&pkt.OnlineInfos, 7)
pkt.OnlineInfos = r.ReadOnlineInfos(7)
pkt.PCClientType = r.ReadInt32(8)
}
@ -797,7 +718,6 @@ func (pkt *OnlineInfo) ReadFrom(r *JceReader) {
}
func (pkt *SvcReqMSFLoginNotify) ReadFrom(r *JceReader) {
pkt.InstanceList = []InstanceInfo{}
pkt.AppId = r.ReadInt64(0)
pkt.Status = r.ReadByte(1)
pkt.Tablet = r.ReadByte(2)
@ -806,7 +726,7 @@ func (pkt *SvcReqMSFLoginNotify) ReadFrom(r *JceReader) {
pkt.Info = r.ReadString(5)
pkt.ProductType = r.ReadInt64(6)
pkt.ClientType = r.ReadInt64(7)
r.ReadSlice(&pkt.InstanceList, 8)
pkt.InstanceList = r.ReadInstanceInfos(8)
}
func (pkt *InstanceInfo) ReadFrom(r *JceReader) {
@ -816,33 +736,3 @@ func (pkt *InstanceInfo) ReadFrom(r *JceReader) {
pkt.ProductType = r.ReadInt64(3)
pkt.ClientType = r.ReadInt64(4)
}
func (pkt *SvcRespPushMsg) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *ModifyGroupCardRequest) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *SvcReqGetDevLoginInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *SvcReqRegisterNew) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}
func (pkt *DelFriendReq) ToBytes() []byte {
w := NewJceWriter()
w.WriteJceStructRaw(pkt)
return w.Bytes()
}

View File

@ -0,0 +1,752 @@
// Code generated by internal/generator/jce_gen; DO NOT EDIT.
package jce
func (pkt *RequestPacket) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt16(pkt.IVersion, 1)
w.WriteByte(pkt.CPacketType, 2)
w.WriteInt32(pkt.IMessageType, 3)
w.WriteInt32(pkt.IRequestId, 4)
w.WriteString(pkt.SServantName, 5)
w.WriteString(pkt.SFuncName, 6)
w.WriteBytes(pkt.SBuffer, 7)
w.WriteInt32(pkt.ITimeout, 8)
w.writeMapStrStr(pkt.Context, 9)
w.writeMapStrStr(pkt.Status, 10)
return w.Bytes()
}
func (pkt *RequestDataVersion3) ToBytes() []byte {
w := NewJceWriter()
w.writeMapStrBytes(pkt.Map, 0)
return w.Bytes()
}
func (pkt *RequestDataVersion2) ToBytes() []byte {
w := NewJceWriter()
w.writeMapStrMapStrBytes(pkt.Map, 0)
return w.Bytes()
}
func (pkt *SsoServerInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteString(pkt.Server, 1)
w.WriteInt32(pkt.Port, 2)
w.WriteString(pkt.Location, 8)
return w.Bytes()
}
func (pkt *FileStoragePushFSSvcList) ToBytes() []byte {
w := NewJceWriter()
{ // write pkt.UploadList tag=0
w.writeHead(9, 0)
if len(pkt.UploadList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.UploadList)), 0)
for _, i := range pkt.UploadList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
{ // write pkt.PicDownloadList tag=1
w.writeHead(9, 1)
if len(pkt.PicDownloadList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.PicDownloadList)), 0)
for _, i := range pkt.PicDownloadList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
{ // write pkt.GPicDownloadList tag=2
w.writeHead(9, 2)
if len(pkt.GPicDownloadList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.GPicDownloadList)), 0)
for _, i := range pkt.GPicDownloadList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
{ // write pkt.QZoneProxyServiceList tag=3
w.writeHead(9, 3)
if len(pkt.QZoneProxyServiceList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.QZoneProxyServiceList)), 0)
for _, i := range pkt.QZoneProxyServiceList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
{ // write pkt.UrlEncodeServiceList tag=4
w.writeHead(9, 4)
if len(pkt.UrlEncodeServiceList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.UrlEncodeServiceList)), 0)
for _, i := range pkt.UrlEncodeServiceList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
{ // write BigDataChannel tag=5
w.writeHead(10, 5)
w.buf.Write(pkt.BigDataChannel.ToBytes())
w.writeHead(11, 0)
}
{ // write pkt.VipEmotionList tag=6
w.writeHead(9, 6)
if len(pkt.VipEmotionList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.VipEmotionList)), 0)
for _, i := range pkt.VipEmotionList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
{ // write pkt.C2CPicDownList tag=7
w.writeHead(9, 7)
if len(pkt.C2CPicDownList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.C2CPicDownList)), 0)
for _, i := range pkt.C2CPicDownList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
w.WriteBytes(pkt.PttList, 10)
return w.Bytes()
}
func (pkt *FileStorageServerInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteString(pkt.Server, 1)
w.WriteInt32(pkt.Port, 2)
return w.Bytes()
}
func (pkt *BigDataChannel) ToBytes() []byte {
w := NewJceWriter()
{ // write pkt.IPLists tag=0
w.writeHead(9, 0)
if len(pkt.IPLists) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.IPLists)), 0)
for _, i := range pkt.IPLists {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
w.WriteBytes(pkt.SigSession, 1)
w.WriteBytes(pkt.KeySession, 2)
w.WriteInt64(pkt.SigUin, 3)
w.WriteInt32(pkt.ConnectFlag, 4)
w.WriteBytes(pkt.PbBuf, 5)
return w.Bytes()
}
func (pkt *BigDataIPList) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.ServiceType, 0)
{ // write pkt.IPList tag=1
w.writeHead(9, 1)
if len(pkt.IPList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.IPList)), 0)
for _, i := range pkt.IPList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
w.WriteInt64(pkt.FragmentSize, 3)
return w.Bytes()
}
func (pkt *BigDataIPInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Type, 0)
w.WriteString(pkt.Server, 1)
w.WriteInt64(pkt.Port, 2)
return w.Bytes()
}
func (pkt *SvcReqRegister) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteInt64(pkt.Bid, 1)
w.WriteByte(pkt.ConnType, 2)
w.WriteString(pkt.Other, 3)
w.WriteInt32(pkt.Status, 4)
w.WriteByte(pkt.OnlinePush, 5)
w.WriteByte(pkt.IsOnline, 6)
w.WriteByte(pkt.IsShowOnline, 7)
w.WriteByte(pkt.KickPC, 8)
w.WriteByte(pkt.KickWeak, 9)
w.WriteInt64(pkt.Timestamp, 10)
w.WriteInt64(pkt.IOSVersion, 11)
w.WriteByte(pkt.NetType, 12)
w.WriteString(pkt.BuildVer, 13)
w.WriteByte(pkt.RegType, 14)
w.WriteBytes(pkt.DevParam, 15)
w.WriteBytes(pkt.Guid, 16)
w.WriteInt32(pkt.LocaleId, 17)
w.WriteByte(pkt.SilentPush, 18)
w.WriteString(pkt.DevName, 19)
w.WriteString(pkt.DevType, 20)
w.WriteString(pkt.OSVer, 21)
w.WriteByte(pkt.OpenPush, 22)
w.WriteInt64(pkt.LargeSeq, 23)
w.WriteInt64(pkt.LastWatchStartTime, 24)
w.WriteInt64(pkt.OldSSOIp, 26)
w.WriteInt64(pkt.NewSSOIp, 27)
w.WriteString(pkt.ChannelNo, 28)
w.WriteInt64(pkt.CPID, 29)
w.WriteString(pkt.VendorName, 30)
w.WriteString(pkt.VendorOSName, 31)
w.WriteString(pkt.IOSIdfa, 32)
w.WriteBytes(pkt.B769, 33)
w.WriteByte(pkt.IsSetStatus, 34)
w.WriteBytes(pkt.ServerBuf, 35)
w.WriteByte(pkt.SetMute, 36)
w.WriteInt64(pkt.ExtOnlineStatus, 38)
w.WriteInt32(pkt.BatteryStatus, 39)
return w.Bytes()
}
func (pkt *SvcRespRegister) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteInt64(pkt.Bid, 1)
w.WriteByte(pkt.ReplyCode, 2)
w.WriteString(pkt.Result, 3)
w.WriteInt64(pkt.ServerTime, 4)
w.WriteByte(pkt.LogQQ, 5)
w.WriteByte(pkt.NeedKik, 6)
w.WriteByte(pkt.UpdateFlag, 7)
w.WriteInt64(pkt.Timestamp, 8)
w.WriteByte(pkt.CrashFlag, 9)
w.WriteString(pkt.ClientIp, 10)
w.WriteInt32(pkt.ClientPort, 11)
w.WriteInt32(pkt.HelloInterval, 12)
w.WriteInt32(pkt.LargeSeq, 13)
w.WriteByte(pkt.LargeSeqUpdate, 14)
w.WriteBytes(pkt.D769RspBody, 15)
w.WriteInt32(pkt.Status, 16)
w.WriteInt64(pkt.ExtOnlineStatus, 17)
w.WriteInt64(pkt.ClientBatteryGetInterval, 18)
w.WriteInt64(pkt.ClientAutoStatusInterval, 19)
return w.Bytes()
}
func (pkt *SvcReqRegisterNew) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.RequestOptional, 0)
{ // write C2CMsg tag=1
w.writeHead(10, 1)
w.buf.Write(pkt.C2CMsg.ToBytes())
w.writeHead(11, 0)
}
{ // write GroupMsg tag=2
w.writeHead(10, 2)
w.buf.Write(pkt.GroupMsg.ToBytes())
w.writeHead(11, 0)
}
w.WriteByte(pkt.DisGroupMsgFilter, 14)
w.WriteByte(pkt.GroupMask, 15)
w.WriteInt64(pkt.EndSeq, 16)
w.WriteBytes(pkt.O769Body, 20)
return w.Bytes()
}
func (pkt *SvcReqGetMsgV2) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteInt32(pkt.DateTime, 1)
w.WriteByte(pkt.RecivePic, 4)
w.WriteInt16(pkt.Ability, 6)
w.WriteByte(pkt.Channel, 9)
w.WriteByte(pkt.Inst, 16)
w.WriteByte(pkt.ChannelEx, 17)
w.WriteBytes(pkt.SyncCookie, 18)
w.WriteInt64(int64(pkt.SyncFlag), 19)
w.WriteByte(pkt.RambleFlag, 20)
w.WriteInt64(pkt.GeneralAbi, 26)
w.WriteBytes(pkt.PubAccountCookie, 27)
return w.Bytes()
}
func (pkt *SvcReqPullGroupMsgSeq) ToBytes() []byte {
w := NewJceWriter()
{ // write pkt.GroupInfo tag=0
w.writeHead(9, 0)
if len(pkt.GroupInfo) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.GroupInfo)), 0)
for _, i := range pkt.GroupInfo {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
w.WriteByte(pkt.VerifyType, 1)
w.WriteInt32(pkt.Filter, 2)
return w.Bytes()
}
func (pkt *PullGroupSeqParam) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.GroupCode, 0)
w.WriteInt64(pkt.LastSeqId, 1)
return w.Bytes()
}
func (pkt *SvcRespParam) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt32(pkt.PCStat, 0)
w.WriteInt32(pkt.IsSupportC2CRoamMsg, 1)
w.WriteInt32(pkt.IsSupportDataLine, 2)
w.WriteInt32(pkt.IsSupportPrintable, 3)
w.WriteInt32(pkt.IsSupportViewPCFile, 4)
w.WriteInt32(pkt.PcVersion, 5)
w.WriteInt64(pkt.RoamFlag, 6)
{ // write pkt.OnlineInfos tag=7
w.writeHead(9, 7)
if len(pkt.OnlineInfos) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.OnlineInfos)), 0)
for _, i := range pkt.OnlineInfos {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
w.WriteInt32(pkt.PCClientType, 8)
return w.Bytes()
}
func (pkt *RequestPushNotify) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteByte(pkt.Type, 1)
w.WriteString(pkt.Service, 2)
w.WriteString(pkt.Cmd, 3)
w.WriteBytes(pkt.NotifyCookie, 4)
w.WriteInt32(pkt.MsgType, 5)
w.WriteInt32(pkt.UserActive, 6)
w.WriteInt32(pkt.GeneralFlag, 7)
w.WriteInt64(pkt.BindedUin, 8)
return w.Bytes()
}
func (pkt *OnlineInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt32(pkt.InstanceId, 0)
w.WriteInt32(pkt.ClientType, 1)
w.WriteInt32(pkt.OnlineStatus, 2)
w.WriteInt32(pkt.PlatformId, 3)
w.WriteString(pkt.SubPlatform, 4)
w.WriteInt64(pkt.UClientType, 5)
return w.Bytes()
}
func (pkt *SvcReqMSFLoginNotify) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.AppId, 0)
w.WriteByte(pkt.Status, 1)
w.WriteByte(pkt.Tablet, 2)
w.WriteInt64(pkt.Platform, 3)
w.WriteString(pkt.Title, 4)
w.WriteString(pkt.Info, 5)
w.WriteInt64(pkt.ProductType, 6)
w.WriteInt64(pkt.ClientType, 7)
{ // write pkt.InstanceList tag=8
w.writeHead(9, 8)
if len(pkt.InstanceList) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.InstanceList)), 0)
for _, i := range pkt.InstanceList {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
return w.Bytes()
}
func (pkt *InstanceInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt32(pkt.AppId, 0)
w.WriteByte(pkt.Tablet, 1)
w.WriteInt64(pkt.Platform, 2)
w.WriteInt64(pkt.ProductType, 3)
w.WriteInt64(pkt.ClientType, 4)
return w.Bytes()
}
func (pkt *PushMessageInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.FromUin, 0)
w.WriteInt64(pkt.MsgTime, 1)
w.WriteInt16(pkt.MsgType, 2)
w.WriteInt16(pkt.MsgSeq, 3)
w.WriteString(pkt.Msg, 4)
w.WriteInt32(pkt.RealMsgTime, 5)
w.WriteBytes(pkt.VMsg, 6)
w.WriteInt64(pkt.AppShareID, 7)
w.WriteBytes(pkt.MsgCookies, 8)
w.WriteBytes(pkt.AppShareCookie, 9)
w.WriteInt64(pkt.MsgUid, 10)
w.WriteInt64(pkt.LastChangeTime, 11)
w.WriteInt64(pkt.FromInstId, 14)
w.WriteBytes(pkt.RemarkOfSender, 15)
w.WriteString(pkt.FromMobile, 16)
w.WriteString(pkt.FromName, 17)
return w.Bytes()
}
func (pkt *SvcRespPushMsg) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
{ // write pkt.DelInfos tag=1
w.writeHead(9, 1)
if len(pkt.DelInfos) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.DelInfos)), 0)
for _, i := range pkt.DelInfos {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
w.WriteInt32(pkt.Svrip, 2)
w.WriteBytes(pkt.PushToken, 3)
w.WriteInt32(pkt.ServiceType, 4)
return w.Bytes()
}
func (pkt *SvcReqGetDevLoginInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteBytes(pkt.Guid, 0)
w.WriteString(pkt.AppName, 1)
w.WriteInt64(pkt.LoginType, 2)
w.WriteInt64(pkt.Timestamp, 3)
w.WriteInt64(pkt.NextItemIndex, 4)
w.WriteInt64(pkt.RequireMax, 5)
w.WriteInt64(pkt.GetDevListType, 6)
return w.Bytes()
}
func (pkt *DelMsgInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.FromUin, 0)
w.WriteInt64(pkt.MsgTime, 1)
w.WriteInt16(pkt.MsgSeq, 2)
w.WriteBytes(pkt.MsgCookies, 3)
w.WriteInt16(pkt.Cmd, 4)
w.WriteInt64(pkt.MsgType, 5)
w.WriteInt64(pkt.AppId, 6)
w.WriteInt64(pkt.SendTime, 7)
w.WriteInt32(pkt.SsoSeq, 8)
w.WriteInt32(pkt.SsoIp, 9)
w.WriteInt32(pkt.ClientIp, 10)
return w.Bytes()
}
func (pkt *FriendListRequest) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt32(pkt.Reqtype, 0)
w.WriteByte(pkt.IfReflush, 1)
w.WriteInt64(pkt.Uin, 2)
w.WriteInt16(pkt.StartIndex, 3)
w.WriteInt16(pkt.FriendCount, 4)
w.WriteByte(pkt.GroupId, 5)
w.WriteByte(pkt.IfGetGroupInfo, 6)
w.WriteByte(pkt.GroupStartIndex, 7)
w.WriteByte(pkt.GroupCount, 8)
w.WriteByte(pkt.IfGetMSFGroup, 9)
w.WriteByte(pkt.IfShowTermType, 10)
w.WriteInt64(pkt.Version, 11)
w.WriteInt64Slice(pkt.UinList, 12)
w.WriteInt32(pkt.AppType, 13)
w.WriteByte(pkt.IfGetDOVId, 14)
w.WriteByte(pkt.IfGetBothFlag, 15)
w.WriteBytes(pkt.D50, 16)
w.WriteBytes(pkt.D6B, 17)
w.WriteInt64Slice(pkt.SnsTypeList, 18)
return w.Bytes()
}
func (pkt *FriendInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.FriendUin, 0)
w.WriteByte(pkt.GroupId, 1)
w.WriteInt16(pkt.FaceId, 2)
w.WriteString(pkt.Remark, 3)
w.WriteByte(pkt.QQType, 4)
w.WriteByte(pkt.Status, 5)
w.WriteByte(pkt.MemberLevel, 6)
w.WriteByte(pkt.IsMqqOnLine, 7)
w.WriteByte(pkt.QQOnlineState, 8)
w.WriteByte(pkt.IsIphoneOnline, 9)
w.WriteByte(pkt.DetailStatusFlag, 10)
w.WriteByte(pkt.QQOnlineStateV2, 11)
w.WriteString(pkt.ShowName, 12)
w.WriteByte(pkt.IsRemark, 13)
w.WriteString(pkt.Nick, 14)
w.WriteByte(pkt.SpecialFlag, 15)
w.WriteBytes(pkt.IMGroupID, 16)
w.WriteBytes(pkt.MSFGroupID, 17)
w.WriteInt32(pkt.TermType, 18)
w.WriteByte(pkt.Network, 20)
w.WriteBytes(pkt.Ring, 21)
w.WriteInt64(pkt.AbiFlag, 22)
w.WriteInt64(pkt.FaceAddonId, 23)
w.WriteInt32(pkt.NetworkType, 24)
w.WriteInt64(pkt.VipFont, 25)
w.WriteInt32(pkt.IconType, 26)
w.WriteString(pkt.TermDesc, 27)
w.WriteInt64(pkt.ColorRing, 28)
w.WriteByte(pkt.ApolloFlag, 29)
w.WriteInt64(pkt.ApolloTimestamp, 30)
w.WriteByte(pkt.Sex, 31)
w.WriteInt64(pkt.FounderFont, 32)
w.WriteString(pkt.EimId, 33)
w.WriteString(pkt.EimMobile, 34)
w.WriteByte(pkt.OlympicTorch, 35)
w.WriteInt64(pkt.ApolloSignTime, 36)
w.WriteInt64(pkt.LaviUin, 37)
w.WriteInt64(pkt.TagUpdateTime, 38)
w.WriteInt64(pkt.GameLastLoginTime, 39)
w.WriteInt64(pkt.GameAppId, 40)
w.WriteBytes(pkt.CardID, 41)
w.WriteInt64(pkt.BitSet, 42)
w.WriteByte(pkt.KingOfGloryFlag, 43)
w.WriteInt64(pkt.KingOfGloryRank, 44)
w.WriteString(pkt.MasterUin, 45)
w.WriteInt64(pkt.LastMedalUpdateTime, 46)
w.WriteInt64(pkt.FaceStoreId, 47)
w.WriteInt64(pkt.FontEffect, 48)
w.WriteString(pkt.DOVId, 49)
w.WriteInt64(pkt.BothFlag, 50)
w.WriteByte(pkt.CentiShow3DFlag, 51)
w.WriteBytes(pkt.IntimateInfo, 52)
w.WriteByte(pkt.ShowNameplate, 53)
w.WriteByte(pkt.NewLoverDiamondFlag, 54)
w.WriteBytes(pkt.ExtSnsFrdData, 55)
w.WriteBytes(pkt.MutualMarkData, 56)
return w.Bytes()
}
func (pkt *TroopListRequest) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteByte(pkt.GetMSFMsgFlag, 1)
w.WriteBytes(pkt.Cookies, 2)
w.WriteInt64Slice(pkt.GroupInfo, 3)
w.WriteByte(pkt.GroupFlagExt, 4)
w.WriteInt32(pkt.Version, 5)
w.WriteInt64(pkt.CompanyId, 6)
w.WriteInt64(pkt.VersionNum, 7)
w.WriteByte(pkt.GetLongGroupName, 8)
return w.Bytes()
}
func (pkt *TroopNumber) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.GroupUin, 0)
w.WriteInt64(pkt.GroupCode, 1)
w.WriteByte(pkt.Flag, 2)
w.WriteInt64(pkt.GroupInfoSeq, 3)
w.WriteString(pkt.GroupName, 4)
w.WriteString(pkt.GroupMemo, 5)
w.WriteInt64(pkt.GroupFlagExt, 6)
w.WriteInt64(pkt.GroupRankSeq, 7)
w.WriteInt64(pkt.CertificationType, 8)
w.WriteInt64(pkt.ShutUpTimestamp, 9)
w.WriteInt64(pkt.MyShutUpTimestamp, 10)
w.WriteInt64(pkt.CmdUinUinFlag, 11)
w.WriteInt64(pkt.AdditionalFlag, 12)
w.WriteInt64(pkt.GroupTypeFlag, 13)
w.WriteInt64(pkt.GroupSecType, 14)
w.WriteInt64(pkt.GroupSecTypeInfo, 15)
w.WriteInt64(pkt.GroupClassExt, 16)
w.WriteInt64(pkt.AppPrivilegeFlag, 17)
w.WriteInt64(pkt.SubscriptionUin, 18)
w.WriteInt64(pkt.MemberNum, 19)
w.WriteInt64(pkt.MemberNumSeq, 20)
w.WriteInt64(pkt.MemberCardSeq, 21)
w.WriteInt64(pkt.GroupFlagExt3, 22)
w.WriteInt64(pkt.GroupOwnerUin, 23)
w.WriteByte(pkt.IsConfGroup, 24)
w.WriteByte(pkt.IsModifyConfGroupFace, 25)
w.WriteByte(pkt.IsModifyConfGroupName, 26)
w.WriteInt64(pkt.CmdUinJoinTime, 27)
w.WriteInt64(pkt.CompanyId, 28)
w.WriteInt64(pkt.MaxGroupMemberNum, 29)
w.WriteInt64(pkt.CmdUinGroupMask, 30)
w.WriteInt64(pkt.GuildAppId, 31)
w.WriteInt64(pkt.GuildSubType, 32)
w.WriteInt64(pkt.CmdUinRingtoneID, 33)
w.WriteInt64(pkt.CmdUinFlagEx2, 34)
return w.Bytes()
}
func (pkt *TroopMemberListRequest) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteInt64(pkt.GroupCode, 1)
w.WriteInt64(pkt.NextUin, 2)
w.WriteInt64(pkt.GroupUin, 3)
w.WriteInt64(pkt.Version, 4)
w.WriteInt64(pkt.ReqType, 5)
w.WriteInt64(pkt.GetListAppointTime, 6)
w.WriteByte(pkt.RichCardNameVer, 7)
return w.Bytes()
}
func (pkt *TroopMemberInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.MemberUin, 0)
w.WriteInt16(pkt.FaceId, 1)
w.WriteByte(pkt.Age, 2)
w.WriteByte(pkt.Gender, 3)
w.WriteString(pkt.Nick, 4)
w.WriteByte(pkt.Status, 5)
w.WriteString(pkt.ShowName, 6)
w.WriteString(pkt.Name, 8)
w.WriteString(pkt.Memo, 12)
w.WriteString(pkt.AutoRemark, 13)
w.WriteInt64(pkt.MemberLevel, 14)
w.WriteInt64(pkt.JoinTime, 15)
w.WriteInt64(pkt.LastSpeakTime, 16)
w.WriteInt64(pkt.CreditLevel, 17)
w.WriteInt64(pkt.Flag, 18)
w.WriteInt64(pkt.FlagExt, 19)
w.WriteInt64(pkt.Point, 20)
w.WriteByte(pkt.Concerned, 21)
w.WriteByte(pkt.Shielded, 22)
w.WriteString(pkt.SpecialTitle, 23)
w.WriteInt64(pkt.SpecialTitleExpireTime, 24)
w.WriteString(pkt.Job, 25)
w.WriteByte(pkt.ApolloFlag, 26)
w.WriteInt64(pkt.ApolloTimestamp, 27)
w.WriteInt64(pkt.GlobalGroupLevel, 28)
w.WriteInt64(pkt.TitleId, 29)
w.WriteInt64(pkt.ShutUpTimestap, 30)
w.WriteInt64(pkt.GlobalGroupPoint, 31)
w.WriteByte(pkt.RichCardNameVer, 33)
w.WriteInt64(pkt.VipType, 34)
w.WriteInt64(pkt.VipLevel, 35)
w.WriteInt64(pkt.BigClubLevel, 36)
w.WriteInt64(pkt.BigClubFlag, 37)
w.WriteInt64(pkt.Nameplate, 38)
w.WriteBytes(pkt.GroupHonor, 39)
return w.Bytes()
}
func (pkt *ModifyGroupCardRequest) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Zero, 0)
w.WriteInt64(pkt.GroupCode, 1)
w.WriteInt64(pkt.NewSeq, 2)
{ // write pkt.UinInfo tag=3
w.writeHead(9, 3)
if len(pkt.UinInfo) == 0 {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
} else {
w.WriteInt32(int32(len(pkt.UinInfo)), 0)
for _, i := range pkt.UinInfo {
w.writeHead(10, 0)
w.buf.Write(i.ToBytes())
w.writeHead(11, 0)
}
}
}
return w.Bytes()
}
func (pkt *UinInfo) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteInt64(pkt.Flag, 1)
w.WriteString(pkt.Name, 2)
w.WriteByte(pkt.Gender, 3)
w.WriteString(pkt.Phone, 4)
w.WriteString(pkt.Email, 5)
w.WriteString(pkt.Remark, 6)
return w.Bytes()
}
func (pkt *SummaryCardReq) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteInt32(pkt.ComeFrom, 1)
w.WriteInt64(pkt.QzoneFeedTimestamp, 2)
w.WriteByte(pkt.IsFriend, 3)
w.WriteInt64(pkt.GroupCode, 4)
w.WriteInt64(pkt.GroupUin, 5)
w.WriteInt64(pkt.GetControl, 8)
w.WriteInt32(pkt.AddFriendSource, 9)
w.WriteBytes(pkt.SecureSig, 10)
w.WriteBytesSlice(pkt.ReqServices, 14)
w.WriteInt64(pkt.TinyId, 15)
w.WriteInt64(pkt.LikeSource, 16)
w.WriteByte(pkt.ReqMedalWallInfo, 18)
w.WriteInt64Slice(pkt.Req0x5ebFieldId, 19)
w.WriteByte(pkt.ReqNearbyGodInfo, 20)
w.WriteByte(pkt.ReqExtendCard, 22)
return w.Bytes()
}
func (pkt *SummaryCardReqSearch) ToBytes() []byte {
w := NewJceWriter()
w.WriteString(pkt.Keyword, 0)
w.WriteString(pkt.CountryCode, 1)
w.WriteInt32(pkt.Version, 2)
w.WriteBytesSlice(pkt.ReqServices, 3)
return w.Bytes()
}
func (pkt *DelFriendReq) ToBytes() []byte {
w := NewJceWriter()
w.WriteInt64(pkt.Uin, 0)
w.WriteInt64(pkt.DelUin, 1)
w.WriteByte(pkt.DelType, 2)
w.WriteInt32(pkt.Version, 3)
return w.Bytes()
}

View File

@ -3,9 +3,7 @@ package jce
import (
"bytes"
goBinary "encoding/binary"
"reflect"
"strconv"
"sync"
"math"
)
type JceWriter struct {
@ -16,18 +14,16 @@ func NewJceWriter() *JceWriter {
return &JceWriter{buf: new(bytes.Buffer)}
}
func (w *JceWriter) writeHead(t byte, tag int) {
if tag < 15 {
b := byte(tag<<4) | t
w.buf.WriteByte(b)
} else if tag < 256 {
b := 0xF0 | t
w.buf.WriteByte(b)
w.buf.WriteByte(byte(tag))
func (w *JceWriter) writeHead(t, tag byte) {
if tag < 0xF {
w.buf.WriteByte(tag<<4 | t)
} else {
w.buf.WriteByte(0xF0 | t)
w.buf.WriteByte(tag)
}
}
func (w *JceWriter) WriteByte(b byte, tag int) *JceWriter {
func (w *JceWriter) WriteByte(b, tag byte) *JceWriter {
if b == 0 {
w.writeHead(12, tag)
} else {
@ -37,78 +33,116 @@ func (w *JceWriter) WriteByte(b byte, tag int) *JceWriter {
return w
}
func (w *JceWriter) WriteBool(b bool, tag int) {
var by byte = 0
func (w *JceWriter) WriteBool(b bool, tag byte) {
var by byte
if b {
by = 1
}
w.WriteByte(by, tag)
}
func (w *JceWriter) WriteInt16(n int16, tag int) {
if n >= -128 && n <= 127 {
func (w *JceWriter) WriteInt16(n int16, tag byte) {
switch {
case n >= -128 && n <= 127:
w.WriteByte(byte(n), tag)
return
default:
w.putInt16(n, tag)
}
}
//go:nosplit
func (w *JceWriter) putInt16(n int16, tag byte) {
w.writeHead(1, tag)
_ = goBinary.Write(w.buf, goBinary.BigEndian, n)
var buf [2]byte
goBinary.BigEndian.PutUint16(buf[:], uint16(n))
w.buf.Write(buf[:])
}
func (w *JceWriter) WriteInt32(n int32, tag int) *JceWriter {
if n >= -32768 && n <= 32767 { // ? if ((n >= 32768) && (n <= 32767))
w.WriteInt16(int16(n), tag)
return w
func (w *JceWriter) WriteInt32(n int32, tag byte) *JceWriter {
switch {
case n >= -128 && n <= 127:
w.WriteByte(byte(n), tag)
case n >= -32768 && n <= 32767:
w.putInt16(int16(n), tag)
default:
w.putInt32(n, tag)
}
return w
}
//go:nosplit
func (w *JceWriter) putInt32(n int32, tag byte) {
w.writeHead(2, tag)
_ = goBinary.Write(w.buf, goBinary.BigEndian, n)
return w
var buf [4]byte
goBinary.BigEndian.PutUint32(buf[:], uint32(n))
w.buf.Write(buf[:])
}
func (w *JceWriter) WriteInt64(n int64, tag int) *JceWriter {
if n >= -2147483648 && n <= 2147483647 {
return w.WriteInt32(int32(n), tag)
func (w *JceWriter) WriteInt64(n int64, tag byte) *JceWriter {
switch {
case n >= -128 && n <= 127:
w.WriteByte(byte(n), tag)
case n >= -32768 && n <= 32767:
w.putInt16(int16(n), tag)
case n >= -2147483648 && n <= 2147483647:
w.putInt32(int32(n), tag)
default:
w.putInt64(n, tag)
}
w.writeHead(3, tag)
_ = goBinary.Write(w.buf, goBinary.BigEndian, n)
return w
}
func (w *JceWriter) WriteFloat32(n float32, tag int) {
//go:nosplit
func (w *JceWriter) putInt64(n int64, tag byte) {
w.writeHead(3, tag)
var buf [8]byte
goBinary.BigEndian.PutUint64(buf[:], uint64(n))
w.buf.Write(buf[:])
}
//go:nosplit
func (w *JceWriter) WriteFloat32(n float32, tag byte) {
w.writeHead(4, tag)
_ = goBinary.Write(w.buf, goBinary.BigEndian, n)
var buf [4]byte
goBinary.BigEndian.PutUint32(buf[:], math.Float32bits(n))
w.buf.Write(buf[:])
}
func (w *JceWriter) WriteFloat64(n float64, tag int) {
//go:nosplit
func (w *JceWriter) WriteFloat64(n float64, tag byte) {
w.writeHead(5, tag)
_ = goBinary.Write(w.buf, goBinary.BigEndian, n)
var buf [8]byte
goBinary.BigEndian.PutUint64(buf[:], math.Float64bits(n))
w.buf.Write(buf[:])
}
func (w *JceWriter) WriteString(s string, tag int) *JceWriter {
by := []byte(s)
if len(by) > 255 {
func (w *JceWriter) WriteString(s string, tag byte) *JceWriter {
if len(s) > 255 {
w.writeHead(7, tag)
_ = goBinary.Write(w.buf, goBinary.BigEndian, int32(len(by)))
w.buf.Write(by)
var buf [4]byte
goBinary.BigEndian.PutUint32(buf[:], uint32(len(s)))
w.buf.Write(buf[:])
w.buf.WriteString(s)
return w
}
w.writeHead(6, tag)
w.buf.WriteByte(byte(len(by)))
w.buf.Write(by)
w.buf.WriteByte(byte(len(s)))
w.buf.WriteString(s)
return w
}
func (w *JceWriter) WriteBytes(l []byte, tag int) *JceWriter {
func (w *JceWriter) WriteBytes(l []byte, tag byte) *JceWriter {
w.writeHead(13, tag)
w.writeHead(0, 0)
w.buf.WriteByte(0) // w.writeHead(0, 0)
w.WriteInt32(int32(len(l)), 0)
w.buf.Write(l)
return w
}
func (w *JceWriter) WriteInt64Slice(l []int64, tag int) {
func (w *JceWriter) WriteInt64Slice(l []int64, tag byte) {
w.writeHead(9, tag)
if len(l) == 0 {
w.WriteInt32(0, 0)
w.writeHead(12, 0) // w.WriteInt32(0, 0)
return
}
w.WriteInt32(int32(len(l)), 0)
@ -117,143 +151,60 @@ func (w *JceWriter) WriteInt64Slice(l []int64, tag int) {
}
}
func (w *JceWriter) WriteSlice(i interface{}, tag int) {
va := reflect.ValueOf(i)
if va.Kind() != reflect.Slice {
return
}
w.writeHead(9, tag)
if va.Len() == 0 {
w.WriteInt32(0, 0)
return
}
w.WriteInt32(int32(va.Len()), 0)
for i := 0; i < va.Len(); i++ {
v := va.Index(i)
w.WriteObject(v.Interface(), 0)
}
}
func (w *JceWriter) WriteJceStructSlice(l []IJceStruct, tag int) {
func (w *JceWriter) WriteBytesSlice(l [][]byte, tag byte) {
w.writeHead(9, tag)
if len(l) == 0 {
w.WriteInt32(0, 0)
w.writeHead(12, 0) // w.WriteInt32(0, 0)
return
}
w.WriteInt32(int32(len(l)), 0)
for _, v := range l {
w.WriteJceStruct(v, 0)
w.WriteBytes(v, 0)
}
}
func (w *JceWriter) WriteMap(m interface{}, tag int) {
func (w *JceWriter) writeMapStrStr(m map[string]string, tag byte) {
if m == nil {
w.writeHead(8, tag)
w.WriteInt32(0, 0)
return
}
va := reflect.ValueOf(m)
if va.Kind() != reflect.Map {
w.writeHead(12, 0) // w.WriteInt32(0, 0)
return
}
w.writeHead(8, tag)
w.WriteInt32(int32(va.Len()), 0)
iter := va.MapRange()
for iter.Next() {
w.WriteObject(iter.Key().Interface(), 0)
w.WriteObject(iter.Value().Interface(), 1)
w.WriteInt32(int32(len(m)), 0)
for k, v := range m {
w.WriteString(k, 0)
w.WriteString(v, 1)
}
}
func (w *JceWriter) WriteObject(i interface{}, tag int) {
t := reflect.TypeOf(i)
if t.Kind() == reflect.Map {
w.WriteMap(i, tag)
func (w *JceWriter) writeMapStrBytes(m map[string][]byte, tag byte) {
if m == nil {
w.writeHead(8, tag)
w.writeHead(12, 0) // w.WriteInt32(0, 0)
return
}
if t.Kind() == reflect.Slice {
if b, ok := i.([]byte); ok {
w.WriteBytes(b, tag)
return
}
w.WriteSlice(i, tag)
w.writeHead(8, tag)
w.WriteInt32(int32(len(m)), 0)
for k, v := range m {
w.WriteString(k, 0)
w.WriteBytes(v, 1)
}
}
func (w *JceWriter) writeMapStrMapStrBytes(m map[string]map[string][]byte, tag byte) {
if m == nil {
w.writeHead(8, tag)
w.writeHead(12, 0) // w.WriteInt32(0, 0)
return
}
switch o := i.(type) {
case byte:
w.WriteByte(o, tag)
case bool:
w.WriteBool(o, tag)
case int16:
w.WriteInt16(o, tag)
case int32:
w.WriteInt32(o, tag)
case int64:
w.WriteInt64(o, tag)
case float32:
w.WriteFloat32(o, tag)
case float64:
w.WriteFloat64(o, tag)
case string:
w.WriteString(o, tag)
case IJceStruct:
w.WriteJceStruct(o, tag)
w.writeHead(8, tag)
w.WriteInt32(int32(len(m)), 0)
for k, v := range m {
w.WriteString(k, 0)
w.writeMapStrBytes(v, 1)
}
}
type decoder struct {
index int
id int
}
var decoderCache = sync.Map{}
// WriteJceStructRaw 写入 Jce 结构体
func (w *JceWriter) WriteJceStructRaw(s interface{}) {
t := reflect.TypeOf(s)
reflect.ValueOf(s).Interface()
if t.Kind() != reflect.Ptr {
return
}
t = t.Elem()
v := reflect.ValueOf(s).Elem()
var jceDec []decoder
dec, ok := decoderCache.Load(t)
if ok { // 从缓存中加载
jceDec = dec.([]decoder)
} else { // 初次反射
jceDec = make([]decoder, 0, t.NumField())
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
strId := field.Tag.Get("jceId")
if strId == "" {
continue
}
id, err := strconv.Atoi(strId)
if err != nil {
continue
}
jceDec = append(jceDec, decoder{
index: i,
id: id,
})
}
decoderCache.Store(t, jceDec) // 存入缓存
}
for _, dec := range jceDec {
obj := v.Field(dec.index).Interface()
if obj != nil {
w.WriteObject(obj, dec.id)
}
}
}
func (w *JceWriter) WriteJceStruct(s IJceStruct, tag int) {
w.writeHead(10, tag)
w.WriteJceStructRaw(s)
w.writeHead(11, 0)
}
func (w *JceWriter) Bytes() []byte {
return w.buf.Bytes()
}

View File

@ -9,10 +9,10 @@ import (
var globalBytes []byte
func BenchmarkJceWriter_WriteMap(b *testing.B) {
var x = globalBytes
x := globalBytes
for i := 0; i < b.N; i++ {
w := NewJceWriter()
w.WriteMap(req.Map, 0)
w.writeMapStrMapStrBytes(req.Map, 0)
x = w.Bytes()
}
globalBytes = x
@ -39,20 +39,16 @@ var reqPacket1 = &RequestPacket{
}
func BenchmarkJceWriter_WriteJceStructRaw(b *testing.B) {
var x = globalBytes
x := globalBytes
for i := 0; i < b.N; i++ {
w := NewJceWriter()
w.WriteJceStructRaw(reqPacket1)
x = w.Bytes()
_ = reqPacket1.ToBytes()
}
globalBytes = x
b.SetBytes(int64(len(globalBytes)))
}
func TestJceWriter_WriteJceStructRaw(t *testing.T) {
w := NewJceWriter()
w.WriteJceStructRaw(reqPacket1)
r := NewJceReader(w.Bytes())
r := NewJceReader(reqPacket1.ToBytes())
var reqPacket2 RequestPacket
reqPacket2.ReadFrom(r)
assert.Equal(t, reqPacket1, &reqPacket2)

View File

@ -14,20 +14,19 @@ var bufferPool = sync.Pool{
},
}
// NewWriter 从池中取出一个 Writer
func NewWriter() *Writer {
w := bufferPool.Get().(*Writer)
if w == nil {
return new(Writer)
}
return w
// SelectWriter 从池中取出一个 Writer
func SelectWriter() *Writer {
// 因为 bufferPool 定义有 New 函数
// 所以 bufferPool.Get() 永不为 nil
// 不用判空
return bufferPool.Get().(*Writer)
}
// PutWriter 将 Writer 放回池中
func PutWriter(w *Writer) {
// See https://golang.org/issue/23199
const maxSize = 1 << 16
if w.Cap() < maxSize { // 对于大Buffer直接丢弃
if (*bytes.Buffer)(w).Cap() < maxSize { // 对于大Buffer直接丢弃
w.Reset()
bufferPool.Put(w)
}
@ -91,38 +90,3 @@ func releaseZlibWriter(w *zlibWriter) {
zlibPool.Put(w)
}
}
const size256k = 256 * 1024
var b256kPool = sync.Pool{
New: func() interface{} {
return make128kSlicePointer()
},
}
// Get256KBytes 获取一个128k大小 []byte
func Get256KBytes() *[]byte {
buf := b256kPool.Get().(*[]byte)
if buf == nil {
return make128kSlicePointer()
}
if cap(*buf) < size256k {
return make128kSlicePointer()
}
*buf = (*buf)[:size256k]
return buf
}
// Put256KBytes 放回一个128k大小 []byte
func Put256KBytes(b *[]byte) {
if cap(*b) < size256k || cap(*b) > 2*size256k { // 太大或太小的 []byte 不要放入
return
}
*b = (*b)[:cap(*b)]
b256kPool.Put(b)
}
func make128kSlicePointer() *[]byte {
data := make([]byte, size256k)
return &data
}

View File

@ -14,6 +14,8 @@ type encoder struct {
func (msg DynamicProtoMessage) Encode() []byte {
en := &encoder{}
//nolint:staticcheck
for id, value := range msg {
key := id << 3
switch v := value.(type) {

View File

@ -71,6 +71,10 @@ func (r *Reader) ReadString() string {
return utils.B2S(data)
}
func (r *Reader) ReadInt32Bytes() []byte {
return r.ReadBytes(int(r.ReadInt32() - 4))
}
func (r *Reader) ReadStringShort() string {
data := r.ReadBytes(int(r.ReadUInt16()))
return utils.B2S(data)
@ -97,11 +101,12 @@ func (r *Reader) ReadTlvMap(tagSize int) (m TlvMap) {
return m
}
var k uint16
if tagSize == 1 {
switch tagSize {
case 1:
k = uint16(r.ReadByte())
} else if tagSize == 2 {
case 2:
k = r.ReadUInt16()
} else if tagSize == 4 {
case 4:
k = uint16(r.ReadInt32())
}
if k == 255 {

View File

@ -2,155 +2,145 @@ package binary
import (
"encoding/binary"
"math/rand"
"unsafe"
_ "unsafe" // required by go:linkname
)
func xorQ(a, b []byte, c []byte) { // MAGIC
*(*uint64)(unsafe.Pointer(&c[0])) =
*(*uint64)(unsafe.Pointer(&a[0])) ^ *(*uint64)(unsafe.Pointer(&b[0]))
}
type TEA [4]uint32
// randuint32 returns a lock free uint32 value.
//go:linkname randuint32 runtime.fastrand
func randuint32() uint32
// Encrypt tea 加密
// http://bbs.chinaunix.net/thread-583468-1-1.html
// 感谢xichen大佬对TEA的解释
func (t *TEA) Encrypt(src []byte) (dst []byte) {
func (t TEA) Encrypt(src []byte) (dst []byte) {
lens := len(src)
fill := 10 - (lens+1)%8
tmp1 := make([]byte, 8) // 非纯src的数据
tmp2 := make([]byte, 8)
dst = make([]byte, fill+lens+7)
// for i := 0; i < fill; i++ {
// dst[i] = ' '
// } // For test purpose
_, _ = rand.Read(dst[0:fill])
binary.LittleEndian.PutUint32(dst, randuint32())
binary.LittleEndian.PutUint32(dst[4:], randuint32())
binary.LittleEndian.PutUint32(dst[8:], randuint32())
dst[0] = byte(fill-3) | 0xF8 // 存储pad长度
in := 0 // 位置
// #1
if fill < 8 {
in = 8 - fill
copy(dst[fill:8], src[:in])
copy(dst[fill:], src)
var iv1, iv2, holder uint64
for i := 0; i < len(dst); i += 8 {
block := binary.BigEndian.Uint64(dst[i:])
holder = block ^ iv1
iv1 = t.encode(holder)
iv1 ^= iv2
iv2 = holder
binary.BigEndian.PutUint64(dst[i:], iv1)
}
copy(tmp2, dst[0:8])
t.encode(dst[0:8], dst[0:8])
out := 8 // 位置
// #2
if fill > 8 {
copy(dst[fill:out+8], src[:16-fill])
xorQ(dst[8:16], dst[0:8], dst[8:16]) // 与前一次结果xor
copy(tmp1, dst[8:16])
t.encode(dst[8:16], dst[8:16])
xorQ(dst[8:16], tmp2, dst[8:16]) // 与前一次数据xor
copy(tmp2, tmp1)
in = 16 - fill
out = 16
}
// #3+或#4+
lens -= 8
for in < lens {
xorQ(src[in:in+8], dst[out-8:out], dst[out:out+8]) // 与前一次结果xor
copy(tmp1, dst[out:out+8])
t.encode(dst[out:out+8], dst[out:out+8])
xorQ(dst[out:out+8], tmp2, dst[out:out+8]) // 与前一次数据xor
copy(tmp2, tmp1)
in += 8
out += 8
}
tmp3 := make([]byte, 8)
copy(tmp3, src[in:])
xorQ(tmp3, dst[out-8:out], dst[out:out+8]) // 与前一次结果xor
t.encode(dst[out:out+8], dst[out:out+8])
xorQ(dst[out:out+8], tmp2, dst[out:out+8]) // 与前一次数据xor
return dst
}
func (t *TEA) Decrypt(data []byte) []byte {
func (t TEA) Decrypt(data []byte) []byte {
if len(data) < 16 || len(data)%8 != 0 {
return nil
}
dst := make([]byte, len(data))
copy(dst, data)
t.decode(dst[0:8], dst[0:8])
tmp := make([]byte, 8)
copy(tmp, dst[0:8])
for in := 8; in < len(data); in += 8 {
xorQ(dst[in:in+8], tmp, dst[in:in+8])
t.decode(dst[in:in+8], dst[in:in+8])
xorQ(dst[in:in+8], data[in-8:in], dst[in:in+8])
xorQ(dst[in:in+8], data[in-8:in], tmp)
var iv1, iv2, holder uint64
for i := 0; i < len(dst); i += 8 {
iv1 = binary.BigEndian.Uint64(data[i:])
iv2 ^= iv1
iv2 = t.decode(iv2)
binary.BigEndian.PutUint64(dst[i:], iv2^holder)
holder = iv1
}
return dst[dst[0]&7+3 : len(data)-7]
}
//go:nosplit
func unpack(data []byte) (v0, v1 uint32) {
v1 = uint32(data[7]) | uint32(data[6])<<8 | uint32(data[5])<<16 | uint32(data[4])<<24
v0 = uint32(data[3]) | uint32(data[2])<<8 | uint32(data[1])<<16 | uint32(data[0])<<24
return v0, v1
}
func (t *TEA) encode(n uint64) uint64 {
v0, v1 := uint32(n>>32), uint32(n)
t0, t1, t2, t3 := t[0], t[1], t[2], t[3]
//go:nosplit
func repack(data []byte, v0, v1 uint32) {
_ = data[7] // early bounds check to guarantee safety of writes below
data[0] = byte(v0 >> 24)
data[1] = byte(v0 >> 16)
data[2] = byte(v0 >> 8)
data[3] = byte(v0)
v0 += (v1 + 0x9e3779b9) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x9e3779b9) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x3c6ef372) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x3c6ef372) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0xdaa66d2b) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0xdaa66d2b) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x78dde6e4) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x78dde6e4) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x1715609d) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x1715609d) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0xb54cda56) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0xb54cda56) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x5384540f) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x5384540f) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0xf1bbcdc8) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0xf1bbcdc8) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x8ff34781) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x8ff34781) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x2e2ac13a) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x2e2ac13a) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0xcc623af3) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0xcc623af3) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x6a99b4ac) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x6a99b4ac) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x08d12e65) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x08d12e65) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0xa708a81e) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0xa708a81e) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0x454021d7) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0x454021d7) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 += (v1 + 0xe3779b90) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 += (v0 + 0xe3779b90) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
data[4] = byte(v1 >> 24)
data[5] = byte(v1 >> 16)
data[6] = byte(v1 >> 8)
data[7] = byte(v1)
}
var sumTable = [0x10]uint32{
0x9e3779b9,
0x3c6ef372,
0xdaa66d2b,
0x78dde6e4,
0x1715609d,
0xb54cda56,
0x5384540f,
0xf1bbcdc8,
0x8ff34781,
0x2e2ac13a,
0xcc623af3,
0x6a99b4ac,
0x08d12e65,
0xa708a81e,
0x454021d7,
0xe3779b90,
}
//go:nosplit
func (t *TEA) encode(src, dst []byte) {
v0, v1 := unpack(src)
for i := 0; i < 0x10; i++ {
v0 += ((v1 << 4) + t[0]) ^ (v1 + sumTable[i]) ^ ((v1 >> 5) + t[1])
v1 += ((v0 << 4) + t[2]) ^ (v0 + sumTable[i]) ^ ((v0 >> 5) + t[3])
}
repack(dst, v0, v1)
return uint64(v0)<<32 | uint64(v1)
}
// 每次8字节
//go:nosplit
func (t *TEA) decode(src, dst []byte) {
v0, v1 := unpack(src)
for i := 0xf; i >= 0; i-- {
v1 -= ((v0 << 4) + t[2]) ^ (v0 + sumTable[i]) ^ ((v0 >> 5) + t[3])
v0 -= ((v1 << 4) + t[0]) ^ (v1 + sumTable[i]) ^ ((v1 >> 5) + t[1])
}
repack(dst, v0, v1)
func (t *TEA) decode(n uint64) uint64 {
v0, v1 := uint32(n>>32), uint32(n)
t0, t1, t2, t3 := t[0], t[1], t[2], t[3]
v1 -= (v0 + 0xe3779b90) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0xe3779b90) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x454021d7) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x454021d7) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0xa708a81e) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0xa708a81e) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x08d12e65) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x08d12e65) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x6a99b4ac) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x6a99b4ac) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0xcc623af3) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0xcc623af3) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x2e2ac13a) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x2e2ac13a) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x8ff34781) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x8ff34781) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0xf1bbcdc8) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0xf1bbcdc8) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x5384540f) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x5384540f) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0xb54cda56) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0xb54cda56) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x1715609d) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x1715609d) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x78dde6e4) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x78dde6e4) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0xdaa66d2b) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0xdaa66d2b) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x3c6ef372) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x3c6ef372) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
v1 -= (v0 + 0x9e3779b9) ^ ((v0 << 4) + t2) ^ ((v0 >> 5) + t3)
v0 -= (v1 + 0x9e3779b9) ^ ((v1 << 4) + t0) ^ ((v1 >> 5) + t1)
return uint64(v0)<<32 | uint64(v1)
}
//go:nosplit
func NewTeaCipher(key []byte) *TEA {
func NewTeaCipher(key []byte) (t TEA) {
if len(key) != 16 {
return nil
return TEA{}
}
t := new(TEA)
t[3] = binary.BigEndian.Uint32(key[12:])
t[2] = binary.BigEndian.Uint32(key[8:])
t[1] = binary.BigEndian.Uint32(key[4:])

View File

@ -110,7 +110,11 @@ func BenchmarkTEAen(b *testing.B) {
benchEncrypt(b, data)
})
b.Run("4K", func(b *testing.B) {
data := make([]byte, 4096)
data := make([]byte, 1024*4)
benchEncrypt(b, data)
})
b.Run("32K", func(b *testing.B) {
data := make([]byte, 1024*32)
benchEncrypt(b, data)
})
}
@ -128,4 +132,20 @@ func BenchmarkTEAde(b *testing.B) {
data := make([]byte, 4096)
benchDecrypt(b, data)
})
b.Run("32K", func(b *testing.B) {
data := make([]byte, 1024*32)
benchDecrypt(b, data)
})
}
func BenchmarkTEA_encode(b *testing.B) {
for i := 0; i < b.N; i++ {
testTEA.encode(114514)
}
}
func BenchmarkTEA_decode(b *testing.B) {
for i := 0; i < b.N; i++ {
testTEA.decode(114514)
}
}

View File

@ -4,21 +4,48 @@ import (
"bytes"
"encoding/binary"
"encoding/hex"
"github.com/Mrs4s/MiraiGo/utils"
)
// Writer 写入
type Writer bytes.Buffer
func NewWriterF(f func(writer *Writer)) []byte {
w := NewWriter()
w := SelectWriter()
f(w)
b := append([]byte(nil), w.Bytes()...)
PutWriter(w)
w.put()
return b
}
// OpenWriterF must call func cl to close
func OpenWriterF(f func(*Writer)) (b []byte, cl func()) {
w := SelectWriter()
f(w)
return w.Bytes(), w.put
}
func (w *Writer) FillUInt16() (pos int) {
pos = w.Len()
(*bytes.Buffer)(w).Write([]byte{0, 0})
return
}
func (w *Writer) WriteUInt16At(pos int, v uint16) {
newdata := (*bytes.Buffer)(w).Bytes()[pos:]
binary.BigEndian.PutUint16(newdata, v)
}
func (w *Writer) FillUInt32() (pos int) {
pos = w.Len()
(*bytes.Buffer)(w).Write([]byte{0, 0, 0, 0})
return
}
func (w *Writer) WriteUInt32At(pos int, v uint32) {
newdata := (*bytes.Buffer)(w).Bytes()[pos:]
binary.BigEndian.PutUint32(newdata, v)
}
func (w *Writer) Write(b []byte) {
(*bytes.Buffer)(w).Write(b)
}
@ -51,13 +78,13 @@ func (w *Writer) WriteUInt64(v uint64) {
}
func (w *Writer) WriteString(v string) {
payload := utils.S2B(v)
w.WriteUInt32(uint32(len(payload) + 4))
w.Write(payload)
w.WriteUInt32(uint32(len(v) + 4))
(*bytes.Buffer)(w).WriteString(v)
}
func (w *Writer) WriteStringShort(v string) {
w.WriteBytesShort(utils.S2B(v))
w.WriteUInt16(uint16(len(v)))
(*bytes.Buffer)(w).WriteString(v)
}
func (w *Writer) WriteBool(b bool) {
@ -69,36 +96,13 @@ func (w *Writer) WriteBool(b bool) {
}
func (w *Writer) EncryptAndWrite(key []byte, data []byte) {
tea := NewTeaCipher(key)
ed := tea.Encrypt(data)
w.Write(ed)
w.Write(NewTeaCipher(key).Encrypt(data))
}
func (w *Writer) WriteIntLvPacket(offset int, f func(writer *Writer)) {
data := NewWriterF(f)
w.WriteUInt32(uint32(len(data) + offset))
w.Write(data)
}
func (w *Writer) WriteUniPacket(commandName string, sessionId, extraData, body []byte) {
w1 := NewWriter()
{ // WriteIntLvPacket
w1.WriteString(commandName)
w1.WriteUInt32(8)
w1.Write(sessionId)
if len(extraData) == 0 {
w1.WriteUInt32(0x04)
} else {
w1.WriteUInt32(uint32(len(extraData) + 4))
w1.Write(extraData)
}
}
data := w1.Bytes()
w.WriteUInt32(uint32(len(data) + 4))
w.Write(data)
PutWriter(w1)
w.WriteUInt32(uint32(len(body) + 4)) // WriteIntLvPacket
w.Write(body)
func (w *Writer) WriteIntLvPacket(offset int, f func(*Writer)) {
pos := w.FillUInt32()
f(w)
w.WriteUInt32At(pos, uint32(w.Len()+offset-pos-4))
}
func (w *Writer) WriteBytesShort(data []byte) {
@ -114,12 +118,12 @@ func (w *Writer) WriteTlvLimitedSize(data []byte, limit int) {
w.WriteBytesShort(data[:limit])
}
func (w *Writer) Bytes() []byte {
return (*bytes.Buffer)(w).Bytes()
func (w *Writer) Len() int {
return (*bytes.Buffer)(w).Len()
}
func (w *Writer) Cap() int {
return (*bytes.Buffer)(w).Cap()
func (w *Writer) Bytes() []byte {
return (*bytes.Buffer)(w).Bytes()
}
func (w *Writer) Reset() {
@ -129,3 +133,7 @@ func (w *Writer) Reset() {
func (w *Writer) Grow(n int) {
(*bytes.Buffer)(w).Grow(n)
}
func (w *Writer) put() {
PutWriter(w)
}

View File

@ -49,3 +49,51 @@ func BenchmarkNewWriterF128_5(b *testing.B) {
}
})
}
func BenchmarkOpenWriterF128(b *testing.B) {
test := make([]byte, 128)
rand.Read(test)
b.StartTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_, close := OpenWriterF(func(w *Writer) {
w.Write(test)
})
close()
}
})
}
func BenchmarkOpenWriterF128_3(b *testing.B) {
test := make([]byte, 128)
rand.Read(test)
b.StartTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_, close := OpenWriterF(func(w *Writer) {
w.Write(test)
w.Write(test)
w.Write(test)
})
close()
}
})
}
func BenchmarkOpenWriterF128_5(b *testing.B) {
test := make([]byte, 128)
rand.Read(test)
b.StartTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_, close := OpenWriterF(func(w *Writer) {
w.Write(test)
w.Write(test)
w.Write(test)
w.Write(test)
w.Write(test)
})
close()
}
})
}

View File

@ -1,8 +1,11 @@
package client
import "github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
import (
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
)
var privateMsgDecoders = map[int32]func(*QQClient, *msg.Message, *incomingPacketInfo){
var privateMsgDecoders = map[int32]func(*QQClient, *msg.Message, *network.Response){
9: privateMessageDecoder, 10: privateMessageDecoder, 31: privateMessageDecoder,
79: privateMessageDecoder, 97: privateMessageDecoder, 120: privateMessageDecoder,
132: privateMessageDecoder, 133: privateMessageDecoder, 166: privateMessageDecoder,
@ -10,21 +13,21 @@ var privateMsgDecoders = map[int32]func(*QQClient, *msg.Message, *incomingPacket
208: privatePttDecoder,
}
var nonSvcNotifyTroopSystemMsgDecoders = map[int32]func(*QQClient, *msg.Message, *incomingPacketInfo){
var nonSvcNotifyTroopSystemMsgDecoders = map[int32]func(*QQClient, *msg.Message, *network.Response){
36: troopSystemMessageDecoder, 85: troopSystemMessageDecoder,
}
var troopSystemMsgDecoders = map[int32]func(*QQClient, *msg.Message, *incomingPacketInfo){
var troopSystemMsgDecoders = map[int32]func(*QQClient, *msg.Message, *network.Response){
35: troopSystemMessageDecoder, 37: troopSystemMessageDecoder,
45: troopSystemMessageDecoder, 46: troopSystemMessageDecoder, 84: troopSystemMessageDecoder,
86: troopSystemMessageDecoder, 87: troopSystemMessageDecoder,
} // IsSvcNotify
var sysMsgDecoders = map[int32]func(*QQClient, *msg.Message, *incomingPacketInfo){
var sysMsgDecoders = map[int32]func(*QQClient, *msg.Message, *network.Response){
187: systemMessageDecoder, 188: systemMessageDecoder, 189: systemMessageDecoder,
190: systemMessageDecoder, 191: systemMessageDecoder,
} // IsSvcNotify
var otherDecoders = map[int32]func(*QQClient, *msg.Message, *incomingPacketInfo){
var otherDecoders = map[int32]func(*QQClient, *msg.Message, *network.Response){
33: troopAddMemberBroadcastDecoder, 529: msgType0x211Decoder,
}

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,18 @@
package client
//go:generate go run cmd/c2c_switcher.go
//go:generate go run github.com/Mrs4s/MiraiGo/internal/generator/c2c_switcher
import (
"fmt"
"sync/atomic"
"time"
protobuf "github.com/segmentio/encoding/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/internal/proto"
)
type (
@ -30,21 +28,21 @@ type (
)
const (
GroupSource TempSessionSource = 0 // 来自群聊
ConsultingSource TempSessionSource = 1 // 来自QQ咨询
SearchSource TempSessionSource = 2 // 来自查找
MovieSource TempSessionSource = 3 // 来自QQ电影
HotChatSource TempSessionSource = 4 // 来自热聊
SystemMessageSource TempSessionSource = 6 // 来自验证消息
MultiChatSource TempSessionSource = 7 // 来自多人聊天
DateSource TempSessionSource = 8 // 来自约会
AddressBookSource TempSessionSource = 9 // 来自通讯录
GroupSource TempSessionSource = iota // 来自群聊
ConsultingSource // 来自QQ咨询
SearchSource // 来自查找
MovieSource // 来自QQ电影
HotChatSource // 来自热聊
SystemMessageSource // 来自验证消息
MultiChatSource // 来自多人聊天
DateSource // 来自约会
AddressBookSource // 来自通讯录
)
func (c *QQClient) c2cMessageSyncProcessor(rsp *msg.GetMessageResponse, info *incomingPacketInfo) {
c.syncCookie = rsp.SyncCookie
c.pubAccountCookie = rsp.PubAccountCookie
c.msgCtrlBuf = rsp.MsgCtrlBuf
func (c *QQClient) c2cMessageSyncProcessor(rsp *msg.GetMessageResponse, resp *network.Response) {
c.sig.SyncCookie = rsp.SyncCookie
c.sig.PubAccountCookie = rsp.PubAccountCookie
// c.msgCtrlBuf = rsp.MsgCtrlBuf
if rsp.UinPairMsgs == nil {
return
}
@ -66,20 +64,21 @@ func (c *QQClient) c2cMessageSyncProcessor(rsp *msg.GetMessageResponse, info *in
if (int64(pairMsg.GetLastReadTime()) & 4294967295) > int64(pMsg.Head.GetMsgTime()) {
continue
}
c.commMsgProcessor(pMsg, info)
c.commMsgProcessor(pMsg, resp)
}
}
if delItems != nil {
_, _ = c.sendAndWait(c.buildDeleteMessageRequestPacket(delItems))
_, _ = c.call(c.buildDeleteMessageRequestPacket(delItems))
}
if rsp.GetSyncFlag() != msg.SyncFlag_STOP {
c.Debug("continue sync with flag: %v", *rsp.SyncFlag)
seq, pkt := c.buildGetMessageRequestPacket(rsp.GetSyncFlag(), time.Now().Unix())
_, _ = c.sendAndWait(seq, pkt, info.Params)
c.Debug("continue sync with flag: %v", rsp.SyncFlag)
req := c.buildGetMessageRequest(rsp.GetSyncFlag(), time.Now().Unix())
req.Params = resp.Params()
_, _ = c.callAndDecode(req)
}
}
func (c *QQClient) commMsgProcessor(pMsg *msg.Message, info *incomingPacketInfo) {
func (c *QQClient) commMsgProcessor(pMsg *msg.Message, resp *network.Response) {
strKey := fmt.Sprintf("%d%d%d%d", pMsg.Head.GetFromUin(), pMsg.Head.GetToUin(), pMsg.Head.GetMsgSeq(), pMsg.Head.GetMsgUid())
if _, ok := c.msgSvcCache.GetAndUpdate(strKey, time.Hour); ok {
c.Debug("c2c msg %v already exists in cache. skip.", pMsg.Head.GetMsgUid())
@ -91,24 +90,24 @@ func (c *QQClient) commMsgProcessor(pMsg *msg.Message, info *incomingPacketInfo)
return
}
c.lastC2CMsgTime = int64(pMsg.Head.GetMsgTime())
if info.Params.bool("init") {
if resp.Params().Bool("init") {
return
}
if decoder, _ := peekC2CDecoder(pMsg.Head.GetMsgType()); decoder != nil {
decoder(c, pMsg, info)
decoder(c, pMsg, resp)
} else {
c.Debug("unknown msg type on c2c processor: %v - %v", pMsg.Head.GetMsgType(), pMsg.Head.GetC2CCmd())
}
}
func privateMessageDecoder(c *QQClient, pMsg *msg.Message, _ *incomingPacketInfo) {
func privateMessageDecoder(c *QQClient, pMsg *msg.Message, _ *network.Response) {
switch pMsg.Head.GetC2CCmd() {
case 11, 175: // friend msg
if pMsg.Head.GetFromUin() == c.Uin {
for {
frdSeq := atomic.LoadInt32(&c.friendSeq)
frdSeq := c.friendSeq.Load()
if frdSeq < pMsg.Head.GetMsgSeq() {
if atomic.CompareAndSwapInt32(&c.friendSeq, frdSeq, pMsg.Head.GetMsgSeq()) {
if c.friendSeq.CAS(frdSeq, pMsg.Head.GetMsgSeq()) {
break
}
} else {
@ -129,7 +128,7 @@ func privateMessageDecoder(c *QQClient, pMsg *msg.Message, _ *incomingPacketInfo
}
}
func privatePttDecoder(c *QQClient, pMsg *msg.Message, _ *incomingPacketInfo) {
func privatePttDecoder(c *QQClient, pMsg *msg.Message, _ *network.Response) {
if pMsg.Body == nil || pMsg.Body.RichText == nil || pMsg.Body.RichText.Ptt == nil {
return
}
@ -140,7 +139,7 @@ func privatePttDecoder(c *QQClient, pMsg *msg.Message, _ *incomingPacketInfo) {
c.dispatchPrivateMessage(c.parsePrivateMessage(pMsg))
}
func tempSessionDecoder(c *QQClient, pMsg *msg.Message, _ *incomingPacketInfo) {
func tempSessionDecoder(c *QQClient, pMsg *msg.Message, _ *network.Response) {
if pMsg.Head.C2CTmpMsgHead == nil || pMsg.Body == nil {
return
}
@ -161,7 +160,7 @@ func tempSessionDecoder(c *QQClient, pMsg *msg.Message, _ *incomingPacketInfo) {
info := &TempSessionInfo{
Source: 0,
Sender: pMsg.Head.GetFromUin(),
sig: pMsg.Head.C2CTmpMsgHead.Sig,
sig: pMsg.Head.C2CTmpMsgHead.GetSig(),
client: c,
}
@ -201,7 +200,7 @@ func tempSessionDecoder(c *QQClient, pMsg *msg.Message, _ *incomingPacketInfo) {
}
}
func troopAddMemberBroadcastDecoder(c *QQClient, pMsg *msg.Message, _ *incomingPacketInfo) {
func troopAddMemberBroadcastDecoder(c *QQClient, pMsg *msg.Message, resp *network.Response) {
groupJoinLock.Lock()
defer groupJoinLock.Unlock()
group := c.FindGroupByUin(pMsg.Head.GetFromUin())
@ -228,19 +227,18 @@ func troopAddMemberBroadcastDecoder(c *QQClient, pMsg *msg.Message, _ *incomingP
}
}
func systemMessageDecoder(c *QQClient, _ *msg.Message, _ *incomingPacketInfo) {
_, pkt := c.buildSystemMsgNewFriendPacket()
_ = c.sendPacket(pkt)
func systemMessageDecoder(c *QQClient, _ *msg.Message, _ *network.Response) {
_, _ = c.call(c.buildSystemMsgNewFriendRequest())
}
func troopSystemMessageDecoder(c *QQClient, pMsg *msg.Message, info *incomingPacketInfo) {
if !info.Params.bool("used_reg_proxy") && pMsg.Head.GetMsgType() != 85 && pMsg.Head.GetMsgType() != 36 {
func troopSystemMessageDecoder(c *QQClient, pMsg *msg.Message, info *network.Response) {
if !info.Params().Bool("used_reg_proxy") && pMsg.Head.GetMsgType() != 85 && pMsg.Head.GetMsgType() != 36 {
c.exceptAndDispatchGroupSysMsg()
}
if len(pMsg.Body.MsgContent) == 0 {
if len(pMsg.Body.GetMsgContent()) == 0 {
return
}
reader := binary.NewReader(pMsg.Body.MsgContent)
reader := binary.NewReader(pMsg.GetBody().GetMsgContent())
groupCode := uint32(reader.ReadInt32())
if info := c.FindGroup(int64(groupCode)); info != nil && pMsg.Head.GetGroupName() != "" && info.Name != pMsg.Head.GetGroupName() {
c.Debug("group %v name updated. %v -> %v", groupCode, info.Name, pMsg.Head.GetGroupName())
@ -248,18 +246,18 @@ func troopSystemMessageDecoder(c *QQClient, pMsg *msg.Message, info *incomingPac
}
}
func msgType0x211Decoder(c *QQClient, pMsg *msg.Message, info *incomingPacketInfo) {
func msgType0x211Decoder(c *QQClient, pMsg *msg.Message, info *network.Response) {
if pMsg.Head.GetC2CCmd() == 6 || pMsg.Head.C2CTmpMsgHead != nil {
tempSessionDecoder(c, pMsg, info)
}
sub4 := msg.SubMsgType0X4Body{}
if err := protobuf.Unmarshal(pMsg.Body.MsgContent, &sub4); err != nil {
if err := proto.Unmarshal(pMsg.Body.MsgContent, &sub4); err != nil {
err = errors.Wrap(err, "unmarshal sub msg 0x4 error")
c.Error("unmarshal sub msg 0x4 error: %v", err)
return
}
if sub4.NotOnlineFile != nil && sub4.NotOnlineFile.GetSubcmd() == 1 { // subcmd: 1 -> sendPacket, 2-> recv
rsp, err := c.sendAndWait(c.buildOfflineFileDownloadRequestPacket(sub4.NotOnlineFile.FileUuid)) // offline_file.go
rsp, err := c.callAndDecode(c.buildOfflineFileDownloadRequestPacket(sub4.NotOnlineFile.FileUuid)) // offline_file.go
if err != nil {
return
}

View File

@ -1,21 +1,22 @@
// Code generated by client/c2c_switcher.go DO NOT EDIT.
// Code generated by internal/generator/c2c_switcher DO NOT EDIT.
package client
import (
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
)
const (
UnknownDecoder = iota
privateMsgDecoders
nonSvcNotifyTroopSystemMsgDecoders
troopSystemMsgDecoders
sysMsgDecoders
otherDecoders
privateMsgDecoders
sysMsgDecoders
troopSystemMsgDecoders
)
func peekC2CDecoder(msgType int32) (decoder func(*QQClient, *msg.Message, *incomingPacketInfo), decoderType uint8) {
func peekC2CDecoder(msgType int32) (decoder func(*QQClient, *msg.Message, *network.Response), decoderType uint8) {
switch msgType {
case 9:
return privateMessageDecoder, privateMsgDecoders

File diff suppressed because it is too large Load Diff

View File

@ -11,20 +11,18 @@ import (
"time"
"github.com/pkg/errors"
protobuf "github.com/segmentio/encoding/proto"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/binary/jce"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x352"
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x6ff"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/client/pb/profilecard"
"github.com/Mrs4s/MiraiGo/client/pb/qweb"
"github.com/Mrs4s/MiraiGo/client/pb/structmsg"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xd79"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/utils"
)
@ -34,27 +32,27 @@ var (
)
// wtlogin.login
func decodeLoginResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
reader := binary.NewReader(payload)
func decodeLoginResponse(c *QQClient, resp *network.Response) (interface{}, error) {
reader := binary.NewReader(resp.Body)
reader.ReadUInt16() // sub command
t := reader.ReadByte()
reader.ReadUInt16()
m := reader.ReadTlvMap(2)
if m.Exists(0x402) {
c.dpwd = []byte(utils.RandomString(16))
c.t402 = m[0x402]
h := md5.Sum(append(append(c.deviceInfo.Guid, c.dpwd...), c.t402...))
c.g = h[:]
c.sig.Dpwd = []byte(utils.RandomString(16))
c.sig.T402 = m[0x402]
h := md5.Sum(append(append(c.deviceInfo.Guid, c.sig.Dpwd...), c.sig.T402...))
c.sig.G = h[:]
}
if t == 0 { // login success
if t150, ok := m[0x150]; ok {
c.t150 = t150
}
// if t150, ok := m[0x150]; ok {
// c.t150 = t150
// }
if t161, ok := m[0x161]; ok {
c.decodeT161(t161)
}
if m.Exists(0x403) {
c.randSeed = m[0x403]
c.sig.RandSeed = m[0x403]
}
c.decodeT119(m[0x119], c.deviceInfo.TgtgtKey)
return LoginResponse{
@ -62,7 +60,7 @@ func decodeLoginResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (in
}, nil
}
if t == 2 {
c.t104 = m[0x104]
c.sig.T104 = m[0x104]
if m.Exists(0x192) {
return LoginResponse{
Success: false,
@ -99,9 +97,9 @@ func decodeLoginResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (in
if t == 160 || t == 239 {
if t174, ok := m[0x174]; ok { // 短信验证
c.t104 = m[0x104]
c.t174 = t174
c.randSeed = m[0x403]
c.sig.T104 = m[0x104]
c.sig.T174 = t174
c.sig.RandSeed = m[0x403]
phone := func() string {
r := binary.NewReader(m[0x178])
return r.ReadStringLimit(int(r.ReadInt32()))
@ -124,7 +122,7 @@ func decodeLoginResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (in
}
if _, ok := m[0x17b]; ok { // 二次验证
c.t104 = m[0x104]
c.sig.T104 = m[0x104]
return LoginResponse{
Success: false,
Error: SMSNeededError,
@ -148,9 +146,9 @@ func decodeLoginResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (in
}
if t == 204 {
c.t104 = m[0x104]
c.randSeed = m[0x403]
return c.sendAndWait(c.buildDeviceLockLoginPacket())
c.sig.T104 = m[0x104]
c.sig.RandSeed = m[0x403]
return c.callAndDecode(c.buildDeviceLockLoginRequest())
} // drive lock
if t149, ok := m[0x149]; ok {
@ -182,9 +180,9 @@ func decodeLoginResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (in
}
// StatSvc.register
func decodeClientRegisterResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeClientRegisterResponse(c *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion2{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
svcRsp := &jce.SvcRespRegister{}
@ -199,32 +197,31 @@ func decodeClientRegisterResponse(c *QQClient, _ *incomingPacketInfo, payload []
}
// wtlogin.exchange_emp
func decodeExchangeEmpResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
reader := binary.NewReader(payload)
func decodeExchangeEmpResponse(c *QQClient, resp *network.Response) (interface{}, error) {
reader := binary.NewReader(resp.Body)
cmd := reader.ReadUInt16()
t := reader.ReadByte()
reader.ReadUInt16()
m := reader.ReadTlvMap(2)
if t != 0 {
c.Error("exchange_emp error: %v", t)
return nil, errors.New("exchange_emp failed")
return nil, errors.Errorf("exchange_emp failed: %v", t)
}
if cmd == 15 {
c.decodeT119R(m[0x119])
}
if cmd == 11 {
h := md5.Sum(c.sigInfo.d2Key)
h := md5.Sum(c.sig.D2Key)
c.decodeT119(m[0x119], h[:])
}
return nil, nil
}
// wtlogin.trans_emp
func decodeTransEmpResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
if len(payload) < 48 {
func decodeTransEmpResponse(c *QQClient, resp *network.Response) (interface{}, error) {
if len(resp.Body) < 48 {
return nil, errors.New("missing payload length")
}
reader := binary.NewReader(payload)
reader := binary.NewReader(resp.Body)
reader.ReadBytes(5) // trans req head
reader.ReadByte()
reader.ReadUInt16()
@ -270,21 +267,23 @@ func decodeTransEmpResponse(c *QQClient, _ *incomingPacketInfo, payload []byte)
body.ReadInt32() // app id?
code := body.ReadByte()
if code != 0 {
if code == 0x30 {
return &QRCodeLoginResponse{State: QRCodeWaitingForScan}, nil
var qrResp QRCodeLoginResponse
switch code {
case 0x30:
qrResp.State = QRCodeWaitingForScan
case 0x35:
qrResp.State = QRCodeWaitingForConfirm
case 0x36:
qrResp.State = QRCodeCanceled
case 0x11:
qrResp.State = QRCodeTimeout
default:
return nil, errors.Errorf("wtlogin.trans_emp sub cmd 0x12 error: %v", code)
}
if code == 0x35 {
return &QRCodeLoginResponse{State: QRCodeWaitingForConfirm}, nil
}
if code == 0x36 {
return &QRCodeLoginResponse{State: QRCodeCanceled}, nil
}
if code == 0x11 {
return &QRCodeLoginResponse{State: QRCodeTimeout}, nil
}
return nil, errors.Errorf("wtlogin.trans_emp sub cmd 0x12 error: %v", code)
return qrResp, nil
}
c.Uin = body.ReadInt64()
c.highwaySession.Uin = strconv.FormatInt(c.Uin, 10)
body.ReadInt32() // sig create time
body.ReadUInt16()
m := body.ReadTlvMap(2)
@ -302,9 +301,9 @@ func decodeTransEmpResponse(c *QQClient, _ *incomingPacketInfo, payload []byte)
}
// ConfigPushSvc.PushReq
func decodePushReqPacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodePushReqPacket(c *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion2{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
r := jce.NewJceReader(data.Map["PushReq"]["ConfigPush.PushReq"][1:])
@ -314,8 +313,7 @@ func decodePushReqPacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (in
switch t {
case 1:
ssoPkt := jce.NewJceReader(jceBuf)
servers := []jce.SsoServerInfo{}
ssoPkt.ReadSlice(&servers, 1)
servers := ssoPkt.ReadSsoServerInfos(1)
if len(servers) > 0 {
var adds []*net.TCPAddr
for _, s := range servers {
@ -349,14 +347,12 @@ func decodePushReqPacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (in
c.fileStorageInfo = list
rsp := cmd0x6ff.C501RspBody{}
if err := proto.Unmarshal(list.BigDataChannel.PbBuf, &rsp); err == nil && rsp.RspBody != nil {
c.bigDataSession = &bigDataSessionInfo{
SigSession: rsp.RspBody.SigSession,
SessionKey: rsp.RspBody.SessionKey,
}
c.highwaySession.SigSession = rsp.RspBody.SigSession
c.highwaySession.SessionKey = rsp.RspBody.SessionKey
for _, srv := range rsp.RspBody.Addrs {
if srv.GetServiceType() == 10 {
for _, addr := range srv.Addrs {
c.srvSsoAddrs = append(c.srvSsoAddrs, fmt.Sprintf("%v:%v", binary.UInt32ToIPV4Address(addr.GetIp()), addr.GetPort()))
c.highwaySession.AppendAddr(addr.GetIp(), addr.GetPort())
}
}
if srv.GetServiceType() == 21 {
@ -370,29 +366,29 @@ func decodePushReqPacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (in
}
seq := r.ReadInt64(3)
_, pkt := c.buildConfPushRespPacket(t, seq, jceBuf)
return nil, c.sendPacket(pkt)
err := c.sendPacket(c.transport.PackPacket(c.buildConfPushRespPacket(t, seq, jceBuf)))
return nil, err
}
// MessageSvc.PbGetMsg
func decodeMessageSvcPacket(c *QQClient, info *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeMessageSvcPacket(c *QQClient, resp *network.Response) (interface{}, error) {
rsp := msg.GetMessageResponse{}
err := protobuf.Unmarshal(payload, &rsp)
err := proto.Unmarshal(resp.Body, &rsp)
if err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
c.c2cMessageSyncProcessor(&rsp, info)
c.c2cMessageSyncProcessor(&rsp, resp)
return nil, nil
}
// MessageSvc.PushNotify
func decodeSvcNotify(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeSvcNotify(c *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload[15:]))
request.ReadFrom(jce.NewJceReader(resp.Body[4:]))
data := &jce.RequestDataVersion2{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
if len(data.Map) == 0 {
_, err := c.sendAndWait(c.buildGetMessageRequestPacket(msg.SyncFlag_START, time.Now().Unix()))
_, err := c.callAndDecode(c.buildGetMessageRequest(msg.SyncFlag_START, time.Now().Unix()))
return nil, err
}
notify := &jce.RequestPushNotify{}
@ -404,18 +400,18 @@ func decodeSvcNotify(c *QQClient, _ *incomingPacketInfo, payload []byte) (interf
return nil, nil
}
if typ == sysMsgDecoders {
_, pkt := c.buildSystemMsgNewFriendPacket()
return nil, c.sendPacket(pkt)
_, err := c.callAndDecode(c.buildSystemMsgNewFriendRequest())
return nil, err
}
}
_, err := c.sendAndWait(c.buildGetMessageRequestPacket(msg.SyncFlag_START, time.Now().Unix()))
_, err := c.callAndDecode(c.buildGetMessageRequest(msg.SyncFlag_START, time.Now().Unix()))
return nil, err
}
// SummaryCard.ReqSummaryCard
func decodeSummaryCardResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeSummaryCardResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion2{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
rsp := func() *jce.JceReader {
@ -435,8 +431,7 @@ func decodeSummaryCardResponse(_ *QQClient, _ *incomingPacketInfo, payload []byt
Uin: rsp.ReadInt64(23),
LoginDays: rsp.ReadInt64(36),
}
services := [][]byte{}
rsp.ReadSlice(&services, 46)
services := rsp.ReadByteArrArr(46)
readService := func(buf []byte) (*profilecard.BusiComm, []byte) {
r := binary.NewReader(buf)
r.ReadByte()
@ -462,15 +457,14 @@ func decodeSummaryCardResponse(_ *QQClient, _ *incomingPacketInfo, payload []byt
}
// friendlist.getFriendGroupList
func decodeFriendGroupListResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeFriendGroupListResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion3{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
r := jce.NewJceReader(data.Map["FLRESP"][1:])
totalFriendCount := r.ReadInt16(5)
friends := make([]jce.FriendInfo, 0)
r.ReadSlice(&friends, 7)
friends := r.ReadFriendInfos(7)
l := make([]*FriendInfo, 0, len(friends))
for _, f := range friends {
l = append(l, &FriendInfo{
@ -488,9 +482,9 @@ func decodeFriendGroupListResponse(_ *QQClient, _ *incomingPacketInfo, payload [
}
// friendlist.delFriend
func decodeFriendDeleteResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeFriendDeleteResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion3{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
r := jce.NewJceReader(data.Map["DFRESP"][1:])
@ -501,16 +495,14 @@ func decodeFriendDeleteResponse(_ *QQClient, _ *incomingPacketInfo, payload []by
}
// friendlist.GetTroopListReqV2
func decodeGroupListResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGroupListResponse(c *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion3{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
r := jce.NewJceReader(data.Map["GetTroopListRespV2"][1:])
vecCookie := []byte{}
groups := []jce.TroopNumber{}
r.ReadSlice(&vecCookie, 4)
r.ReadSlice(&groups, 5)
vecCookie := r.ReadBytes(4)
groups := r.ReadTroopNumbers(5)
l := make([]*GroupInfo, 0, len(groups))
for _, g := range groups {
l = append(l, &GroupInfo{
@ -525,7 +517,7 @@ func decodeGroupListResponse(c *QQClient, _ *incomingPacketInfo, payload []byte)
})
}
if len(vecCookie) > 0 {
rsp, err := c.sendAndWait(c.buildGroupListRequestPacket(vecCookie))
rsp, err := c.callAndDecode(c.buildGroupListRequest(vecCookie))
if err != nil {
return nil, err
}
@ -535,14 +527,13 @@ func decodeGroupListResponse(c *QQClient, _ *incomingPacketInfo, payload []byte)
}
// friendlist.GetTroopMemberListReq
func decodeGroupMemberListResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGroupMemberListResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion3{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
r := jce.NewJceReader(data.Map["GTMLRESP"][1:])
members := make([]jce.TroopMemberInfo, 0)
r.ReadSlice(&members, 3)
members := r.ReadTroopMemberInfos(3)
next := r.ReadInt64(4)
l := make([]*GroupMemberInfo, 0, len(members))
for _, m := range members {
@ -572,9 +563,9 @@ func decodeGroupMemberListResponse(_ *QQClient, _ *incomingPacketInfo, payload [
}
// group_member_card.get_group_member_card_info
func decodeGroupMemberInfoResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGroupMemberInfoResponse(c *QQClient, resp *network.Response) (interface{}, error) {
rsp := pb.GroupMemberRspBody{}
if err := proto.Unmarshal(payload, &rsp); err != nil {
if err := proto.Unmarshal(resp.Body, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.MemInfo == nil || (rsp.MemInfo.Nick == nil && rsp.MemInfo.Age == 0) {
@ -605,9 +596,9 @@ func decodeGroupMemberInfoResponse(c *QQClient, _ *incomingPacketInfo, payload [
}
// LongConn.OffPicUp
func decodeOffPicUpResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOffPicUpResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
rsp := cmd0x352.RspBody{}
if err := proto.Unmarshal(payload, &rsp); err != nil {
if err := proto.Unmarshal(resp.Body, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.GetFailMsg() != nil {
@ -643,9 +634,9 @@ func decodeOffPicUpResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte)
}
// OnlinePush.PbPushTransMsg
func decodeOnlinePushTransPacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOnlinePushTransPacket(c *QQClient, resp *network.Response) (interface{}, error) {
info := msg.TransMsgInfo{}
err := protobuf.Unmarshal(payload, &info)
err := proto.Unmarshal(resp.Body, &info)
if err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
@ -746,9 +737,9 @@ func decodeOnlinePushTransPacket(c *QQClient, _ *incomingPacketInfo, payload []b
}
// ProfileService.Pb.ReqSystemMsgNew.Friend
func decodeSystemMsgFriendPacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeSystemMsgFriendPacket(c *QQClient, resp *network.Response) (interface{}, error) {
rsp := structmsg.RspSystemMsgNew{}
if err := proto.Unmarshal(payload, &rsp); err != nil {
if err := proto.Unmarshal(resp.Body, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(rsp.Friendmsgs) == 0 {
@ -768,9 +759,9 @@ func decodeSystemMsgFriendPacket(c *QQClient, _ *incomingPacketInfo, payload []b
}
// MessageSvc.PushForceOffline
func decodeForceOfflinePacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeForceOfflinePacket(c *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion2{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
r := jce.NewJceReader(data.Map["req_PushForceOffline"]["PushNotifyPack.RequestPushForceOffline"][1:])
@ -781,7 +772,7 @@ func decodeForceOfflinePacket(c *QQClient, _ *incomingPacketInfo, payload []byte
}
// StatSvc.ReqMSFOffline
func decodeMSFOfflinePacket(c *QQClient, _ *incomingPacketInfo, _ []byte) (interface{}, error) {
func decodeMSFOfflinePacket(c *QQClient, _ *network.Response) (interface{}, error) {
// c.lastLostMsg = "服务器端强制下线."
c.Disconnect()
// 这个decoder不能消耗太多时间, event另起线程处理
@ -790,13 +781,13 @@ func decodeMSFOfflinePacket(c *QQClient, _ *incomingPacketInfo, _ []byte) (inter
}
// OidbSvc.0xd79
func decodeWordSegmentation(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeWordSegmentation(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := &oidb0xd79.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := &oidb.D79RspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.Content != nil {
@ -805,22 +796,32 @@ func decodeWordSegmentation(_ *QQClient, _ *incomingPacketInfo, payload []byte)
return nil, errors.New("no word received")
}
func decodeSidExpiredPacket(c *QQClient, resp *network.Response) (interface{}, error) {
_, err := c.callAndDecode(c.buildRequestChangeSigRequest(3554528))
if err != nil {
return nil, errors.Wrap(err, "resign client error")
}
if err = c.registerClient(); err != nil {
return nil, errors.Wrap(err, "register error")
}
_, _ = c.call(c.uniPacketWithSeq(uint16(resp.SequenceID), "OnlinePush.SidTicketExpired", EmptyBytes, nil))
return nil, nil
}
/* unused
// LightAppSvc.mini_app_info.GetAppInfoById
func decodeAppInfoResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeAppInfoResponse(_ *QQClient, _ *incomingPacketInfo) (interface{}, error) {
pkg := qweb.QWebRsp{}
rsp := qweb.GetAppInfoByIdRsp{}
if err := proto.Unmarshal(payload, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if pkg.RetCode != 0 {
return nil, errors.New(pkg.ErrMsg)
if pkg.GetRetCode() != 0 {
return nil, errors.New(pkg.GetErrMsg())
}
if err := proto.Unmarshal(pkg.BusiBuff, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return rsp.AppInfo, nil
}
func ignoreDecoder(_ *QQClient, _ *incomingPacketInfo, _ []byte) (interface{}, error) {
return nil, nil
}
*/

View File

@ -4,6 +4,7 @@ import (
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/binary/jce"
"github.com/Mrs4s/MiraiGo/client/internal/auth"
"github.com/Mrs4s/MiraiGo/message"
)
@ -22,7 +23,7 @@ type (
UserOnlineStatus int
ClientProtocol int
ClientProtocol = auth.Protocol
LoginResponse struct {
Success bool
@ -177,6 +178,7 @@ type (
LogEvent struct {
Type string
Message string
Dump []byte
}
ServerUpdatedEvent struct {
@ -221,15 +223,42 @@ type (
}
GuildMessageReactionsUpdatedEvent struct {
OperatorId uint64 // OperatorId 操作者TinyId, 删除贴表情的事件下不会有值
EmojiId int32 // EmojiId 被贴的表情, 只有自身消息被贴表情才会有值
GuildId uint64
ChannelId uint64
MessageId uint64
MessageSenderUin int64 // MessageSenderUin 被贴表情的消息发送者QQ号
OperatorId uint64 // OperatorId 操作者TinyId, 删除贴表情的事件下不会有值
EmojiId int32 // EmojiId 被贴的表情, 只有自身消息被贴表情才会有值
GuildId uint64
ChannelId uint64
MessageId uint64
// MessageSenderUin int64 // MessageSenderUin 被贴表情的消息发送者QQ号
CurrentReactions []*message.GuildMessageEmojiReaction
}
GuildChannelUpdatedEvent struct {
OperatorId uint64
GuildId uint64
ChannelId uint64
OldChannelInfo *ChannelInfo
NewChannelInfo *ChannelInfo
}
GuildMessageRecalledEvent struct {
OperatorId uint64
GuildId uint64
ChannelId uint64
MessageId uint64
RecallTime int64
}
GuildChannelOperationEvent struct {
OperatorId uint64
GuildId uint64
ChannelInfo *ChannelInfo
}
MemberJoinGuildEvent struct {
Guild *GuildInfo
Member *GuildMemberInfo
}
OcrResponse struct {
Texts []*TextDetection `json:"texts"`
Language string `json:"language"`
@ -257,33 +286,6 @@ type (
list []*GroupMemberInfo
}
imageUploadResponse struct {
UploadKey []byte
UploadIp []uint32
UploadPort []uint32
ResourceId string
Message string
FileId int64
Width int32
Height int32
ResultCode int32
IsExists bool
}
pttUploadResponse struct {
ResultCode int32
Message string
IsExists bool
ResourceId string
UploadKey []byte
UploadIp []string
UploadPort []uint32
FileKey []byte
FileId int64
}
groupMessageReceiptEvent struct {
Rand int32
Seq int32
@ -342,11 +344,12 @@ const (
Administrator MemberPermission = 2
Member MemberPermission = 3
AndroidPhone ClientProtocol = 1
IPad ClientProtocol = 2
AndroidWatch ClientProtocol = 3
MacOS ClientProtocol = 4
QiDian ClientProtocol = 5
Unset = auth.Unset
AndroidPhone = auth.AndroidPhone
AndroidWatch = auth.AndroidWatch
MacOS = auth.MacOS
QiDian = auth.QiDian
IPad = auth.IPad
)
func (r *UserJoinGroupRequest) Accept() {

View File

@ -16,6 +16,11 @@ type eventHandlers struct {
selfGroupMessageHandlers []func(*QQClient, *message.GroupMessage)
guildChannelMessageHandlers []func(*QQClient, *message.GuildChannelMessage)
guildMessageReactionsUpdatedHandlers []func(*QQClient, *GuildMessageReactionsUpdatedEvent)
guildMessageRecalledHandlers []func(*QQClient, *GuildMessageRecalledEvent)
guildChannelUpdatedHandlers []func(*QQClient, *GuildChannelUpdatedEvent)
guildChannelCreatedHandlers []func(*QQClient, *GuildChannelOperationEvent)
guildChannelDestroyedHandlers []func(*QQClient, *GuildChannelOperationEvent)
memberJoinedGuildHandlers []func(*QQClient, *MemberJoinGuildEvent)
groupMuteEventHandlers []func(*QQClient, *GroupMuteEvent)
groupRecalledHandlers []func(*QQClient, *GroupMessageRecalledEvent)
friendRecalledHandlers []func(*QQClient, *FriendMessageRecalledEvent)
@ -78,6 +83,26 @@ func (s *GuildService) OnGuildMessageReactionsUpdated(f func(*QQClient, *GuildMe
s.c.eventHandlers.guildMessageReactionsUpdatedHandlers = append(s.c.eventHandlers.guildMessageReactionsUpdatedHandlers, f)
}
func (s *GuildService) OnGuildMessageRecalled(f func(*QQClient, *GuildMessageRecalledEvent)) {
s.c.eventHandlers.guildMessageRecalledHandlers = append(s.c.eventHandlers.guildMessageRecalledHandlers, f)
}
func (s *GuildService) OnGuildChannelUpdated(f func(*QQClient, *GuildChannelUpdatedEvent)) {
s.c.eventHandlers.guildChannelUpdatedHandlers = append(s.c.eventHandlers.guildChannelUpdatedHandlers, f)
}
func (s *GuildService) OnGuildChannelCreated(f func(*QQClient, *GuildChannelOperationEvent)) {
s.c.eventHandlers.guildChannelCreatedHandlers = append(s.c.eventHandlers.guildChannelCreatedHandlers, f)
}
func (s *GuildService) OnGuildChannelDestroyed(f func(*QQClient, *GuildChannelOperationEvent)) {
s.c.eventHandlers.guildChannelDestroyedHandlers = append(s.c.eventHandlers.guildChannelDestroyedHandlers, f)
}
func (s *GuildService) OnMemberJoinedGuild(f func(*QQClient, *MemberJoinGuildEvent)) {
s.c.eventHandlers.memberJoinedGuildHandlers = append(s.c.eventHandlers.memberJoinedGuildHandlers, f)
}
func (c *QQClient) OnGroupMuted(f func(*QQClient, *GroupMuteEvent)) {
c.eventHandlers.groupMuteEventHandlers = append(c.eventHandlers.groupMuteEventHandlers, f)
}
@ -262,6 +287,61 @@ func (c *QQClient) dispatchGuildMessageReactionsUpdatedEvent(e *GuildMessageReac
}
}
func (c *QQClient) dispatchGuildMessageRecalledEvent(e *GuildMessageRecalledEvent) {
if e == nil {
return
}
for _, f := range c.eventHandlers.guildMessageRecalledHandlers {
cover(func() {
f(c, e)
})
}
}
func (c *QQClient) dispatchGuildChannelUpdatedEvent(e *GuildChannelUpdatedEvent) {
if e == nil {
return
}
for _, f := range c.eventHandlers.guildChannelUpdatedHandlers {
cover(func() {
f(c, e)
})
}
}
func (c *QQClient) dispatchGuildChannelCreatedEvent(e *GuildChannelOperationEvent) {
if e == nil {
return
}
for _, f := range c.eventHandlers.guildChannelCreatedHandlers {
cover(func() {
f(c, e)
})
}
}
func (c *QQClient) dispatchGuildChannelDestroyedEvent(e *GuildChannelOperationEvent) {
if e == nil {
return
}
for _, f := range c.eventHandlers.guildChannelDestroyedHandlers {
cover(func() {
f(c, e)
})
}
}
func (c *QQClient) dispatchMemberJoinedGuildEvent(e *MemberJoinGuildEvent) {
if e == nil {
return
}
for _, f := range c.eventHandlers.memberJoinedGuildHandlers {
cover(func() {
f(c, e)
})
}
}
func (c *QQClient) dispatchGroupMuteEvent(e *GroupMuteEvent) {
if e == nil {
return

View File

@ -3,12 +3,11 @@ package client
import (
"fmt"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/faceroam"
"github.com/Mrs4s/MiraiGo/internal/proto"
)
type CustomFace struct {
@ -16,20 +15,15 @@ type CustomFace struct {
Url string
}
func init() {
decoders["Faceroam.OpReq"] = decodeFaceroamResponse
}
func (c *QQClient) GetCustomFaces() ([]*CustomFace, error) {
i, err := c.sendAndWait(c.buildFaceroamRequestPacket())
i, err := c.callAndDecode(c.buildFaceroamRequestPacket())
if err != nil {
return nil, errors.Wrap(err, "get faces error")
}
return i.([]*CustomFace), nil
}
func (c *QQClient) buildFaceroamRequestPacket() (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildFaceroamRequestPacket() *network.Request {
payload, _ := proto.Marshal(&faceroam.FaceroamReqBody{
Comm: &faceroam.PlatInfo{
Implat: proto.Int64(109),
@ -40,13 +34,12 @@ func (c *QQClient) buildFaceroamRequestPacket() (uint16, []byte) {
SubCmd: proto.Uint32(1),
ReqUserInfo: &faceroam.ReqUserInfo{},
})
packet := packets.BuildUniPacket(c.Uin, seq, "Faceroam.OpReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("Faceroam.OpReq", payload, decodeFaceroamResponse)
}
func decodeFaceroamResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeFaceroamResponse(c *QQClient, resp *network.Response) (interface{}, error) {
rsp := faceroam.FaceroamRspBody{}
if err := proto.Unmarshal(payload, &rsp); err != nil {
if err := proto.Unmarshal(resp.Body, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.RspUserInfo == nil {

View File

@ -3,7 +3,6 @@ package client
import (
"crypto/md5"
"encoding/hex"
"encoding/json"
"fmt"
"math/rand"
"net"
@ -13,118 +12,24 @@ import (
"time"
"github.com/pkg/errors"
protobuf "github.com/segmentio/encoding/proto"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/binary/jce"
devinfo "github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb"
proto2 "github.com/Mrs4s/MiraiGo/internal/protobuf/proto"
"github.com/Mrs4s/MiraiGo/client/internal/auth"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
)
type (
DeviceInfo struct {
Display []byte
Product []byte
Device []byte
Board []byte
Brand []byte
Model []byte
Bootloader []byte
FingerPrint []byte
BootId []byte
ProcVersion []byte
BaseBand []byte
SimInfo []byte
OSType []byte
MacAddress []byte
IpAddress []byte
WifiBSSID []byte
WifiSSID []byte
IMSIMd5 []byte
IMEI string
AndroidId []byte
APN []byte
VendorName []byte
VendorOSName []byte
Guid []byte
TgtgtKey []byte
Protocol ClientProtocol
Version *Version
}
Version struct {
Incremental []byte
Release []byte
CodeName []byte
Sdk uint32
}
DeviceInfoFile struct {
Display string `json:"display"`
Product string `json:"product"`
Device string `json:"device"`
Board string `json:"board"`
Model string `json:"model"`
FingerPrint string `json:"finger_print"`
BootId string `json:"boot_id"`
ProcVersion string `json:"proc_version"`
Protocol int `json:"protocol"` // 0: Pad 1: Phone 2: Watch
IMEI string `json:"imei"`
Brand string `json:"brand"`
Bootloader string `json:"bootloader"`
BaseBand string `json:"base_band"`
Version *VersionFile `json:"version"`
SimInfo string `json:"sim_info"`
OsType string `json:"os_type"`
MacAddress string `json:"mac_address"`
IpAddress []int32 `json:"ip_address"`
WifiBSSID string `json:"wifi_bssid"`
WifiSSID string `json:"wifi_ssid"`
ImsiMd5 string `json:"imsi_md5"`
AndroidId string `json:"android_id"`
Apn string `json:"apn"`
VendorName string `json:"vendor_name"`
VendorOSName string `json:"vendor_os_name"`
}
VersionFile struct {
Incremental string `json:"incremental"`
Release string `json:"release"`
Codename string `json:"codename"`
Sdk uint32 `json:"sdk"`
}
DeviceInfo = auth.Device
Version = auth.OSVersion
groupMessageBuilder struct {
MessageSlices []*msg.Message
}
versionInfo struct {
ApkSign []byte
ApkId string
SortVersionName string
SdkVersion string
AppId uint32
SubAppId uint32
BuildTime uint32
SSOVersion uint32
MiscBitmap uint32
SubSigmap uint32
MainSigMap uint32
Protocol ClientProtocol
}
incomingPacketInfo struct {
CommandName string
SequenceId uint16
Params requestParams
}
requestParams map[string]interface{}
)
var SystemDeviceInfo = &DeviceInfo{
@ -138,7 +43,7 @@ var SystemDeviceInfo = &DeviceInfo{
FingerPrint: []byte("mamoe/mirai/mirai:10/MIRAI.200122.001/1234567:user/release-keys"),
BootId: []byte("cb886ae2-00b6-4d68-a230-787f111d12c7"),
ProcVersion: []byte("Linux version 3.0.31-cb886ae2 (android-build@xxx.xxx.xxx.xxx.com)"),
BaseBand: []byte{},
BaseBand: EmptyBytes,
SimInfo: []byte("T-Mobile"),
OSType: []byte("android"),
MacAddress: []byte("00:50:56:C0:00:08"),
@ -155,14 +60,11 @@ var SystemDeviceInfo = &DeviceInfo{
Incremental: []byte("5891938"),
Release: []byte("10"),
CodeName: []byte("REL"),
Sdk: 29,
SDK: 29,
},
}
var (
EmptyBytes = []byte{}
NumberRange = "0123456789"
)
var EmptyBytes = make([]byte, 0)
func init() {
r := make([]byte, 16)
@ -176,8 +78,9 @@ func init() {
func GenRandomDevice() {
r := make([]byte, 16)
rand.Read(r)
SystemDeviceInfo.Display = []byte("MIRAI." + utils.RandomStringRange(6, NumberRange) + ".001")
SystemDeviceInfo.FingerPrint = []byte("mamoe/mirai/mirai:10/MIRAI.200122.001/" + utils.RandomStringRange(7, NumberRange) + ":user/release-keys")
const numberRange = "0123456789"
SystemDeviceInfo.Display = []byte("MIRAI." + utils.RandomStringRange(6, numberRange) + ".001")
SystemDeviceInfo.FingerPrint = []byte("mamoe/mirai/mirai:10/MIRAI.200122.001/" + utils.RandomStringRange(7, numberRange) + ":user/release-keys")
SystemDeviceInfo.BootId = binary.GenUUID(r)
SystemDeviceInfo.ProcVersion = []byte("Linux version 3.0.31-" + utils.RandomString(8) + " (android-build@xxx.xxx.xxx.xxx.com)")
rand.Read(r)
@ -191,235 +94,6 @@ func GenRandomDevice() {
SystemDeviceInfo.GenNewTgtgtKey()
}
func genVersionInfo(p ClientProtocol) *versionInfo {
switch p {
case AndroidPhone: // Dumped by mirai from qq android v8.8.38
return &versionInfo{
ApkId: "com.tencent.mobileqq",
AppId: 537100432,
SubAppId: 537100432,
SortVersionName: "8.8.38",
BuildTime: 1634310940,
ApkSign: []byte{0xA6, 0xB7, 0x45, 0xBF, 0x24, 0xA2, 0xC2, 0x77, 0x52, 0x77, 0x16, 0xF6, 0xF3, 0x6E, 0xB6, 0x8D},
SdkVersion: "6.0.0.2487",
SSOVersion: 16,
MiscBitmap: 184024956,
SubSigmap: 0x10400,
MainSigMap: 34869472,
Protocol: p,
}
case AndroidWatch:
return &versionInfo{
ApkId: "com.tencent.qqlite",
AppId: 537064446,
SubAppId: 537064446,
SortVersionName: "2.0.5",
BuildTime: 1559564731,
ApkSign: []byte{0xA6, 0xB7, 0x45, 0xBF, 0x24, 0xA2, 0xC2, 0x77, 0x52, 0x77, 0x16, 0xF6, 0xF3, 0x6E, 0xB6, 0x8D},
SdkVersion: "6.0.0.236",
SSOVersion: 5,
MiscBitmap: 16252796,
SubSigmap: 0x10400,
MainSigMap: 34869472,
Protocol: p,
}
case IPad:
return &versionInfo{
ApkId: "com.tencent.minihd.qq",
AppId: 537097188,
SubAppId: 537097188,
SortVersionName: "8.8.35",
BuildTime: 1595836208,
ApkSign: []byte{170, 57, 120, 244, 31, 217, 111, 249, 145, 74, 102, 158, 24, 100, 116, 199},
SdkVersion: "6.0.0.2433",
SSOVersion: 12,
MiscBitmap: 150470524,
SubSigmap: 66560,
MainSigMap: 1970400,
Protocol: p,
}
case MacOS:
return &versionInfo{
ApkId: "com.tencent.minihd.qq",
AppId: 537064315,
SubAppId: 537064315,
SortVersionName: "5.8.9",
BuildTime: 1595836208,
ApkSign: []byte{170, 57, 120, 244, 31, 217, 111, 249, 145, 74, 102, 158, 24, 100, 116, 199},
SdkVersion: "6.0.0.2433",
SSOVersion: 12,
MiscBitmap: 150470524,
SubSigmap: 66560,
MainSigMap: 1970400,
Protocol: p,
}
case QiDian:
return &versionInfo{
ApkId: "com.tencent.qidian",
AppId: 537061386,
SubAppId: 537036590,
SortVersionName: "3.8.6",
BuildTime: 1556628836,
ApkSign: []byte{160, 30, 236, 171, 133, 233, 227, 186, 43, 15, 106, 21, 140, 133, 92, 41},
SdkVersion: "6.0.0.2365",
SSOVersion: 5,
MiscBitmap: 49807228,
SubSigmap: 66560,
MainSigMap: 34869472,
Protocol: p,
}
}
return nil
}
func (info *DeviceInfo) ToJson() []byte {
f := &DeviceInfoFile{
Display: string(info.Display),
Product: string(info.Product),
Device: string(info.Device),
Board: string(info.Board),
Model: string(info.Model),
FingerPrint: string(info.FingerPrint),
BootId: string(info.BootId),
ProcVersion: string(info.ProcVersion),
IMEI: info.IMEI,
Brand: string(info.Brand),
Bootloader: string(info.Bootloader),
BaseBand: string(info.BaseBand),
AndroidId: string(info.AndroidId),
Version: &VersionFile{
Incremental: string(info.Version.Incremental),
Release: string(info.Version.Release),
Codename: string(info.Version.CodeName),
Sdk: info.Version.Sdk,
},
SimInfo: string(info.SimInfo),
OsType: string(info.OSType),
MacAddress: string(info.MacAddress),
IpAddress: []int32{int32(info.IpAddress[0]), int32(info.IpAddress[1]), int32(info.IpAddress[2]), int32(info.IpAddress[3])},
WifiBSSID: string(info.WifiBSSID),
WifiSSID: string(info.WifiSSID),
ImsiMd5: hex.EncodeToString(info.IMSIMd5),
Apn: string(info.APN),
VendorName: string(info.VendorName),
VendorOSName: string(info.VendorOSName),
Protocol: func() int {
switch info.Protocol {
case IPad:
return 0
case AndroidPhone:
return 1
case AndroidWatch:
return 2
case MacOS:
return 3
case QiDian:
return 4
}
return 0
}(),
}
d, _ := json.Marshal(f)
return d
}
func (info *DeviceInfo) ReadJson(d []byte) error {
var f DeviceInfoFile
if err := json.Unmarshal(d, &f); err != nil {
return errors.Wrap(err, "failed to unmarshal json message")
}
SetIfNotEmpty := func(trg *[]byte, str string) {
if str != "" {
*trg = []byte(str)
}
}
SetIfNotEmpty(&info.Display, f.Display)
SetIfNotEmpty(&info.Product, f.Product)
SetIfNotEmpty(&info.Device, f.Device)
SetIfNotEmpty(&info.Board, f.Board)
SetIfNotEmpty(&info.Brand, f.Brand)
SetIfNotEmpty(&info.Model, f.Model)
SetIfNotEmpty(&info.Bootloader, f.Bootloader)
SetIfNotEmpty(&info.FingerPrint, f.FingerPrint)
SetIfNotEmpty(&info.BootId, f.BootId)
SetIfNotEmpty(&info.ProcVersion, f.ProcVersion)
SetIfNotEmpty(&info.BaseBand, f.BaseBand)
SetIfNotEmpty(&info.SimInfo, f.SimInfo)
SetIfNotEmpty(&info.OSType, f.OsType)
SetIfNotEmpty(&info.MacAddress, f.MacAddress)
if len(f.IpAddress) == 4 {
info.IpAddress = []byte{byte(f.IpAddress[0]), byte(f.IpAddress[1]), byte(f.IpAddress[2]), byte(f.IpAddress[3])}
}
SetIfNotEmpty(&info.WifiBSSID, f.WifiBSSID)
SetIfNotEmpty(&info.WifiSSID, f.WifiSSID)
if len(f.ImsiMd5) != 0 {
imsiMd5, err := hex.DecodeString(f.ImsiMd5)
if err != nil {
info.IMSIMd5 = imsiMd5
}
}
if f.IMEI != "" {
info.IMEI = f.IMEI
}
SetIfNotEmpty(&info.APN, f.Apn)
SetIfNotEmpty(&info.VendorName, f.VendorName)
SetIfNotEmpty(&info.VendorOSName, f.VendorOSName)
SetIfNotEmpty(&info.AndroidId, f.AndroidId)
if f.AndroidId == "" {
info.AndroidId = info.Display // ?
}
switch f.Protocol {
case 1:
info.Protocol = AndroidPhone
case 2:
info.Protocol = AndroidWatch
case 3:
info.Protocol = MacOS
case 4:
info.Protocol = QiDian
default:
info.Protocol = IPad
}
SystemDeviceInfo.GenNewGuid()
SystemDeviceInfo.GenNewTgtgtKey()
return nil
}
func (info *DeviceInfo) GenNewGuid() {
t := md5.Sum(append(info.AndroidId, info.MacAddress...))
info.Guid = t[:]
}
func (info *DeviceInfo) GenNewTgtgtKey() {
r := make([]byte, 16)
rand.Read(r)
h := md5.New()
h.Write(r)
h.Write(info.Guid)
info.TgtgtKey = h.Sum(nil)
}
func (info *DeviceInfo) GenDeviceInfoData() []byte {
m := &devinfo.DeviceInfo{
Bootloader: string(info.Bootloader),
ProcVersion: string(info.ProcVersion),
Codename: string(info.Version.CodeName),
Incremental: string(info.Version.Incremental),
Fingerprint: string(info.FingerPrint),
BootId: string(info.BootId),
AndroidId: string(info.AndroidId),
BaseBand: string(info.BaseBand),
InnerVersion: string(info.Version.Incremental),
}
data, err := proto.Marshal(m)
if err != nil {
panic(errors.Wrap(err, "failed to unmarshal protobuf message"))
}
return data
}
func GenIMEI() string {
sum := 0 // the control sum of digits
var final strings.Builder
@ -444,7 +118,7 @@ func GenIMEI() string {
}
func getSSOAddress() ([]*net.TCPAddr, error) {
protocol := genVersionInfo(SystemDeviceInfo.Protocol)
protocol := SystemDeviceInfo.Protocol.Version()
key, _ := hex.DecodeString("F0441F5FF42DA58FDCF7949ABA62D411")
payload := jce.NewJceWriter(). // see ServerConfig.d
WriteInt64(0, 1).WriteInt64(0, 2).WriteByte(1, 3).
@ -461,12 +135,15 @@ func getSSOAddress() ([]*net.TCPAddr, error) {
SFuncName: "HttpServerListReq",
SBuffer: buf.ToBytes(),
}
tea := binary.NewTeaCipher(key)
rsp, err := utils.HttpPostBytes("https://configsvr.msf.3g.qq.com/configsvr/serverlist.jsp", tea.Encrypt(binary.NewWriterF(func(w *binary.Writer) {
b, cl := binary.OpenWriterF(func(w *binary.Writer) {
w.WriteIntLvPacket(0, func(w *binary.Writer) {
w.Write(pkt.ToBytes())
})
})))
})
tea := binary.NewTeaCipher(key)
encpkt := tea.Encrypt(b)
cl()
rsp, err := utils.HttpPostBytes("https://configsvr.msf.3g.qq.com/configsvr/serverlist.jsp", encpkt)
if err != nil {
return nil, errors.Wrap(err, "unable to fetch server list")
}
@ -475,8 +152,7 @@ func getSSOAddress() ([]*net.TCPAddr, error) {
rspPkt.ReadFrom(jce.NewJceReader(tea.Decrypt(rsp)[4:]))
data.ReadFrom(jce.NewJceReader(rspPkt.SBuffer))
reader := jce.NewJceReader(data.Map["HttpServerListRes"][1:])
servers := []jce.SsoServerInfo{}
reader.ReadSlice(&servers, 2)
servers := reader.ReadSsoServerInfos(2)
adds := make([]*net.TCPAddr, 0, len(servers))
for _, s := range servers {
if strings.Contains(s.Server, "com") {
@ -498,8 +174,7 @@ func qualityTest(addr string) (int64, error) {
return 0, errors.Wrap(err, "failed to connect to server during quality test")
}
_ = conn.Close()
end := time.Now()
return end.Sub(start).Milliseconds(), nil
return time.Since(start).Milliseconds(), nil
}
func (c *QQClient) parsePrivateMessage(msg *msg.Message) *message.PrivateMessage {
@ -582,10 +257,12 @@ func (b *groupMessageBuilder) build() *msg.Message {
return base
}
func packUniRequestData(data []byte) (r []byte) {
r = append([]byte{0x0A}, data...)
func packUniRequestData(data []byte) []byte {
r := make([]byte, 0, len(data)+2)
r = append(r, 0x0a)
r = append(r, data...)
r = append(r, 0x0B)
return
return r
}
func genForwardTemplate(resID, preview, title, brief, source, summary string, ts int64, items []*msg.PbMultiMsgItem) *message.ForwardElement {
@ -623,62 +300,45 @@ func genLongTemplate(resID, brief string, ts int64) *message.ServiceElement {
}
}
func (p requestParams) bool(k string) bool {
if p == nil {
return false
}
i, ok := p[k]
if !ok {
return false
}
return i.(bool)
func (c *QQClient) getWebDeviceInfo() (i string) {
qimei := strings.ToLower(utils.RandomString(36))
i += fmt.Sprintf("i=%v&imsi=&mac=%v&m=%v&o=%v&", c.deviceInfo.IMEI, utils.B2S(c.deviceInfo.MacAddress), utils.B2S(c.deviceInfo.Device), utils.B2S(c.deviceInfo.Version.Release))
i += fmt.Sprintf("a=%v&sd=0&c64=0&sc=1&p=1080*2210&aid=%v&", c.deviceInfo.Version.SDK, c.deviceInfo.IMEI)
i += fmt.Sprintf("f=%v&mm=%v&cf=%v&cc=%v&", c.deviceInfo.Brand, 5629 /* Total Memory*/, 1725 /* CPU Frequency */, 8 /* CPU Core Count */)
i += fmt.Sprintf("qimei=%v&qimei36=%v&", qimei, qimei)
i += "sharpP=1&n=wifi&support_xsj_live=true&client_mod=default&timezone=Asia/Shanghai&material_sdk_version=2.9.0&vh265=null&refreshrate=60"
return
}
func (p requestParams) int32(k string) int32 {
if p == nil {
return 0
}
i, ok := p[k]
if !ok {
return 0
}
return i.(int32)
}
func (c *QQClient) packOIDBPackage(cmd, serviceType uint32, body []byte) []byte {
func (c *QQClient) packOIDBPackage(cmd, serviceType int32, body []byte) []byte {
pkg := &oidb.OIDBSSOPkg{
Command: &cmd,
ServiceType: &serviceType,
Command: cmd,
ServiceType: serviceType,
Bodybuffer: body,
ClientVersion: proto.String("Android " + c.version.SortVersionName),
ClientVersion: "Android " + c.version.SortVersionName,
}
r, _ := pkg.Marshal()
r, _ := proto.Marshal(pkg)
return r
}
func (c *QQClient) packOIDBPackageDynamically(cmd, serviceType uint32, msg binary.DynamicProtoMessage) []byte {
func (c *QQClient) packOIDBPackageDynamically(cmd, serviceType int32, msg binary.DynamicProtoMessage) []byte {
return c.packOIDBPackage(cmd, serviceType, msg.Encode())
}
func (c *QQClient) packOIDBPackageProto(cmd, serviceType uint32, msg proto.Message) []byte {
func (c *QQClient) packOIDBPackageProto(cmd, serviceType int32, msg proto.Message) []byte {
b, _ := proto.Marshal(msg)
return c.packOIDBPackage(cmd, serviceType, b)
}
func (c *QQClient) packOIDBPackageProto2(cmd, serviceType uint32, msg proto2.Message) []byte {
b, _ := msg.Marshal()
return c.packOIDBPackage(cmd, serviceType, b)
}
func (c *QQClient) unpackOIDBPackage(buff []byte, payload interface{}) error {
func unpackOIDBPackage(buff []byte, payload proto.Message) error {
pkg := new(oidb.OIDBSSOPkg)
if err := protobuf.Unmarshal(buff, pkg); err != nil {
if err := proto.Unmarshal(buff, pkg); err != nil {
return errors.Wrap(err, "failed to unmarshal protobuf message")
}
if pkg.GetResult() != 0 {
return errors.Errorf("oidb result unsuccessful: %v msg: %v", pkg.GetResult(), pkg.GetErrorMsg())
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, payload); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, payload); err != nil {
return errors.Wrap(err, "failed to unmarshal protobuf message")
}
return nil
@ -718,3 +378,11 @@ func (c *QQClient) Trace(msg string, args ...interface{}) {
Message: fmt.Sprintf(msg, args...),
})
}
func (c *QQClient) Dump(msg string, data []byte, args ...interface{}) {
c.dispatchLogEvent(&LogEvent{
Type: "DUMP",
Message: fmt.Sprintf(msg, args...),
Dump: data,
})
}

View File

@ -10,17 +10,12 @@ import (
"runtime/debug"
"github.com/pkg/errors"
protobuf "github.com/segmentio/encoding/proto"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/client/internal/highway"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/exciting"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/group_file_common"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d6"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d7"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d8"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d9"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/utils"
)
@ -62,17 +57,6 @@ type (
var fsWaiter = utils.NewUploadWaiter()
func init() {
decoders["OidbSvc.0x6d8_1"] = decodeOIDB6d81Response
decoders["OidbSvc.0x6d6_0"] = decodeOIDB6d60Response
decoders["OidbSvc.0x6d6_2"] = decodeOIDB6d62Response
decoders["OidbSvc.0x6d6_3"] = decodeOIDB6d63Response
decoders["OidbSvc.0x6d7_0"] = decodeOIDB6d7Response
decoders["OidbSvc.0x6d7_1"] = decodeOIDB6d7Response
decoders["OidbSvc.0x6d7_2"] = decodeOIDB6d7Response
decoders["OidbSvc.0x6d9_4"] = ignoreDecoder
}
func (c *QQClient) GetGroupFileSystem(groupCode int64) (fs *GroupFileSystem, err error) {
defer func() {
if pan := recover(); pan != nil {
@ -84,27 +68,27 @@ func (c *QQClient) GetGroupFileSystem(groupCode int64) (fs *GroupFileSystem, err
if g == nil {
return nil, errors.New("group not found")
}
rsp, e := c.sendAndWait(c.buildGroupFileCountRequestPacket(groupCode))
rsp, e := c.callAndDecode(c.buildGroupFileCountRequest(groupCode))
if e != nil {
return nil, e
}
fs = &GroupFileSystem{
FileCount: rsp.(*oidb0x6d8.RspBody).GroupFileCntRsp.GetAllFileCount(),
LimitCount: rsp.(*oidb0x6d8.RspBody).GroupFileCntRsp.GetLimitCount(),
FileCount: rsp.(*oidb.D6D8RspBody).FileCountRsp.GetAllFileCount(),
LimitCount: rsp.(*oidb.D6D8RspBody).FileCountRsp.GetLimitCount(),
GroupCode: groupCode,
client: c,
}
rsp, err = c.sendAndWait(c.buildGroupFileSpaceRequestPacket(groupCode))
rsp, err = c.callAndDecode(c.buildGroupFileSpaceRequest(groupCode))
if err != nil {
return nil, err
}
fs.TotalSpace = rsp.(*oidb0x6d8.RspBody).GroupSpaceRsp.GetTotalSpace()
fs.UsedSpace = rsp.(*oidb0x6d8.RspBody).GroupSpaceRsp.GetUsedSpace()
fs.TotalSpace = rsp.(*oidb.D6D8RspBody).GroupSpaceRsp.GetTotalSpace()
fs.UsedSpace = rsp.(*oidb.D6D8RspBody).GroupSpaceRsp.GetUsedSpace()
return fs, nil
}
func (c *QQClient) GetGroupFileUrl(groupCode int64, fileId string, busId int32) string {
i, err := c.sendAndWait(c.buildGroupFileDownloadReqPacket(groupCode, fileId, busId))
i, err := c.callAndDecode(c.buildGroupFileDownloadReq(groupCode, fileId, busId))
if err != nil {
return ""
}
@ -122,11 +106,12 @@ func (fs *GroupFileSystem) GetFilesByFolder(folderID string) ([]*GroupFile, []*G
var files []*GroupFile
var folders []*GroupFolder
for {
i, err := fs.client.sendAndWait(fs.client.buildGroupFileListRequestPacket(fs.GroupCode, folderID, startIndex))
req := fs.client.buildGroupFileListRequest(fs.GroupCode, folderID, startIndex)
i, err := fs.client.callAndDecode(req)
if err != nil {
return nil, nil, err
}
rsp := i.(*oidb0x6d8.RspBody)
rsp := i.(*oidb.D6D8RspBody)
if rsp.FileListInfoRsp == nil {
break
}
@ -182,14 +167,16 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
_, _ = io.Copy(sha1H, file)
sha1Hash := sha1H.Sum(nil)
_, _ = file.Seek(0, io.SeekStart)
i, err := fs.client.sendAndWait(fs.client.buildGroupFileUploadReqPacket(folderId, name, fs.GroupCode, size, md5Hash, sha1Hash))
req := fs.client.buildGroupFileUploadReq(folderId, name, fs.GroupCode, size, md5Hash, sha1Hash)
i, err := fs.client.callAndDecode(req)
if err != nil {
return errors.Wrap(err, "query upload failed")
}
rsp := i.(*oidb0x6d6.UploadFileRspBody)
if rsp.GetFileExist() {
_, pkt := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.GetFileId(), int32(rsp.GetBusId()), rand.Int31())
return fs.client.sendPacket(pkt)
rsp := i.(*oidb.UploadFileRspBody)
if rsp.GetBoolFileExist() {
req := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.GetFileId(), rsp.GetBusId(), rand.Int31())
_, err := fs.client.call(req)
return err
}
if len(rsp.UploadIpLanV4) == 0 {
return errors.New("server requires unsupported ftn upload")
@ -199,7 +186,7 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
Unknown2: proto.Int32(1),
Entry: &exciting.GroupFileUploadEntry{
BusiBuff: &exciting.ExcitingBusiInfo{
BusId: proto.Int32(int32(rsp.GetBusId())),
BusId: rsp.BusId,
SenderUin: &fs.client.Uin,
ReceiverUin: &fs.GroupCode,
GroupCode: &fs.GroupCode,
@ -225,17 +212,25 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
Unknown: proto.Int32(1),
Host: &rsp.UploadIpLanV4[0],
},
Port: proto.Int32(int32(rsp.GetUploadPort())),
Port: rsp.UploadPort,
},
}},
},
Unknown3: proto.Int32(0),
})
if _, err = fs.client.excitingUploadStream(file, 71, fs.client.bigDataSession.SigSession, ext); err != nil {
client := fs.client
input := highway.ExcitingInput{
CommandID: 71,
Body: file,
Ticket: fs.client.highwaySession.SigSession,
Ext: ext,
}
if _, err = fs.client.highwaySession.UploadExciting(input); err != nil {
return errors.Wrap(err, "upload failed")
}
_, pkt := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.GetFileId(), int32(rsp.GetBusId()), rand.Int31())
return fs.client.sendPacket(pkt)
req = client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.GetFileId(), rsp.GetBusId(), rand.Int31())
_, err = client.call(req)
return err
}
func (fs *GroupFileSystem) GetDownloadUrl(file *GroupFile) string {
@ -243,21 +238,21 @@ func (fs *GroupFileSystem) GetDownloadUrl(file *GroupFile) string {
}
func (fs *GroupFileSystem) CreateFolder(parentFolder, name string) error {
if _, err := fs.client.sendAndWait(fs.client.buildGroupFileCreateFolderPacket(fs.GroupCode, parentFolder, name)); err != nil {
if _, err := fs.client.callAndDecode(fs.client.buildGroupFileCreateFolderRequest(fs.GroupCode, parentFolder, name)); err != nil {
return errors.Wrap(err, "create folder error")
}
return nil
}
func (fs *GroupFileSystem) RenameFolder(folderId, newName string) error {
if _, err := fs.client.sendAndWait(fs.client.buildGroupFileRenameFolderPacket(fs.GroupCode, folderId, newName)); err != nil {
if _, err := fs.client.callAndDecode(fs.client.buildGroupFileRenameFolderRequest(fs.GroupCode, folderId, newName)); err != nil {
return errors.Wrap(err, "rename folder error")
}
return nil
}
func (fs *GroupFileSystem) DeleteFolder(folderId string) error {
if _, err := fs.client.sendAndWait(fs.client.buildGroupFileDeleteFolderPacket(fs.GroupCode, folderId)); err != nil {
if _, err := fs.client.callAndDecode(fs.client.buildGroupFileDeleteFolderRequest(fs.GroupCode, folderId)); err != nil {
return errors.Wrap(err, "rename folder error")
}
return nil
@ -266,53 +261,54 @@ func (fs *GroupFileSystem) DeleteFolder(folderId string) error {
// DeleteFile 删除群文件,需要管理权限.
// 返回错误, 空为删除成功
func (fs *GroupFileSystem) DeleteFile(parentFolderID, fileId string, busId int32) string {
i, err := fs.client.sendAndWait(fs.client.buildGroupFileDeleteReqPacket(fs.GroupCode, parentFolderID, fileId, busId))
i, err := fs.client.callAndDecode(fs.client.buildGroupFileDeleteReq(fs.GroupCode, parentFolderID, fileId, busId))
if err != nil {
return err.Error()
}
return i.(string)
}
func (c *QQClient) buildGroupFileUploadReqPacket(parentFolderID, fileName string, groupCode, fileSize int64, md5, sha1 []byte) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb0x6d6.ReqBody{UploadFileReq: &oidb0x6d6.UploadFileReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
BusId: proto.Uint32(102),
Entrance: proto.Uint32(5),
func (c *QQClient) buildGroupFileUploadReq(parentFolderID, fileName string, groupCode, fileSize int64, md5, sha1 []byte) *network.Request {
b, _ := proto.Marshal(&oidb.D6D6ReqBody{UploadFileReq: &oidb.UploadFileReqBody{
GroupCode: &groupCode,
AppId: proto.Int32(3),
BusId: proto.Int32(102),
Entrance: proto.Int32(5),
ParentFolderId: &parentFolderID,
FileName: &fileName,
LocalPath: proto.String("/storage/emulated/0/Pictures/files/s/" + fileName),
FileSize: proto.Uint64(uint64(fileSize)),
Int64FileSize: &fileSize,
Sha: sha1,
Md5: md5,
SupportMultiUpload: proto.Bool(true),
}}
payload := c.packOIDBPackageProto2(1750, 0, body)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d6_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
}})
req := &oidb.OIDBSSOPkg{
Command: 1750,
ServiceType: 0,
Bodybuffer: b,
ClientVersion: "android 8.4.8",
}
payload, _ := proto.Marshal(req)
return c.uniRequest("OidbSvc.0x6d6_0", payload, decodeOIDB6d60Response)
}
func (c *QQClient) buildGroupFileFeedsRequest(groupCode int64, fileID string, busId, msgRand int32) (uint16, []byte) {
seq := c.nextSeq()
req := c.packOIDBPackageProto2(1753, 4, &oidb0x6d9.ReqBody{FeedsInfoReq: &oidb0x6d9.FeedsReqBody{
func (c *QQClient) buildGroupFileFeedsRequest(groupCode int64, fileID string, busId, msgRand int32) *network.Request {
req := c.packOIDBPackageProto(1753, 4, &oidb.D6D9ReqBody{FeedsInfoReq: &oidb.FeedsReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
FeedsInfoList: []*group_file_common.FeedsInfo{{
FeedsInfoList: []*oidb.GroupFileFeedsInfo{{
FileId: &fileID,
FeedFlag: proto.Uint32(1),
BusId: proto.Uint32(uint32(busId)),
MsgRandom: proto.Uint32(uint32(msgRand)),
}},
}})
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d9_4", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, req)
return seq, packet
return c.uniRequest("OidbSvc.0x6d9_4", req, nil)
}
// OidbSvc.0x6d8_1
func (c *QQClient) buildGroupFileListRequestPacket(groupCode int64, folderID string, startIndex uint32) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb0x6d8.ReqBody{FileListInfoReq: &oidb0x6d8.GetFileListReqBody{
func (c *QQClient) buildGroupFileListRequest(groupCode int64, folderID string, startIndex uint32) *network.Request {
body := &oidb.D6D8ReqBody{FileListInfoReq: &oidb.GetFileListReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
FolderId: &folderID,
@ -325,119 +321,138 @@ func (c *QQClient) buildGroupFileListRequestPacket(groupCode int64, folderID str
StartIndex: &startIndex,
Context: EmptyBytes,
}}
payload := c.packOIDBPackageProto2(1752, 1, body)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d8_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{
Command: 1752,
ServiceType: 1,
Bodybuffer: b,
ClientVersion: "android 8.4.8",
}
payload, _ := proto.Marshal(req)
return c.uniRequest("OidbSvc.0x6d8_1", payload, decodeOIDB6d81Response)
}
func (c *QQClient) buildGroupFileCountRequestPacket(groupCode int64) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb0x6d8.ReqBody{GroupFileCntReq: &oidb0x6d8.GetFileCountReqBody{
func (c *QQClient) buildGroupFileCountRequest(groupCode int64) *network.Request {
body := &oidb.D6D8ReqBody{GroupFileCountReq: &oidb.GetFileCountReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
BusId: proto.Uint32(0),
}}
payload := c.packOIDBPackageProto2(1752, 2, body)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d8_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{
Command: 1752,
ServiceType: 2,
Bodybuffer: b,
ClientVersion: "android 8.4.8",
}
payload, _ := proto.Marshal(req)
return c.uniRequest("OidbSvc.0x6d8_1", payload, decodeOIDB6d81Response)
}
func (c *QQClient) buildGroupFileSpaceRequestPacket(groupCode int64) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb0x6d8.ReqBody{GroupSpaceReq: &oidb0x6d8.GetSpaceReqBody{
func (c *QQClient) buildGroupFileSpaceRequest(groupCode int64) *network.Request {
body := &oidb.D6D8ReqBody{GroupSpaceReq: &oidb.GetSpaceReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
}}
payload := c.packOIDBPackageProto2(1752, 3, body)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d8_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{
Command: 1752,
ServiceType: 3,
Bodybuffer: b,
ClientVersion: "android 8.4.8",
}
payload, _ := proto.Marshal(req)
return c.uniRequest("OidbSvc.0x6d8_1", payload, decodeOIDB6d81Response)
}
func (c *QQClient) buildGroupFileCreateFolderPacket(groupCode int64, parentFolder, name string) (uint16, []byte) {
seq := c.nextSeq()
payload := c.packOIDBPackageProto2(1751, 0, &oidb0x6d7.ReqBody{CreateFolderReq: &oidb0x6d7.CreateFolderReqBody{
func (c *QQClient) buildGroupFileCreateFolderRequest(groupCode int64, parentFolder, name string) *network.Request {
payload := c.packOIDBPackageProto(1751, 0, &oidb.D6D7ReqBody{CreateFolderReq: &oidb.CreateFolderReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
ParentFolderId: &parentFolder,
FolderName: &name,
}})
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d7_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("OidbSvc.0x6d7_0", payload, decodeOIDB6d7Response)
}
func (c *QQClient) buildGroupFileRenameFolderPacket(groupCode int64, folderId, newName string) (uint16, []byte) {
seq := c.nextSeq()
payload := c.packOIDBPackageProto2(1751, 2, &oidb0x6d7.ReqBody{RenameFolderReq: &oidb0x6d7.RenameFolderReqBody{
func (c *QQClient) buildGroupFileRenameFolderRequest(groupCode int64, folderId, newName string) *network.Request {
payload := c.packOIDBPackageProto(1751, 2, &oidb.D6D7ReqBody{RenameFolderReq: &oidb.RenameFolderReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
FolderId: proto.String(folderId),
NewFolderName: proto.String(newName),
}})
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d7_2", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("OidbSvc.0x6d7_2", payload, decodeOIDB6d7Response)
}
func (c *QQClient) buildGroupFileDeleteFolderPacket(groupCode int64, folderId string) (uint16, []byte) {
seq := c.nextSeq()
payload := c.packOIDBPackageProto2(1751, 1, &oidb0x6d7.ReqBody{DeleteFolderReq: &oidb0x6d7.DeleteFolderReqBody{
func (c *QQClient) buildGroupFileDeleteFolderRequest(groupCode int64, folderId string) *network.Request {
payload := c.packOIDBPackageProto(1751, 1, &oidb.D6D7ReqBody{DeleteFolderReq: &oidb.DeleteFolderReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
FolderId: proto.String(folderId),
}})
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d7_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("OidbSvc.0x6d7_1", payload, decodeOIDB6d7Response)
}
// OidbSvc.0x6d6_2
func (c *QQClient) buildGroupFileDownloadReqPacket(groupCode int64, fileId string, busId int32) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb0x6d6.ReqBody{
DownloadFileReq: &oidb0x6d6.DownloadFileReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
BusId: proto.Uint32(uint32(busId)),
func (c *QQClient) buildGroupFileDownloadReq(groupCode int64, fileId string, busId int32) *network.Request {
body := &oidb.D6D6ReqBody{
DownloadFileReq: &oidb.DownloadFileReqBody{
GroupCode: &groupCode,
AppId: proto.Int32(3),
BusId: &busId,
FileId: &fileId,
},
}
payload := c.packOIDBPackageProto2(1750, 2, body)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d6_2", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{
Command: 1750,
ServiceType: 2,
Bodybuffer: b,
}
payload, _ := proto.Marshal(req)
return c.uniRequest("OidbSvc.0x6d6_2", payload, decodeOIDB6d62Response)
}
func (c *QQClient) buildGroupFileDeleteReqPacket(groupCode int64, parentFolderId, fileId string, busId int32) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb0x6d6.ReqBody{DeleteFileReq: &oidb0x6d6.DeleteFileReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
BusId: proto.Uint32(uint32(busId)),
func (c *QQClient) buildGroupFileDeleteReq(groupCode int64, parentFolderId, fileId string, busId int32) *network.Request {
body := &oidb.D6D6ReqBody{DeleteFileReq: &oidb.DeleteFileReqBody{
GroupCode: &groupCode,
AppId: proto.Int32(3),
BusId: &busId,
ParentFolderId: &parentFolderId,
FileId: &fileId,
}}
payload := c.packOIDBPackageProto2(1750, 3, body)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d6_3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{
Command: 1750,
ServiceType: 3,
Bodybuffer: b,
ClientVersion: "android 8.4.8",
}
payload, _ := proto.Marshal(req)
return c.uniRequest("OidbSvc.0x6d6_3", payload, decodeOIDB6d63Response)
}
func decodeOIDB6d81Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOIDB6d81Response(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb0x6d8.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := oidb.D6D8RspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return &rsp, nil
}
// OidbSvc.0x6d6_2
func decodeOIDB6d62Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOIDB6d62Response(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb0x6d6.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := oidb.D6D6RspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.DownloadFileRsp.DownloadUrl == nil {
@ -448,13 +463,13 @@ func decodeOIDB6d62Response(_ *QQClient, _ *incomingPacketInfo, payload []byte)
return fmt.Sprintf("http://%s/ftn_handler/%s/", ip, url), nil
}
func decodeOIDB6d63Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOIDB6d63Response(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb0x6d6.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := oidb.D6D6RspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.DeleteFileRsp == nil {
@ -463,25 +478,25 @@ func decodeOIDB6d63Response(_ *QQClient, _ *incomingPacketInfo, payload []byte)
return rsp.DeleteFileRsp.GetClientWording(), nil
}
func decodeOIDB6d60Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOIDB6d60Response(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb0x6d6.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := oidb.D6D6RspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return rsp.UploadFileRsp, nil
}
func decodeOIDB6d7Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOIDB6d7Response(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb0x6d7.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := oidb.D6D7RspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.CreateFolderRsp != nil && rsp.CreateFolderRsp.GetRetCode() != 0 {

View File

@ -1,24 +1,24 @@
package client
import (
"bytes"
"encoding/json"
"fmt"
"math/rand"
"net/http"
"net/url"
"sort"
"strings"
"sync"
"github.com/pkg/errors"
protobuf "github.com/segmentio/encoding/proto"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/binary/jce"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/client/pb/profilecard"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x88d"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/utils"
)
@ -65,13 +65,8 @@ type (
}
)
func init() {
decoders["SummaryCard.ReqSearch"] = decodeGroupSearchResponse
decoders["OidbSvc.0x88d_0"] = decodeGroupInfoResponse
}
func (c *QQClient) GetGroupInfo(groupCode int64) (*GroupInfo, error) {
i, err := c.sendAndWait(c.buildGroupInfoRequestPacket(groupCode))
i, err := c.callAndDecode(c.buildGroupInfoRequestPacket(groupCode))
if err != nil {
return nil, err
}
@ -79,14 +74,13 @@ func (c *QQClient) GetGroupInfo(groupCode int64) (*GroupInfo, error) {
}
// OidbSvc.0x88d_0
func (c *QQClient) buildGroupInfoRequestPacket(groupCode int64) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb0x88d.ReqBody{
Appid: proto.Uint32(c.version.AppId),
Stzreqgroupinfo: []*oidb0x88d.ReqGroupInfo{
func (c *QQClient) buildGroupInfoRequestPacket(groupCode int64) *network.Request {
body := &oidb.D88DReqBody{
AppId: proto.Uint32(c.version.AppId),
ReqGroupInfo: []*oidb.ReqGroupInfo{
{
GroupCode: proto.Uint64(uint64(groupCode)),
Stgroupinfo: &oidb0x88d.GroupInfo{
Stgroupinfo: &oidb.D88DGroupInfo{
GroupOwner: proto.Uint64(0),
GroupUin: proto.Uint64(0),
GroupCreateTime: proto.Uint32(0),
@ -106,8 +100,8 @@ func (c *QQClient) buildGroupInfoRequestPacket(groupCode int64) (uint16, []byte)
GroupGrade: proto.Uint32(0),
ActiveMemberNum: proto.Uint32(0),
HeadPortraitSeq: proto.Uint32(0),
HeadPortrait: &oidb0x88d.GroupHeadPortrait{},
StGroupExInfo: &oidb0x88d.GroupExInfoOnly{},
MsgHeadPortrait: &oidb.D88DGroupHeadPortrait{},
StGroupExInfo: &oidb.D88DGroupExInfoOnly{},
GroupSecLevel: proto.Uint32(0),
CmduinPrivilege: proto.Uint32(0),
NoFingerOpenFlag: proto.Uint32(0),
@ -117,14 +111,18 @@ func (c *QQClient) buildGroupInfoRequestPacket(groupCode int64) (uint16, []byte)
},
PcClientVersion: proto.Uint32(0),
}
payload := c.packOIDBPackageProto2(2189, 0, body)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x88d_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{
Command: 2189,
Bodybuffer: b,
}
payload, _ := proto.Marshal(req)
return c.uniRequest("OidbSvc.0x88d_0", payload, decodeGroupInfoResponse)
}
// SearchGroupByKeyword 通过关键词搜索陌生群组
func (c *QQClient) SearchGroupByKeyword(keyword string) ([]GroupSearchInfo, error) {
rsp, err := c.sendAndWait(c.buildGroupSearchPacket(keyword))
rsp, err := c.callAndDecode(c.buildGroupSearchPacket(keyword))
if err != nil {
return nil, errors.Wrap(err, "group search failed")
}
@ -132,8 +130,7 @@ func (c *QQClient) SearchGroupByKeyword(keyword string) ([]GroupSearchInfo, erro
}
// SummaryCard.ReqSearch
func (c *QQClient) buildGroupSearchPacket(keyword string) (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildGroupSearchPacket(keyword string) *network.Request {
comm, _ := proto.Marshal(&profilecard.BusiComm{
Ver: proto.Int32(1),
Seq: proto.Int32(rand.Int31()),
@ -182,14 +179,13 @@ func (c *QQClient) buildGroupSearchPacket(keyword string) (uint16, []byte) {
Context: make(map[string]string),
Status: make(map[string]string),
}
packet := packets.BuildUniPacket(c.Uin, seq, "SummaryCard.ReqSearch", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
return seq, packet
return c.uniRequest("SummaryCard.ReqSearch", pkt.ToBytes(), decodeGroupSearchResponse)
}
// SummaryCard.ReqSearch
func decodeGroupSearchResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGroupSearchResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion2{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
if len(data.Map["RespHead"]["SummaryCard.RespHead"]) > 20 {
@ -197,7 +193,8 @@ func decodeGroupSearchResponse(_ *QQClient, _ *incomingPacketInfo, payload []byt
}
rsp := data.Map["RespSearch"]["SummaryCard.RespSearch"][1:]
r := jce.NewJceReader(rsp)
rspService := r.ReadAny(2).([]interface{})[0].([]byte)
// rspService := r.ReadAny(2).([]interface{})[0].([]byte)
rspService := r.ReadByteArrArr(2)[0]
sr := binary.NewReader(rspService)
sr.ReadByte()
ld1 := sr.ReadInt32()
@ -224,38 +221,52 @@ func decodeGroupSearchResponse(_ *QQClient, _ *incomingPacketInfo, payload []byt
}
// OidbSvc.0x88d_0
func decodeGroupInfoResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGroupInfoResponse(c *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb0x88d.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := oidb.D88DRspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(rsp.Stzrspgroupinfo) == 0 {
return nil, errors.New(string(rsp.Errorinfo))
if len(rsp.RspGroupInfo) == 0 {
return nil, errors.New(string(rsp.StrErrorInfo))
}
info := rsp.Stzrspgroupinfo[0]
if info.Stgroupinfo == nil {
info := rsp.RspGroupInfo[0]
if info.GroupInfo == nil {
return nil, errors.New("group info not found")
}
return &GroupInfo{
Uin: int64(*info.Stgroupinfo.GroupUin),
Uin: int64(*info.GroupInfo.GroupUin),
Code: int64(*info.GroupCode),
Name: string(info.Stgroupinfo.GroupName),
Memo: string(info.Stgroupinfo.GroupMemo),
GroupCreateTime: *info.Stgroupinfo.GroupCreateTime,
GroupLevel: *info.Stgroupinfo.GroupLevel,
OwnerUin: int64(*info.Stgroupinfo.GroupOwner),
MemberCount: uint16(*info.Stgroupinfo.GroupMemberNum),
MaxMemberCount: uint16(*info.Stgroupinfo.GroupMemberMaxNum),
Name: string(info.GroupInfo.GroupName),
Memo: string(info.GroupInfo.GroupMemo),
GroupCreateTime: *info.GroupInfo.GroupCreateTime,
GroupLevel: *info.GroupInfo.GroupLevel,
OwnerUin: int64(*info.GroupInfo.GroupOwner),
MemberCount: uint16(*info.GroupInfo.GroupMemberNum),
MaxMemberCount: uint16(*info.GroupInfo.GroupMemberMaxNum),
Members: []*GroupMemberInfo{},
LastMsgSeq: int64(info.Stgroupinfo.GetGroupCurMsgSeq()),
LastMsgSeq: int64(info.GroupInfo.GetGroupCurMsgSeq()),
client: c,
}, nil
}
func (c *QQClient) uploadGroupHeadPortrait(groupCode int64, img []byte) error {
url := fmt.Sprintf("http://htdata3.qq.com/cgi-bin/httpconn?htcmd=0x6ff0072&ver=5520&ukey=%v&range=0&uin=%v&seq=23&groupuin=%v&filetype=3&imagetype=5&userdata=0&subcmd=1&subver=101&clip=0_0_0_0&filesize=%v",
c.getSKey(), c.Uin, groupCode, len(img))
req, _ := http.NewRequest("POST", url, bytes.NewReader(img))
req.Header["User-Agent"] = []string{"Dalvik/2.1.0 (Linux; U; Android 7.1.2; PCRT00 Build/N2G48H)"}
req.Header["Content-Type"] = []string{"multipart/form-data;boundary=****"}
rsp, err := http.DefaultClient.Do(req)
if err != nil {
return errors.Wrap(err, "failed to upload group head portrait")
}
rsp.Body.Close()
return nil
}
func (g *GroupInfo) UpdateName(newName string) {
if g.AdministratorOrOwner() && newName != "" && strings.Count(newName, "") <= 20 {
g.client.updateGroupName(g.Code, newName)

View File

@ -12,28 +12,20 @@ import (
"time"
"github.com/pkg/errors"
protobuf "github.com/segmentio/encoding/proto"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/client/internal/highway"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/longmsg"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/client/pb/multimsg"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8a7"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x8fc"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xeac"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
)
func init() {
decoders["OnlinePush.PbPushGroupMsg"] = decodeGroupMessagePacket
decoders["MessageSvc.PbSendMsg"] = decodeMsgSendResponse
decoders["MessageSvc.PbGetGroupMsg"] = decodeGetGroupMsgResponse
decoders["OidbSvc.0x8a7_0"] = decodeAtAllRemainResponse
decoders["OidbSvc.0xeac_1"] = decodeEssenceMsgResponse
decoders["OidbSvc.0xeac_2"] = decodeEssenceMsgResponse
}
// SendGroupMessage 发送群消息
@ -52,22 +44,22 @@ func (c *QQClient) SendGroupMessage(groupCode int64, m *message.SendingMessage,
}
}
msgLen := message.EstimateLength(m.Elements)
if msgLen > 5000 || imgCount > 50 {
if msgLen > message.MaxMessageSize || imgCount > 50 {
return nil
}
if !useFram && (msgLen > 100 || imgCount > 2) {
ret := c.sendGroupMessage(groupCode, false,
&message.SendingMessage{Elements: []message.IMessageElement{
c.uploadGroupLongMessage(groupCode,
message.NewForwardMessage().AddNode(&message.ForwardNode{
SenderId: c.Uin,
SenderName: c.Nickname,
Time: int32(time.Now().Unix()),
Message: m.Elements,
}),
),
}},
)
lmsg, err := c.uploadGroupLongMessage(groupCode,
message.NewForwardMessage().AddNode(&message.ForwardNode{
SenderId: c.Uin,
SenderName: c.Nickname,
Time: int32(time.Now().Unix()),
Message: m.Elements,
}))
if err != nil {
c.Error("%v", err)
return nil
}
ret := c.sendGroupMessage(groupCode, false, &message.SendingMessage{Elements: []message.IMessageElement{lmsg}})
ret.Elements = m.Elements
return ret
}
@ -83,8 +75,9 @@ func (c *QQClient) SendGroupForwardMessage(groupCode int64, m *message.ForwardEl
// GetGroupMessages 从服务器获取历史信息
func (c *QQClient) GetGroupMessages(groupCode, beginSeq, endSeq int64) ([]*message.GroupMessage, error) {
seq, pkt := c.buildGetGroupMsgRequest(groupCode, beginSeq, endSeq)
i, err := c.sendAndWait(seq, pkt, requestParams{"raw": false})
req := c.buildGetGroupMsgRequest(groupCode, beginSeq, endSeq)
req.Params = network.Params{"raw": false}
i, err := c.callAndDecode(req)
if err != nil {
return nil, err
}
@ -92,7 +85,7 @@ func (c *QQClient) GetGroupMessages(groupCode, beginSeq, endSeq int64) ([]*messa
}
func (c *QQClient) GetAtAllRemain(groupCode int64) (*AtAllRemainInfo, error) {
i, err := c.sendAndWait(c.buildAtAllRemainRequestPacket(groupCode))
i, err := c.callAndDecode(c.buildAtAllRemainRequestPacket(groupCode))
if err != nil {
return nil, err
}
@ -126,12 +119,12 @@ func (c *QQClient) sendGroupMessage(groupCode int64, forward bool, m *message.Se
div := int32(rand.Uint32())
fragmented := m.ToFragmented()
for i, elems := range fragmented {
_, pkt := c.buildGroupSendingPacket(groupCode, mr, int32(len(fragmented)), int32(i), div, forward, elems)
_ = c.sendPacket(pkt)
req := c.buildGroupSendingReq(groupCode, mr, int32(len(fragmented)), int32(i), div, forward, elems)
c.sendReq(req)
}
} else {
_, pkt := c.buildGroupSendingPacket(groupCode, mr, 1, 0, 0, forward, m.Elements)
_ = c.sendPacket(pkt)
req := c.buildGroupSendingReq(groupCode, mr, 1, 0, 0, forward, m.Elements)
c.sendReq(req)
}
var mid int32
ret := &message.GroupMessage{
@ -164,28 +157,29 @@ func (c *QQClient) sendGroupMessage(groupCode int64, forward bool, m *message.Se
}
}
func (c *QQClient) uploadGroupLongMessage(groupCode int64, m *message.ForwardMessage) *message.ServiceElement {
if m.Length() >= 200 {
return nil
}
func (c *QQClient) uploadGroupLongMessage(groupCode int64, m *message.ForwardMessage) (*message.ServiceElement, error) {
ts := time.Now().UnixNano()
seq := c.nextGroupSeq()
data, hash := m.CalculateValidationData(seq, rand.Int31(), groupCode)
rsp, body, err := c.multiMsgApplyUp(groupCode, data, hash, 1)
if err != nil {
c.Error("upload long message error: %v", err)
return nil
return nil, errors.Errorf("upload long message error: %v", err)
}
for i, ip := range rsp.Uint32UpIp {
err := c.highwayUpload(uint32(ip), int(rsp.Uint32UpPort[i]), rsp.MsgSig, body, 27)
addr := highway.Addr{IP: uint32(ip), Port: int(rsp.Uint32UpPort[i])}
input := highway.Input{
CommandID: 27,
Key: rsp.MsgSig,
Body: bytes.NewReader(body),
}
err := c.highwaySession.Upload(addr, input)
if err != nil {
c.Error("highway upload long message error: %v", err)
continue
}
return genLongTemplate(rsp.MsgResid, m.Brief(), ts)
return genLongTemplate(rsp.MsgResid, m.Brief(), ts), nil
}
c.Error("upload long message error: highway server list is empty or not available server.")
return nil
return nil, errors.New("upload long message error: highway server list is empty or not available server.")
}
func (c *QQClient) UploadGroupForwardMessage(groupCode int64, m *message.ForwardMessage) *message.ForwardElement {
@ -200,7 +194,13 @@ func (c *QQClient) UploadGroupForwardMessage(groupCode int64, m *message.Forward
return nil
}
for i, ip := range rsp.Uint32UpIp {
err := c.highwayUpload(uint32(ip), int(rsp.Uint32UpPort[i]), rsp.MsgSig, body, 27)
addr := highway.Addr{IP: uint32(ip), Port: int(rsp.Uint32UpPort[i])}
input := highway.Input{
CommandID: 27,
Key: rsp.MsgSig,
Body: bytes.NewReader(body),
}
err := c.highwaySession.Upload(addr, input)
if err != nil {
continue
}
@ -210,7 +210,7 @@ func (c *QQClient) UploadGroupForwardMessage(groupCode int64, m *message.Forward
}
func (c *QQClient) multiMsgApplyUp(groupCode int64, data []byte, hash []byte, buType int32) (*multimsg.MultiMsgApplyUpRsp, []byte, error) {
i, err := c.sendAndWait(c.buildMultiApplyUpPacket(data, hash, buType, utils.ToGroupUin(groupCode)))
i, err := c.callAndDecode(c.buildMultiApplyUpPacket(data, hash, buType, utils.ToGroupUin(groupCode)))
if err != nil {
return nil, nil, err
}
@ -233,8 +233,7 @@ func (c *QQClient) multiMsgApplyUp(groupCode int64, data []byte, hash []byte, bu
}
// MessageSvc.PbSendMsg
func (c *QQClient) buildGroupSendingPacket(groupCode int64, r, pkgNum, pkgIndex, pkgDiv int32, forward bool, m []message.IMessageElement) (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildGroupSendingReq(groupCode int64, r, pkgNum, pkgIndex, pkgDiv int32, forward bool, m []message.IMessageElement) *network.Request {
var ptt *message.GroupVoiceElement
if len(m) > 0 {
if p, ok := m[0].(*message.GroupVoiceElement); ok {
@ -267,41 +266,36 @@ func (c *QQClient) buildGroupSendingPacket(groupCode int64, r, pkgNum, pkgIndex,
return nil
}(),
}
payload, _ := protobuf.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "MessageSvc.PbSendMsg", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
payload, _ := proto.Marshal(req)
return c.uniRequest("MessageSvc.PbSendMsg", payload, nil)
}
func (c *QQClient) buildGetGroupMsgRequest(groupCode, beginSeq, endSeq int64) (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildGetGroupMsgRequest(groupCode, beginSeq, endSeq int64) *network.Request {
req := &msg.GetGroupMsgReq{
GroupCode: proto.Uint64(uint64(groupCode)),
BeginSeq: proto.Uint64(uint64(beginSeq)),
EndSeq: proto.Uint64(uint64(endSeq)),
PublicGroup: proto.Bool(false),
}
payload, _ := protobuf.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "MessageSvc.PbGetGroupMsg", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
payload, _ := proto.Marshal(req)
return c.uniRequest("MessageSvc.PbGetGroupMsg", payload, decodeGetGroupMsgResponse)
}
func (c *QQClient) buildAtAllRemainRequestPacket(groupCode int64) (uint16, []byte) {
seq := c.nextSeq()
payload := c.packOIDBPackageProto2(2215, 0, &oidb0x8a7.ReqBody{
func (c *QQClient) buildAtAllRemainRequestPacket(groupCode int64) *network.Request {
payload := c.packOIDBPackageProto(2215, 0, &oidb.D8A7ReqBody{
SubCmd: proto.Uint32(1),
LimitIntervalTypeForUin: proto.Uint32(2),
LimitIntervalTypeForGroup: proto.Uint32(1),
Uin: proto.Uint64(uint64(c.Uin)),
GroupCode: proto.Uint64(uint64(groupCode)),
})
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8a7_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("OidbSvc.0x8a7_0", payload, decodeAtAllRemainResponse)
}
// OnlinePush.PbPushGroupMsg
func decodeGroupMessagePacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGroupMessagePacket(c *QQClient, resp *network.Response) (interface{}, error) {
pkt := msg.PushMessagePacket{}
err := protobuf.Unmarshal(payload, &pkt)
err := proto.Unmarshal(resp.Body, &pkt)
if err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
@ -340,24 +334,9 @@ func decodeGroupMessagePacket(c *QQClient, _ *incomingPacketInfo, payload []byte
return nil, nil
}
func decodeMsgSendResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
rsp := msg.SendMessageResponse{}
if err := protobuf.Unmarshal(payload, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
switch rsp.GetResult() {
case 0: // OK.
case 55:
c.Error("sendPacket msg error: %v Bot has blocked target's content", rsp.GetResult())
default:
c.Error("sendPacket msg error: %v %v", rsp.GetResult(), rsp.GetErrMsg())
}
return nil, nil
}
func decodeGetGroupMsgResponse(c *QQClient, info *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGetGroupMsgResponse(c *QQClient, resp *network.Response) (interface{}, error) {
rsp := msg.GetGroupMsgResp{}
if err := protobuf.Unmarshal(payload, &rsp); err != nil {
if err := proto.Unmarshal(resp.Body, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.GetResult() != 0 {
@ -369,15 +348,16 @@ func decodeGetGroupMsgResponse(c *QQClient, info *incomingPacketInfo, payload []
if m.Head.FromUin == nil {
continue
}
if m.Content != nil && m.Content.GetPkgNum() > 1 && !info.Params.bool("raw") {
if m.Content != nil && m.Content.GetPkgNum() > 1 && !resp.Params().Bool("raw") {
if m.Content.GetPkgIndex() == 0 {
c.Debug("build fragmented message from history")
i := m.Head.GetMsgSeq() - m.Content.GetPkgNum()
builder := &groupMessageBuilder{}
for {
end := int32(math.Min(float64(i+19), float64(m.Head.GetMsgSeq()+m.Content.GetPkgNum())))
seq, pkt := c.buildGetGroupMsgRequest(m.Head.GroupInfo.GetGroupCode(), int64(i), int64(end))
data, err := c.sendAndWait(seq, pkt, requestParams{"raw": true})
req := c.buildGetGroupMsgRequest(m.Head.GroupInfo.GetGroupCode(), int64(i), int64(end))
req.Params = network.Params{"raw": true}
data, err := c.callAndDecode(req)
if err != nil {
return nil, errors.Wrap(err, "build fragmented message error")
}
@ -404,13 +384,13 @@ func decodeGetGroupMsgResponse(c *QQClient, info *incomingPacketInfo, payload []
return ret, nil
}
func decodeAtAllRemainResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeAtAllRemainResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb0x8a7.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := oidb.D8A7RspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return &AtAllRemainInfo{
@ -522,8 +502,8 @@ func (c *QQClient) parseGroupMessage(m *msg.Message) *message.GroupMessage {
mem := group.FindMember(m.Head.GetFromUin())
groupCard := m.Head.GroupInfo.GetGroupCard()
if extInfo != nil && len(extInfo.GroupCard) > 0 && extInfo.GroupCard[0] == 0x0A {
buf := oidb0x8fc.CommCardNameBuf{}
if err := protobuf.Unmarshal(extInfo.GroupCard, &buf); err == nil && len(buf.RichCardName) > 0 {
buf := oidb.D8FCCommCardNameBuf{}
if err := proto.Unmarshal(extInfo.GroupCard, &buf); err == nil && len(buf.RichCardName) > 0 {
var gcard strings.Builder
for _, e := range buf.RichCardName {
gcard.Write(e.Text)
@ -565,11 +545,11 @@ func (c *QQClient) parseGroupMessage(m *msg.Message) *message.GroupMessage {
// SetEssenceMessage 设为群精华消息
func (c *QQClient) SetEssenceMessage(groupCode int64, msgID, msgInternalId int32) error {
r, err := c.sendAndWait(c.buildEssenceMsgOperatePacket(groupCode, uint32(msgID), uint32(msgInternalId), 1))
r, err := c.callAndDecode(c.buildEssenceMsgOperatePacket(groupCode, uint32(msgID), uint32(msgInternalId), 1))
if err != nil {
return errors.Wrap(err, "set essence msg network")
}
rsp := r.(*oidb0xeac.RspBody)
rsp := r.(*oidb.EACRspBody)
if rsp.GetErrorCode() != 0 {
return errors.New(rsp.GetWording())
}
@ -578,37 +558,35 @@ func (c *QQClient) SetEssenceMessage(groupCode int64, msgID, msgInternalId int32
// DeleteEssenceMessage 移出群精华消息
func (c *QQClient) DeleteEssenceMessage(groupCode int64, msgID, msgInternalId int32) error {
r, err := c.sendAndWait(c.buildEssenceMsgOperatePacket(groupCode, uint32(msgID), uint32(msgInternalId), 2))
r, err := c.callAndDecode(c.buildEssenceMsgOperatePacket(groupCode, uint32(msgID), uint32(msgInternalId), 2))
if err != nil {
return errors.Wrap(err, "set essence msg networ")
}
rsp := r.(*oidb0xeac.RspBody)
rsp := r.(*oidb.EACRspBody)
if rsp.GetErrorCode() != 0 {
return errors.New(rsp.GetWording())
}
return nil
}
func (c *QQClient) buildEssenceMsgOperatePacket(groupCode int64, msgSeq, msgRand, opType uint32) (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildEssenceMsgOperatePacket(groupCode int64, msgSeq, msgRand, opType uint32) *network.Request {
commandName := "OidbSvc.0xeac_" + strconv.FormatInt(int64(opType), 10)
payload := c.packOIDBPackageProto2(3756, opType, &oidb0xeac.ReqBody{ // serviceType 2 取消
payload := c.packOIDBPackageProto(3756, int32(opType), &oidb.EACReqBody{ // serviceType 2 取消
GroupCode: proto.Uint64(uint64(groupCode)),
Seq: proto.Uint32(msgSeq),
Random: proto.Uint32(msgRand),
})
packet := packets.BuildUniPacket(c.Uin, seq, commandName, 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest(commandName, payload, decodeEssenceMsgResponse)
}
// OidbSvc.0xeac_1/2
func decodeEssenceMsgResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeEssenceMsgResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := &oidb0xeac.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := &oidb.EACRspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return rsp, nil

View File

@ -2,14 +2,21 @@ package client
import (
"fmt"
"math/rand"
"sort"
"strconv"
"time"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/topic"
"github.com/Mrs4s/MiraiGo/client/pb/qweb"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/pkg/errors"
protobuf "github.com/segmentio/encoding/proto"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/channel"
"github.com/Mrs4s/MiraiGo/client/pb/channel"
"github.com/Mrs4s/MiraiGo/utils"
)
@ -34,9 +41,9 @@ type (
CoverUrl string
AvatarUrl string
Channels []*ChannelInfo
Bots []*GuildMemberInfo
Members []*GuildMemberInfo
Admins []*GuildMemberInfo
// Bots []*GuildMemberInfo
// Members []*GuildMemberInfo
// Admins []*GuildMemberInfo
}
// GuildMeta 频道数据
@ -52,12 +59,14 @@ type (
OwnerId uint64
}
// GuildMemberInfo 频道成员信息, 仅通过频道成员列表API获取
GuildMemberInfo struct {
TinyId uint64
Title string
Nickname string
LastSpeakTime int64
Role int32 // 0 = member 1 = admin 2 = owner ?
Role uint64
RoleName string
}
// GuildUserProfile 频道系统用户资料
@ -66,6 +75,19 @@ type (
Nickname string
AvatarUrl string
JoinTime int64 // 只有 GetGuildMemberProfileInfo 函数才会有
Roles []*GuildRole
}
// GuildRole 频道身份组信息
GuildRole struct {
RoleId uint64
RoleName string
ArgbColor uint32
Independent bool
Num int32
Owned bool
Disabled bool
MaxNum int32
}
// ChannelInfo 子频道信息
@ -78,6 +100,8 @@ type (
ChannelType ChannelType
AtAllSeq uint64
Meta *ChannelMeta
fetchTime int64
}
ChannelMeta struct {
@ -101,6 +125,14 @@ type (
SlowModeText string
}
FetchGuildMemberListWithRoleResult struct {
Members []*GuildMemberInfo
NextIndex uint32
NextRoleId uint64
NextQueryParam string
Finished bool
}
ChannelType int32
)
@ -108,6 +140,7 @@ const (
ChannelTypeText ChannelType = 1
ChannelTypeVoice ChannelType = 2
ChannelTypeLive ChannelType = 5
ChannelTypeTopic ChannelType = 7
)
func init() {
@ -123,25 +156,6 @@ func (s *GuildService) FindGuild(guildId uint64) *GuildInfo {
return nil
}
func (g *GuildInfo) FindMember(tinyId uint64) *GuildMemberInfo {
for i := 0; i < len(g.Members); i++ {
if g.Members[i].TinyId == tinyId {
return g.Members[i]
}
}
for i := 0; i < len(g.Admins); i++ {
if g.Admins[i].TinyId == tinyId {
return g.Admins[i]
}
}
for i := 0; i < len(g.Bots); i++ {
if g.Bots[i].TinyId == tinyId {
return g.Bots[i]
}
}
return nil
}
func (g *GuildInfo) FindChannel(channelId uint64) *ChannelInfo {
for _, c := range g.Channels {
if c.ChannelId == channelId {
@ -151,8 +165,17 @@ func (g *GuildInfo) FindChannel(channelId uint64) *ChannelInfo {
return nil
}
func (g *GuildInfo) removeChannel(id uint64) {
i := sort.Search(len(g.Channels), func(i int) bool {
return g.Channels[i].ChannelId >= id
})
if i >= len(g.Channels) || g.Channels[i].ChannelId != id {
return
}
g.Channels = append(g.Channels[:i], g.Channels[i+1:]...)
}
func (s *GuildService) GetUserProfile(tinyId uint64) (*GuildUserProfile, error) {
seq := s.c.nextSeq()
flags := binary.DynamicProtoMessage{}
for i := 3; i <= 29; i++ {
flags[uint64(i)] = uint32(1)
@ -164,13 +187,12 @@ func (s *GuildService) GetUserProfile(tinyId uint64) (*GuildUserProfile, error)
3: tinyId,
4: uint32(0),
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xfc9_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
rsp, err := s.c.uniCall("OidbSvcTrpcTcp.0xfc9_1", payload)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xfc9Rsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
// todo: 解析个性档案
@ -182,53 +204,68 @@ func (s *GuildService) GetUserProfile(tinyId uint64) (*GuildUserProfile, error)
}, nil
}
func (s *GuildService) GetGuildMembers(guildId uint64) (bots []*GuildMemberInfo, members []*GuildMemberInfo, admins []*GuildMemberInfo, err error) {
seq := s.c.nextSeq()
// FetchGuildMemberListWithRole 获取频道成员列表
// 第一次请求: startIndex = 0 , roleIdIndex = 2 param = ""
// 后续请求请根据上次请求的返回值进行设置
func (s *GuildService) FetchGuildMemberListWithRole(guildId, channelId uint64, startIndex uint32, roleIdIndex uint64, param string) (*FetchGuildMemberListWithRoleResult, error) {
u1 := uint32(1)
// todo: 这个包实际上是 fetchMemberListWithRole , 可以按channel, role等规则获取成员列表, 还需要修改
payload := s.c.packOIDBPackageDynamically(3931, 1, binary.DynamicProtoMessage{ // todo: 可能还需要处理翻页的情况?
m := binary.DynamicProtoMessage{
1: guildId, // guild id
2: uint32(3),
3: uint32(0),
4: binary.DynamicProtoMessage{ // unknown param, looks like flags
1: u1, 2: u1, 3: u1, 4: u1, 5: u1, 6: u1, 7: u1, 8: u1, 20: u1,
},
6: uint32(0),
8: uint32(500), // count
14: uint32(2),
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf5b_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
6: startIndex,
8: uint32(50), // count
12: channelId,
}
if param != "" {
m[13] = param
}
m[14] = roleIdIndex
rsp, err := s.c.uniCall("OidbSvcTrpcTcp.0xf5b_1", s.c.packOIDBPackageDynamically(3931, 1, m))
if err != nil {
return nil, nil, nil, errors.Wrap(err, "send packet error")
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf5BRsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
return nil, nil, nil, errors.Wrap(err, "decode packet error")
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
protoToMemberInfo := func(mem *channel.GuildMemberInfo) *GuildMemberInfo {
return &GuildMemberInfo{
var ret []*GuildMemberInfo
for _, memberWithRole := range body.MemberWithRoles {
for _, mem := range memberWithRole.Members {
ret = append(ret, &GuildMemberInfo{
TinyId: mem.GetTinyId(),
Title: mem.GetTitle(),
Nickname: mem.GetNickname(),
LastSpeakTime: mem.GetLastSpeakTime(),
Role: memberWithRole.GetRoleId(),
RoleName: memberWithRole.GetRoleName(),
})
}
}
for _, mem := range body.Members {
ret = append(ret, &GuildMemberInfo{
TinyId: mem.GetTinyId(),
Title: mem.GetTitle(),
Nickname: mem.GetNickname(),
LastSpeakTime: mem.GetLastSpeakTime(),
Role: mem.GetRole(),
}
Role: 1,
RoleName: "普通成员",
})
}
for _, mem := range body.Bots {
bots = append(bots, protoToMemberInfo(mem))
}
for _, mem := range body.Members {
members = append(members, protoToMemberInfo(mem))
}
for _, mem := range body.AdminInfo.Admins {
admins = append(admins, protoToMemberInfo(mem))
}
return
return &FetchGuildMemberListWithRoleResult{
Members: ret,
NextIndex: body.GetNextIndex(),
NextRoleId: body.GetNextRoleIdIndex(),
NextQueryParam: body.GetNextQueryParam(),
Finished: body.NextIndex == nil,
}, nil
}
func (s *GuildService) GetGuildMemberProfileInfo(guildId, tinyId uint64) (*GuildUserProfile, error) {
seq := s.c.nextSeq()
// FetchGuildMemberProfileInfo 获取单个频道成员资料
func (s *GuildService) FetchGuildMemberProfileInfo(guildId, tinyId uint64) (*GuildUserProfile, error) {
flags := binary.DynamicProtoMessage{}
for i := 3; i <= 29; i++ {
flags[uint64(i)] = uint32(1)
@ -240,26 +277,138 @@ func (s *GuildService) GetGuildMemberProfileInfo(guildId, tinyId uint64) (*Guild
3: tinyId,
4: guildId,
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf88_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
rsp, err := s.c.uniCall("OidbSvcTrpcTcp.0xf88_1", payload)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf88Rsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
roles, err := s.fetchMemberRoles(guildId, tinyId)
if err != nil {
return nil, errors.Wrap(err, "fetch roles error")
}
// todo: 解析个性档案
return &GuildUserProfile{
TinyId: tinyId,
Nickname: body.Profile.GetNickname(),
AvatarUrl: body.Profile.GetAvatarUrl(),
JoinTime: body.Profile.GetJoinTime(),
Roles: roles,
}, nil
}
func (s *GuildService) GetGuildRoles(guildId uint64) ([]*GuildRole, error) {
req := s.c.uniRequest("OidbSvcTrpcTcp.0x1019_1",
s.c.packOIDBPackageDynamically(4121, 1, binary.DynamicProtoMessage{1: guildId}), nil)
rsp, err := s.c.call(req)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0X1019Rsp)
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
roles := make([]*GuildRole, 0, len(body.GetRoles()))
for _, role := range body.GetRoles() {
roles = append(roles, &GuildRole{
RoleId: role.GetRoleId(),
RoleName: role.GetName(),
ArgbColor: role.GetArgbColor(),
Independent: role.GetIndependent() == 1,
Num: role.GetNum(),
Owned: role.GetOwned() == 1,
Disabled: role.GetDisabled() == 1,
MaxNum: role.GetMaxNum(),
})
}
return roles, nil
}
func (s *GuildService) CreateGuildRole(guildId uint64, name string, color uint32, independent bool, initialUsers []uint64) (uint64, error) {
u1 := uint32(1)
req := s.c.uniRequest("OidbSvcTrpcTcp.0x1016_1", s.c.packOIDBPackageDynamically(4118, 1, binary.DynamicProtoMessage{
1: guildId,
2: binary.DynamicProtoMessage{ // todo: 未知参数
1: u1,
2: u1,
3: u1,
},
3: binary.DynamicProtoMessage{
1: name,
2: color,
3: independent,
},
4: initialUsers,
}), nil)
rsp, err := s.c.call(req)
if err != nil {
return 0, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0X1016Rsp)
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return 0, errors.Wrap(err, "decode packet error")
}
return body.GetRoleId(), nil
}
func (s *GuildService) DeleteGuildRole(guildId uint64, roleId uint64) error {
req := s.c.uniRequest("OidbSvcTrpcTcp.0x100e_1", s.c.packOIDBPackageDynamically(4110, 1, binary.DynamicProtoMessage{
1: guildId,
2: roleId,
}), nil)
_, err := s.c.call(req)
if err != nil {
return errors.Wrap(err, "send packet error")
}
return nil
}
func (s *GuildService) SetUserRoleInGuild(guildId uint64, set bool, roleId uint64, user []uint64) error { // remove => p2 = false
setOrRemove := binary.DynamicProtoMessage{
1: roleId,
}
if set {
setOrRemove[2] = user
} else {
setOrRemove[3] = user
}
req := s.c.uniRequest("OidbSvcTrpcTcp.0x101a_1", s.c.packOIDBPackageDynamically(4122, 1, binary.DynamicProtoMessage{
1: guildId,
2: setOrRemove,
}), nil)
_, err := s.c.call(req)
if err != nil {
return errors.Wrap(err, "send packet error")
}
return nil
}
func (s *GuildService) ModifyRoleInGuild(guildId uint64, roleId uint64, name string, color uint32, indepedent bool) error {
u1 := uint32(1)
req := s.c.uniRequest("OidbSvcTrpcTcp.0x100d_1", s.c.packOIDBPackageDynamically(4109, 1, binary.DynamicProtoMessage{
1: guildId,
2: roleId,
3: binary.DynamicProtoMessage{
1: u1,
2: u1,
3: u1,
},
4: binary.DynamicProtoMessage{
1: name,
2: color,
3: indepedent,
},
}), nil)
_, err := s.c.call(req)
if err != nil {
return errors.Wrap(err, "send packet error")
}
return nil
}
func (s *GuildService) FetchGuestGuild(guildId uint64) (*GuildMeta, error) {
seq := s.c.nextSeq()
u1 := uint32(1)
payload := s.c.packOIDBPackageDynamically(3927, 9, binary.DynamicProtoMessage{
1: binary.DynamicProtoMessage{
@ -275,13 +424,13 @@ func (s *GuildService) FetchGuestGuild(guildId uint64) (*GuildMeta, error) {
1: guildId,
},
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf57_9", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
req := s.c.uniRequest("OidbSvcTrpcTcp.0xf57_9", payload, nil)
rsp, err := s.c.call(req)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf57Rsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
return &GuildMeta{
@ -297,15 +446,20 @@ func (s *GuildService) FetchGuestGuild(guildId uint64) (*GuildMeta, error) {
}
func (s *GuildService) FetchChannelList(guildId uint64) (r []*ChannelInfo, e error) {
seq := s.c.nextSeq()
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf5d_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key,
s.c.packOIDBPackageDynamically(3933, 1, binary.DynamicProtoMessage{1: guildId, 3: binary.DynamicProtoMessage{1: uint32(1)}}))
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
req := s.c.uniRequest("OidbSvcTrpcTcp.0xf5d_1",
s.c.packOIDBPackageDynamically(3933, 1,
binary.DynamicProtoMessage{
1: guildId,
3: binary.DynamicProtoMessage{
1: uint32(1),
},
}), nil)
rsp, err := s.c.call(req)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf5DRsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
for _, info := range body.Rsp.Channels {
@ -315,20 +469,186 @@ func (s *GuildService) FetchChannelList(guildId uint64) (r []*ChannelInfo, e err
}
func (s *GuildService) FetchChannelInfo(guildId, channelId uint64) (*ChannelInfo, error) {
seq := s.c.nextSeq()
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf55_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key,
s.c.packOIDBPackageDynamically(3925, 1, binary.DynamicProtoMessage{1: guildId, 2: channelId}))
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
req := s.c.uniRequest("OidbSvcTrpcTcp.0xf55_1",
s.c.packOIDBPackageDynamically(3925, 1, binary.DynamicProtoMessage{
1: guildId,
2: channelId,
}), nil)
rsp, err := s.c.call(req)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0Xf55Rsp)
if err = s.c.unpackOIDBPackage(rsp, body); err != nil {
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
return convertChannelInfo(body.Info), nil
}
func (s *GuildService) GetTopicChannelFeeds(guildId, channelId uint64) ([]*topic.Feed, error) {
guild := s.FindGuild(guildId)
if guild == nil {
return nil, errors.New("guild not found")
}
channelInfo := guild.FindChannel(channelId)
if channelInfo == nil {
return nil, errors.New("channel not found")
}
if channelInfo.ChannelType != ChannelTypeTopic {
return nil, errors.New("channel type error")
}
req, _ := proto.Marshal(&channel.StGetChannelFeedsReq{
Count: proto.Uint32(12),
From: proto.Uint32(0),
ChannelSign: &channel.StChannelSign{
GuildId: &guildId,
ChannelId: &channelId,
},
FeedAttchInfo: proto.String(""), // isLoadMore
})
payload, _ := proto.Marshal(&qweb.QWebReq{
Seq: proto.Int64(s.c.nextQWebSeq()),
Qua: proto.String("V1_AND_SQ_8.8.50_2324_YYB_D"),
DeviceInfo: proto.String(s.c.getWebDeviceInfo()),
BusiBuff: req,
TraceId: proto.String(fmt.Sprintf("%v_%v_%v", s.c.Uin, time.Now().Format("0102150405"), rand.Int63())),
Extinfo: []*qweb.COMMEntry{
{
Key: proto.String("fc-appid"),
Value: proto.String("96"),
},
{
Key: proto.String("environment_id"),
Value: proto.String("production"),
},
{
Key: proto.String("tiny_id"),
Value: proto.String(fmt.Sprint(s.TinyId)),
},
},
})
call := s.c.uniRequest("QChannelSvr.trpc.qchannel.commreader.ComReader.GetChannelTimelineFeeds", payload, nil)
rsp, err := s.c.call(call)
if err != nil {
return nil, errors.New("send packet error")
}
pkg := new(qweb.QWebRsp)
body := new(channel.StGetChannelFeedsRsp)
if err = proto.Unmarshal(rsp.Body, pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err = proto.Unmarshal(pkg.BusiBuff, body); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
feeds := make([]*topic.Feed, 0, len(body.VecFeed))
for _, f := range body.VecFeed {
feeds = append(feeds, topic.DecodeFeed(f))
}
return feeds, nil
}
func (s *GuildService) PostTopicChannelFeed(guildId, channelId uint64, feed *topic.Feed) error {
guild := s.FindGuild(guildId)
if guild == nil {
return errors.New("guild not found")
}
channelInfo := guild.FindChannel(channelId)
if channelInfo == nil {
return errors.New("channel not found")
}
if channelInfo.ChannelType != ChannelTypeTopic {
return errors.New("channel type error")
}
feed.Poster = &topic.FeedPoster{
TinyIdStr: strconv.FormatUint(s.TinyId, 10),
Nickname: s.Nickname,
}
feed.GuildId = guildId
feed.ChannelId = channelId
req, _ := proto.Marshal(&channel.StPublishFeedReq{
ExtInfo: &channel.StCommonExt{
MapInfo: []*channel.CommonEntry{
{
Key: proto.String("clientkey"), Value: proto.String("GuildMain" + utils.RandomStringRange(14, "0123456789")),
},
},
},
From: proto.Int32(0),
JsonFeed: proto.String(feed.ToSendingPayload(s.c.Uin)),
})
payload, _ := proto.Marshal(&qweb.QWebReq{
Seq: proto.Int64(s.c.nextQWebSeq()),
Qua: proto.String("V1_AND_SQ_8.8.50_2324_YYB_D"),
DeviceInfo: proto.String(s.c.getWebDeviceInfo()),
BusiBuff: req,
TraceId: proto.String(fmt.Sprintf("%v_%v_%v", s.c.Uin, time.Now().Format("0102150405"), rand.Int63())),
Extinfo: []*qweb.COMMEntry{
{
Key: proto.String("fc-appid"),
Value: proto.String("96"),
},
{
Key: proto.String("environment_id"),
Value: proto.String("production"),
},
{
Key: proto.String("tiny_id"),
Value: proto.String(fmt.Sprint(s.TinyId)),
},
},
})
rsp, err := s.c.call(s.c.uniRequest("QChannelSvr.trpc.qchannel.commwriter.ComWriter.PublishFeed", payload, nil))
if err != nil {
return errors.New("send packet error")
}
pkg := new(qweb.QWebRsp)
body := new(channel.StPublishFeedRsp)
if err = proto.Unmarshal(rsp.Body, pkg); err != nil {
return errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err = proto.Unmarshal(pkg.BusiBuff, body); err != nil {
return errors.Wrap(err, "failed to unmarshal protobuf message")
}
if body.Feed != nil && body.Feed.Id != nil {
return nil
}
return errors.New("post feed error")
}
func (s *GuildService) fetchMemberRoles(guildId uint64, tinyId uint64) ([]*GuildRole, error) {
u1 := uint32(1)
req := s.c.uniRequest("OidbSvcTrpcTcp.0x1017_1", s.c.packOIDBPackageDynamically(4119, 1, binary.DynamicProtoMessage{
1: guildId,
2: tinyId,
4: binary.DynamicProtoMessage{
1: u1,
2: u1,
3: u1,
},
}), nil)
rsp, err := s.c.call(req)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.ChannelOidb0X1017Rsp)
if err = unpackOIDBPackage(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "decode packet error")
}
p1 := body.GetP1()
if p1 == nil {
return nil, errors.New("packet OidbSvcTrpcTcp.0x1017_1: decode p1 error")
}
roles := make([]*GuildRole, 0, len(p1.GetRoles()))
for _, role := range p1.GetRoles() {
roles = append(roles, &GuildRole{
RoleId: role.GetRoleId(),
RoleName: role.GetName(),
ArgbColor: role.GetArgbColor(),
})
}
return roles, nil
}
/* need analysis
func (s *GuildService) fetchChannelListState(guildId uint64, channels []*ChannelInfo) {
seq := s.c.nextSeq()
@ -342,13 +662,13 @@ func (s *GuildService) fetchChannelListState(guildId uint64, channels []*Channel
2: ids,
},
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0x1008_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0x1008_1", 1, s.c.SessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return
}
pkg := new(oidb.OIDBSSOPkg)
if err = protobuf.Unmarshal(rsp, pkg); err != nil {
if err = proto.Unmarshal(rsp, pkg); err != nil {
return //nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
}
@ -383,17 +703,18 @@ func convertChannelInfo(info *channel.GuildChannelInfo) *ChannelInfo {
NotifyType: uint32(info.GetFinalNotifyType()),
ChannelType: ChannelType(info.GetChannelType()),
Meta: meta,
fetchTime: time.Now().Unix(),
}
}
func (c *QQClient) syncChannelFirstView() {
rsp, err := c.sendAndWaitDynamic(c.buildSyncChannelFirstViewPacket())
rsp, err := c.call(c.buildSyncChannelFirstViewPacket())
if err != nil {
c.Error("sync channel error: %v", err)
return
}
firstViewRsp := new(channel.FirstViewRsp)
if err = protobuf.Unmarshal(rsp, firstViewRsp); err != nil {
if err = proto.Unmarshal(rsp.Body, firstViewRsp); err != nil {
return
}
c.GuildService.TinyId = firstViewRsp.GetSelfTinyid()
@ -406,21 +727,19 @@ func (c *QQClient) syncChannelFirstView() {
}
}
func (c *QQClient) buildSyncChannelFirstViewPacket() (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildSyncChannelFirstViewPacket() *network.Request {
req := &channel.FirstViewReq{
LastMsgTime: proto.Uint64(0),
Seq: proto.Uint32(0),
DirectMessageFlag: proto.Uint32(1),
}
payload, _ := protobuf.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "trpc.group_pro.synclogic.SyncLogic.SyncFirstView", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, payload)
return seq, packet
payload, _ := proto.Marshal(req)
return c.uniRequest("trpc.group_pro.synclogic.SyncLogic.SyncFirstView", payload, nil)
}
func decodeGuildPushFirstView(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGuildPushFirstView(c *QQClient, resp *network.Response) (interface{}, error) {
firstViewMsg := new(channel.FirstViewMsg)
if err := protobuf.Unmarshal(payload, firstViewMsg); err != nil {
if err := proto.Unmarshal(resp.Body, firstViewMsg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(firstViewMsg.GuildNodes) > 0 {
@ -438,7 +757,7 @@ func decodeGuildPushFirstView(c *QQClient, _ *incomingPacketInfo, payload []byte
c.Warning("waring: fetch guild %v channel error %v. will use sync node to fill channel list field", guild.GuildId, err)
for _, node := range guild.ChannelNodes {
meta := new(channel.ChannelMsgMeta)
_ = protobuf.Unmarshal(node.Meta, meta)
_ = proto.Unmarshal(node.Meta, meta)
info.Channels = append(info.Channels, &ChannelInfo{
ChannelId: node.GetChannelId(),
ChannelName: utils.B2S(node.ChannelName),
@ -452,12 +771,11 @@ func decodeGuildPushFirstView(c *QQClient, _ *incomingPacketInfo, payload []byte
} else {
info.Channels = channels
}
info.Bots, info.Members, info.Admins, _ = c.GuildService.GetGuildMembers(info.GuildId)
// info.Bots, info.Members, info.Admins, _ = c.GuildService.GetGuildMembers(info.GuildId)
c.GuildService.Guilds = append(c.GuildService.Guilds, info)
}
}
if len(firstViewMsg.ChannelMsgs) > 0 { // sync msg
}
return nil, nil
}

View File

@ -1,34 +1,55 @@
package client
import (
"sync"
"time"
"github.com/pkg/errors"
protobuf "github.com/segmentio/encoding/proto"
"github.com/pierrec/lz4/v4"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/channel"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/Mrs4s/MiraiGo/internal/protobuf/proto"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/channel"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/internal/proto"
)
func init() {
decoders["MsgPush.PushGroupProMsg"] = decodeGuildEventFlowPacket
}
func decodeGuildEventFlowPacket(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
var updateChanLock sync.Mutex
type tipsPushInfo struct {
TinyId uint64
// TargetMessageSenderUin int64
GuildId uint64
ChannelId uint64
}
func decodeGuildEventFlowPacket(c *QQClient, resp *network.Response) (interface{}, error) {
push := new(channel.MsgOnlinePush)
if err := protobuf.Unmarshal(payload, push); err != nil {
if err := proto.Unmarshal(resp.Body, push); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if push.GetCompressFlag() == 1 && len(push.CompressMsg) > 0 {
press := new(channel.PressMsg)
dst := make([]byte, len(push.CompressMsg)*2)
i, err := lz4.UncompressBlock(push.CompressMsg, dst)
for times := 0; err != nil && err.Error() == "lz4: invalid source or destination buffer too short" && times < 5; times++ {
dst = append(dst, make([]byte, 1024)...)
i, err = lz4.UncompressBlock(push.CompressMsg, dst)
}
if err != nil {
return nil, errors.Wrap(err, "failed to decompress guild event packet")
}
if err = proto.Unmarshal(dst[:i], press); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
push.Msgs = press.Msgs
}
for _, m := range push.Msgs {
if m.Head.ContentHead.GetType() == 3841 {
type tipsPushInfo struct {
TinyId uint64
TargetMessageSenderUin int64
GuildId uint64
ChannelId uint64
}
// todo: 回头 event flow 的处理移出去重构下逻辑, 先暂时这样方便改
var common *msg.CommonElem
if m.Body != nil {
@ -41,90 +62,179 @@ func decodeGuildEventFlowPacket(c *QQClient, _ *incomingPacketInfo, payload []by
}
if m.Head.ContentHead.GetSubType() == 2 { // todo: tips?
if common == nil { // empty tips
}
tipsInfo := &tipsPushInfo{
TinyId: m.Head.RoutingHead.GetFromTinyid(),
GuildId: m.Head.RoutingHead.GetGuildId(),
ChannelId: m.Head.RoutingHead.GetChannelId(),
}
if len(m.CtrlHead.IncludeUin) > 0 {
tipsInfo.TargetMessageSenderUin = int64(m.CtrlHead.IncludeUin[0])
}
/*
if len(m.CtrlHead.IncludeUin) > 0 {
tipsInfo.TargetMessageSenderUin = int64(m.CtrlHead.IncludeUin[0])
}
*/
return tipsInfo, nil
}
if common == nil || common.GetServiceType() != 500 {
continue
}
eventBody := new(channel.EventBody)
if err := protobuf.Unmarshal(common.PbElem, eventBody); err != nil {
if err := proto.Unmarshal(common.PbElem, eventBody); err != nil {
c.Error("failed to unmarshal guild channel event body: %v", err)
continue
}
if eventBody.UpdateMsg != nil {
if eventBody.UpdateMsg.GetEventType() == 1 || eventBody.UpdateMsg.GetEventType() == 2 { // todo: 撤回消息
continue
}
if eventBody.UpdateMsg.GetEventType() == 4 { // 消息贴表情更新 (包含添加或删除)
t, err := c.GuildService.pullRoamMsgByEventFlow(m.Head.RoutingHead.GetGuildId(), m.Head.RoutingHead.GetChannelId(), eventBody.UpdateMsg.GetMsgSeq(), eventBody.UpdateMsg.GetMsgSeq(), eventBody.UpdateMsg.GetEventVersion()-1)
if err != nil || len(t) == 0 {
c.Error("process guild event flow error: pull eventMsg message error: %v", err)
continue
}
// 自己的消息被贴表情会单独推送一个tips, 这里不需要解析
if t[0].Head.RoutingHead.GetFromTinyid() == c.GuildService.TinyId {
continue
}
updatedEvent := &GuildMessageReactionsUpdatedEvent{
GuildId: m.Head.RoutingHead.GetGuildId(),
ChannelId: m.Head.RoutingHead.GetChannelId(),
MessageId: t[0].Head.ContentHead.GetSeq(),
CurrentReactions: decodeGuildMessageEmojiReactions(t[0]),
}
tipsInfo, err := c.waitPacketTimeoutSyncF("MsgPush.PushGroupProMsg", time.Second, func(i interface{}) bool {
if i == nil {
return false
}
_, ok := i.(*tipsPushInfo)
return ok
})
if err == nil {
updatedEvent.OperatorId = tipsInfo.(*tipsPushInfo).TinyId
updatedEvent.MessageSenderUin = tipsInfo.(*tipsPushInfo).TargetMessageSenderUin
}
c.dispatchGuildMessageReactionsUpdatedEvent(updatedEvent)
}
}
c.processGuildEventBody(m, eventBody)
continue
}
if cm := c.parseGuildChannelMessage(m); cm != nil {
c.dispatchGuildChannelMessage(cm)
if m.Head.ContentHead.GetType() == 3840 {
if m.Head.RoutingHead.GetDirectMessageFlag() == 1 {
// todo: direct message decode
continue
}
if m.Head.RoutingHead.GetFromTinyid() == c.GuildService.TinyId {
continue
}
if cm := c.GuildService.parseGuildChannelMessage(m); cm != nil {
c.dispatchGuildChannelMessage(cm)
}
}
}
return nil, nil
}
func (s *GuildService) pullRoamMsgByEventFlow(guildId, channelId, beginSeq, endSeq, eventVersion uint64) ([]*channel.ChannelMsgContent, error) {
payload, _ := protobuf.Marshal(&channel.ChannelMsgReq{
ChannelParam: &channel.ChannelParam{
GuildId: &guildId,
ChannelId: &channelId,
BeginSeq: &beginSeq,
EndSeq: &endSeq,
Version: []uint64{eventVersion},
},
WithVersionFlag: proto.Uint32(1),
DirectMessageFlag: proto.Uint32(0),
})
seq := s.c.nextSeq()
packet := packets.BuildUniPacket(s.c.Uin, seq, "trpc.group_pro.synclogic.SyncLogic.GetChannelMsg", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
func (c *QQClient) processGuildEventBody(m *channel.ChannelMsgContent, eventBody *channel.EventBody) {
var guild *GuildInfo
if m.Head.RoutingHead.GetGuildId() != 0 {
if guild = c.GuildService.FindGuild(m.Head.RoutingHead.GetGuildId()); guild == nil {
c.Warning("process channel event error: guild not found.")
return
}
}
msgRsp := new(channel.ChannelMsgRsp)
if err = protobuf.Unmarshal(rsp, msgRsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
switch {
case eventBody.CreateChan != nil:
for _, chanId := range eventBody.CreateChan.CreateId {
if guild.FindChannel(chanId.GetChanId()) != nil {
continue
}
channelInfo, err := c.GuildService.FetchChannelInfo(guild.GuildId, chanId.GetChanId())
if err != nil {
c.Warning("process create channel event error: fetch channel info error: %v", err)
continue
}
guild.Channels = append(guild.Channels, channelInfo)
c.dispatchGuildChannelCreatedEvent(&GuildChannelOperationEvent{
OperatorId: m.Head.RoutingHead.GetFromTinyid(),
GuildId: m.Head.RoutingHead.GetGuildId(),
ChannelInfo: channelInfo,
})
}
case eventBody.DestroyChan != nil:
for _, chanId := range eventBody.DestroyChan.DeleteId {
channelInfo := guild.FindChannel(chanId.GetChanId())
if channelInfo == nil {
continue
}
guild.removeChannel(chanId.GetChanId())
c.dispatchGuildChannelDestroyedEvent(&GuildChannelOperationEvent{
OperatorId: m.Head.RoutingHead.GetFromTinyid(),
GuildId: guild.GuildId,
ChannelInfo: channelInfo,
})
}
case eventBody.ChangeChanInfo != nil:
updateChanLock.Lock()
defer updateChanLock.Unlock()
oldInfo := guild.FindChannel(eventBody.ChangeChanInfo.GetChanId())
if oldInfo == nil {
info, err := c.GuildService.FetchChannelInfo(m.Head.RoutingHead.GetGuildId(), eventBody.ChangeChanInfo.GetChanId())
if err != nil {
c.Error("error to decode channel info updated event: fetch channel info failed: %v", err)
return
}
guild.Channels = append(guild.Channels, info)
oldInfo = info
}
if time.Now().Unix()-oldInfo.fetchTime <= 2 {
return
}
newInfo, err := c.GuildService.FetchChannelInfo(m.Head.RoutingHead.GetGuildId(), eventBody.ChangeChanInfo.GetChanId())
if err != nil {
c.Error("error to decode channel info updated event: fetch channel info failed: %v", err)
return
}
for i := range guild.Channels {
if guild.Channels[i].ChannelId == newInfo.ChannelId {
guild.Channels[i] = newInfo
break
}
}
c.dispatchGuildChannelUpdatedEvent(&GuildChannelUpdatedEvent{
OperatorId: m.Head.RoutingHead.GetFromTinyid(),
GuildId: m.Head.RoutingHead.GetGuildId(),
ChannelId: eventBody.ChangeChanInfo.GetChanId(),
OldChannelInfo: oldInfo,
NewChannelInfo: newInfo,
})
case eventBody.JoinGuild != nil:
/* 应该不会重复推送把, 不会吧不会吧
if mem := guild.FindMember(eventBody.JoinGuild.GetMemberTinyid()); mem != nil {
c.Info("ignore join guild event: member %v already exists", mem.TinyId)
return
}
*/
profile, err := c.GuildService.FetchGuildMemberProfileInfo(guild.GuildId, eventBody.JoinGuild.GetMemberTinyid())
if err != nil {
c.Error("error to decode member join guild event: get member profile error: %v", err)
return
}
info := &GuildMemberInfo{
TinyId: profile.TinyId,
Nickname: profile.Nickname,
}
// guild.Members = append(guild.Members, info)
c.dispatchMemberJoinedGuildEvent(&MemberJoinGuildEvent{
Guild: guild,
Member: info,
})
case eventBody.UpdateMsg != nil:
if eventBody.UpdateMsg.GetEventType() == 1 || eventBody.UpdateMsg.GetEventType() == 2 {
c.dispatchGuildMessageRecalledEvent(&GuildMessageRecalledEvent{
OperatorId: eventBody.UpdateMsg.GetOperatorTinyid(),
GuildId: m.Head.RoutingHead.GetGuildId(),
ChannelId: m.Head.RoutingHead.GetChannelId(),
MessageId: eventBody.UpdateMsg.GetMsgSeq(),
RecallTime: int64(m.Head.ContentHead.GetTime()),
})
return
}
if eventBody.UpdateMsg.GetEventType() == 4 { // 消息贴表情更新 (包含添加或删除)
t, err := c.GuildService.pullChannelMessages(m.Head.RoutingHead.GetGuildId(), m.Head.RoutingHead.GetChannelId(), eventBody.UpdateMsg.GetMsgSeq(), eventBody.UpdateMsg.GetMsgSeq(), eventBody.UpdateMsg.GetEventVersion()-1, false)
if err != nil || len(t) == 0 {
c.Error("process guild event flow error: pull eventMsg message error: %v", err)
return
}
// 自己的消息被贴表情会单独推送一个tips, 这里不需要解析
if t[0].Head.RoutingHead.GetFromTinyid() == c.GuildService.TinyId {
return
}
updatedEvent := &GuildMessageReactionsUpdatedEvent{
GuildId: m.Head.RoutingHead.GetGuildId(),
ChannelId: m.Head.RoutingHead.GetChannelId(),
MessageId: t[0].Head.ContentHead.GetSeq(),
CurrentReactions: decodeGuildMessageEmojiReactions(t[0]),
}
tipsInfo, err := c.waitPacketTimeoutSyncF("MsgPush.PushGroupProMsg", time.Second, func(i interface{}) bool {
if i == nil {
return false
}
_, ok := i.(*tipsPushInfo)
return ok
})
if err == nil {
updatedEvent.OperatorId = tipsInfo.(*tipsPushInfo).TinyId
// updatedEvent.MessageSenderUin = tipsInfo.(*tipsPushInfo).TargetMessageSenderUin
}
c.dispatchGuildMessageReactionsUpdatedEvent(updatedEvent)
}
}
return msgRsp.ChannelMsg.Msgs, nil
}

View File

@ -1,26 +1,50 @@
package client
import (
"bytes"
"encoding/hex"
"image"
"io"
"math/rand"
"strconv"
protobuf "github.com/segmentio/encoding/proto"
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x388"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/channel"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/internal/highway"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/channel"
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x388"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/client/pb/pttcenter"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
)
func (s *GuildService) SendGuildChannelMessage(guildId, channelId uint64, m *message.SendingMessage) error {
type guildImageUploadResponse struct {
UploadKey []byte
UploadIp []uint32
UploadPort []uint32
Width int32
Height int32
Message string
DownloadIndex string
FileId int64
ResultCode int32
IsExists bool
}
func (s *GuildService) SendGuildChannelMessage(guildId, channelId uint64, m *message.SendingMessage) (*message.GuildChannelMessage, error) {
mr := rand.Uint32() // 客户端似乎是生成的 u32 虽然类型是u64
for _, elem := range m.Elements {
if elem.Type() == message.At {
at := elem.(*message.AtElement)
if at.SubType == message.AtTypeGroupMember {
at.SubType = message.AtTypeGuildMember
}
}
}
req := &channel.DF62ReqBody{Msg: &channel.ChannelMsgContent{
Head: &channel.ChannelMsgHead{
RoutingHead: &channel.ChannelRoutingHead{
@ -39,33 +63,172 @@ func (s *GuildService) SendGuildChannelMessage(guildId, channelId uint64, m *mes
},
},
}}
seq := s.c.nextSeq()
payload, _ := protobuf.Marshal(req)
packet := packets.BuildUniPacket(s.c.Uin, seq, "MsgProxy.SendMsg", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
payload, _ := proto.Marshal(req)
rsp, err := s.c.uniCall("MsgProxy.SendMsg", payload)
if err != nil {
return errors.Wrap(err, "send packet error")
return nil, errors.Wrap(err, "send packet error")
}
body := new(channel.DF62RspBody)
if err = protobuf.Unmarshal(rsp, body); err != nil {
return errors.Wrap(err, "failed to unmarshal protobuf message")
if err = proto.Unmarshal(rsp.Body, body); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if body.GetResult() != 0 {
return errors.Errorf("send channel message error: server response %v", body.GetResult())
return nil, errors.Errorf("send channel message error: server response %v", body.GetResult())
}
// todo: 返回 *message.GuildMessage
return nil
elements := m.Elements
if body.Body != nil && body.Body.RichText != nil {
elements = message.ParseMessageElems(body.Body.RichText.Elems)
}
return &message.GuildChannelMessage{
Id: body.Head.ContentHead.GetSeq(),
InternalId: body.Head.ContentHead.GetRandom(),
GuildId: guildId,
ChannelId: channelId,
Time: int64(body.GetSendTime()),
Sender: &message.GuildSender{
TinyId: body.Head.RoutingHead.GetFromTinyid(),
Nickname: s.Nickname,
},
Elements: elements,
}, nil
}
func (s *GuildService) QueryImage(guildId, channelId uint64, hash []byte, size uint64) (*message.GuildImageElement, error) {
seq := s.c.nextSeq()
payload, _ := protobuf.Marshal(&cmd0x388.D388ReqBody{
rsp, err := s.c.callAndDecode(s.c.buildGuildImageStorePacket(guildId, channelId, hash, size))
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := rsp.(*guildImageUploadResponse)
if body.IsExists {
return &message.GuildImageElement{
FileId: body.FileId,
FilePath: hex.EncodeToString(hash) + ".jpg",
Size: int32(size),
DownloadIndex: body.DownloadIndex,
Width: body.Width,
Height: body.Height,
Md5: hash,
}, nil
}
return nil, errors.New("image is not exists")
}
func (s *GuildService) UploadGuildImage(guildId, channelId uint64, img io.ReadSeeker) (*message.GuildImageElement, error) {
_, _ = img.Seek(0, io.SeekStart) // safe
fh, length := utils.ComputeMd5AndLength(img)
_, _ = img.Seek(0, io.SeekStart)
rsp, err := s.c.callAndDecode(s.c.buildGuildImageStorePacket(guildId, channelId, fh, uint64(length)))
if err != nil {
return nil, err
}
body := rsp.(*guildImageUploadResponse)
if body.IsExists {
goto ok
}
if s.c.highwaySession.AddrLength() == 0 {
for i, addr := range body.UploadIp {
s.c.highwaySession.AppendAddr(addr, body.UploadPort[i])
}
}
if _, err = s.c.highwaySession.UploadBDH(highway.BdhInput{
CommandID: 83,
Body: img,
Ticket: body.UploadKey,
Ext: binary.DynamicProtoMessage{11: guildId, 12: channelId}.Encode(),
Encrypt: false,
}); err == nil {
goto ok
}
return nil, errors.Wrap(err, "highway upload error")
ok:
_, _ = img.Seek(0, io.SeekStart)
i, _, err := image.DecodeConfig(img)
var imageType int32 = 1000
_, _ = img.Seek(0, io.SeekStart)
tmp := make([]byte, 4)
_, _ = img.Read(tmp)
if bytes.Equal(tmp, []byte{0x47, 0x49, 0x46, 0x38}) {
imageType = 2000
}
width := int32(i.Width)
height := int32(i.Height)
if err != nil {
s.c.Warning("waring: decode image error: %v. this image will be displayed by wrong size in pc guild client", err)
width = 200
height = 200
}
return &message.GuildImageElement{
FileId: body.FileId,
FilePath: hex.EncodeToString(fh) + ".jpg",
Size: int32(length),
DownloadIndex: body.DownloadIndex,
Width: width,
Height: height,
ImageType: imageType,
Md5: fh,
}, nil
}
func (s *GuildService) PullGuildChannelMessage(guildId, channelId, beginSeq, endSeq uint64) (r []*message.GuildChannelMessage, e error) {
contents, err := s.pullChannelMessages(guildId, channelId, beginSeq, endSeq, 0, false)
if err != nil {
return nil, errors.Wrap(err, "pull channel message error")
}
for _, c := range contents {
if cm := s.parseGuildChannelMessage(c); cm != nil {
cm.Reactions = decodeGuildMessageEmojiReactions(c)
r = append(r, cm)
}
}
if len(r) == 0 {
return nil, errors.New("message not found")
}
return
}
func (s *GuildService) pullChannelMessages(guildId, channelId, beginSeq, endSeq, eventVersion uint64, direct bool) ([]*channel.ChannelMsgContent, error) {
param := &channel.ChannelParam{
GuildId: &guildId,
ChannelId: &channelId,
BeginSeq: &beginSeq,
EndSeq: &endSeq,
}
if eventVersion != 0 {
param.Version = []uint64{eventVersion}
}
withVersionFlag := uint32(0)
if eventVersion != 0 {
withVersionFlag = 1
}
directFlag := uint32(0)
if direct {
directFlag = 1
}
payload, _ := proto.Marshal(&channel.ChannelMsgReq{
ChannelParam: param,
WithVersionFlag: &withVersionFlag,
DirectMessageFlag: &directFlag,
})
rsp, err := s.c.uniCall("trpc.group_pro.synclogic.SyncLogic.GetChannelMsg", payload)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
msgRsp := new(channel.ChannelMsgRsp)
if err = proto.Unmarshal(rsp.Body, msgRsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return msgRsp.ChannelMsg.Msgs, nil
}
func (c *QQClient) buildGuildImageStorePacket(guildId, channelId uint64, hash []byte, size uint64) *network.Request {
payload, _ := proto.Marshal(&cmd0x388.D388ReqBody{
NetType: proto.Uint32(3),
Subcmd: proto.Uint32(1),
TryupImgReq: []*cmd0x388.TryUpImgReq{
{
GroupCode: &channelId,
SrcUin: proto.Uint64(uint64(s.c.Uin)),
SrcUin: proto.Uint64(uint64(c.Uin)),
FileId: proto.Uint64(0),
FileMd5: hash,
FileSize: &size,
@ -83,28 +246,7 @@ func (s *GuildService) QueryImage(guildId, channelId uint64, hash []byte, size u
},
CommandId: proto.Uint32(83),
})
packet := packets.BuildUniPacket(s.c.Uin, seq, "ImgStore.QQMeetPicUp", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
if err != nil {
return nil, errors.Wrap(err, "send packet error")
}
body := new(cmd0x388.D388RspBody)
if err = protobuf.Unmarshal(rsp, body); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(body.TryupImgRsp) == 0 {
return nil, errors.New("response is empty")
}
if body.TryupImgRsp[0].GetFileExit() {
return &message.GuildImageElement{
FileId: body.TryupImgRsp[0].GetFileid(),
FilePath: hex.EncodeToString(hash) + ".jpg",
Size: int32(size),
DownloadIndex: string(body.TryupImgRsp[0].GetDownloadIndex()),
Md5: hash,
}, nil
}
return nil, errors.New("image is not exists")
return c.uniRequest("ImgStore.QQMeetPicUp", payload, decodeGuildImageStoreResponse)
}
func decodeGuildMessageEmojiReactions(content *channel.ChannelMsgContent) (r []*message.GuildMessageEmojiReaction) {
@ -120,10 +262,10 @@ func decodeGuildMessageEmojiReactions(content *channel.ChannelMsgContent) (r []*
return
}
serv38 := new(msg.MsgElemInfoServtype38)
_ = protobuf.Unmarshal(common.PbElem, serv38)
_ = proto.Unmarshal(common.PbElem, serv38)
if len(serv38.ReactData) > 0 {
cnt := new(channel.MsgCnt)
_ = protobuf.Unmarshal(serv38.ReactData, cnt)
_ = proto.Unmarshal(serv38.ReactData, cnt)
if len(cnt.EmojiReaction) == 0 {
return
}
@ -143,22 +285,127 @@ func decodeGuildMessageEmojiReactions(content *channel.ChannelMsgContent) (r []*
return
}
func (c *QQClient) parseGuildChannelMessage(msg *channel.ChannelMsgContent) *message.GuildChannelMessage {
guild := c.GuildService.FindGuild(msg.Head.RoutingHead.GetGuildId())
func decodeGuildImageStoreResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
body := new(cmd0x388.D388RspBody)
if err := proto.Unmarshal(resp.Body, body); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(body.TryupImgRsp) == 0 {
return nil, errors.New("response is empty")
}
rsp := body.TryupImgRsp[0]
if rsp.GetResult() != 0 {
return &guildImageUploadResponse{
ResultCode: int32(rsp.GetResult()),
Message: utils.B2S(rsp.GetFailMsg()),
}, nil
}
if rsp.GetFileExit() {
if rsp.ImgInfo != nil {
return &guildImageUploadResponse{IsExists: true, FileId: int64(rsp.GetFileid()), DownloadIndex: string(rsp.GetDownloadIndex()), Width: int32(rsp.ImgInfo.GetFileWidth()), Height: int32(rsp.ImgInfo.GetFileHeight())}, nil
}
return &guildImageUploadResponse{IsExists: true, FileId: int64(rsp.GetFileid()), DownloadIndex: string(rsp.GetDownloadIndex())}, nil
}
return &guildImageUploadResponse{
FileId: int64(rsp.GetFileid()),
UploadKey: rsp.UpUkey,
UploadIp: rsp.GetUpIp(),
UploadPort: rsp.GetUpPort(),
DownloadIndex: string(rsp.GetDownloadIndex()),
}, nil
}
func (s *GuildService) parseGuildChannelMessage(msg *channel.ChannelMsgContent) *message.GuildChannelMessage {
guild := s.FindGuild(msg.Head.RoutingHead.GetGuildId())
if guild == nil {
return nil // todo: sync guild info
}
if msg.Body == nil || msg.Body.RichText == nil {
return nil
}
// mem := guild.FindMember(msg.Head.RoutingHead.GetFromTinyid())
memberName := msg.ExtInfo.GetMemberName()
if memberName == nil {
memberName = msg.ExtInfo.GetFromNick()
}
return &message.GuildChannelMessage{
Id: msg.Head.ContentHead.GetSeq(),
InternalId: msg.Body.RichText.Attr.GetRandom(),
InternalId: msg.Head.ContentHead.GetRandom(),
GuildId: msg.Head.RoutingHead.GetGuildId(),
ChannelId: msg.Head.RoutingHead.GetChannelId(),
Time: int64(msg.Head.ContentHead.GetTime()),
Sender: &message.GuildSender{
TinyId: msg.Head.RoutingHead.GetFromTinyid(),
Nickname: string(msg.ExtInfo.FromNick),
Nickname: string(memberName),
},
Elements: message.ParseMessageElems(msg.Body.RichText.Elems),
}
}
// PttCenterSvr.GroupShortVideoUpReq
func (c *QQClient) buildPttGuildVideoUpReq(videoHash, thumbHash []byte, guildId, channelId int64, videoSize, thumbSize int64) *network.Request {
pb := c.buildPttGroupShortVideoProto(videoHash, thumbHash, guildId, videoSize, thumbSize, 4)
pb.PttShortVideoUploadReq.BusinessType = 4601
pb.PttShortVideoUploadReq.ToUin = channelId
pb.ExtensionReq[0].SubBusiType = 4601
payload, _ := proto.Marshal(pb)
return c.uniRequest("PttCenterSvr.GroupShortVideoUpReq", payload, decodeGroupShortVideoUploadResponse)
}
func (c *QQClient) UploadGuildShortVideo(guildId, channelId uint64, video, thumb io.ReadSeeker) (*message.ShortVideoElement, error) {
// todo: combine with group short video upload
videoHash, videoLen := utils.ComputeMd5AndLength(video)
thumbHash, thumbLen := utils.ComputeMd5AndLength(thumb)
key := string(videoHash) + string(thumbHash)
pttWaiter.Wait(key)
defer pttWaiter.Done(key)
i, err := c.callAndDecode(c.buildPttGuildVideoUpReq(videoHash, thumbHash, int64(guildId), int64(channelId), videoLen, thumbLen))
if err != nil {
return nil, errors.Wrap(err, "upload req error")
}
rsp := i.(*pttcenter.ShortVideoUploadRsp)
if rsp.FileExists == 1 {
return &message.ShortVideoElement{
Uuid: []byte(rsp.FileId),
Size: int32(videoLen),
ThumbSize: int32(thumbLen),
Md5: videoHash,
ThumbMd5: thumbHash,
Guild: true,
}, nil
}
req := c.buildPttGroupShortVideoProto(videoHash, thumbHash, int64(guildId), videoLen, thumbLen, 4).PttShortVideoUploadReq
req.BusinessType = 4601
req.ToUin = int64(channelId)
ext, _ := proto.Marshal(req)
multi := utils.MultiReadSeeker(thumb, video)
hwRsp, err := c.highwaySession.UploadBDH(highway.BdhInput{
CommandID: 89,
Body: multi,
Ticket: c.highwaySession.SigSession,
Ext: ext,
Encrypt: true,
})
if err != nil {
return nil, errors.Wrap(err, "upload video file error")
}
if len(hwRsp) == 0 {
return nil, errors.New("resp is empty")
}
rsp = &pttcenter.ShortVideoUploadRsp{}
if err = proto.Unmarshal(hwRsp, rsp); err != nil {
return nil, errors.Wrap(err, "decode error")
}
return &message.ShortVideoElement{
Uuid: []byte(rsp.FileId),
Size: int32(videoLen),
ThumbSize: int32(thumbLen),
Md5: videoHash,
ThumbMd5: thumbHash,
Guild: true,
}, nil
}

View File

@ -1,387 +0,0 @@
// Code generated by syncmap; DO NOT EDIT.
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package client
import (
"sync"
"sync/atomic"
"unsafe"
)
// Map is like a Go map[interface{}]interface{} but is safe for concurrent use
// by multiple goroutines without additional locking or coordination.
// Loads, stores, and deletes run in amortized constant time.
//
// The Map type is specialized. Most code should use a plain Go map instead,
// with separate locking or coordination, for better type safety and to make it
// easier to maintain other invariants along with the map content.
//
// The Map type is optimized for two common use cases: (1) when the entry for a given
// key is only ever written once but read many times, as in caches that only grow,
// or (2) when multiple goroutines read, write, and overwrite entries for disjoint
// sets of keys. In these two cases, use of a Map may significantly reduce lock
// contention compared to a Go map paired with a separate Mutex or RWMutex.
//
// The zero Map is empty and ready for use. A Map must not be copied after first use.
type HandlerMap struct {
mu sync.Mutex
// read contains the portion of the map's contents that are safe for
// concurrent access (with or without mu held).
//
// The read field itself is always safe to load, but must only be stored with
// mu held.
//
// Entries stored in read may be updated concurrently without mu, but updating
// a previously-expunged entry requires that the entry be copied to the dirty
// map and unexpunged with mu held.
read atomic.Value // readOnly
// dirty contains the portion of the map's contents that require mu to be
// held. To ensure that the dirty map can be promoted to the read map quickly,
// it also includes all of the non-expunged entries in the read map.
//
// Expunged entries are not stored in the dirty map. An expunged entry in the
// clean map must be unexpunged and added to the dirty map before a new value
// can be stored to it.
//
// If the dirty map is nil, the next write to the map will initialize it by
// making a shallow copy of the clean map, omitting stale entries.
dirty map[uint16]*entryHandlerMap
// misses counts the number of loads since the read map was last updated that
// needed to lock mu to determine whether the key was present.
//
// Once enough misses have occurred to cover the cost of copying the dirty
// map, the dirty map will be promoted to the read map (in the unamended
// state) and the next store to the map will make a new dirty copy.
misses int
}
// readOnly is an immutable struct stored atomically in the Map.read field.
type readOnlyHandlerMap struct {
m map[uint16]*entryHandlerMap
amended bool // true if the dirty map contains some key not in m.
}
// expunged is an arbitrary pointer that marks entries which have been deleted
// from the dirty map.
var expungedHandlerMap = unsafe.Pointer(new(*handlerInfo))
// An entry is a slot in the map corresponding to a particular key.
type entryHandlerMap struct {
// p points to the interface{} value stored for the entry.
//
// If p == nil, the entry has been deleted and m.dirty == nil.
//
// If p == expunged, the entry has been deleted, m.dirty != nil, and the entry
// is missing from m.dirty.
//
// Otherwise, the entry is valid and recorded in m.read.m[key] and, if m.dirty
// != nil, in m.dirty[key].
//
// An entry can be deleted by atomic replacement with nil: when m.dirty is
// next created, it will atomically replace nil with expunged and leave
// m.dirty[key] unset.
//
// An entry's associated value can be updated by atomic replacement, provided
// p != expunged. If p == expunged, an entry's associated value can be updated
// only after first setting m.dirty[key] = e so that lookups using the dirty
// map find the entry.
p unsafe.Pointer // *interface{}
}
func newEntryHandlerMap(i *handlerInfo) *entryHandlerMap {
return &entryHandlerMap{p: unsafe.Pointer(&i)}
}
// Load returns the value stored in the map for a key, or nil if no
// value is present.
// The ok result indicates whether value was found in the map.
func (m *HandlerMap) Load(key uint16) (value *handlerInfo, ok bool) {
read, _ := m.read.Load().(readOnlyHandlerMap)
e, ok := read.m[key]
if !ok && read.amended {
m.mu.Lock()
// Avoid reporting a spurious miss if m.dirty got promoted while we were
// blocked on m.mu. (If further loads of the same key will not miss, it's
// not worth copying the dirty map for this key.)
read, _ = m.read.Load().(readOnlyHandlerMap)
e, ok = read.m[key]
if !ok && read.amended {
e, ok = m.dirty[key]
// Regardless of whether the entry was present, record a miss: this key
// will take the slow path until the dirty map is promoted to the read
// map.
m.missLocked()
}
m.mu.Unlock()
}
if !ok {
return value, false
}
return e.load()
}
func (e *entryHandlerMap) load() (value *handlerInfo, ok bool) {
p := atomic.LoadPointer(&e.p)
if p == nil || p == expungedHandlerMap {
return value, false
}
return *(**handlerInfo)(p), true
}
// Store sets the value for a key.
func (m *HandlerMap) Store(key uint16, value *handlerInfo) {
read, _ := m.read.Load().(readOnlyHandlerMap)
if e, ok := read.m[key]; ok && e.tryStore(&value) {
return
}
m.mu.Lock()
read, _ = m.read.Load().(readOnlyHandlerMap)
if e, ok := read.m[key]; ok {
if e.unexpungeLocked() {
// The entry was previously expunged, which implies that there is a
// non-nil dirty map and this entry is not in it.
m.dirty[key] = e
}
e.storeLocked(&value)
} else if e, ok := m.dirty[key]; ok {
e.storeLocked(&value)
} else {
if !read.amended {
// We're adding the first new key to the dirty map.
// Make sure it is allocated and mark the read-only map as incomplete.
m.dirtyLocked()
m.read.Store(readOnlyHandlerMap{m: read.m, amended: true})
}
m.dirty[key] = newEntryHandlerMap(value)
}
m.mu.Unlock()
}
// tryStore stores a value if the entry has not been expunged.
//
// If the entry is expunged, tryStore returns false and leaves the entry
// unchanged.
func (e *entryHandlerMap) tryStore(i **handlerInfo) bool {
for {
p := atomic.LoadPointer(&e.p)
if p == expungedHandlerMap {
return false
}
if atomic.CompareAndSwapPointer(&e.p, p, unsafe.Pointer(i)) {
return true
}
}
}
// unexpungeLocked ensures that the entry is not marked as expunged.
//
// If the entry was previously expunged, it must be added to the dirty map
// before m.mu is unlocked.
func (e *entryHandlerMap) unexpungeLocked() (wasExpunged bool) {
return atomic.CompareAndSwapPointer(&e.p, expungedHandlerMap, nil)
}
// storeLocked unconditionally stores a value to the entry.
//
// The entry must be known not to be expunged.
func (e *entryHandlerMap) storeLocked(i **handlerInfo) {
atomic.StorePointer(&e.p, unsafe.Pointer(i))
}
// LoadOrStore returns the existing value for the key if present.
// Otherwise, it stores and returns the given value.
// The loaded result is true if the value was loaded, false if stored.
func (m *HandlerMap) LoadOrStore(key uint16, value *handlerInfo) (actual *handlerInfo, loaded bool) {
// Avoid locking if it's a clean hit.
read, _ := m.read.Load().(readOnlyHandlerMap)
if e, ok := read.m[key]; ok {
actual, loaded, ok := e.tryLoadOrStore(value)
if ok {
return actual, loaded
}
}
m.mu.Lock()
read, _ = m.read.Load().(readOnlyHandlerMap)
if e, ok := read.m[key]; ok {
if e.unexpungeLocked() {
m.dirty[key] = e
}
actual, loaded, _ = e.tryLoadOrStore(value)
} else if e, ok := m.dirty[key]; ok {
actual, loaded, _ = e.tryLoadOrStore(value)
m.missLocked()
} else {
if !read.amended {
// We're adding the first new key to the dirty map.
// Make sure it is allocated and mark the read-only map as incomplete.
m.dirtyLocked()
m.read.Store(readOnlyHandlerMap{m: read.m, amended: true})
}
m.dirty[key] = newEntryHandlerMap(value)
actual, loaded = value, false
}
m.mu.Unlock()
return actual, loaded
}
// tryLoadOrStore atomically loads or stores a value if the entry is not
// expunged.
//
// If the entry is expunged, tryLoadOrStore leaves the entry unchanged and
// returns with ok==false.
func (e *entryHandlerMap) tryLoadOrStore(i *handlerInfo) (actual *handlerInfo, loaded, ok bool) {
p := atomic.LoadPointer(&e.p)
if p == expungedHandlerMap {
return actual, false, false
}
if p != nil {
return *(**handlerInfo)(p), true, true
}
// Copy the interface after the first load to make this method more amenable
// to escape analysis: if we hit the "load" path or the entry is expunged, we
// shouldn't bother heap-allocating.
ic := i
for {
if atomic.CompareAndSwapPointer(&e.p, nil, unsafe.Pointer(&ic)) {
return i, false, true
}
p = atomic.LoadPointer(&e.p)
if p == expungedHandlerMap {
return actual, false, false
}
if p != nil {
return *(**handlerInfo)(p), true, true
}
}
}
// LoadAndDelete deletes the value for a key, returning the previous value if any.
// The loaded result reports whether the key was present.
func (m *HandlerMap) LoadAndDelete(key uint16) (value *handlerInfo, loaded bool) {
read, _ := m.read.Load().(readOnlyHandlerMap)
e, ok := read.m[key]
if !ok && read.amended {
m.mu.Lock()
read, _ = m.read.Load().(readOnlyHandlerMap)
e, ok = read.m[key]
if !ok && read.amended {
e, ok = m.dirty[key]
delete(m.dirty, key)
// Regardless of whether the entry was present, record a miss: this key
// will take the slow path until the dirty map is promoted to the read
// map.
m.missLocked()
}
m.mu.Unlock()
}
if ok {
return e.delete()
}
return value, false
}
// Delete deletes the value for a key.
func (m *HandlerMap) Delete(key uint16) {
m.LoadAndDelete(key)
}
func (e *entryHandlerMap) delete() (value *handlerInfo, ok bool) {
for {
p := atomic.LoadPointer(&e.p)
if p == nil || p == expungedHandlerMap {
return value, false
}
if atomic.CompareAndSwapPointer(&e.p, p, nil) {
return *(**handlerInfo)(p), true
}
}
}
// Range calls f sequentially for each key and value present in the map.
// If f returns false, range stops the iteration.
//
// Range does not necessarily correspond to any consistent snapshot of the Map's
// contents: no key will be visited more than once, but if the value for any key
// is stored or deleted concurrently, Range may reflect any mapping for that key
// from any point during the Range call.
//
// Range may be O(N) with the number of elements in the map even if f returns
// false after a constant number of calls.
func (m *HandlerMap) Range(f func(key uint16, value *handlerInfo) bool) {
// We need to be able to iterate over all of the keys that were already
// present at the start of the call to Range.
// If read.amended is false, then read.m satisfies that property without
// requiring us to hold m.mu for a long time.
read, _ := m.read.Load().(readOnlyHandlerMap)
if read.amended {
// m.dirty contains keys not in read.m. Fortunately, Range is already O(N)
// (assuming the caller does not break out early), so a call to Range
// amortizes an entire copy of the map: we can promote the dirty copy
// immediately!
m.mu.Lock()
read, _ = m.read.Load().(readOnlyHandlerMap)
if read.amended {
read = readOnlyHandlerMap{m: m.dirty}
m.read.Store(read)
m.dirty = nil
m.misses = 0
}
m.mu.Unlock()
}
for k, e := range read.m {
v, ok := e.load()
if !ok {
continue
}
if !f(k, v) {
break
}
}
}
func (m *HandlerMap) missLocked() {
m.misses++
if m.misses < len(m.dirty) {
return
}
m.read.Store(readOnlyHandlerMap{m: m.dirty})
m.dirty = nil
m.misses = 0
}
func (m *HandlerMap) dirtyLocked() {
if m.dirty != nil {
return
}
read, _ := m.read.Load().(readOnlyHandlerMap)
m.dirty = make(map[uint16]*entryHandlerMap, len(read.m))
for k, e := range read.m {
if !e.tryExpungeLocked() {
m.dirty[k] = e
}
}
}
func (e *entryHandlerMap) tryExpungeLocked() (isExpunged bool) {
p := atomic.LoadPointer(&e.p)
for p == nil {
if atomic.CompareAndSwapPointer(&e.p, nil, expungedHandlerMap) {
return true
}
p = atomic.LoadPointer(&e.p)
}
return p == expungedHandlerMap
}

View File

@ -1,499 +0,0 @@
package client
import (
"bytes"
"crypto/md5"
binary2 "encoding/binary"
"fmt"
"io"
"net"
"net/http"
"os"
"strconv"
"sync"
"sync/atomic"
"time"
"github.com/pkg/errors"
"golang.org/x/sync/errgroup"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/utils"
)
func (c *QQClient) highwayUpload(ip uint32, port int, updKey, data []byte, cmdID int32) error {
return c.highwayUploadStream(ip, port, updKey, bytes.NewReader(data), cmdID)
}
func (c *QQClient) highwayUploadStream(ip uint32, port int, updKey []byte, stream io.ReadSeeker, cmdId int32) error {
addr := net.TCPAddr{
IP: make([]byte, 4),
Port: port,
}
binary2.LittleEndian.PutUint32(addr.IP, ip)
h := md5.New()
length, _ := io.Copy(h, stream)
fh := h.Sum(nil)
const chunkSize = 8192 * 8
_, _ = stream.Seek(0, io.SeekStart)
conn, err := net.DialTCP("tcp", nil, &addr)
if err != nil {
return errors.Wrap(err, "connect error")
}
defer conn.Close()
offset := 0
reader := binary.NewNetworkReader(conn)
buf := binary.Get256KBytes()
chunk := *buf
defer binary.Put256KBytes(buf)
w := binary.NewWriter()
defer binary.PutWriter(w)
for {
chunk = chunk[:chunkSize]
rl, err := io.ReadFull(stream, chunk)
if errors.Is(err, io.EOF) {
break
}
if errors.Is(err, io.ErrUnexpectedEOF) {
chunk = chunk[:rl]
}
ch := md5.Sum(chunk)
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: strconv.FormatInt(c.Uin, 10),
Command: "PicUp.DataUp",
Seq: c.nextGroupDataTransSeq(),
Appid: int32(c.version.AppId),
Dataflag: 4096,
CommandId: cmdId,
LocaleId: 2052,
},
MsgSeghead: &pb.SegHead{
Filesize: length,
Dataoffset: int64(offset),
Datalength: int32(rl),
Serviceticket: updKey,
Md5: ch[:],
FileMd5: fh,
},
ReqExtendinfo: EmptyBytes,
})
offset += rl
w.Reset()
w.WriteByte(40)
w.WriteUInt32(uint32(len(head)))
w.WriteUInt32(uint32(len(chunk)))
w.Write(head)
w.Write(chunk)
w.WriteByte(41)
_, err = conn.Write(w.Bytes())
if err != nil {
return errors.Wrap(err, "write conn error")
}
rspHead, _, err := highwayReadResponse(reader)
if err != nil {
return errors.Wrap(err, "highway upload error")
}
if rspHead.ErrorCode != 0 {
return errors.New("upload failed")
}
}
return nil
}
func (c *QQClient) highwayUploadByBDH(stream io.Reader, length int64, cmdId int32, ticket, sum, ext []byte, encrypt bool) ([]byte, error) {
if len(c.srvSsoAddrs) == 0 {
return nil, errors.New("srv addrs not found. maybe miss some packet?")
}
if encrypt {
if c.bigDataSession == nil || len(c.bigDataSession.SessionKey) == 0 {
return nil, errors.New("session key not found. maybe miss some packet?")
}
ext = binary.NewTeaCipher(c.bigDataSession.SessionKey).Encrypt(ext)
}
const chunkSize = 256 * 1024
conn, err := net.DialTimeout("tcp", c.srvSsoAddrs[0], time.Second*20)
if err != nil {
return nil, errors.Wrap(err, "connect error")
}
defer conn.Close()
offset := 0
reader := binary.NewNetworkReader(conn)
if err = c.highwaySendHeartbreak(conn); err != nil {
return nil, errors.Wrap(err, "echo error")
}
if _, _, err = highwayReadResponse(reader); err != nil {
return nil, errors.Wrap(err, "echo error")
}
var rspExt []byte
buf := binary.Get256KBytes()
chunk := *buf
defer binary.Put256KBytes(buf)
w := binary.NewWriter()
defer binary.PutWriter(w)
for {
chunk = chunk[:chunkSize]
rl, err := io.ReadFull(stream, chunk)
if errors.Is(err, io.EOF) {
break
}
if errors.Is(err, io.ErrUnexpectedEOF) {
chunk = chunk[:rl]
}
ch := md5.Sum(chunk)
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: strconv.FormatInt(c.Uin, 10),
Command: "PicUp.DataUp",
Seq: c.nextGroupDataTransSeq(),
Appid: int32(c.version.AppId),
Dataflag: 4096,
CommandId: cmdId,
LocaleId: 2052,
},
MsgSeghead: &pb.SegHead{
Filesize: length,
Dataoffset: int64(offset),
Datalength: int32(rl),
Serviceticket: ticket,
Md5: ch[:],
FileMd5: sum,
},
ReqExtendinfo: ext,
})
offset += rl
w.Reset()
w.WriteByte(40)
w.WriteUInt32(uint32(len(head)))
w.WriteUInt32(uint32(len(chunk)))
w.Write(head)
w.Write(chunk)
w.WriteByte(41)
_, err = conn.Write(w.Bytes())
if err != nil {
return nil, errors.Wrap(err, "write conn error")
}
rspHead, _, err := highwayReadResponse(reader)
if err != nil {
return nil, errors.Wrap(err, "highway upload error")
}
if rspHead.ErrorCode != 0 {
return nil, errors.Errorf("upload failed: %d", rspHead.ErrorCode)
}
if rspHead.RspExtendinfo != nil {
rspExt = rspHead.RspExtendinfo
}
if rspHead.MsgSeghead != nil && rspHead.MsgSeghead.Serviceticket != nil {
ticket = rspHead.MsgSeghead.Serviceticket
}
}
return rspExt, nil
}
func (c *QQClient) highwayUploadFileMultiThreadingByBDH(path string, cmdId int32, threadCount int, ticket, ext []byte, encrypt bool) ([]byte, error) {
if len(c.srvSsoAddrs) == 0 {
return nil, errors.New("srv addrs not found. maybe miss some packet?")
}
if encrypt {
if c.bigDataSession == nil || len(c.bigDataSession.SessionKey) == 0 {
return nil, errors.New("session key not found. maybe miss some packet?")
}
ext = binary.NewTeaCipher(c.bigDataSession.SessionKey).Encrypt(ext)
}
stat, err := os.Stat(path)
if err != nil {
return nil, errors.Wrap(err, "get stat error")
}
file, err := os.OpenFile(path, os.O_RDONLY, 0o666)
if err != nil {
return nil, errors.Wrap(err, "open file error")
}
defer file.Close()
h := md5.New()
length, _ := io.Copy(h, file)
fh := h.Sum(nil)
_, _ = file.Seek(0, io.SeekStart)
if stat.Size() < 1024*1024*3 || threadCount < 2 {
return c.highwayUploadByBDH(file, length, cmdId, ticket, fh, ext, false)
}
type BlockMetaData struct {
Id int
BeginOffset int64
EndOffset int64
}
const blockSize int64 = 1024 * 512
var (
blocks []*BlockMetaData
rspExt []byte
BlockId = ^uint32(0) // -1
uploadedCount uint32
cond = sync.NewCond(&sync.Mutex{})
)
// Init Blocks
{
var temp int64 = 0
for temp+blockSize < stat.Size() {
blocks = append(blocks, &BlockMetaData{
Id: len(blocks),
BeginOffset: temp,
EndOffset: temp + blockSize,
})
temp += blockSize
}
blocks = append(blocks, &BlockMetaData{
Id: len(blocks),
BeginOffset: temp,
EndOffset: stat.Size(),
})
}
doUpload := func() error {
defer cond.Signal()
conn, err := net.DialTimeout("tcp", c.srvSsoAddrs[0], time.Second*20)
if err != nil {
return errors.Wrap(err, "connect error")
}
defer conn.Close()
chunk, _ := os.OpenFile(path, os.O_RDONLY, 0o666)
defer chunk.Close()
reader := binary.NewNetworkReader(conn)
if err = c.highwaySendHeartbreak(conn); err != nil {
return errors.Wrap(err, "echo error")
}
if _, _, err = highwayReadResponse(reader); err != nil {
return errors.Wrap(err, "echo error")
}
buffer := make([]byte, blockSize)
w := binary.NewWriter()
w.Reset()
w.Grow(600 * 1024) // 复用,600k 不要放回池中
for {
nextId := atomic.AddUint32(&BlockId, 1)
if nextId >= uint32(len(blocks)) {
break
}
block := blocks[nextId]
if block.Id == len(blocks)-1 {
cond.L.Lock()
for atomic.LoadUint32(&uploadedCount) != uint32(len(blocks))-1 {
cond.Wait()
}
cond.L.Unlock()
}
buffer = buffer[:blockSize]
_, _ = chunk.Seek(block.BeginOffset, io.SeekStart)
ri, err := io.ReadFull(chunk, buffer)
if err != nil {
if err == io.EOF {
break
}
if err == io.ErrUnexpectedEOF {
buffer = buffer[:ri]
} else {
return err
}
}
ch := md5.Sum(buffer)
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: strconv.FormatInt(c.Uin, 10),
Command: "PicUp.DataUp",
Seq: c.nextGroupDataTransSeq(),
Appid: int32(c.version.AppId),
Dataflag: 4096,
CommandId: cmdId,
LocaleId: 2052,
},
MsgSeghead: &pb.SegHead{
Filesize: stat.Size(),
Dataoffset: block.BeginOffset,
Datalength: int32(ri),
Serviceticket: ticket,
Md5: ch[:],
FileMd5: fh,
},
ReqExtendinfo: ext,
})
w.Reset()
w.WriteByte(40)
w.WriteUInt32(uint32(len(head)))
w.WriteUInt32(uint32(len(buffer)))
w.Write(head)
w.Write(buffer)
w.WriteByte(41)
_, err = conn.Write(w.Bytes())
if err != nil {
return errors.Wrap(err, "write conn error")
}
rspHead, _, err := highwayReadResponse(reader)
if err != nil {
return errors.Wrap(err, "highway upload error")
}
if rspHead.ErrorCode != 0 {
return errors.Errorf("upload failed: %d", rspHead.ErrorCode)
}
if rspHead.RspExtendinfo != nil {
rspExt = rspHead.RspExtendinfo
}
atomic.AddUint32(&uploadedCount, 1)
}
return nil
}
group := errgroup.Group{}
for i := 0; i < threadCount; i++ {
group.Go(doUpload)
}
err = group.Wait()
return rspExt, err
}
func (c *QQClient) highwaySendHeartbreak(conn net.Conn) error {
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: strconv.FormatInt(c.Uin, 10),
Command: "PicUp.Echo",
Seq: c.nextGroupDataTransSeq(),
Appid: int32(c.version.AppId),
Dataflag: 4096,
CommandId: 0,
LocaleId: 2052,
},
})
w := binary.NewWriter()
w.WriteByte(40)
w.WriteUInt32(uint32(len(head)))
w.WriteUInt32(0)
w.Write(head)
w.WriteByte(41)
_, err := conn.Write(w.Bytes())
binary.PutWriter(w)
return err
}
func highwayReadResponse(r *binary.NetworkReader) (*pb.RspDataHighwayHead, []byte, error) {
_, err := r.ReadByte()
if err != nil {
return nil, nil, errors.Wrap(err, "failed to read byte")
}
hl, _ := r.ReadInt32()
a2, _ := r.ReadInt32()
head, _ := r.ReadBytes(int(hl))
payload, _ := r.ReadBytes(int(a2))
_, _ = r.ReadByte()
rsp := new(pb.RspDataHighwayHead)
if err = proto.Unmarshal(head, rsp); err != nil {
return nil, nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return rsp, payload, nil
}
func (c *QQClient) excitingUploadStream(stream io.ReadSeeker, cmdId int32, ticket, ext []byte) ([]byte, error) {
fileMd5, fileLength := utils.ComputeMd5AndLength(stream)
_, _ = stream.Seek(0, io.SeekStart)
url := fmt.Sprintf("http://%v/cgi-bin/httpconn?htcmd=0x6FF0087&uin=%v", c.srvSsoAddrs[0], c.Uin)
var (
rspExt []byte
offset int64 = 0
chunkSize = 524288
)
chunk := make([]byte, chunkSize)
w := binary.NewWriter()
w.Reset()
w.Grow(600 * 1024) // 复用,600k 不要放回池中
for {
chunk = chunk[:chunkSize]
rl, err := io.ReadFull(stream, chunk)
if err == io.EOF {
break
}
if err == io.ErrUnexpectedEOF {
chunk = chunk[:rl]
}
ch := md5.Sum(chunk)
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: strconv.FormatInt(c.Uin, 10),
Command: "PicUp.DataUp",
Seq: c.nextGroupDataTransSeq(),
Appid: int32(c.version.AppId),
Dataflag: 0,
CommandId: cmdId,
LocaleId: 0,
},
MsgSeghead: &pb.SegHead{
Filesize: fileLength,
Dataoffset: offset,
Datalength: int32(rl),
Serviceticket: ticket,
Md5: ch[:],
FileMd5: fileMd5,
},
ReqExtendinfo: ext,
})
offset += int64(rl)
w.Reset()
w.WriteByte(40)
w.WriteUInt32(uint32(len(head)))
w.WriteUInt32(uint32(len(chunk)))
w.Write(head)
w.Write(chunk)
w.WriteByte(41)
req, _ := http.NewRequest("POST", url, bytes.NewReader(w.Bytes()))
req.Header.Set("Accept", "*/*")
req.Header.Set("Connection", "Keep-Alive")
req.Header.Set("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)")
req.Header.Set("Pragma", "no-cache")
rsp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, errors.Wrap(err, "request error")
}
body, _ := io.ReadAll(rsp.Body)
_ = rsp.Body.Close()
r := binary.NewReader(body)
r.ReadByte()
hl := r.ReadInt32()
a2 := r.ReadInt32()
h := r.ReadBytes(int(hl))
r.ReadBytes(int(a2))
rspHead := new(pb.RspDataHighwayHead)
if err = proto.Unmarshal(h, rspHead); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rspHead.ErrorCode != 0 {
return nil, errors.Errorf("upload failed: %d", rspHead.ErrorCode)
}
if rspHead.RspExtendinfo != nil {
rspExt = rspHead.RspExtendinfo
}
}
return rspExt, nil
}
func (c *QQClient) uploadGroupHeadPortrait(groupCode int64, img []byte) error {
url := fmt.Sprintf(
"http://htdata3.qq.com/cgi-bin/httpconn?htcmd=0x6ff0072&ver=5520&ukey=%v&range=0&uin=%v&seq=23&groupuin=%v&filetype=3&imagetype=5&userdata=0&subcmd=1&subver=101&clip=0_0_0_0&filesize=%v",
c.getSKey(),
c.Uin,
groupCode,
len(img),
)
req, _ := http.NewRequest("POST", url, bytes.NewReader(img))
req.Header["User-Agent"] = []string{"Dalvik/2.1.0 (Linux; U; Android 7.1.2; PCRT00 Build/N2G48H)"}
req.Header["Content-Type"] = []string{"multipart/form-data;boundary=****"}
rsp, err := http.DefaultClient.Do(req)
if err != nil {
return errors.Wrap(err, "failed to upload group head portrait")
}
rsp.Body.Close()
return nil
}

View File

@ -14,10 +14,10 @@ import (
"strings"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb/richmedia"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/utils"
)
@ -124,15 +124,14 @@ func (c *QQClient) GetGroupHonorInfo(groupCode int64, honorType HonorType) (*Gro
/* -------- TextToSpeech -------- */
func (c *QQClient) GetTts(text string) ([]byte, error) {
url := "https://textts.qq.com/cgi-bin/tts"
bt, _ := json.Marshal(text)
data := fmt.Sprintf(`{"appid": "201908021016","sendUin": %v,"text": %s}`, c.Uin, bt)
rsp, err := utils.HttpPostBytesWithCookie(url, []byte(data), c.getCookies())
apiUrl := "https://textts.qq.com/cgi-bin/tts"
data := fmt.Sprintf(`{"appid": "201908021016","sendUin": %v,"text": %q}`, c.Uin, text)
rsp, err := utils.HttpPostBytesWithCookie(apiUrl, []byte(data), c.getCookies())
if err != nil {
return nil, errors.Wrap(err, "failed to post to tts server")
}
ttsReader := binary.NewReader(rsp)
ttsWriter := binary.NewWriter()
ttsWriter := binary.SelectWriter()
for {
// 数据格式 69e(字符串) 十六进制 数据长度 0 为结尾
// 0D 0A (分隔符) payload 0D 0A

View File

@ -3,48 +3,52 @@ package client
import (
"bytes"
"encoding/hex"
"fmt"
"image"
_ "image/gif"
"io"
"math/rand"
"os"
"strings"
"time"
"github.com/fumiama/imgsz"
"github.com/pkg/errors"
protobuf "github.com/segmentio/encoding/proto"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/internal/highway"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x388"
"github.com/Mrs4s/MiraiGo/client/pb/highway"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0xe07"
highway2 "github.com/Mrs4s/MiraiGo/client/pb/highway"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
)
func init() {
decoders["ImgStore.GroupPicUp"] = decodeGroupImageStoreResponse
decoders["ImgStore.GroupPicDown"] = decodeGroupImageDownloadResponse
decoders["OidbSvc.0xe07_0"] = decodeImageOcrResponse
}
var imgWaiter = utils.NewUploadWaiter()
type imageUploadResponse struct {
UploadKey []byte
UploadIp []uint32
UploadPort []uint32
ResourceId string
Message string
FileId int64
Width int32
Height int32
ResultCode int32
IsExists bool
}
func (c *QQClient) UploadGroupImage(groupCode int64, img io.ReadSeeker) (*message.GroupImageElement, error) {
_, _ = img.Seek(0, io.SeekStart) // safe
fh, length := utils.ComputeMd5AndLength(img)
_, _ = img.Seek(0, io.SeekStart)
key := hex.EncodeToString(fh)
key := string(fh)
imgWaiter.Wait(key)
defer imgWaiter.Done(key)
seq, pkt := c.buildGroupImageStorePacket(groupCode, fh, int32(length))
r, err := c.sendAndWait(seq, pkt)
req := c.buildGroupImageStoreRequest(groupCode, fh, int32(length))
r, err := c.callAndDecode(req)
if err != nil {
return nil, err
}
@ -55,23 +59,26 @@ func (c *QQClient) UploadGroupImage(groupCode int64, img io.ReadSeeker) (*messag
if rsp.IsExists {
goto ok
}
if len(c.srvSsoAddrs) == 0 {
if c.highwaySession.AddrLength() == 0 {
for i, addr := range rsp.UploadIp {
c.srvSsoAddrs = append(c.srvSsoAddrs, fmt.Sprintf("%v:%v", binary.UInt32ToIPV4Address(addr), rsp.UploadPort[i]))
c.highwaySession.AppendAddr(addr, rsp.UploadPort[i])
}
}
if _, err = c.highwayUploadByBDH(img, length, 2, rsp.UploadKey, fh, EmptyBytes, false); err == nil {
if _, err = c.highwaySession.UploadBDH(highway.BdhInput{
CommandID: 2,
Body: img,
Ticket: rsp.UploadKey,
Ext: EmptyBytes,
Encrypt: false,
}); err == nil {
goto ok
}
return nil, errors.Wrap(err, "upload failed")
ok:
_, _ = img.Seek(0, io.SeekStart)
i, _, _ := image.DecodeConfig(img)
i, t, _ := imgsz.DecodeSize(img)
var imageType int32 = 1000
_, _ = img.Seek(0, io.SeekStart)
tmp := make([]byte, 4)
_, _ = img.Read(tmp)
if bytes.Equal(tmp, []byte{0x47, 0x49, 0x46, 0x38}) {
if t == "gif" {
imageType = 2000
}
return message.NewGroupImage(binary.CalculateImageResourceId(fh), fh, rsp.FileId, int32(length), int32(i.Width), int32(i.Height), imageType), nil
@ -89,8 +96,8 @@ func (c *QQClient) UploadGroupImageByFile(groupCode int64, path string) (*messag
imgWaiter.Wait(key)
defer imgWaiter.Done(key)
seq, pkt := c.buildGroupImageStorePacket(groupCode, fh, int32(length))
r, err := c.sendAndWait(seq, pkt)
req := c.buildGroupImageStoreRequest(groupCode, fh, int32(length))
r, err := c.callAndDecode(req)
if err != nil {
return nil, err
}
@ -101,23 +108,27 @@ func (c *QQClient) UploadGroupImageByFile(groupCode int64, path string) (*messag
if rsp.IsExists {
goto ok
}
if len(c.srvSsoAddrs) == 0 {
if c.highwaySession.AddrLength() == 0 {
for i, addr := range rsp.UploadIp {
c.srvSsoAddrs = append(c.srvSsoAddrs, fmt.Sprintf("%v:%v", binary.UInt32ToIPV4Address(addr), rsp.UploadPort[i]))
c.highwaySession.AppendAddr(addr, rsp.UploadPort[i])
}
}
if _, err = c.highwayUploadFileMultiThreadingByBDH(path, 2, 1, rsp.UploadKey, EmptyBytes, false); err == nil {
if _, err = c.highwaySession.UploadBDHMultiThread(highway.BdhInput{
CommandID: 2,
File: path,
Ticket: rsp.UploadKey,
Ext: EmptyBytes,
Encrypt: false,
}, 1); err == nil {
goto ok
}
return nil, errors.Wrap(err, "upload failed")
ok:
_, _ = img.Seek(0, io.SeekStart)
i, _, _ := image.DecodeConfig(img)
i, t, _ := imgsz.DecodeSize(img)
var imageType int32 = 1000
_, _ = img.Seek(0, io.SeekStart)
tmp := make([]byte, 4)
_, _ = img.Read(tmp)
if bytes.Equal(tmp, []byte{0x47, 0x49, 0x46, 0x38}) {
if t == "gif" {
imageType = 2000
}
return message.NewGroupImage(binary.CalculateImageResourceId(fh), fh, rsp.FileId, int32(length), int32(i.Width), int32(i.Height), imageType), nil
@ -128,7 +139,7 @@ func (c *QQClient) UploadPrivateImage(target int64, img io.ReadSeeker) (*message
}
func (c *QQClient) GetGroupImageDownloadUrl(fileId, groupCode int64, fileMd5 []byte) (string, error) {
i, err := c.sendAndWait(c.buildGroupImageDownloadPacket(fileId, groupCode, fileMd5))
i, err := c.callAndDecode(c.buildGroupImageDownloadRequest(fileId, groupCode, fileMd5))
if err != nil {
return "", err
}
@ -163,12 +174,13 @@ func (c *QQClient) ImageOcr(img interface{}) (*OcrResponse, error) {
case *message.GroupImageElement:
url = e.Url
if b, err := utils.HTTPGetReadCloser(e.Url, ""); err == nil {
if url, err = c.uploadOcrImage(b, int64(e.Size), e.Md5); err != nil {
if url, err = c.uploadOcrImage(b); err != nil {
url = e.Url
}
_ = b.Close()
}
rsp, err := c.sendAndWait(c.buildImageOcrRequestPacket(url, strings.ToUpper(hex.EncodeToString(e.Md5)), e.Size, e.Width, e.Height))
call := c.buildImageOcrRequestPacket(url, strings.ToUpper(hex.EncodeToString(e.Md5)), e.Size, e.Width, e.Height)
rsp, err := c.callAndDecode(call)
if err != nil {
return nil, err
}
@ -178,7 +190,7 @@ func (c *QQClient) ImageOcr(img interface{}) (*OcrResponse, error) {
}
func (c *QQClient) QueryGroupImage(groupCode int64, hash []byte, size int32) (*message.GroupImageElement, error) {
r, err := c.sendAndWait(c.buildGroupImageStorePacket(groupCode, hash, size))
r, err := c.callAndDecode(c.buildGroupImageStoreRequest(groupCode, hash, size))
if err != nil {
return nil, err
}
@ -193,7 +205,7 @@ func (c *QQClient) QueryGroupImage(groupCode int64, hash []byte, size int32) (*m
}
func (c *QQClient) QueryFriendImage(target int64, hash []byte, size int32) (*message.FriendImageElement, error) {
i, err := c.sendAndWait(c.buildOffPicUpPacket(target, hash, size))
i, err := c.callAndDecode(c.buildOffPicUpRequest(target, hash, size))
if err != nil {
return nil, err
}
@ -216,8 +228,7 @@ func (c *QQClient) QueryFriendImage(target int64, hash []byte, size int32) (*mes
}
// ImgStore.GroupPicUp
func (c *QQClient) buildGroupImageStorePacket(groupCode int64, md5 []byte, size int32) (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildGroupImageStoreRequest(groupCode int64, md5 []byte, size int32) *network.Request {
name := utils.RandomString(16) + ".gif"
req := &cmd0x388.D388ReqBody{
NetType: proto.Uint32(3),
@ -242,12 +253,10 @@ func (c *QQClient) buildGroupImageStorePacket(groupCode int64, md5 []byte, size
Extension: EmptyBytes,
}
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "ImgStore.GroupPicUp", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("ImgStore.GroupPicUp", payload, decodeGroupImageStoreResponse)
}
func (c *QQClient) buildGroupImageDownloadPacket(fileId, groupCode int64, fileMd5 []byte) (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildGroupImageDownloadRequest(fileId, groupCode int64, fileMd5 []byte) *network.Request {
req := &cmd0x388.D388ReqBody{
NetType: proto.Uint32(3),
Subcmd: proto.Uint32(2),
@ -268,22 +277,29 @@ func (c *QQClient) buildGroupImageDownloadPacket(fileId, groupCode int64, fileMd
},
}
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "ImgStore.GroupPicDown", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("ImgStore.GroupPicDown", payload, decodeGroupImageDownloadResponse)
}
func (c *QQClient) uploadOcrImage(img io.Reader, length int64, sum []byte) (string, error) {
func (c *QQClient) uploadOcrImage(img io.Reader) (string, error) {
r := make([]byte, 16)
rand.Read(r)
ext, _ := proto.Marshal(&highway.CommFileExtReq{
ext, _ := proto.Marshal(&highway2.CommFileExtReq{
ActionType: proto.Uint32(0),
Uuid: binary.GenUUID(r),
})
rsp, err := c.highwayUploadByBDH(img, length, 76, c.bigDataSession.SigSession, sum, ext, false)
buf, _ := io.ReadAll(img)
rsp, err := c.highwaySession.UploadBDH(highway.BdhInput{
CommandID: 76,
Body: bytes.NewReader(buf),
Ticket: c.highwaySession.SigSession,
Ext: ext,
Encrypt: false,
})
if err != nil {
return "", errors.Wrap(err, "upload ocr image error")
}
rspExt := highway.CommFileExtRsp{}
rspExt := highway2.CommFileExtRsp{}
if err = proto.Unmarshal(rsp, &rspExt); err != nil {
return "", errors.Wrap(err, "error unmarshal highway resp")
}
@ -291,31 +307,29 @@ func (c *QQClient) uploadOcrImage(img io.Reader, length int64, sum []byte) (stri
}
// OidbSvc.0xe07_0
func (c *QQClient) buildImageOcrRequestPacket(url, md5 string, size, weight, height int32) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb0xe07.ReqBody{
Version: proto.Uint32(1),
Entrance: proto.Uint32(3),
OcrReqBody: &oidb0xe07.OCRReqBody{
ImageUrl: &url,
OriginMd5: &md5,
AfterCompressMd5: &md5,
AfterCompressFileSize: proto.Uint32(uint32(size)),
AfterCompressWeight: proto.Uint32(uint32(weight)),
AfterCompressHeight: proto.Uint32(uint32(height)),
IsCut: proto.Bool(false),
func (c *QQClient) buildImageOcrRequestPacket(url, md5 string, size, weight, height int32) *network.Request {
body := &oidb.DE07ReqBody{
Version: 1,
Entrance: 3,
OcrReqBody: &oidb.OCRReqBody{
ImageUrl: url,
OriginMd5: md5,
AfterCompressMd5: md5,
AfterCompressFileSize: size,
AfterCompressWeight: weight,
AfterCompressHeight: height,
IsCut: false,
},
}
b, _ := body.Marshal()
b, _ := proto.Marshal(body)
payload := c.packOIDBPackage(3591, 0, b)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xe07_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("OidbSvc.0xe07_0", payload, decodeImageOcrResponse)
}
// ImgStore.GroupPicUp
func decodeGroupImageStoreResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGroupImageStoreResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
pkt := cmd0x388.D388RspBody{}
err := proto.Unmarshal(payload, &pkt)
err := proto.Unmarshal(resp.Body, &pkt)
if err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
@ -340,9 +354,9 @@ func decodeGroupImageStoreResponse(_ *QQClient, _ *incomingPacketInfo, payload [
}, nil
}
func decodeGroupImageDownloadResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeGroupImageDownloadResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
pkt := cmd0x388.D388RspBody{}
if err := proto.Unmarshal(payload, &pkt); err != nil {
if err := proto.Unmarshal(resp.Body, &pkt); err != nil {
return nil, errors.Wrap(err, "unmarshal protobuf message error")
}
if len(pkt.GetimgUrlRsp) == 0 {
@ -355,22 +369,22 @@ func decodeGroupImageDownloadResponse(_ *QQClient, _ *incomingPacketInfo, payloa
}
// OidbSvc.0xe07_0
func decodeImageOcrResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeImageOcrResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
pkg := oidb.OIDBSSOPkg{}
rsp := oidb0xe07.RspBody{}
if err := protobuf.Unmarshal(payload, &pkg); err != nil {
rsp := oidb.DE07RspBody{}
if err := proto.Unmarshal(resp.Body, &pkg); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if err := protobuf.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.GetWording() != "" {
if strings.Contains(rsp.GetWording(), "服务忙") {
if rsp.Wording != "" {
if strings.Contains(rsp.Wording, "服务忙") {
return nil, errors.New("未识别到文本")
}
return nil, errors.New(rsp.GetWording())
return nil, errors.New(rsp.Wording)
}
if rsp.GetRetCode() != 0 {
if rsp.RetCode != 0 {
return nil, errors.Errorf("server error, code: %v msg: %v", rsp.RetCode, rsp.ErrMsg)
}
texts := make([]*TextDetection, 0, len(rsp.OcrRspBody.TextDetections))
@ -378,18 +392,18 @@ func decodeImageOcrResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte)
points := make([]*Coordinate, 0, len(text.Polygon.Coordinates))
for _, c := range text.Polygon.Coordinates {
points = append(points, &Coordinate{
X: c.GetX(),
Y: c.GetY(),
X: c.X,
Y: c.Y,
})
}
texts = append(texts, &TextDetection{
Text: text.GetDetectedText(),
Confidence: int32(text.GetConfidence()),
Text: text.DetectedText,
Confidence: text.Confidence,
Coordinates: points,
})
}
return &OcrResponse{
Texts: texts,
Language: rsp.OcrRspBody.GetLanguage(),
Language: rsp.OcrRspBody.Language,
}, nil
}

View File

@ -0,0 +1,151 @@
package auth
//go:generate stringer -type=Protocol -linecomment
type Protocol int
const (
Unset Protocol = iota
AndroidPhone // Android Phone
AndroidWatch // Android Watch
MacOS // MacOS
QiDian // 企点
IPad // iPad
)
type AppVersion struct {
ApkSign []byte
ApkId string
SortVersionName string
SdkVersion string
AppId uint32
SubAppId uint32
BuildTime uint32
SSOVersion uint32
MiscBitmap uint32
SubSigmap uint32
MainSigMap uint32
Protocol Protocol
}
func (i Protocol) Version() *AppVersion {
switch i {
case AndroidPhone: // Dumped by mirai from qq android v8.8.38
return &AppVersion{
ApkId: "com.tencent.mobileqq",
AppId: 537100432,
SubAppId: 537100432,
SortVersionName: "8.8.38",
BuildTime: 1634310940,
ApkSign: []byte{0xA6, 0xB7, 0x45, 0xBF, 0x24, 0xA2, 0xC2, 0x77, 0x52, 0x77, 0x16, 0xF6, 0xF3, 0x6E, 0xB6, 0x8D},
SdkVersion: "6.0.0.2487",
SSOVersion: 16,
MiscBitmap: 184024956,
SubSigmap: 0x10400,
MainSigMap: 34869472,
Protocol: i,
}
case AndroidWatch:
return &AppVersion{
ApkId: "com.tencent.qqlite",
AppId: 537064446,
SubAppId: 537064446,
SortVersionName: "2.0.5",
BuildTime: 1559564731,
ApkSign: []byte{0xA6, 0xB7, 0x45, 0xBF, 0x24, 0xA2, 0xC2, 0x77, 0x52, 0x77, 0x16, 0xF6, 0xF3, 0x6E, 0xB6, 0x8D},
SdkVersion: "6.0.0.236",
SSOVersion: 5,
MiscBitmap: 16252796,
SubSigmap: 0x10400,
MainSigMap: 34869472,
Protocol: i,
}
case IPad:
return &AppVersion{
ApkId: "com.tencent.minihd.qq",
AppId: 537097188,
SubAppId: 537097188,
SortVersionName: "8.8.35",
BuildTime: 1595836208,
ApkSign: []byte{170, 57, 120, 244, 31, 217, 111, 249, 145, 74, 102, 158, 24, 100, 116, 199},
SdkVersion: "6.0.0.2433",
SSOVersion: 12,
MiscBitmap: 150470524,
SubSigmap: 66560,
MainSigMap: 1970400,
Protocol: i,
}
case MacOS:
return &AppVersion{
ApkId: "com.tencent.minihd.qq",
AppId: 537064315,
SubAppId: 537064315,
SortVersionName: "5.8.9",
BuildTime: 1595836208,
ApkSign: []byte{170, 57, 120, 244, 31, 217, 111, 249, 145, 74, 102, 158, 24, 100, 116, 199},
SdkVersion: "6.0.0.2433",
SSOVersion: 12,
MiscBitmap: 150470524,
SubSigmap: 66560,
MainSigMap: 1970400,
Protocol: i,
}
case QiDian:
return &AppVersion{
ApkId: "com.tencent.qidian",
AppId: 537061386,
SubAppId: 537036590,
SortVersionName: "3.8.6",
BuildTime: 1556628836,
ApkSign: []byte{160, 30, 236, 171, 133, 233, 227, 186, 43, 15, 106, 21, 140, 133, 92, 41},
SdkVersion: "6.0.0.2365",
SSOVersion: 5,
MiscBitmap: 49807228,
SubSigmap: 66560,
MainSigMap: 34869472,
Protocol: i,
}
}
return nil
}
type SigInfo struct {
LoginBitmap uint64
TGT []byte
TGTKey []byte
SrmToken []byte // study room manager | 0x16a
T133 []byte
EncryptedA1 []byte
UserStKey []byte
UserStWebSig []byte
SKey []byte
SKeyExpiredTime int64
D2 []byte
D2Key []byte
DeviceToken []byte
PsKeyMap map[string][]byte
Pt4TokenMap map[string][]byte
// Others
OutPacketSessionID []byte
Dpwd []byte
// tlv cache
T104 []byte
T174 []byte
G []byte
T402 []byte
RandSeed []byte // t403
// rollbackSig []byte
// t149 []byte
// t150 []byte
// t528 []byte
// t530 []byte
// sync info
SyncCookie []byte
PubAccountCookie []byte
Ksid []byte
// msgCtrlBuf []byte
}

View File

@ -0,0 +1,213 @@
package auth
import (
"crypto/md5"
"encoding/hex"
"encoding/json"
"math/rand"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/internal/proto"
)
type OSVersion struct {
Incremental []byte
Release []byte
CodeName []byte
SDK uint32
}
type Device struct {
Display []byte
Product []byte
Device []byte
Board []byte
Brand []byte
Model []byte
Bootloader []byte
FingerPrint []byte
BootId []byte
ProcVersion []byte
BaseBand []byte
SimInfo []byte
OSType []byte
MacAddress []byte
IpAddress []byte
WifiBSSID []byte
WifiSSID []byte
IMSIMd5 []byte
IMEI string
AndroidId []byte
APN []byte
VendorName []byte
VendorOSName []byte
Guid []byte
TgtgtKey []byte
Protocol Protocol
Version *OSVersion
}
func (info *Device) ToJson() []byte {
f := &deviceFile{
Display: string(info.Display),
Product: string(info.Product),
Device: string(info.Device),
Board: string(info.Board),
Model: string(info.Model),
FingerPrint: string(info.FingerPrint),
BootId: string(info.BootId),
ProcVersion: string(info.ProcVersion),
IMEI: info.IMEI,
Brand: string(info.Brand),
Bootloader: string(info.Bootloader),
BaseBand: string(info.BaseBand),
AndroidId: string(info.AndroidId),
Version: &osVersionFile{
Incremental: string(info.Version.Incremental),
Release: string(info.Version.Release),
Codename: string(info.Version.CodeName),
Sdk: info.Version.SDK,
},
SimInfo: string(info.SimInfo),
OsType: string(info.OSType),
MacAddress: string(info.MacAddress),
IpAddress: []int32{int32(info.IpAddress[0]), int32(info.IpAddress[1]), int32(info.IpAddress[2]), int32(info.IpAddress[3])},
WifiBSSID: string(info.WifiBSSID),
WifiSSID: string(info.WifiSSID),
ImsiMd5: hex.EncodeToString(info.IMSIMd5),
Apn: string(info.APN),
VendorName: string(info.VendorName),
VendorOSName: string(info.VendorOSName),
Protocol: int(info.Protocol),
}
d, _ := json.Marshal(f)
return d
}
func (info *Device) ReadJson(d []byte) error {
var f deviceFile
if err := json.Unmarshal(d, &f); err != nil {
return errors.Wrap(err, "failed to unmarshal json message")
}
setIfNotEmpty := func(trg *[]byte, str string) {
if str != "" {
*trg = []byte(str)
}
}
setIfNotEmpty(&info.Display, f.Display)
setIfNotEmpty(&info.Product, f.Product)
setIfNotEmpty(&info.Device, f.Device)
setIfNotEmpty(&info.Board, f.Board)
setIfNotEmpty(&info.Brand, f.Brand)
setIfNotEmpty(&info.Model, f.Model)
setIfNotEmpty(&info.Bootloader, f.Bootloader)
setIfNotEmpty(&info.FingerPrint, f.FingerPrint)
setIfNotEmpty(&info.BootId, f.BootId)
setIfNotEmpty(&info.ProcVersion, f.ProcVersion)
setIfNotEmpty(&info.BaseBand, f.BaseBand)
setIfNotEmpty(&info.SimInfo, f.SimInfo)
setIfNotEmpty(&info.OSType, f.OsType)
setIfNotEmpty(&info.MacAddress, f.MacAddress)
if len(f.IpAddress) == 4 {
info.IpAddress = []byte{byte(f.IpAddress[0]), byte(f.IpAddress[1]), byte(f.IpAddress[2]), byte(f.IpAddress[3])}
}
setIfNotEmpty(&info.WifiBSSID, f.WifiBSSID)
setIfNotEmpty(&info.WifiSSID, f.WifiSSID)
if len(f.ImsiMd5) != 0 {
imsiMd5, err := hex.DecodeString(f.ImsiMd5)
if err != nil {
info.IMSIMd5 = imsiMd5
}
}
if f.IMEI != "" {
info.IMEI = f.IMEI
}
setIfNotEmpty(&info.APN, f.Apn)
setIfNotEmpty(&info.VendorName, f.VendorName)
setIfNotEmpty(&info.VendorOSName, f.VendorOSName)
setIfNotEmpty(&info.AndroidId, f.AndroidId)
if f.AndroidId == "" {
info.AndroidId = info.Display // ?
}
switch f.Protocol {
case 1, 2, 3, 4, 5:
info.Protocol = Protocol(f.Protocol)
default:
info.Protocol = IPad
}
info.GenNewGuid()
info.GenNewTgtgtKey()
return nil
}
func (info *Device) GenNewGuid() {
t := md5.Sum(append(info.AndroidId, info.MacAddress...))
info.Guid = t[:]
}
func (info *Device) GenNewTgtgtKey() {
r := make([]byte, 16)
rand.Read(r)
h := md5.New()
h.Write(r)
h.Write(info.Guid)
info.TgtgtKey = h.Sum(nil)
}
func (info *Device) GenDeviceInfoData() []byte {
m := &pb.DeviceInfo{
Bootloader: string(info.Bootloader),
ProcVersion: string(info.ProcVersion),
Codename: string(info.Version.CodeName),
Incremental: string(info.Version.Incremental),
Fingerprint: string(info.FingerPrint),
BootId: string(info.BootId),
AndroidId: string(info.AndroidId),
BaseBand: string(info.BaseBand),
InnerVersion: string(info.Version.Incremental),
}
data, err := proto.Marshal(m)
if err != nil {
panic(errors.Wrap(err, "failed to unmarshal protobuf message"))
}
return data
}
type deviceFile struct {
Display string `json:"display"`
Product string `json:"product"`
Device string `json:"device"`
Board string `json:"board"`
Model string `json:"model"`
FingerPrint string `json:"finger_print"`
BootId string `json:"boot_id"`
ProcVersion string `json:"proc_version"`
Protocol int `json:"protocol"` // 0: Pad 1: Phone 2: Watch
IMEI string `json:"imei"`
Brand string `json:"brand"`
Bootloader string `json:"bootloader"`
BaseBand string `json:"base_band"`
Version *osVersionFile `json:"version"`
SimInfo string `json:"sim_info"`
OsType string `json:"os_type"`
MacAddress string `json:"mac_address"`
IpAddress []int32 `json:"ip_address"`
WifiBSSID string `json:"wifi_bssid"`
WifiSSID string `json:"wifi_ssid"`
ImsiMd5 string `json:"imsi_md5"`
AndroidId string `json:"android_id"`
Apn string `json:"apn"`
VendorName string `json:"vendor_name"`
VendorOSName string `json:"vendor_os_name"`
}
type osVersionFile struct {
Incremental string `json:"incremental"`
Release string `json:"release"`
Codename string `json:"codename"`
Sdk uint32 `json:"sdk"`
}

View File

@ -0,0 +1,28 @@
// Code generated by "stringer -type=Protocol -linecomment"; DO NOT EDIT.
package auth
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Unset-0]
_ = x[AndroidPhone-1]
_ = x[AndroidWatch-2]
_ = x[MacOS-3]
_ = x[QiDian-4]
_ = x[IPad-5]
}
const _Protocol_name = "UnsetAndroid PhoneAndroid WatchMacOS企点iPad"
var _Protocol_index = [...]uint8{0, 5, 18, 31, 36, 42, 46}
func (i Protocol) String() string {
if i < 0 || i >= Protocol(len(_Protocol_index)-1) {
return "Protocol(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Protocol_name[_Protocol_index[i]:_Protocol_index[i+1]]
}

View File

@ -0,0 +1,31 @@
package highway
import (
binary2 "encoding/binary"
"fmt"
"net"
"github.com/Mrs4s/MiraiGo/binary"
)
type Addr struct {
IP uint32
Port int
}
func (a Addr) asTcpAddr() *net.TCPAddr {
addr := &net.TCPAddr{
IP: make([]byte, 4),
Port: a.Port,
}
binary2.LittleEndian.PutUint32(addr.IP, a.IP)
return addr
}
func (a Addr) AsNetIP() net.IP {
return net.IPv4(byte(a.IP>>24), byte(a.IP>>16), byte(a.IP>>8), byte(a.IP))
}
func (a Addr) String() string {
return fmt.Sprintf("%v:%v", binary.UInt32ToIPV4Address(a.IP), a.Port)
}

View File

@ -0,0 +1,276 @@
package highway
import (
"crypto/md5"
"io"
"net"
"os"
"sync"
"sync/atomic"
"time"
"github.com/pkg/errors"
"golang.org/x/sync/errgroup"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/utils"
)
type BdhInput struct {
CommandID int32
File string // upload multi-thread required
Body io.ReadSeeker
Ticket []byte
Ext []byte
Encrypt bool
}
func (bdh *BdhInput) encrypt(key []byte) error {
if bdh.Encrypt {
if len(key) == 0 {
return errors.New("session key not found. maybe miss some packet?")
}
bdh.Ext = binary.NewTeaCipher(key).Encrypt(bdh.Ext)
}
return nil
}
func (s *Session) UploadBDH(input BdhInput) ([]byte, error) {
if len(s.SsoAddr) == 0 {
return nil, errors.New("srv addrs not found. maybe miss some packet?")
}
addr := s.SsoAddr[0].String()
sum, length := utils.ComputeMd5AndLength(input.Body)
_, _ = input.Body.Seek(0, io.SeekStart)
if err := input.encrypt(s.SessionKey); err != nil {
return nil, errors.Wrap(err, "encrypt error")
}
conn, err := net.DialTimeout("tcp", addr, time.Second*20)
if err != nil {
return nil, errors.Wrap(err, "connect error")
}
defer conn.Close()
reader := binary.NewNetworkReader(conn)
if err = s.sendEcho(conn); err != nil {
return nil, err
}
const chunkSize = 256 * 1024
var rspExt []byte
offset := 0
chunk := make([]byte, chunkSize)
w := binary.SelectWriter()
defer binary.PutWriter(w)
for {
chunk = chunk[:chunkSize]
rl, err := io.ReadFull(input.Body, chunk)
if errors.Is(err, io.EOF) {
break
}
if errors.Is(err, io.ErrUnexpectedEOF) {
chunk = chunk[:rl]
}
ch := md5.Sum(chunk)
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: s.Uin,
Command: "PicUp.DataUp",
Seq: s.nextSeq(),
Appid: s.AppID,
Dataflag: 4096,
CommandId: input.CommandID,
LocaleId: 2052,
},
MsgSeghead: &pb.SegHead{
Filesize: length,
Dataoffset: int64(offset),
Datalength: int32(rl),
Serviceticket: input.Ticket,
Md5: ch[:],
FileMd5: sum,
},
ReqExtendinfo: input.Ext,
})
offset += rl
w.Reset()
writeHeadBody(w, head, chunk)
_, err = conn.Write(w.Bytes())
if err != nil {
return nil, errors.Wrap(err, "write conn error")
}
rspHead, _, err := readResponse(reader)
if err != nil {
return nil, errors.Wrap(err, "highway upload error")
}
if rspHead.ErrorCode != 0 {
return nil, errors.Errorf("upload failed: %d", rspHead.ErrorCode)
}
if rspHead.RspExtendinfo != nil {
rspExt = rspHead.RspExtendinfo
}
if rspHead.MsgSeghead != nil && rspHead.MsgSeghead.Serviceticket != nil {
input.Ticket = rspHead.MsgSeghead.Serviceticket
}
}
return rspExt, nil
}
func (s *Session) UploadBDHMultiThread(input BdhInput, threadCount int) ([]byte, error) {
if len(s.SsoAddr) == 0 {
return nil, errors.New("srv addrs not found. maybe miss some packet?")
}
addr := s.SsoAddr[0].String()
stat, err := os.Stat(input.File)
if err != nil {
return nil, errors.Wrap(err, "get stat error")
}
file, err := os.OpenFile(input.File, os.O_RDONLY, 0o666)
if err != nil {
return nil, errors.Wrap(err, "open file error")
}
sum, length := utils.ComputeMd5AndLength(file)
_, _ = file.Seek(0, io.SeekStart)
if err := input.encrypt(s.SessionKey); err != nil {
return nil, errors.Wrap(err, "encrypt error")
}
// for small file and small thread count,
// use UploadBDH instead of UploadBDHMultiThread
if length < 1024*1024*3 || threadCount < 2 {
input.Body = file
return s.UploadBDH(input)
}
type BlockMetaData struct {
Id int
BeginOffset int64
EndOffset int64
}
const blockSize int64 = 1024 * 512
var (
blocks []*BlockMetaData
rspExt []byte
BlockId = ^uint32(0) // -1
uploadedCount uint32
cond = sync.NewCond(&sync.Mutex{})
)
// Init Blocks
{
var temp int64 = 0
for temp+blockSize < stat.Size() {
blocks = append(blocks, &BlockMetaData{
Id: len(blocks),
BeginOffset: temp,
EndOffset: temp + blockSize,
})
temp += blockSize
}
blocks = append(blocks, &BlockMetaData{
Id: len(blocks),
BeginOffset: temp,
EndOffset: stat.Size(),
})
}
doUpload := func() error {
// send signal complete uploading
defer cond.Signal()
conn, err := net.DialTimeout("tcp", addr, time.Second*20)
if err != nil {
return errors.Wrap(err, "connect error")
}
defer conn.Close()
chunk, _ := os.OpenFile(input.File, os.O_RDONLY, 0o666)
defer chunk.Close()
reader := binary.NewNetworkReader(conn)
if err = s.sendEcho(conn); err != nil {
return err
}
buffer := make([]byte, blockSize)
w := binary.SelectWriter()
w.Reset()
w.Grow(600 * 1024) // 复用,600k 不要放回池中
for {
nextId := atomic.AddUint32(&BlockId, 1)
if nextId >= uint32(len(blocks)) {
break
}
block := blocks[nextId]
if block.Id == len(blocks)-1 {
cond.L.Lock()
for atomic.LoadUint32(&uploadedCount) != uint32(len(blocks))-1 {
cond.Wait()
}
cond.L.Unlock()
}
buffer = buffer[:blockSize]
_, _ = chunk.Seek(block.BeginOffset, io.SeekStart)
ri, err := io.ReadFull(chunk, buffer)
if err != nil {
if err == io.EOF {
break
}
if err == io.ErrUnexpectedEOF {
buffer = buffer[:ri]
} else {
return err
}
}
ch := md5.Sum(buffer)
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: s.Uin,
Command: "PicUp.DataUp",
Seq: s.nextSeq(),
Appid: s.AppID,
Dataflag: 4096,
CommandId: input.CommandID,
LocaleId: 2052,
},
MsgSeghead: &pb.SegHead{
Filesize: stat.Size(),
Dataoffset: block.BeginOffset,
Datalength: int32(ri),
Serviceticket: input.Ticket,
Md5: ch[:],
FileMd5: sum,
},
ReqExtendinfo: input.Ext,
})
w.Reset()
writeHeadBody(w, head, buffer)
_, err = conn.Write(w.Bytes())
if err != nil {
return errors.Wrap(err, "write conn error")
}
rspHead, _, err := readResponse(reader)
if err != nil {
return errors.Wrap(err, "highway upload error")
}
if rspHead.ErrorCode != 0 {
return errors.Errorf("upload failed: %d", rspHead.ErrorCode)
}
if rspHead.RspExtendinfo != nil {
rspExt = rspHead.RspExtendinfo
}
atomic.AddUint32(&uploadedCount, 1)
}
return nil
}
group := errgroup.Group{}
for i := 0; i < threadCount; i++ {
group.Go(doUpload)
}
err = group.Wait()
return rspExt, err
}

View File

@ -0,0 +1,263 @@
package highway
import (
"bytes"
"crypto/md5"
"fmt"
"io"
"net"
"net/http"
"sync/atomic"
"time"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/utils"
)
type Session struct {
Uin string
AppID int32
SigSession []byte
SessionKey []byte
SsoAddr []Addr
seq int32
}
const highwayMaxResponseSize int32 = 1024 * 100 // 100k
func (s *Session) AddrLength() int {
return len(s.SsoAddr)
}
func (s *Session) AppendAddr(ip, port uint32) {
addr := Addr{
IP: ip,
Port: int(port),
}
s.SsoAddr = append(s.SsoAddr, addr)
}
type Input struct {
CommandID int32
Key []byte
Body io.ReadSeeker
}
func (s *Session) Upload(addr Addr, input Input) error {
fh, length := utils.ComputeMd5AndLength(input.Body)
_, _ = input.Body.Seek(0, io.SeekStart)
conn, err := net.DialTimeout("tcp", addr.String(), time.Second*3)
if err != nil {
return errors.Wrap(err, "connect error")
}
defer conn.Close()
const chunkSize = 8192 * 8
chunk := make([]byte, chunkSize)
offset := 0
reader := binary.NewNetworkReader(conn)
w := binary.SelectWriter()
defer binary.PutWriter(w)
for {
chunk = chunk[:chunkSize]
rl, err := io.ReadFull(input.Body, chunk)
if errors.Is(err, io.EOF) {
break
}
if errors.Is(err, io.ErrUnexpectedEOF) {
chunk = chunk[:rl]
}
ch := md5.Sum(chunk)
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: s.Uin,
Command: "PicUp.DataUp",
Seq: s.nextSeq(),
Appid: s.AppID,
Dataflag: 4096,
CommandId: input.CommandID,
LocaleId: 2052,
},
MsgSeghead: &pb.SegHead{
Filesize: length,
Dataoffset: int64(offset),
Datalength: int32(rl),
Serviceticket: input.Key,
Md5: ch[:],
FileMd5: fh,
},
ReqExtendinfo: []byte{},
})
offset += rl
w.Reset()
writeHeadBody(w, head, chunk)
_, err = conn.Write(w.Bytes())
if err != nil {
return errors.Wrap(err, "write conn error")
}
rspHead, _, err := readResponse(reader)
if err != nil {
return errors.Wrap(err, "highway upload error")
}
if rspHead.ErrorCode != 0 {
return errors.New("upload failed")
}
}
return nil
}
type ExcitingInput struct {
CommandID int32
Body io.ReadSeeker
Ticket []byte
Ext []byte
}
func (s *Session) UploadExciting(input ExcitingInput) ([]byte, error) {
fileMd5, fileLength := utils.ComputeMd5AndLength(input.Body)
_, _ = input.Body.Seek(0, io.SeekStart)
addr := s.SsoAddr[0]
url := fmt.Sprintf("http://%v/cgi-bin/httpconn?htcmd=0x6FF0087&Uin=%v", addr, s.Uin)
var (
rspExt []byte
offset int64 = 0
chunkSize = 524288
)
chunk := make([]byte, chunkSize)
w := binary.SelectWriter()
w.Reset()
w.Grow(600 * 1024) // 复用,600k 不要放回池中
for {
chunk = chunk[:chunkSize]
rl, err := io.ReadFull(input.Body, chunk)
if err == io.EOF {
break
}
if err == io.ErrUnexpectedEOF {
chunk = chunk[:rl]
}
ch := md5.Sum(chunk)
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: s.Uin,
Command: "PicUp.DataUp",
Seq: s.nextSeq(),
Appid: s.AppID,
Dataflag: 0,
CommandId: input.CommandID,
LocaleId: 0,
},
MsgSeghead: &pb.SegHead{
Filesize: fileLength,
Dataoffset: offset,
Datalength: int32(rl),
Serviceticket: input.Ticket,
Md5: ch[:],
FileMd5: fileMd5,
},
ReqExtendinfo: input.Ext,
})
offset += int64(rl)
w.Reset()
writeHeadBody(w, head, chunk)
req, _ := http.NewRequest("POST", url, bytes.NewReader(w.Bytes()))
req.Header.Set("Accept", "*/*")
req.Header.Set("Connection", "Keep-Alive")
req.Header.Set("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)")
req.Header.Set("Pragma", "no-cache")
rsp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, errors.Wrap(err, "request error")
}
body, _ := io.ReadAll(rsp.Body)
_ = rsp.Body.Close()
r := binary.NewReader(body)
r.ReadByte()
hl := r.ReadInt32()
a2 := r.ReadInt32()
h := r.ReadBytes(int(hl))
r.ReadBytes(int(a2))
rspHead := new(pb.RspDataHighwayHead)
if err = proto.Unmarshal(h, rspHead); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rspHead.ErrorCode != 0 {
return nil, errors.Errorf("upload failed: %d", rspHead.ErrorCode)
}
if rspHead.RspExtendinfo != nil {
rspExt = rspHead.RspExtendinfo
}
}
return rspExt, nil
}
func (s *Session) nextSeq() int32 {
return atomic.AddInt32(&s.seq, 2)
}
func (s *Session) sendHeartbreak(conn net.Conn) error {
head, _ := proto.Marshal(&pb.ReqDataHighwayHead{
MsgBasehead: &pb.DataHighwayHead{
Version: 1,
Uin: s.Uin,
Command: "PicUp.Echo",
Seq: s.nextSeq(),
Appid: s.AppID,
Dataflag: 4096,
CommandId: 0,
LocaleId: 2052,
},
})
w := binary.SelectWriter()
writeHeadBody(w, head, nil)
_, err := conn.Write(w.Bytes())
binary.PutWriter(w)
return err
}
func (s *Session) sendEcho(conn net.Conn) error {
err := s.sendHeartbreak(conn)
if err != nil {
return errors.Wrap(err, "echo error")
}
if _, _, err = readResponse(binary.NewNetworkReader(conn)); err != nil {
return errors.Wrap(err, "echo error")
}
return nil
}
func writeHeadBody(w *binary.Writer, head []byte, body []byte) {
w.WriteByte(40)
w.WriteUInt32(uint32(len(head)))
w.WriteUInt32(uint32(len(body)))
w.Write(head)
w.Write(body)
w.WriteByte(41)
}
func readResponse(r *binary.NetworkReader) (*pb.RspDataHighwayHead, []byte, error) {
_, err := r.ReadByte()
if err != nil {
return nil, nil, errors.Wrap(err, "failed to read byte")
}
hl, _ := r.ReadInt32()
a2, _ := r.ReadInt32()
if hl > highwayMaxResponseSize || a2 > highwayMaxResponseSize {
return nil, nil, errors.Errorf("highway response invild. head size: %v body size: %v", hl, a2)
}
head, _ := r.ReadBytes(int(hl))
payload, _ := r.ReadBytes(int(a2))
_, _ = r.ReadByte()
rsp := new(pb.RspDataHighwayHead)
if err = proto.Unmarshal(head, rsp); err != nil {
return nil, nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return rsp, payload, nil
}

View File

@ -0,0 +1,172 @@
package network
import (
"encoding/binary"
"io"
"net"
"sync"
"sync/atomic"
"unsafe"
"github.com/pkg/errors"
)
type TCPListener struct {
//lock sync.RWMutex
conn *net.TCPConn
//connected bool
// PlannedDisconnect 预料中的断开连接
// 如调用 Close() Connect()
PlannedDisconnect func(*TCPListener)
// UnexpectedDisconnect 未预料的断开连接
UnexpectedDisconnect func(*TCPListener, error)
}
func (t *TCPListener) getConn() *net.TCPConn {
return (*net.TCPConn)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&t.conn))))
}
func (t *TCPListener) setConn(conn *net.TCPConn) (swapped bool) {
return atomic.CompareAndSwapPointer((*unsafe.Pointer)(unsafe.Pointer(&t.conn)), unsafe.Pointer(nil), unsafe.Pointer(conn))
}
func (t *TCPListener) closeConn() *net.TCPConn {
return (*net.TCPConn)(atomic.SwapPointer((*unsafe.Pointer)(unsafe.Pointer(&t.conn)), unsafe.Pointer(nil)))
}
func (t *TCPListener) Connected() bool {
// 等同于 t.getConn() != nil (? copilot写的)
return t.getConn() != nil
}
func (t *TCPListener) Connect(addr *net.TCPAddr) error {
t.Close()
conn, err := net.DialTCP("tcp", nil, addr)
if err != nil {
return errors.Wrap(err, "dial tcp error")
}
t.setConn(conn)
//t.lock.Lock()
//defer t.lock.Unlock()
//t.conn = conn
return nil
}
// ConnectFastest 连接到最快的服务器
// TODO 禁用不可用服务器
func (t *TCPListener) ConnectFastest(addr []*net.TCPAddr) (*net.TCPAddr, error) {
ch := make(chan error)
wg := sync.WaitGroup{}
wg.Add(len(addr))
for _, remote := range addr {
go func(remote *net.TCPAddr) {
defer wg.Done()
conn, err := net.DialTCP("tcp", nil, remote)
if err != nil {
return
}
//addrs = append(addrs, remote)
if !t.setConn(conn) {
_ = conn.Close()
return
}
ch <- nil
}(remote)
}
go func() {
wg.Wait()
if t.getConn() == nil {
ch <- errors.New("All addr are unreachable")
}
}()
err := <-ch
if err != nil {
return nil, err
}
conn := t.getConn()
return conn.RemoteAddr().(*net.TCPAddr), nil
}
func (t *TCPListener) Write(buf []byte) error {
if conn := t.getConn(); conn != nil {
_, err := conn.Write(buf)
if err != nil {
t.unexpectedClose(err)
return ErrConnectionBroken
}
return nil
}
return ErrConnectionBroken
}
func (t *TCPListener) ReadBytes(len int) ([]byte, error) {
buf := make([]byte, len)
if conn := t.getConn(); conn != nil {
_, err := io.ReadFull(conn, buf)
if err != nil {
// time.Sleep(time.Millisecond * 100) // 服务器会发送offline包后立即断开连接, 此时还没解析, 可能还是得加锁
t.unexpectedClose(err)
return nil, ErrConnectionBroken
}
return buf, nil
}
return nil, ErrConnectionBroken
}
func (t *TCPListener) ReadInt32() (int32, error) {
b, err := t.ReadBytes(4)
if err != nil {
return 0, err
}
return int32(binary.BigEndian.Uint32(b)), nil
}
func (t *TCPListener) Close() {
t.close()
t.invokePlannedDisconnect()
}
func (t *TCPListener) unexpectedClose(err error) {
t.close()
t.invokeUnexpectedDisconnect(err)
}
func (t *TCPListener) close() {
if conn := t.closeConn(); conn != nil {
_ = conn.Close()
}
}
func (t *TCPListener) invokePlannedDisconnect() {
//if t.Connected() {
t.PlannedDisconnect(t)
//}
//t.lock.RLock()
//defer t.lock.RUnlock()
//if t.plannedDisconnect != nil && t.connected {
// go t.plannedDisconnect(t)
// t.connected = false
//}
}
func (t *TCPListener) invokeUnexpectedDisconnect(err error) {
//if t.Connected() {
t.UnexpectedDisconnect(t, err)
//}
//t.lock.RLock()
//defer t.lock.RUnlock()
//if t.unexpectedDisconnect != nil && t.connected {
// go t.unexpectedDisconnect(t, err)
// t.connected = false
//}
}
//func (t *TCPListener) getConn() net.Conn {
// t.lock.RLock()
// defer t.lock.RUnlock()
// return t.conn
//}

View File

@ -0,0 +1,30 @@
package network
type RequestType uint32
const (
RequestTypeLogin = 0x0A
RequestTypeSimple = 0x0B
)
var emptyKey = make([]byte, 16)
type EncryptType uint32
const (
EncryptTypeNoEncrypt EncryptType = iota // 0x00
EncryptTypeD2Key // 0x01
EncryptTypeEmptyKey // 0x02
)
type Request struct {
Type RequestType
EncryptType EncryptType
SequenceID int32
Uin int64
CommandName string
Body []byte
Params Params
Decode func(*Response) (interface{}, error) // callAndDecode use this function to decode response
}

View File

@ -0,0 +1,96 @@
package network
import (
"strconv"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/binary"
)
type Response struct {
SequenceID int32
CommandName string
Body []byte
// Request is the original request that obtained this response.
Request *Request
}
func (r *Response) Params() Params {
if r.Request == nil {
return nil
}
return r.Request.Params
}
var (
ErrSessionExpired = errors.New("session expired")
ErrPacketDropped = errors.New("packet dropped")
ErrInvalidPacketType = errors.New("invalid packet type")
ErrConnectionBroken = errors.New("connection broken")
)
func (t *Transport) ReadRequest(head []byte) (*Request, error) {
req := new(Request)
r := binary.NewReader(head)
req.Type = RequestType(r.ReadInt32())
if req.Type != RequestTypeLogin && req.Type != RequestTypeSimple {
return req, ErrInvalidPacketType
}
req.EncryptType = EncryptType(r.ReadByte())
_ = r.ReadByte() // 0x00?
req.Uin, _ = strconv.ParseInt(r.ReadString(), 10, 64)
body := r.ReadAvailable()
switch req.EncryptType {
case EncryptTypeNoEncrypt:
// nothing to do
case EncryptTypeD2Key:
body = binary.NewTeaCipher(t.Sig.D2Key).Decrypt(body)
case EncryptTypeEmptyKey:
body = binary.NewTeaCipher(emptyKey).Decrypt(body)
}
err := t.readSSOFrame(req, body)
return req, err
}
func (t *Transport) readSSOFrame(req *Request, payload []byte) error {
reader := binary.NewReader(payload)
headLen := reader.ReadInt32()
if headLen-4 > int32(reader.Len()) {
return errors.WithStack(ErrPacketDropped)
}
head := binary.NewReader(reader.ReadBytes(int(headLen) - 4))
req.SequenceID = head.ReadInt32()
retCode := head.ReadInt32()
message := head.ReadString()
switch retCode {
case 0:
// ok
case -10008:
return errors.WithMessage(ErrSessionExpired, message)
default:
return errors.Errorf("return code unsuccessful: %d message: %s", retCode, message)
}
req.CommandName = head.ReadString()
if req.CommandName == "Heartbeat.Alive" {
return nil
}
_ = head.ReadInt32Bytes() // session id
compressedFlag := head.ReadInt32()
bodyLen := reader.ReadInt32() - 4
body := reader.ReadAvailable()
if bodyLen > 0 && bodyLen < int32(len(body)) {
body = body[:bodyLen]
}
switch compressedFlag {
case 0, 8:
case 1:
body = binary.ZlibUncompress(body)
}
req.Body = body
return nil
}

View File

@ -0,0 +1,34 @@
package network
// Call is a client-side RPC call.
// refer to `net/rpc`
type Call struct {
Request *Request
Response *Response
Err error
Done chan *Call
}
type Params map[string]interface{}
func (p Params) Bool(k string) bool {
if p == nil {
return false
}
i, ok := p[k]
if !ok {
return false
}
return i.(bool)
}
func (p Params) Int32(k string) int32 {
if p == nil {
return 0
}
i, ok := p[k]
if !ok {
return 0
}
return i.(int32)
}

View File

@ -0,0 +1,206 @@
package network
import (
goBinary "encoding/binary"
"fmt"
"io"
"net"
"strconv"
"sync"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/internal/auth"
)
// Transport is a network transport.
type Transport struct {
// sessionMu sync.Mutex
Sig *auth.SigInfo
Version *auth.AppVersion
Device *auth.Device
// connection
connMu sync.Mutex
servers []*net.TCPAddr
curServerAddr *net.TCPAddr
conn TCPListener
}
func (t *Transport) AddServerAddr(addr *net.TCPAddr) {
t.connMu.Lock()
defer t.connMu.Unlock()
t.servers = append(t.servers, addr)
}
func (t *Transport) GetServerAddr() *net.TCPAddr {
t.connMu.Lock()
defer t.connMu.Unlock()
return t.curServerAddr
}
func (t *Transport) ServerCount() int {
t.connMu.Lock()
defer t.connMu.Unlock()
return len(t.servers)
}
func (t *Transport) PlannedDisconnect(fun func(*TCPListener)) {
t.conn.PlannedDisconnect = fun
}
func (t *Transport) UnexpectedDisconnect(fun func(*TCPListener, error)) {
t.conn.UnexpectedDisconnect = fun
}
func (t *Transport) ConnectFastest() (chosen *net.TCPAddr, err error) {
t.connMu.Lock()
defer t.connMu.Unlock()
chosen, err = t.conn.ConnectFastest(t.servers)
t.curServerAddr = chosen
return
}
func (t *Transport) Close() {
t.conn.Close()
}
func (t *Transport) Write(data []byte) error {
return t.conn.Write(data)
}
func (t *Transport) packBody(req *Request, w *binary.Writer) {
pos := w.FillUInt32()
if req.Type == RequestTypeLogin {
w.WriteUInt32(uint32(req.SequenceID))
w.WriteUInt32(t.Version.AppId)
w.WriteUInt32(t.Version.SubAppId)
w.Write([]byte{0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00})
tgt := t.Sig.TGT
if len(tgt) == 0 || len(tgt) == 4 {
w.WriteUInt32(0x04)
} else {
w.WriteUInt32(uint32(len(tgt) + 4))
w.Write(tgt)
}
}
w.WriteString(req.CommandName)
w.WriteUInt32(uint32(len(t.Sig.OutPacketSessionID) + 4))
w.Write(t.Sig.OutPacketSessionID)
if req.Type == RequestTypeLogin {
w.WriteString(t.Device.IMEI)
w.WriteUInt32(0x04)
w.WriteUInt16(uint16(len(t.Sig.Ksid)) + 2)
w.Write(t.Sig.Ksid)
}
w.WriteUInt32(0x04)
w.WriteUInt32At(pos, uint32(w.Len()-pos))
w.WriteUInt32(uint32(len(req.Body) + 4))
w.Write(req.Body)
}
// PackPacket packs a packet.
func (t *Transport) PackPacket(req *Request) []byte {
// todo(wdvxdr): combine pack packet, send packet and return the response
if len(t.Sig.D2) == 0 {
req.EncryptType = EncryptTypeEmptyKey
}
w := binary.SelectWriter()
defer binary.PutWriter(w)
pos := w.FillUInt32()
// vvv w.Write(head) vvv
w.WriteUInt32(uint32(req.Type))
w.WriteByte(byte(req.EncryptType))
switch req.Type {
case RequestTypeLogin:
switch req.EncryptType {
case EncryptTypeD2Key:
w.WriteUInt32(uint32(len(t.Sig.D2) + 4))
w.Write(t.Sig.D2)
default:
w.WriteUInt32(4)
}
case RequestTypeSimple:
w.WriteUInt32(uint32(req.SequenceID))
}
w.WriteByte(0x00)
w.WriteString(strconv.FormatInt(req.Uin, 10))
// ^^^ w.Write(head) ^^^
w2 := binary.SelectWriter()
t.packBody(req, w2)
body := w2.Bytes()
// encrypt body
switch req.EncryptType {
case EncryptTypeD2Key:
body = binary.NewTeaCipher(t.Sig.D2Key).Encrypt(body)
case EncryptTypeEmptyKey:
body = binary.NewTeaCipher(emptyKey).Encrypt(body)
}
w.Write(body)
binary.PutWriter(w2)
w.WriteUInt32At(pos, uint32(w.Len()))
return append([]byte(nil), w.Bytes()...)
}
type PktHandler func(pkt *Request, netErr error)
type RequestHandler func(head []byte) (*Request, error)
func (t *Transport) NetLoop(pktHandler PktHandler, respHandler RequestHandler) {
go t.netLoop(pktHandler, respHandler)
}
// readPacket 帮助函数(Helper function)
func readPacket(conn *net.TCPConn, minSize, maxSize uint32) ([]byte, error) {
lBuf := make([]byte, 4)
_, err := io.ReadFull(conn, lBuf)
if err != nil {
return nil, err
}
l := goBinary.BigEndian.Uint32(lBuf)
if l < minSize || l > maxSize {
return nil, fmt.Errorf("parse incoming packet error: invalid packet length %v", l)
}
data := make([]byte, l-4)
_, err = io.ReadFull(conn, data)
return data, err
}
// netLoop 整个函数周期使用同一个连接,确保不会发生串线这种奇怪的事情
func (t *Transport) netLoop(pktHandler PktHandler, respHandler RequestHandler) {
conn := t.conn.getConn()
defer func() {
if r := recover(); r != nil {
pktHandler(nil, fmt.Errorf("panic: %v", r))
}
t.conn.Close()
}()
errCount := 0
for {
data, err := readPacket(conn, 4, 10<<20) // max 10MB
if err != nil {
// 在且仅在没有新连接建立时断线才被认为是意外的
if t.conn.getConn() == conn {
pktHandler(nil, errors.Wrap(ErrConnectionBroken, err.Error()))
}
return
}
req, err := respHandler(data)
if err == nil {
errCount = 0
goto ok
}
errCount++
if errCount > 2 {
err = errors.Wrap(ErrConnectionBroken, err.Error())
}
ok:
go pktHandler(req, err)
}
}

View File

@ -0,0 +1,130 @@
package oicq
import (
goBinary "encoding/binary"
"math/rand"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/internal/crypto"
)
type Codec struct {
ecdh *crypto.ECDH
randomKey []byte
WtSessionTicketKey []byte
}
func NewCodec(uin int64) *Codec {
c := &Codec{
ecdh: crypto.NewECDH(),
randomKey: make([]byte, 16),
}
rand.Read(c.randomKey)
c.ecdh.FetchPubKey(uin)
return c
}
type EncryptionMethod byte
const (
EM_ECDH EncryptionMethod = iota
EM_ST
)
type Message struct {
Uin uint32
Command uint16
EncryptionMethod EncryptionMethod
Body []byte
}
func (c *Codec) Marshal(m *Message) []byte {
w := binary.SelectWriter()
defer binary.PutWriter(w)
w.WriteByte(0x02)
w.WriteUInt16(0) // len 占位
w.WriteUInt16(8001) // version?
w.WriteUInt16(m.Command)
w.WriteUInt16(1)
w.WriteUInt32(m.Uin)
w.WriteByte(0x03)
switch m.EncryptionMethod {
case EM_ECDH:
w.WriteByte(0x87)
case EM_ST:
w.WriteByte(0x45)
}
w.WriteByte(0)
w.WriteUInt32(2)
w.WriteUInt32(0)
w.WriteUInt32(0)
switch m.EncryptionMethod {
case EM_ECDH:
w.WriteByte(0x02)
w.WriteByte(0x01)
w.Write(c.randomKey)
w.WriteUInt16(0x01_31)
w.WriteUInt16(c.ecdh.SvrPublicKeyVer)
w.WriteUInt16(uint16(len(c.ecdh.PublicKey)))
w.Write(c.ecdh.PublicKey)
w.EncryptAndWrite(c.ecdh.ShareKey, m.Body)
case EM_ST:
w.WriteByte(0x01)
w.WriteByte(0x03)
w.Write(c.randomKey)
w.WriteUInt16(0x0102)
w.WriteUInt16(0x0000)
w.EncryptAndWrite(c.randomKey, m.Body)
}
w.WriteByte(0x03)
buf := append([]byte(nil), w.Bytes()...)
goBinary.BigEndian.PutUint16(buf[1:3], uint16(len(buf)))
return buf
}
var (
ErrUnknownFlag = errors.New("unknown flag")
ErrUnknownEncryptType = errors.New("unknown encrypt type")
)
func (c *Codec) Unmarshal(data []byte) (*Message, error) {
reader := binary.NewReader(data)
if flag := reader.ReadByte(); flag != 2 {
return nil, ErrUnknownFlag
}
m := new(Message)
reader.ReadUInt16() // len
reader.ReadUInt16() // version?
m.Command = reader.ReadUInt16()
reader.ReadUInt16() // 1?
m.Uin = uint32(reader.ReadInt32())
reader.ReadByte()
encryptType := reader.ReadByte()
reader.ReadByte()
switch encryptType {
case 0:
m.Body = func() (decrypted []byte) {
d := reader.ReadBytes(reader.Len() - 1)
defer func() {
if pan := recover(); pan != nil {
tea := binary.NewTeaCipher(c.randomKey)
decrypted = tea.Decrypt(d)
}
}()
return binary.NewTeaCipher(c.ecdh.ShareKey).Decrypt(d)
}()
case 3:
d := reader.ReadBytes(reader.Len() - 1)
m.Body = binary.NewTeaCipher(c.WtSessionTicketKey).Decrypt(d)
default:
return nil, ErrUnknownEncryptType
}
return m, nil
}

View File

@ -42,7 +42,7 @@ type (
)
func (c *QQClient) getGtk(domain string) int {
if psKey, ok := c.sigInfo.psKeyMap[domain]; ok {
if psKey, ok := c.sig.PsKeyMap[domain]; ok {
accu := 5381
for _, b := range psKey {
accu = accu + (accu << 5) + int(b)

View File

@ -2,29 +2,23 @@ package client
import (
"fmt"
protobuf "github.com/segmentio/encoding/proto"
"github.com/Mrs4s/MiraiGo/internal/packets"
"math"
"time"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/longmsg"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/client/pb/multimsg"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/Mrs4s/MiraiGo/internal/proto"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
)
func init() {
decoders["MultiMsg.ApplyUp"] = decodeMultiApplyUpResponse
decoders["MultiMsg.ApplyDown"] = decodeMultiApplyDownResponse
}
// MultiMsg.ApplyUp
func (c *QQClient) buildMultiApplyUpPacket(data, hash []byte, buType int32, groupUin int64) (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildMultiApplyUpPacket(data, hash []byte, buType int32, groupUin int64) *network.Request {
req := &multimsg.MultiReqBody{
Subcmd: 1,
TermType: 5,
@ -42,14 +36,13 @@ func (c *QQClient) buildMultiApplyUpPacket(data, hash []byte, buType int32, grou
BuType: buType,
}
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "MultiMsg.ApplyUp", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("MultiMsg.ApplyUp", payload, decodeMultiApplyUpResponse)
}
// MultiMsg.ApplyUp
func decodeMultiApplyUpResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeMultiApplyUpResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
body := multimsg.MultiRspBody{}
if err := proto.Unmarshal(payload, &body); err != nil {
if err := proto.Unmarshal(resp.Body, &body); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(body.MultimsgApplyupRsp) == 0 {
@ -66,8 +59,7 @@ func decodeMultiApplyUpResponse(_ *QQClient, _ *incomingPacketInfo, payload []by
}
// MultiMsg.ApplyDown
func (c *QQClient) buildMultiApplyDownPacket(resID string) (uint16, []byte) {
seq := c.nextSeq()
func (c *QQClient) buildMultiApplyDownPacket(resID string) *network.Request {
req := &multimsg.MultiReqBody{
Subcmd: 2,
TermType: 5,
@ -84,26 +76,26 @@ func (c *QQClient) buildMultiApplyDownPacket(resID string) (uint16, []byte) {
ReqChannelType: 2,
}
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "MultiMsg.ApplyDown", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniRequest("MultiMsg.ApplyDown", payload, decodeMultiApplyDownResponse)
}
// MultiMsg.ApplyDown
func decodeMultiApplyDownResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeMultiApplyDownResponse(_ *QQClient, resp *network.Response) (interface{}, error) {
body := multimsg.MultiRspBody{}
if err := proto.Unmarshal(payload, &body); err != nil {
if err := proto.Unmarshal(resp.Body, &body); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(body.MultimsgApplydownRsp) == 0 {
return nil, errors.New("not found")
}
rsp := body.MultimsgApplydownRsp[0]
prefix := func() string {
if rsp.MsgExternInfo != nil && rsp.MsgExternInfo.ChannelType == 2 {
return "https://ssl.htdata.qq.com"
}
return fmt.Sprintf("http://%s:%d", binary.UInt32ToIPV4Address(uint32(rsp.Uint32DownIp[0])), body.MultimsgApplydownRsp[0].Uint32DownPort[0])
}()
var prefix string
if rsp.MsgExternInfo != nil && rsp.MsgExternInfo.ChannelType == 2 {
prefix = "https://ssl.htdata.qq.com"
} else {
prefix = fmt.Sprintf("http://%s:%d", binary.UInt32ToIPV4Address(uint32(rsp.Uint32DownIp[0])), body.MultimsgApplydownRsp[0].Uint32DownPort[0])
}
b, err := utils.HttpGetBytes(fmt.Sprintf("%s%s", prefix, string(rsp.ThumbDownPara)), "")
if err != nil {
return nil, errors.Wrap(err, "failed to download by multi apply down")
@ -129,8 +121,89 @@ func decodeMultiApplyDownResponse(_ *QQClient, _ *incomingPacketInfo, payload []
}
uc := binary.GZipUncompress(msgContent)
mt := msg.PbMultiMsgTransmit{}
if err = protobuf.Unmarshal(uc, &mt); err != nil {
if err = proto.Unmarshal(uc, &mt); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
return &mt, nil
}
type forwardMsgLinker struct {
items map[string]*msg.PbMultiMsgItem
}
func (l *forwardMsgLinker) link(name string) *message.ForwardMessage {
item := l.items[name]
if item == nil {
return nil
}
nodes := make([]*message.ForwardNode, 0, len(item.GetBuffer().GetMsg()))
for _, m := range item.GetBuffer().GetMsg() {
name := m.Head.GetFromNick()
if m.Head.GetMsgType() == 82 && m.Head.GroupInfo != nil {
name = m.Head.GroupInfo.GetGroupCard()
}
msgElems := message.ParseMessageElems(m.Body.RichText.Elems)
for i, elem := range msgElems {
if forward, ok := elem.(*message.ForwardElement); ok {
if forward.FileName != "" {
msgElems[i] = l.link(forward.FileName) // 递归处理嵌套转发
}
}
}
nodes = append(nodes, &message.ForwardNode{
SenderId: m.Head.GetFromUin(),
SenderName: name,
Time: m.Head.GetMsgTime(),
Message: msgElems,
})
}
return &message.ForwardMessage{Nodes: nodes}
}
func (c *QQClient) GetForwardMessage(resID string) *message.ForwardMessage {
m := c.DownloadForwardMessage(resID)
if m == nil {
return nil
}
linker := forwardMsgLinker{
items: make(map[string]*msg.PbMultiMsgItem),
}
for _, item := range m.Items {
linker.items[item.GetFileName()] = item
}
return linker.link(m.FileName)
}
func (c *QQClient) DownloadForwardMessage(resId string) *message.ForwardElement {
i, err := c.callAndDecode(c.buildMultiApplyDownPacket(resId))
if err != nil {
return nil
}
multiMsg := i.(*msg.PbMultiMsgTransmit)
if multiMsg.GetPbItemList() == nil {
return nil
}
var pv string
for i := 0; i < int(math.Min(4, float64(len(multiMsg.GetMsg())))); i++ {
m := multiMsg.Msg[i]
pv += fmt.Sprintf(`<title size="26" color="#777777">%s: %s</title>`,
func() string {
if m.Head.GetMsgType() == 82 && m.Head.GroupInfo != nil {
return m.Head.GroupInfo.GetGroupCard()
}
return m.Head.GetFromNick()
}(),
message.ToReadableString(
message.ParseMessageElems(multiMsg.Msg[i].GetBody().GetRichText().Elems),
),
)
}
return genForwardTemplate(
resId, pv, "群聊的聊天记录", "[聊天记录]", "聊天记录",
fmt.Sprintf("查看 %d 条转发消息", len(multiMsg.GetMsg())),
time.Now().UnixNano(),
multiMsg.GetPbItemList(),
)
}

View File

@ -3,16 +3,15 @@ package client
import (
"net"
"runtime/debug"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/Mrs4s/MiraiGo/message"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/internal/oicq"
"github.com/Mrs4s/MiraiGo/utils"
)
@ -35,16 +34,17 @@ type ConnectionQualityInfo struct {
}
func (c *QQClient) ConnectionQualityTest() *ConnectionQualityInfo {
if !c.Online {
if !c.Online.Load() {
return nil
}
r := &ConnectionQualityInfo{}
wg := sync.WaitGroup{}
wg.Add(2)
go func(w *sync.WaitGroup) {
go func() {
defer wg.Done()
var err error
if r.ChatServerLatency, err = qualityTest(c.servers[c.currServerIndex].String()); err != nil {
if r.ChatServerLatency, err = qualityTest(c.transport.GetServerAddr().String()); err != nil {
c.Error("test chat server latency error: %v", err)
r.ChatServerLatency = 9999
}
@ -58,27 +58,25 @@ func (c *QQClient) ConnectionQualityTest() *ConnectionQualityInfo {
c.Error("resolve long message server error: %v", err)
r.LongMessageServerLatency = 9999
}
if len(c.srvSsoAddrs) > 0 {
if r.SrvServerLatency, err = qualityTest(c.srvSsoAddrs[0]); err != nil {
if c.highwaySession.AddrLength() > 0 {
if r.SrvServerLatency, err = qualityTest(c.highwaySession.SsoAddr[0].String()); err != nil {
c.Error("test srv server latency error: %v", err)
r.SrvServerLatency = 9999
}
}
w.Done()
}(&wg)
go func(w *sync.WaitGroup) {
res := utils.RunICMPPingLoop(&net.IPAddr{IP: c.servers[c.currServerIndex].IP}, 10)
}()
go func() {
defer wg.Done()
res := utils.RunTCPPingLoop(c.transport.GetServerAddr().String(), 10)
r.ChatServerPacketLoss = res.PacketsLoss
if len(c.srvSsoAddrs) > 0 {
res = utils.RunICMPPingLoop(&net.IPAddr{IP: net.ParseIP(strings.Split(c.srvSsoAddrs[0], ":")[0])}, 10)
if c.highwaySession.AddrLength() > 0 {
res = utils.RunTCPPingLoop(c.highwaySession.SsoAddr[0].String(), 10)
r.SrvServerPacketLoss = res.PacketsLoss
}
w.Done()
}(&wg)
}()
start := time.Now()
if _, err := utils.HttpGetBytes("https://ssl.htdata.qq.com", ""); err == nil {
r.LongMessageServerResponseLatency = time.Now().Sub(start).Milliseconds()
r.LongMessageServerResponseLatency = time.Since(start).Milliseconds()
} else {
c.Error("test long message server response latency error: %v", err)
r.LongMessageServerResponseLatency = 9999
@ -87,9 +85,41 @@ func (c *QQClient) ConnectionQualityTest() *ConnectionQualityInfo {
return r
}
func (c *QQClient) connectFastest() error {
c.Disconnect()
addr, err := c.transport.ConnectFastest()
if err != nil {
c.Disconnect()
return err
}
c.Debug("connected to server: %v [fastest]", addr.String())
c.transport.NetLoop(c.pktProc, c.transport.ReadRequest)
c.ConnectTime = time.Now()
return nil
}
// connect 连接到 QQClient.servers 中的服务器
func (c *QQClient) connect() error {
c.Info("connect to server: %v", c.servers[c.currServerIndex].String())
c.once.Do(func() {
c.OnGroupMessage(func(_ *QQClient, _ *message.GroupMessage) {
c.stat.MessageReceived.Add(1)
c.stat.LastMessageTime.Store(time.Now().Unix())
})
c.OnPrivateMessage(func(_ *QQClient, _ *message.PrivateMessage) {
c.stat.MessageReceived.Add(1)
c.stat.LastMessageTime.Store(time.Now().Unix())
})
c.OnTempMessage(func(_ *QQClient, _ *TempMessageEvent) {
c.stat.MessageReceived.Add(1)
c.stat.LastMessageTime.Store(time.Now().Unix())
})
c.onGroupMessageReceipt("internal", func(_ *QQClient, _ *groupMessageReceiptEvent) {
c.stat.MessageSent.Add(1)
})
// go c.netLoop()
})
return c.connectFastest() // 暂时?
/*c.Info("connect to server: %v", c.servers[c.currServerIndex].String())
err := c.TCP.Connect(c.servers[c.currServerIndex])
c.currServerIndex++
if c.currServerIndex == len(c.servers) {
@ -103,27 +133,13 @@ func (c *QQClient) connect() error {
c.Error("connect server error: %v", err)
return err
}
c.once.Do(func() {
c.OnGroupMessage(func(_ *QQClient, _ *message.GroupMessage) {
atomic.AddUint64(&c.stat.MessageReceived, 1)
atomic.StoreInt64(&c.stat.LastMessageTime, time.Now().Unix())
})
c.OnPrivateMessage(func(_ *QQClient, _ *message.PrivateMessage) {
atomic.AddUint64(&c.stat.MessageReceived, 1)
atomic.StoreInt64(&c.stat.LastMessageTime, time.Now().Unix())
})
c.OnTempMessage(func(_ *QQClient, _ *TempMessageEvent) {
atomic.AddUint64(&c.stat.MessageReceived, 1)
atomic.StoreInt64(&c.stat.LastMessageTime, time.Now().Unix())
})
c.onGroupMessageReceipt("internal", func(_ *QQClient, _ *groupMessageReceiptEvent) {
atomic.AddUint64(&c.stat.MessageSent, 1)
})
go c.netLoop()
})
c.retryTimes = 0
c.ConnectTime = time.Now()
return nil
return nil*/
}
func (c *QQClient) QuickReconnect() {
c.quickReconnect() // TODO "用户请求快速重连"
}
// quickReconnect 快速重连
@ -132,7 +148,7 @@ func (c *QQClient) quickReconnect() {
time.Sleep(time.Millisecond * 200)
if err := c.connect(); err != nil {
c.Error("connect server error: %v", err)
c.dispatchDisconnectEvent(&ClientDisconnectedEvent{Message: "quick reconnect failed"})
c.dispatchDisconnectEvent(&ClientDisconnectedEvent{Message: "快速重连失败"})
return
}
if err := c.registerClient(); err != nil {
@ -145,60 +161,64 @@ func (c *QQClient) quickReconnect() {
// Disconnect 中断连接, 不释放资源
func (c *QQClient) Disconnect() {
c.Online = false
c.TCP.Close()
c.Online.Store(false)
c.transport.Close()
}
// sendAndWait 向服务器发送一个数据包, 并等待返回
func (c *QQClient) sendAndWait(seq uint16, pkt []byte, params ...requestParams) (interface{}, error) {
type T struct {
Response interface{}
Error error
func (c *QQClient) send(call *network.Call) {
if call.Done == nil {
call.Done = make(chan *network.Call, 3) // use buffered channel
}
ch := make(chan T, 1)
var p requestParams
seq := call.Request.SequenceID
c.pendingMu.Lock()
c.pending[seq] = call
c.pendingMu.Unlock()
if len(params) != 0 {
p = params[0]
}
c.handlers.Store(seq, &handlerInfo{fun: func(i interface{}, err error) {
ch <- T{
Response: i,
Error: err,
}
}, params: p, dynamic: false})
err := c.sendPacket(pkt)
err := c.sendPacket(c.transport.PackPacket(call.Request))
c.Debug("send pkt: %v seq: %d", call.Request.CommandName, call.Request.SequenceID)
if err != nil {
c.pendingMu.Lock()
call = c.pending[seq]
delete(c.pending, seq)
c.pendingMu.Unlock()
call.Err = err
call.Done <- call
}
}
func (c *QQClient) sendReq(req *network.Request) {
c.send(&network.Call{Request: req})
}
func (c *QQClient) call(req *network.Request) (*network.Response, error) {
call := &network.Call{
Request: req,
Done: make(chan *network.Call, 3),
}
c.send(call)
select {
case <-call.Done:
return call.Response, call.Err
case <-time.After(time.Second * 15):
return nil, errors.New("Packet timed out")
}
}
func (c *QQClient) callAndDecode(req *network.Request) (interface{}, error) {
resp, err := c.call(req)
if err != nil {
c.handlers.Delete(seq)
return nil, err
}
retry := 0
for {
select {
case rsp := <-ch:
return rsp.Response, rsp.Error
case <-time.After(time.Second * 15):
retry++
if retry < 2 {
_ = c.sendPacket(pkt)
continue
}
c.handlers.Delete(seq)
return nil, errors.New("Packet timed out")
}
}
return req.Decode(resp)
}
// sendPacket 向服务器发送一个数据包
func (c *QQClient) sendPacket(pkt []byte) error {
err := c.TCP.Write(pkt)
err := c.transport.Write(pkt)
if err != nil {
atomic.AddUint64(&c.stat.PacketLost, 1)
c.stat.PacketLost.Add(1)
} else {
atomic.AddUint64(&c.stat.PacketSent, 1)
c.stat.PacketSent.Add(1)
}
return errors.Wrap(err, "Packet failed to sendPacket")
}
@ -232,37 +252,18 @@ func (c *QQClient) waitPacketTimeoutSyncF(cmd string, timeout time.Duration, fil
}
}
// sendAndWaitDynamic
// 发送数据包并返回需要解析的 response
func (c *QQClient) sendAndWaitDynamic(seq uint16, pkt []byte) ([]byte, error) {
ch := make(chan []byte, 1)
c.handlers.Store(seq, &handlerInfo{fun: func(i interface{}, err error) { ch <- i.([]byte) }, dynamic: true})
err := c.sendPacket(pkt)
if err != nil {
c.handlers.Delete(seq)
return nil, err
}
select {
case rsp := <-ch:
return rsp, nil
case <-time.After(time.Second * 15):
c.handlers.Delete(seq)
return nil, errors.New("Packet timed out")
}
}
// plannedDisconnect 计划中断线事件
func (c *QQClient) plannedDisconnect(_ *utils.TCPListener) {
func (c *QQClient) plannedDisconnect(_ *network.TCPListener) {
c.Debug("planned disconnect.")
atomic.AddUint32(&c.stat.DisconnectTimes, 1)
c.Online = false
c.stat.DisconnectTimes.Add(1)
c.Online.Store(false)
}
// unexpectedDisconnect 非预期断线事件
func (c *QQClient) unexpectedDisconnect(_ *utils.TCPListener, e error) {
func (c *QQClient) unexpectedDisconnect(_ *network.TCPListener, e error) {
c.Error("unexpected disconnect: %v", e)
atomic.AddUint32(&c.stat.DisconnectTimes, 1)
c.Online = false
c.stat.DisconnectTimes.Add(1)
c.Online.Store(false)
if err := c.connect(); err != nil {
c.Error("connect server error: %v", err)
c.dispatchDisconnectEvent(&ClientDisconnectedEvent{Message: "connection dropped by server."})
@ -276,86 +277,79 @@ func (c *QQClient) unexpectedDisconnect(_ *utils.TCPListener, e error) {
}
}
// netLoop 通过循环来不停接收数据包
func (c *QQClient) netLoop() {
errCount := 0
for c.alive {
l, err := c.TCP.ReadInt32()
if err != nil {
time.Sleep(time.Millisecond * 500)
continue
func (c *QQClient) pktProc(req *network.Request, netErr error) {
if netErr != nil {
switch true {
case errors.Is(netErr, network.ErrConnectionBroken):
go c.dispatchDisconnectEvent(&ClientDisconnectedEvent{Message: netErr.Error()})
c.QuickReconnect()
case errors.Is(netErr, network.ErrSessionExpired) || errors.Is(netErr, network.ErrPacketDropped):
c.Disconnect()
go c.dispatchDisconnectEvent(&ClientDisconnectedEvent{Message: "session expired"})
}
if l < 4 || l > 1024*1024*10 { // max 10MB
c.Error("parse incoming packet error: invalid packet length %v", l)
errCount++
if errCount > 2 {
go c.quickReconnect()
}
continue
}
data, _ := c.TCP.ReadBytes(int(l) - 4)
pkt, err := packets.ParseIncomingPacket(data, c.sigInfo.d2Key)
if err != nil {
c.Error("parse incoming packet error: %v", err)
if errors.Is(err, packets.ErrSessionExpired) || errors.Is(err, packets.ErrPacketDropped) {
c.Disconnect()
go c.dispatchDisconnectEvent(&ClientDisconnectedEvent{Message: "session expired"})
continue
}
errCount++
if errCount > 2 {
go c.quickReconnect()
}
continue
}
if pkt.Flag2 == 2 {
pkt.Payload, err = pkt.DecryptPayload(c.ecdh.InitialShareKey, c.RandomKey, c.sigInfo.wtSessionTicketKey)
if err != nil {
c.Error("decrypt payload error: %v", err)
continue
}
}
errCount = 0
c.Debug("rev pkt: %v seq: %v", pkt.CommandName, pkt.SequenceId)
atomic.AddUint64(&c.stat.PacketReceived, 1)
go func(pkt *packets.IncomingPacket) {
defer func() {
if pan := recover(); pan != nil {
c.Error("panic on decoder %v : %v\n%s", pkt.CommandName, pan, debug.Stack())
}
}()
c.Error("parse incoming packet error: %v", netErr)
return
}
if decoder, ok := decoders[pkt.CommandName]; ok {
// found predefined decoder
info, ok := c.handlers.LoadAndDelete(pkt.SequenceId)
var decoded interface{}
decoded = pkt.Payload
if info == nil || !info.dynamic {
decoded, err = decoder(c, &incomingPacketInfo{
SequenceId: pkt.SequenceId,
CommandName: pkt.CommandName,
Params: func() requestParams {
if !ok {
return nil
}
return info.params
}(),
}, pkt.Payload)
if err != nil {
c.Debug("decode pkt %v error: %+v", pkt.CommandName, err)
}
}
if ok {
info.fun(decoded, err)
} else if f, ok := c.waiters.Load(pkt.CommandName); ok { // 在不存在handler的情况下触发wait
f.(func(interface{}, error))(decoded, err)
}
} else if f, ok := c.handlers.LoadAndDelete(pkt.SequenceId); ok {
// does not need decoder
f.fun(pkt.Payload, nil)
} else {
c.Debug("Unhandled Command: %s\nSeq: %d\nThis message can be ignored.", pkt.CommandName, pkt.SequenceId)
if req.EncryptType == network.EncryptTypeEmptyKey {
m, err := c.oicq.Unmarshal(req.Body)
if err != nil {
c.Error("decrypt payload error: %v", err)
if errors.Is(err, oicq.ErrUnknownFlag) {
go c.quickReconnect() // TODO "服务器发送未知响应"
}
}(pkt)
}
req.Body = m.Body
}
defer func() {
if pan := recover(); pan != nil {
c.Error("panic on decoder %v : %v\n%s", req.CommandName, pan, debug.Stack())
c.Dump("packet decode error: %v - %v", req.Body, req.CommandName, pan)
}
}()
c.Debug("recv pkt: %v seq: %v", req.CommandName, req.SequenceID)
c.stat.PacketReceived.Add(1)
// snapshot of read call
c.pendingMu.Lock()
call := c.pending[req.SequenceID]
if call != nil {
call.Response = &network.Response{
SequenceID: req.SequenceID,
CommandName: req.CommandName,
Body: req.Body,
Request: call.Request,
}
delete(c.pending, req.SequenceID)
}
c.pendingMu.Unlock()
if call != nil && call.Request.CommandName == req.CommandName {
select {
case call.Done <- call:
default:
// we don't want blocking
}
return
}
if decoder, ok := decoders[req.CommandName]; ok {
// found predefined decoder
resp := network.Response{
SequenceID: req.SequenceID,
CommandName: req.CommandName,
Body: req.Body,
// Request: nil,
}
decoded, err := decoder(c, &resp)
if err != nil {
c.Debug("decode req %v error: %+v", req.CommandName, err)
}
if f, ok := c.waiters.Load(req.CommandName); ok { // 在不存在handler的情况下触发wait
f.(func(interface{}, error))(decoded, err)
}
} else {
c.Debug("Unhandled Command: %s\nSeq: %d\nThis message can be ignored.", req.CommandName, req.SequenceID)
}
}

View File

@ -1,18 +1,14 @@
package client
import (
"github.com/Mrs4s/MiraiGo/internal/packets"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x346"
"github.com/Mrs4s/MiraiGo/internal/proto"
)
func init() {
decoders["OfflineFilleHandleSvr.pb_ftn_CMD_REQ_APPLY_DOWNLOAD-1200"] = decodeOfflineFileDownloadResponse
}
func (c *QQClient) buildOfflineFileDownloadRequestPacket(uuid []byte) (uint16, []byte) {
func (c *QQClient) buildOfflineFileDownloadRequestPacket(uuid []byte) *network.Request {
seq := c.nextSeq()
req := &cmd0x346.C346ReqBody{
Cmd: 1200,
@ -29,13 +25,12 @@ func (c *QQClient) buildOfflineFileDownloadRequestPacket(uuid []byte) (uint16, [
},
}
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "OfflineFilleHandleSvr.pb_ftn_CMD_REQ_APPLY_DOWNLOAD-1200", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
return c.uniPacketWithSeq(seq, "OfflineFilleHandleSvr.pb_ftn_CMD_REQ_APPLY_DOWNLOAD-1200", payload, decodeOfflineFileDownloadResponse)
}
func decodeOfflineFileDownloadResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOfflineFileDownloadResponse(c *QQClient, resp *network.Response) (interface{}, error) {
rsp := cmd0x346.C346RspBody{}
if err := proto.Unmarshal(payload, &rsp); err != nil {
if err := proto.Unmarshal(resp.Body, &rsp); err != nil {
c.Error("unmarshal cmd0x346 rsp body error: %v", err)
return nil, errors.Wrap(err, "unmarshal cmd0x346 rsp body error")
}

View File

@ -5,15 +5,15 @@ import (
"strconv"
"time"
"github.com/Mrs4s/MiraiGo/client/pb/msgtype0x210"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/binary/jce"
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/client/pb/msgtype0x210"
"github.com/Mrs4s/MiraiGo/client/pb/notify"
"github.com/Mrs4s/MiraiGo/internal/proto"
)
var msg0x210Decoders = map[int64]func(*QQClient, []byte) error{
@ -23,16 +23,15 @@ var msg0x210Decoders = map[int64]func(*QQClient, []byte) error{
}
// OnlinePush.ReqPush
func decodeOnlinePushReqPacket(c *QQClient, info *incomingPacketInfo, payload []byte) (interface{}, error) {
func decodeOnlinePushReqPacket(c *QQClient, resp *network.Response) (interface{}, error) {
request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(payload))
request.ReadFrom(jce.NewJceReader(resp.Body))
data := &jce.RequestDataVersion2{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
jr := jce.NewJceReader(data.Map["req"]["OnlinePushPack.SvcReqPushMsg"][1:])
msgInfos := []jce.PushMessageInfo{}
uin := jr.ReadInt64(0)
jr.ReadSlice(&msgInfos, 2)
_ = c.sendPacket(c.buildDeleteOnlinePushPacket(uin, 0, nil, info.SequenceId, msgInfos))
msgInfos := jr.ReadPushMessageInfos(2)
_ = c.sendPacket(c.buildDeleteOnlinePushPacket(uin, 0, nil, uint16(resp.SequenceID), msgInfos))
for _, m := range msgInfos {
k := fmt.Sprintf("%v%v%v", m.MsgSeq, m.MsgTime, m.MsgUid)
if _, ok := c.onlinePushCache.Get(k); ok {
@ -239,7 +238,7 @@ func msgType0x210Sub44Decoder(c *QQClient, protobuf []byte) error {
}
groupJoinLock.Lock()
defer groupJoinLock.Unlock()
if s44.GroupSyncMsg.GetGrpCode() != 0 { // member sync
if s44.GroupSyncMsg.GetGrpCode() == 0 { // member sync
return errors.New("invalid group code")
}
c.Debug("syncing members.")

75
client/packet.go Normal file
View File

@ -0,0 +1,75 @@
package client
import (
"github.com/Mrs4s/MiraiGo/client/internal/network"
"github.com/Mrs4s/MiraiGo/client/internal/oicq"
)
//go:noinline
func (c *QQClient) buildOicqRequestPacket(uin int64, command uint16, body []byte) []byte {
req := oicq.Message{
Uin: uint32(uin),
Command: command,
EncryptionMethod: oicq.EM_ECDH,
Body: body,
}
return c.oicq.Marshal(&req)
}
type decoderFunc = func(*QQClient, *network.Response) (interface{}, error)
func bindDecoder(c *QQClient, decoder decoderFunc) func(*network.Response) (interface{}, error) {
return func(response *network.Response) (interface{}, error) {
return decoder(c, response)
}
}
//go:noinline
func (c *QQClient) uniRequest(command string, body []byte, decoder decoderFunc) *network.Request {
seq := c.nextSeq()
var decode func(*network.Response) (interface{}, error)
if decoder != nil {
decode = bindDecoder(c, decoder)
}
return &network.Request{
Type: network.RequestTypeSimple,
EncryptType: network.EncryptTypeD2Key,
Uin: c.Uin,
SequenceID: int32(seq),
CommandName: command,
Body: body,
Decode: decode,
}
}
//go:noinline
func (c *QQClient) uniCall(command string, body []byte) (*network.Response, error) {
seq := c.nextSeq()
req := network.Request{
Type: network.RequestTypeSimple,
EncryptType: network.EncryptTypeD2Key,
Uin: c.Uin,
SequenceID: int32(seq),
CommandName: command,
Body: body,
}
return c.call(&req)
}
//go:noinline
func (c *QQClient) uniPacketWithSeq(seq uint16, command string, body []byte, decoder decoderFunc) *network.Request {
var decode func(*network.Response) (interface{}, error)
if decoder != nil {
decode = bindDecoder(c, decoder)
}
req := network.Request{
Type: network.RequestTypeSimple,
EncryptType: network.EncryptTypeD2Key,
Uin: c.Uin,
SequenceID: int32(seq),
CommandName: command,
Body: body,
Decode: decode,
}
return &req
}

View File

@ -0,0 +1,261 @@
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/GuildChannelBase.proto
package channel
type ChannelUserInfo struct {
ClientIdentity *ClientIdentity `protobuf:"bytes,1,opt"`
MemberType *uint32 `protobuf:"varint,2,opt"`
Permission *ChannelUserPermission `protobuf:"bytes,3,opt"`
RoleGroups []*BaseRoleGroupInfo `protobuf:"bytes,4,rep"`
}
func (x *ChannelUserInfo) GetClientIdentity() *ClientIdentity {
if x != nil {
return x.ClientIdentity
}
return nil
}
func (x *ChannelUserInfo) GetMemberType() uint32 {
if x != nil && x.MemberType != nil {
return *x.MemberType
}
return 0
}
func (x *ChannelUserInfo) GetPermission() *ChannelUserPermission {
if x != nil {
return x.Permission
}
return nil
}
func (x *ChannelUserInfo) GetRoleGroups() []*BaseRoleGroupInfo {
if x != nil {
return x.RoleGroups
}
return nil
}
type ChannelUserPermission struct {
AllowReadFeed *bool `protobuf:"varint,1,opt"`
AllowWriteFeed *bool `protobuf:"varint,2,opt"`
}
func (x *ChannelUserPermission) GetAllowReadFeed() bool {
if x != nil && x.AllowReadFeed != nil {
return *x.AllowReadFeed
}
return false
}
func (x *ChannelUserPermission) GetAllowWriteFeed() bool {
if x != nil && x.AllowWriteFeed != nil {
return *x.AllowWriteFeed
}
return false
}
type ClientIdentity struct {
ClientId *uint32 `protobuf:"varint,1,opt"`
Desc *string `protobuf:"bytes,2,opt"`
}
func (x *ClientIdentity) GetClientId() uint32 {
if x != nil && x.ClientId != nil {
return *x.ClientId
}
return 0
}
func (x *ClientIdentity) GetDesc() string {
if x != nil && x.Desc != nil {
return *x.Desc
}
return ""
}
type BaseGuildInfo struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
Name *string `protobuf:"bytes,2,opt"`
JoinTime *uint64 `protobuf:"varint,3,opt"`
}
func (x *BaseGuildInfo) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *BaseGuildInfo) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *BaseGuildInfo) GetJoinTime() uint64 {
if x != nil && x.JoinTime != nil {
return *x.JoinTime
}
return 0
}
type BaseRoleGroupInfo struct {
RoleId *uint64 `protobuf:"varint,1,opt"`
Name *string `protobuf:"bytes,2,opt"`
Color *uint32 `protobuf:"varint,3,opt"`
}
func (x *BaseRoleGroupInfo) GetRoleId() uint64 {
if x != nil && x.RoleId != nil {
return *x.RoleId
}
return 0
}
func (x *BaseRoleGroupInfo) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *BaseRoleGroupInfo) GetColor() uint32 {
if x != nil && x.Color != nil {
return *x.Color
}
return 0
}
type StChannelInfo struct {
Sign *StChannelSign `protobuf:"bytes,1,opt"`
Name *string `protobuf:"bytes,2,opt"`
IconUrl *string `protobuf:"bytes,3,opt"`
}
func (x *StChannelInfo) GetSign() *StChannelSign {
if x != nil {
return x.Sign
}
return nil
}
func (x *StChannelInfo) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *StChannelInfo) GetIconUrl() string {
if x != nil && x.IconUrl != nil {
return *x.IconUrl
}
return ""
}
type StChannelSign struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
ChannelId *uint64 `protobuf:"varint,2,opt"`
}
func (x *StChannelSign) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *StChannelSign) GetChannelId() uint64 {
if x != nil && x.ChannelId != nil {
return *x.ChannelId
}
return 0
}
type StEmotionReactionInfo struct {
Id *string `protobuf:"bytes,1,opt"`
EmojiReactionList []*EmojiReaction `protobuf:"bytes,2,rep"`
}
func (x *StEmotionReactionInfo) GetId() string {
if x != nil && x.Id != nil {
return *x.Id
}
return ""
}
func (x *StEmotionReactionInfo) GetEmojiReactionList() []*EmojiReaction {
if x != nil {
return x.EmojiReactionList
}
return nil
}
type StCommonExt struct {
MapInfo []*CommonEntry `protobuf:"bytes,1,rep"`
AttachInfo *string `protobuf:"bytes,2,opt"`
MapBytesInfo []*BytesEntry `protobuf:"bytes,3,rep"`
}
func (x *StCommonExt) GetMapInfo() []*CommonEntry {
if x != nil {
return x.MapInfo
}
return nil
}
func (x *StCommonExt) GetAttachInfo() string {
if x != nil && x.AttachInfo != nil {
return *x.AttachInfo
}
return ""
}
func (x *StCommonExt) GetMapBytesInfo() []*BytesEntry {
if x != nil {
return x.MapBytesInfo
}
return nil
}
type BytesEntry struct {
Key *string `protobuf:"bytes,1,opt"`
Value []byte `protobuf:"bytes,2,opt"`
}
func (x *BytesEntry) GetKey() string {
if x != nil && x.Key != nil {
return *x.Key
}
return ""
}
func (x *BytesEntry) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
type CommonEntry struct {
Key *string `protobuf:"bytes,1,opt"`
Value *string `protobuf:"bytes,2,opt"`
}
func (x *CommonEntry) GetKey() string {
if x != nil && x.Key != nil {
return *x.Key
}
return ""
}
func (x *CommonEntry) GetValue() string {
if x != nil && x.Value != nil {
return *x.Value
}
return ""
}

View File

@ -0,0 +1,78 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
import "pb/channel/MsgResponsesSvr.proto";
message ChannelUserInfo {
optional ClientIdentity clientIdentity = 1;
optional uint32 memberType = 2;
optional ChannelUserPermission permission = 3;
repeated BaseRoleGroupInfo roleGroups = 4;
}
message ChannelUserPermission {
optional bool allowReadFeed = 1;
optional bool allowWriteFeed = 2;
}
message ClientIdentity {
optional uint32 clientId = 1;
optional string desc = 2;
}
message BaseGuildInfo {
optional uint64 guildId = 1;
optional string name = 2;
optional uint64 joinTime = 3;
}
message BaseRoleGroupInfo {
optional uint64 roleId = 1;
optional string name = 2;
optional uint32 color = 3;
}
message StChannelInfo {
optional StChannelSign sign = 1;
optional string name = 2;
optional string iconUrl = 3;
}
message StChannelSign {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
}
/*
message StEmojiReaction {
optional string emojiId = 1;
optional uint64 emojiType = 2;
optional uint64 cnt = 3;
optional bool isClicked = 4;
optional bool isDefaultEmoji = 10001;
}
*/
message StEmotionReactionInfo {
optional string id = 1;
repeated EmojiReaction emojiReactionList = 2;
}
message StCommonExt {
repeated CommonEntry mapInfo = 1;
optional string attachInfo = 2;
repeated BytesEntry mapBytesInfo = 3;
}
message BytesEntry {
optional string key = 1;
optional bytes value = 2;
}
message CommonEntry {
optional string key = 1;
optional string value = 2;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,651 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
import "pb/channel/GuildChannelBase.proto";
message ContentMetaData {
optional RichTextContentCount count = 1;
optional int64 ContentID = 2;
}
message FeedMetaData {
optional ContentMetaData content = 1;
optional uint64 lastModifiedTime = 2;
}
message FeedRedTouchTransInfo {
optional string feedId = 1;
optional string author = 2;
optional int64 createTs = 3;
optional int32 msgType = 4;
optional int32 pageType = 5;
optional int32 redType = 6;
optional int32 insertPageType = 7;
}
message NoticeOperation {
optional uint32 type = 1;
optional string schema = 2;
}
message RichTextContentCount {
optional uint64 textWord = 1;
optional uint64 at = 2;
optional uint64 url = 3;
optional uint64 emoji = 4;
optional uint64 image = 5;
optional uint64 video = 6;
}
message StAnimation {
optional uint32 width = 1;
optional uint32 height = 2;
optional string animationUrl = 3;
optional bytes busiData = 4;
}
message StBusiReportInfo {
optional StRecomReportInfo recomReport = 1;
optional string traceID = 2;
}
message StChannelShareInfo {
optional string feedID = 1;
optional string posterID = 2;
optional uint64 feedPublishAt = 3;
optional StChannelSign channelSign = 4;
optional uint64 updateDurationMs = 5;
optional StChannelShareSign sign = 6;
}
message StChannelShareSign {
optional uint64 createAt = 1;
optional string token = 2;
}
message StCircleRankItem {
optional int32 rankNo = 1;
optional string circleName = 2;
optional int64 fuelValue = 3;
optional int64 feedNum = 4;
optional string circleID = 5;
}
message StClientInfo {
optional string feedclientkey = 1;
repeated CommonEntry clientMap = 2;
}
message StComment {
optional string id = 1;
optional StUser postUser = 2;
optional uint64 createTime = 3;
optional string content = 4;
optional uint32 replyCount = 5;
repeated StReply vecReply = 6;
optional bytes busiData = 7;
optional StLike likeInfo = 8;
optional uint32 typeFlag = 9;
repeated string atUinList = 10;
optional uint32 typeFlag2 = 11;
optional uint64 createTimeNs = 12;
repeated CommonEntry storeExtInfo = 13;
optional string thirdId = 14;
optional uint32 sourceType = 15;
optional StRichText richContents = 16;
}
message StDebugInfo {
repeated CommonEntry debugMap = 1;
}
message StDittoFeed {
optional uint32 dittoId = 1;
optional uint32 dittoPatternId = 2;
optional bytes dittoData = 3;
optional bytes dittoDataNew = 4;
}
message StExifInfo {
repeated CommonEntry kvs = 1;
}
message StExternalMedalWallInfo {
optional bool needRedPoint = 1;
repeated StMedalInfo medalInfos = 2;
optional string medalWallJumpUrl = 3;
optional bool needShowEntrance = 4;
}
message StFeed {
optional string id = 1;
optional StRichText title = 2;
optional StRichText subtitle = 3;
optional StUser poster = 4;
repeated StVideo videos = 5;
optional StRichText contents = 6;
optional uint64 createTime = 7;
optional StEmotionReactionInfo emotionReaction = 8;
optional uint32 commentCount = 9;
repeated StComment vecComment = 10;
optional StShare share = 11;
optional StVisitor visitorInfo = 12;
repeated StImage images = 13;
optional StPoiInfoV2 poiInfo = 14;
repeated StTagInfo tagInfos = 15;
optional bytes busiReport = 16;
repeated uint32 opMask = 17;
optional StOpinfo opinfo = 18;
repeated CommonEntry extInfo = 19;
optional string patternInfo = 20;
optional StChannelInfo channelInfo = 21;
optional uint64 createTimeNs = 22;
optional StFeedSummary summary = 23;
optional StRecomInfo recomInfo = 24;
optional FeedMetaData meta = 25;
}
message StFeedAbstract {
optional string id = 1;
optional string title = 2;
optional StUser poster = 3;
optional StImage pic = 4;
optional uint32 type = 5;
optional uint64 createTime = 6;
optional StVideo video = 7;
optional uint32 fuelNum = 8;
optional string content = 9;
repeated StImage images = 10;
optional StFeedCount countInfo = 11;
}
message StFeedCount {
optional int64 liked = 1;
optional int64 push = 2;
optional int64 comment = 3;
optional int64 visitor = 4;
}
message StFeedSummary {
optional uint32 layoutType = 1;
}
message StFollowRecomInfo {
optional string followText = 1;
repeated StFollowUser followUsers = 4;
optional string commFriendText = 6;
optional string commGroupText = 7;
}
message StFollowUser {
optional uint64 uid = 1;
optional string nick = 2;
}
message StGPSV2 {
optional int64 lat = 1;
optional int64 lon = 2;
optional int64 eType = 3;
optional int64 alt = 4;
}
message StGuidePublishBubble {
optional string id = 1;
optional StImage backgroundImage = 2;
optional string jumpUrl = 3;
}
message StIconInfo {
optional string iconUrl40 = 1;
optional string iconUrl100 = 2;
optional string iconUrl140 = 3;
optional string iconUrl640 = 4;
optional string iconUrl = 5;
}
message StImage {
optional uint32 width = 1;
optional uint32 height = 2;
optional string picUrl = 3;
repeated StImageUrl vecImageUrl = 4;
optional string picId = 5;
optional bytes busiData = 6;
optional string imageMD5 = 7;
optional string layerPicUrl = 8;
optional string patternId = 9;
optional uint32 displayIndex = 10;
}
message StImageUrl {
optional uint32 levelType = 1;
optional string url = 2;
optional uint32 width = 3;
optional uint32 height = 4;
optional bytes busiData = 5;
}
message StLightInteractInfo {
optional StUser user = 1;
optional StRelationInfo relation = 2;
optional uint32 count = 3;
optional bytes busiData = 4;
}
message StLike {
optional string id = 1;
optional uint32 count = 2;
optional uint32 status = 3;
repeated StUser vecUser = 4;
optional bytes busiData = 5;
optional StUser postUser = 6;
optional uint32 hasLikedCount = 7;
optional uint32 ownerStatus = 8;
optional string jumpUrl = 9;
}
message StLiteBanner {
optional StImage icon = 1;
optional string title = 2;
optional string jumpUrl = 3;
optional string activityID = 4;
optional string jsonStyle = 5;
repeated CommonEntry extInfo = 6;
}
message StMaterialDataNew {
optional string materialType = 1;
repeated StSingleMaterial materialList = 2;
}
message StMedalInfo {
optional int32 type = 1;
optional string medalName = 2;
optional string medalID = 3;
optional int32 rank = 4;
optional bool isHighLight = 5;
optional bool isNew = 6;
optional string jumpUrl = 7;
optional string iconUrl = 8;
optional string backgroundUrl = 9;
optional string describe = 10;
optional int32 reportValue = 11;
}
message StNotice {
optional StFeed psvFeed = 1;
optional StFeed origineFeed = 2;
optional StNoticePattonInfo pattonInfo = 3;
}
message StNoticePattonInfo {
optional uint32 pattonType = 1;
optional StPlainTxtInfo plainTxt = 2;
}
message StNoticeTxtInfo {
optional StRichText content = 1;
optional StRichText contentOfReference = 2;
}
message StOpinfo {
repeated uint64 createTime = 1;
}
message StPlainTxtInfo {
optional StNoticeTxtInfo txtInfo = 1;
optional NoticeOperation operation = 2;
}
message StPoiInfoV2 {
optional string poiId = 1;
optional string name = 2;
optional int32 poiType = 3;
optional string typeName = 4;
optional string address = 5;
optional int32 districtCode = 6;
optional StGPSV2 gps = 7;
optional int32 distance = 8;
optional int32 hotValue = 9;
optional string phone = 10;
optional string country = 11;
optional string province = 12;
optional string city = 13;
optional int32 poiNum = 14;
optional int32 poiOrderType = 15;
optional string defaultName = 16;
optional string district = 17;
optional string dianPingId = 18;
optional string distanceText = 19;
optional string displayName = 20;
}
message StPrePullCacheFeed {
optional string id = 1;
optional StUser poster = 2;
optional uint64 createTime = 3;
repeated BytesEntry busiTranparent = 4;
}
message StProxyInfo {
optional int32 cmdId = 1;
optional int32 subCmdId = 2;
optional string appProtocol = 3;
optional bytes reqBody = 4;
}
message StRankingItem {
optional StUser user = 1;
optional StRelationInfo relation = 2;
optional int64 score = 3;
optional int32 grade = 4;
optional bytes busiData = 5;
optional int32 rankNo = 6;
optional int32 inTopicList = 7;
}
message StRecomForward {
optional string id = 1;
optional string title = 2;
optional string subtitle = 3;
optional StUser poster = 4;
optional uint64 createTime = 5;
optional uint32 type = 6;
optional bytes busiData = 7;
}
message StRecomInfo {
optional string recomReason = 1;
optional bytes recomAttachInfo = 2;
optional string recomTrace = 3;
optional bytes clientSealData = 4;
optional string iconUrl = 5;
optional int32 recomReasonType = 6;
}
message StRecomReportInfo {
repeated StSingleRecomReportInfo recomInfos = 1;
}
message StRelationInfo {
optional string id = 1;
optional uint32 relation = 2;
optional bytes busiData = 3;
optional uint32 relationState = 4;
optional uint32 score = 5;
optional bool isBlock = 6;
optional bool isBlocked = 7;
optional bool isFriend = 8;
optional bool isUncare = 9;
optional uint64 imBitMap = 10;
}
message StReply {
optional string id = 1;
optional StUser postUser = 2;
optional uint64 createTime = 3;
optional string content = 4;
optional StUser targetUser = 5;
optional bytes busiData = 6;
optional StLike likeInfo = 7;
optional uint32 typeFlag = 8;
optional uint32 modifyflag = 9;
repeated string atUinList = 10;
optional uint32 typeFlag2 = 11;
optional uint64 createTimeNs = 12;
repeated CommonEntry storeExtInfo = 13;
optional string thirdId = 14;
optional string targetReplyID = 15;
optional uint32 sourceType = 16;
optional StRichText richContents = 17;
}
message StReportInfo {
optional string id = 1;
optional bytes busiReport = 2;
}
message StRichText {
repeated StRichTextContent contents = 1;
}
message StRichTextAtContent {
optional uint32 type = 1;
optional GuildChannelBaseGuildInfo guildInfo = 2;
optional GuildChannelBaseRoleGroupInfo roleGroupId = 3;
optional StUser user = 4;
}
message GuildChannelBaseGuildInfo {
optional uint64 guildId = 1;
optional string name = 2;
optional uint64 joinTime = 3;
}
message GuildChannelBaseRoleGroupInfo {
optional uint64 roleId = 1;
optional string name = 2;
optional uint32 color = 3;
}
message StRichTextChannelContent {
optional StChannelInfo channelInfo = 1;
}
message StRichTextContent {
optional uint32 type = 1;
optional string patternId = 2;
optional StRichTextTextContent textContent = 3;
optional StRichTextAtContent atContent = 4;
optional StRichTextURLContent urlContent = 5;
optional StRichTextEmojiContent emojiContent = 6;
optional StRichTextChannelContent channelContent = 7;
}
message StRichTextEmojiContent {
optional string id = 1;
optional string type = 2;
optional string name = 3;
optional string url = 4;
}
message StRichTextTextContent {
optional string text = 1;
}
message StRichTextURLContent {
optional string url = 1;
optional string displayText = 2;
}
message StSameTopicGuideInfo {
optional uint32 isSameTopicGuide = 1;
optional int64 stayShowTime = 2;
optional string hashTag = 3;
optional string words = 4;
optional string jumpUrl = 5;
optional string reportExt = 6;
}
message StShare {
optional string title = 1;
optional string desc = 2;
optional uint32 type = 3;
optional string url = 4;
optional StUser author = 5;
optional StUser poster = 6;
repeated StVideo videos = 7;
optional string shorturl = 8;
optional string shareCardInfo = 9;
optional StShareQzoneInfo shareQzoneInfo = 10;
repeated StImage images = 11;
optional uint32 publishTotalUser = 12;
optional uint32 sharedCount = 13;
optional StChannelShareInfo channelShareInfo = 14;
}
message StShareQzoneInfo {
repeated CommonEntry entrys = 1;
}
message StSingleMaterial {
optional string materialId = 1;
}
message StSingleRecomReportInfo {
optional string reportID = 1;
optional bytes reportData = 2;
}
message StTagInfo {
optional string tagId = 1;
optional string tagName = 2;
optional string tagDec = 3;
repeated StUser userList = 4;
repeated StFeedAbstract feedList = 5;
optional uint32 tagTotalUser = 6;
optional uint32 tagTotalFeed = 7;
optional string tagWording = 8;
optional uint32 tagType = 9;
optional uint32 followState = 10;
optional StShare shareInfo = 11;
optional uint32 isTop = 12;
optional uint32 isSelected = 13;
optional int64 userViewHistory = 14;
optional StTagMedalInfo medal = 15;
optional uint32 status = 16;
optional StTagOperateInfo optInfo = 17;
optional uint32 tagBaseStatus = 18;
optional int32 isRecommend = 19;
optional int64 tagViewHistory = 20;
optional string operateIconUrl = 21;
optional string tagReport = 99;
optional string tagIconUrl = 100;
}
message StTagMedalInfo {
optional string tagID = 1;
optional string tagName = 2;
optional uint64 rank = 3;
}
message StTagOperateInfo {
optional string createUser = 1;
optional string coverURL = 2;
optional string desc = 3;
optional string backgroundURL = 4;
optional string bannerURL = 5;
optional string bannerSkipLink = 6;
optional int64 activityStartTime = 7;
optional int64 activityEndTime = 8;
optional string recommendReason = 9;
optional int32 isWhite = 10;
optional int64 beWhiteStartTime = 11;
optional int64 beWhiteEndTime = 12;
optional string publishSchema = 13;
}
message StUnifiedTag {
optional string unifiedType = 1;
optional string unifiedId = 2;
}
message StUser {
optional string id = 1;
optional string nick = 2;
optional StIconInfo icon = 3;
optional string desc = 4;
optional uint32 followState = 5;
optional uint32 type = 6;
optional uint32 sex = 7;
optional uint64 birthday = 8;
optional string school = 9;
optional string location = 11;
optional bytes busiData = 12;
optional uint32 frdState = 13;
optional uint32 relationState = 14;
optional uint32 blackState = 15;
optional StTagMedalInfo medal = 16;
optional int32 constellation = 17;
optional string jumpUrl = 18;
optional string locationCode = 19;
optional string thirdId = 20;
optional string company = 21;
optional string certificationDesc = 22;
optional uint32 descType = 23;
optional GuildChannelBaseChannelUserInfo channelUserInfo = 24;
optional string loginId = 25;
}
message GuildChannelBaseChannelUserInfo {
optional ClientIdentity clientIdentity = 1;
optional uint32 memberType = 2;
// optional ChannelUserPermission permission = 3;
repeated GuildChannelBaseRoleGroupInfo roleGroups = 4;
}
message StUserGroupInfo {
optional string id = 1;
optional string name = 2;
repeated StUser userList = 3;
}
message StUserRecomInfo {
optional StUser user = 1;
repeated StFeedAbstract feedList = 2;
optional bytes busiData = 3;
}
message StVideo {
optional string fileId = 1;
optional uint32 fileSize = 2;
optional uint32 duration = 3;
optional uint32 width = 4;
optional uint32 height = 5;
optional string playUrl = 6;
optional uint32 transStatus = 7;
optional uint32 videoPrior = 8;
optional uint32 videoRate = 9;
repeated StVideoUrl vecVideoUrl = 10;
optional bytes busiData = 11;
optional uint32 approvalStatus = 12;
optional uint32 videoSource = 13;
optional uint32 mediaQualityRank = 14;
optional float mediaQualityScore = 15;
optional string videoMD5 = 16;
optional uint32 isQuic = 17;
optional uint32 orientation = 18;
optional StImage cover = 19;
optional string patternId = 20;
optional uint32 displayIndex = 21;
}
message StVideoUrl {
optional uint32 levelType = 1;
optional string playUrl = 2;
optional uint32 videoPrior = 3;
optional uint32 videoRate = 4;
optional uint32 transStatus = 5;
optional bytes busiData = 6;
optional bool hasWatermark = 7;
}
message StVisitor {
optional uint32 viewCount = 1;
optional bytes busiData = 2;
optional uint32 recomCount = 3;
optional string viewDesc = 4;
}
message StWearingMedal {
repeated StWearingMedalInfo medalInfos = 1;
}
message StWearingMedalInfo {
optional int32 type = 1;
optional string medalName = 2;
optional string medalID = 3;
}

View File

@ -0,0 +1,424 @@
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/GuildFeedCloudRead.proto
package channel
type GetNoticesReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
PageNum *uint32 `protobuf:"varint,2,opt"`
AttachInfo *string `protobuf:"bytes,3,opt"`
}
func (x *GetNoticesReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *GetNoticesReq) GetPageNum() uint32 {
if x != nil && x.PageNum != nil {
return *x.PageNum
}
return 0
}
func (x *GetNoticesReq) GetAttachInfo() string {
if x != nil && x.AttachInfo != nil {
return *x.AttachInfo
}
return ""
}
type GetNoticesRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Notices []*StNotice `protobuf:"bytes,2,rep"`
TotalNum *uint32 `protobuf:"varint,3,opt"`
IsFinish *bool `protobuf:"varint,4,opt"`
AttachInfo *string `protobuf:"bytes,5,opt"`
}
func (x *GetNoticesRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *GetNoticesRsp) GetNotices() []*StNotice {
if x != nil {
return x.Notices
}
return nil
}
func (x *GetNoticesRsp) GetTotalNum() uint32 {
if x != nil && x.TotalNum != nil {
return *x.TotalNum
}
return 0
}
func (x *GetNoticesRsp) GetIsFinish() bool {
if x != nil && x.IsFinish != nil {
return *x.IsFinish
}
return false
}
func (x *GetNoticesRsp) GetAttachInfo() string {
if x != nil && x.AttachInfo != nil {
return *x.AttachInfo
}
return ""
}
type NeedInsertCommentInfo struct {
CommentID *string `protobuf:"bytes,1,opt"`
}
func (x *NeedInsertCommentInfo) GetCommentID() string {
if x != nil && x.CommentID != nil {
return *x.CommentID
}
return ""
}
type RefreshToast struct {
Text *string `protobuf:"bytes,1,opt"`
}
func (x *RefreshToast) GetText() string {
if x != nil && x.Text != nil {
return *x.Text
}
return ""
}
type StGetChannelFeedsReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Count *uint32 `protobuf:"varint,2,opt"`
From *uint32 `protobuf:"varint,3,opt"`
ChannelSign *StChannelSign `protobuf:"bytes,4,opt"`
FeedAttchInfo *string `protobuf:"bytes,5,opt"`
}
func (x *StGetChannelFeedsReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StGetChannelFeedsReq) GetCount() uint32 {
if x != nil && x.Count != nil {
return *x.Count
}
return 0
}
func (x *StGetChannelFeedsReq) GetFrom() uint32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StGetChannelFeedsReq) GetChannelSign() *StChannelSign {
if x != nil {
return x.ChannelSign
}
return nil
}
func (x *StGetChannelFeedsReq) GetFeedAttchInfo() string {
if x != nil && x.FeedAttchInfo != nil {
return *x.FeedAttchInfo
}
return ""
}
type StGetChannelFeedsRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
VecFeed []*StFeed `protobuf:"bytes,2,rep"`
IsFinish *uint32 `protobuf:"varint,3,opt"`
User *StUser `protobuf:"bytes,4,opt"`
FeedAttchInfo *string `protobuf:"bytes,5,opt"`
RefreshToast *RefreshToast `protobuf:"bytes,6,opt"`
}
func (x *StGetChannelFeedsRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StGetChannelFeedsRsp) GetVecFeed() []*StFeed {
if x != nil {
return x.VecFeed
}
return nil
}
func (x *StGetChannelFeedsRsp) GetIsFinish() uint32 {
if x != nil && x.IsFinish != nil {
return *x.IsFinish
}
return 0
}
func (x *StGetChannelFeedsRsp) GetUser() *StUser {
if x != nil {
return x.User
}
return nil
}
func (x *StGetChannelFeedsRsp) GetFeedAttchInfo() string {
if x != nil && x.FeedAttchInfo != nil {
return *x.FeedAttchInfo
}
return ""
}
func (x *StGetChannelFeedsRsp) GetRefreshToast() *RefreshToast {
if x != nil {
return x.RefreshToast
}
return nil
}
type StGetChannelShareFeedReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
From *uint32 `protobuf:"varint,2,opt"`
ChannelShareInfo *StChannelShareInfo `protobuf:"bytes,3,opt"`
}
func (x *StGetChannelShareFeedReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StGetChannelShareFeedReq) GetFrom() uint32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StGetChannelShareFeedReq) GetChannelShareInfo() *StChannelShareInfo {
if x != nil {
return x.ChannelShareInfo
}
return nil
}
type StGetChannelShareFeedRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
}
func (x *StGetChannelShareFeedRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StGetChannelShareFeedRsp) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
type StGetFeedCommentsReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
UserId *string `protobuf:"bytes,2,opt"`
FeedId *string `protobuf:"bytes,3,opt"`
ListNum *uint32 `protobuf:"varint,4,opt"`
From *uint32 `protobuf:"varint,5,opt"`
AttchInfo *string `protobuf:"bytes,6,opt"`
EntrySchema *string `protobuf:"bytes,7,opt"`
}
func (x *StGetFeedCommentsReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StGetFeedCommentsReq) GetUserId() string {
if x != nil && x.UserId != nil {
return *x.UserId
}
return ""
}
func (x *StGetFeedCommentsReq) GetFeedId() string {
if x != nil && x.FeedId != nil {
return *x.FeedId
}
return ""
}
func (x *StGetFeedCommentsReq) GetListNum() uint32 {
if x != nil && x.ListNum != nil {
return *x.ListNum
}
return 0
}
func (x *StGetFeedCommentsReq) GetFrom() uint32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StGetFeedCommentsReq) GetAttchInfo() string {
if x != nil && x.AttchInfo != nil {
return *x.AttchInfo
}
return ""
}
func (x *StGetFeedCommentsReq) GetEntrySchema() string {
if x != nil && x.EntrySchema != nil {
return *x.EntrySchema
}
return ""
}
type StGetFeedCommentsRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
VecComment []*StComment `protobuf:"bytes,2,rep"`
TotalNum *uint32 `protobuf:"varint,3,opt"`
IsFinish *uint32 `protobuf:"varint,4,opt"`
AttchInfo *string `protobuf:"bytes,5,opt"`
}
func (x *StGetFeedCommentsRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StGetFeedCommentsRsp) GetVecComment() []*StComment {
if x != nil {
return x.VecComment
}
return nil
}
func (x *StGetFeedCommentsRsp) GetTotalNum() uint32 {
if x != nil && x.TotalNum != nil {
return *x.TotalNum
}
return 0
}
func (x *StGetFeedCommentsRsp) GetIsFinish() uint32 {
if x != nil && x.IsFinish != nil {
return *x.IsFinish
}
return 0
}
func (x *StGetFeedCommentsRsp) GetAttchInfo() string {
if x != nil && x.AttchInfo != nil {
return *x.AttchInfo
}
return ""
}
type StGetFeedDetailReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
From *uint32 `protobuf:"varint,2,opt"`
UserId *string `protobuf:"bytes,3,opt"`
FeedId *string `protobuf:"bytes,4,opt"`
CreateTime *uint64 `protobuf:"varint,5,opt"`
DetailType *uint32 `protobuf:"varint,6,opt"`
ChannelSign *StChannelSign `protobuf:"bytes,7,opt"`
}
func (x *StGetFeedDetailReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StGetFeedDetailReq) GetFrom() uint32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StGetFeedDetailReq) GetUserId() string {
if x != nil && x.UserId != nil {
return *x.UserId
}
return ""
}
func (x *StGetFeedDetailReq) GetFeedId() string {
if x != nil && x.FeedId != nil {
return *x.FeedId
}
return ""
}
func (x *StGetFeedDetailReq) GetCreateTime() uint64 {
if x != nil && x.CreateTime != nil {
return *x.CreateTime
}
return 0
}
func (x *StGetFeedDetailReq) GetDetailType() uint32 {
if x != nil && x.DetailType != nil {
return *x.DetailType
}
return 0
}
func (x *StGetFeedDetailReq) GetChannelSign() *StChannelSign {
if x != nil {
return x.ChannelSign
}
return nil
}
type StGetFeedDetailRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
LoginUser *StUser `protobuf:"bytes,3,opt"`
}
func (x *StGetFeedDetailRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StGetFeedDetailRsp) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StGetFeedDetailRsp) GetLoginUser() *StUser {
if x != nil {
return x.LoginUser
}
return nil
}

View File

@ -0,0 +1,93 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
import "pb/channel/GuildFeedCloudMeta.proto";
import "pb/channel/GuildChannelBase.proto";
message GetNoticesReq {
optional StCommonExt extInfo = 1;
optional uint32 pageNum = 2;
optional string attachInfo = 3;
}
message GetNoticesRsp {
optional StCommonExt extInfo = 1;
repeated StNotice notices = 2;
optional uint32 totalNum = 3;
optional bool isFinish = 4;
optional string attachInfo = 5;
}
message NeedInsertCommentInfo {
optional string commentID = 1;
}
message RefreshToast {
optional string text = 1;
}
message StGetChannelFeedsReq {
optional StCommonExt extInfo = 1;
optional uint32 count = 2;
optional uint32 from = 3;
optional StChannelSign channelSign = 4;
optional string feedAttchInfo = 5;
}
message StGetChannelFeedsRsp {
optional StCommonExt extInfo = 1;
repeated StFeed vecFeed = 2;
optional uint32 isFinish = 3;
optional StUser user = 4;
optional string feedAttchInfo = 5;
optional RefreshToast refreshToast = 6;
}
message StGetChannelShareFeedReq {
optional StCommonExt extInfo = 1;
optional uint32 from = 2;
optional StChannelShareInfo channelShareInfo = 3;
}
message StGetChannelShareFeedRsp {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
}
message StGetFeedCommentsReq {
optional StCommonExt extInfo = 1;
optional string userId = 2;
optional string feedId = 3;
optional uint32 listNum = 4;
optional uint32 from = 5;
optional string attchInfo = 6;
optional string entrySchema = 7;
}
message StGetFeedCommentsRsp {
optional StCommonExt extInfo = 1;
repeated StComment vecComment = 2;
optional uint32 totalNum = 3;
optional uint32 isFinish = 4;
optional string attchInfo = 5;
}
message StGetFeedDetailReq {
optional StCommonExt extInfo = 1;
optional uint32 from = 2;
optional string userId = 3;
optional string feedId = 4;
optional uint64 createTime = 5;
optional uint32 detailType = 6;
optional StChannelSign channelSign = 7;
}
message StGetFeedDetailRsp {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional StUser loginUser = 3;
}

View File

@ -0,0 +1,765 @@
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/GuildWriter.proto
package channel
type StAlterFeedReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
BusiReqData []byte `protobuf:"bytes,3,opt"`
MBitmap *uint64 `protobuf:"varint,4,opt"`
From *int32 `protobuf:"varint,5,opt"`
Src *int32 `protobuf:"varint,6,opt"`
AlterFeedExtInfo []*CommonEntry `protobuf:"bytes,7,rep"`
JsonFeed *string `protobuf:"bytes,8,opt"`
ClientContent *StClientContent `protobuf:"bytes,9,opt"`
}
func (x *StAlterFeedReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StAlterFeedReq) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StAlterFeedReq) GetBusiReqData() []byte {
if x != nil {
return x.BusiReqData
}
return nil
}
func (x *StAlterFeedReq) GetMBitmap() uint64 {
if x != nil && x.MBitmap != nil {
return *x.MBitmap
}
return 0
}
func (x *StAlterFeedReq) GetFrom() int32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StAlterFeedReq) GetSrc() int32 {
if x != nil && x.Src != nil {
return *x.Src
}
return 0
}
func (x *StAlterFeedReq) GetAlterFeedExtInfo() []*CommonEntry {
if x != nil {
return x.AlterFeedExtInfo
}
return nil
}
func (x *StAlterFeedReq) GetJsonFeed() string {
if x != nil && x.JsonFeed != nil {
return *x.JsonFeed
}
return ""
}
func (x *StAlterFeedReq) GetClientContent() *StClientContent {
if x != nil {
return x.ClientContent
}
return nil
}
type StAlterFeedRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
BusiRspData []byte `protobuf:"bytes,3,opt"`
}
func (x *StAlterFeedRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StAlterFeedRsp) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StAlterFeedRsp) GetBusiRspData() []byte {
if x != nil {
return x.BusiRspData
}
return nil
}
type StClientContent struct {
ClientImageContents []*StClientImageContent `protobuf:"bytes,1,rep"`
ClientVideoContents []*StClientVideoContent `protobuf:"bytes,2,rep"`
}
func (x *StClientContent) GetClientImageContents() []*StClientImageContent {
if x != nil {
return x.ClientImageContents
}
return nil
}
func (x *StClientContent) GetClientVideoContents() []*StClientVideoContent {
if x != nil {
return x.ClientVideoContents
}
return nil
}
type StClientImageContent struct {
TaskId *string `protobuf:"bytes,1,opt"`
PicId *string `protobuf:"bytes,2,opt"`
Url *string `protobuf:"bytes,3,opt"`
}
func (x *StClientImageContent) GetTaskId() string {
if x != nil && x.TaskId != nil {
return *x.TaskId
}
return ""
}
func (x *StClientImageContent) GetPicId() string {
if x != nil && x.PicId != nil {
return *x.PicId
}
return ""
}
func (x *StClientImageContent) GetUrl() string {
if x != nil && x.Url != nil {
return *x.Url
}
return ""
}
type StClientVideoContent struct {
TaskId *string `protobuf:"bytes,1,opt"`
VideoId *string `protobuf:"bytes,2,opt"`
VideoUrl *string `protobuf:"bytes,3,opt"`
CoverUrl *string `protobuf:"bytes,4,opt"`
}
func (x *StClientVideoContent) GetTaskId() string {
if x != nil && x.TaskId != nil {
return *x.TaskId
}
return ""
}
func (x *StClientVideoContent) GetVideoId() string {
if x != nil && x.VideoId != nil {
return *x.VideoId
}
return ""
}
func (x *StClientVideoContent) GetVideoUrl() string {
if x != nil && x.VideoUrl != nil {
return *x.VideoUrl
}
return ""
}
func (x *StClientVideoContent) GetCoverUrl() string {
if x != nil && x.CoverUrl != nil {
return *x.CoverUrl
}
return ""
}
type StDelFeedReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
From *int32 `protobuf:"varint,3,opt"`
Src *int32 `protobuf:"varint,4,opt"`
}
func (x *StDelFeedReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StDelFeedReq) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StDelFeedReq) GetFrom() int32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StDelFeedReq) GetSrc() int32 {
if x != nil && x.Src != nil {
return *x.Src
}
return 0
}
type StDelFeedRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
}
func (x *StDelFeedRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
type StDoCommentReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
CommentType *uint32 `protobuf:"varint,2,opt"`
Comment *StComment `protobuf:"bytes,3,opt"`
Feed *StFeed `protobuf:"bytes,4,opt"`
From *int32 `protobuf:"varint,5,opt"`
BusiReqData []byte `protobuf:"bytes,6,opt"`
Src *int32 `protobuf:"varint,7,opt"`
}
func (x *StDoCommentReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StDoCommentReq) GetCommentType() uint32 {
if x != nil && x.CommentType != nil {
return *x.CommentType
}
return 0
}
func (x *StDoCommentReq) GetComment() *StComment {
if x != nil {
return x.Comment
}
return nil
}
func (x *StDoCommentReq) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StDoCommentReq) GetFrom() int32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StDoCommentReq) GetBusiReqData() []byte {
if x != nil {
return x.BusiReqData
}
return nil
}
func (x *StDoCommentReq) GetSrc() int32 {
if x != nil && x.Src != nil {
return *x.Src
}
return 0
}
type StDoCommentRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Comment *StComment `protobuf:"bytes,2,opt"`
BusiRspData []byte `protobuf:"bytes,3,opt"`
}
func (x *StDoCommentRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StDoCommentRsp) GetComment() *StComment {
if x != nil {
return x.Comment
}
return nil
}
func (x *StDoCommentRsp) GetBusiRspData() []byte {
if x != nil {
return x.BusiRspData
}
return nil
}
type StDoLikeReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
LikeType *uint32 `protobuf:"varint,2,opt"`
Like *StLike `protobuf:"bytes,3,opt"`
Feed *StFeed `protobuf:"bytes,4,opt"`
BusiReqData []byte `protobuf:"bytes,5,opt"`
Comment *StComment `protobuf:"bytes,6,opt"`
Reply *StReply `protobuf:"bytes,7,opt"`
From *int32 `protobuf:"varint,8,opt"`
Src *int32 `protobuf:"varint,9,opt"`
EmotionReaction *StEmotionReactionInfo `protobuf:"bytes,10,opt"`
}
func (x *StDoLikeReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StDoLikeReq) GetLikeType() uint32 {
if x != nil && x.LikeType != nil {
return *x.LikeType
}
return 0
}
func (x *StDoLikeReq) GetLike() *StLike {
if x != nil {
return x.Like
}
return nil
}
func (x *StDoLikeReq) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StDoLikeReq) GetBusiReqData() []byte {
if x != nil {
return x.BusiReqData
}
return nil
}
func (x *StDoLikeReq) GetComment() *StComment {
if x != nil {
return x.Comment
}
return nil
}
func (x *StDoLikeReq) GetReply() *StReply {
if x != nil {
return x.Reply
}
return nil
}
func (x *StDoLikeReq) GetFrom() int32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StDoLikeReq) GetSrc() int32 {
if x != nil && x.Src != nil {
return *x.Src
}
return 0
}
func (x *StDoLikeReq) GetEmotionReaction() *StEmotionReactionInfo {
if x != nil {
return x.EmotionReaction
}
return nil
}
type StDoLikeRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Like *StLike `protobuf:"bytes,2,opt"`
BusiRspData []byte `protobuf:"bytes,3,opt"`
EmotionReaction *StEmotionReactionInfo `protobuf:"bytes,4,opt"`
}
func (x *StDoLikeRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StDoLikeRsp) GetLike() *StLike {
if x != nil {
return x.Like
}
return nil
}
func (x *StDoLikeRsp) GetBusiRspData() []byte {
if x != nil {
return x.BusiRspData
}
return nil
}
func (x *StDoLikeRsp) GetEmotionReaction() *StEmotionReactionInfo {
if x != nil {
return x.EmotionReaction
}
return nil
}
type StDoReplyReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
ReplyType *uint32 `protobuf:"varint,2,opt"`
Reply *StReply `protobuf:"bytes,3,opt"`
Comment *StComment `protobuf:"bytes,4,opt"`
Feed *StFeed `protobuf:"bytes,5,opt"`
From *int32 `protobuf:"varint,6,opt"`
BusiReqData []byte `protobuf:"bytes,7,opt"`
Src *int32 `protobuf:"varint,8,opt"`
}
func (x *StDoReplyReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StDoReplyReq) GetReplyType() uint32 {
if x != nil && x.ReplyType != nil {
return *x.ReplyType
}
return 0
}
func (x *StDoReplyReq) GetReply() *StReply {
if x != nil {
return x.Reply
}
return nil
}
func (x *StDoReplyReq) GetComment() *StComment {
if x != nil {
return x.Comment
}
return nil
}
func (x *StDoReplyReq) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StDoReplyReq) GetFrom() int32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StDoReplyReq) GetBusiReqData() []byte {
if x != nil {
return x.BusiReqData
}
return nil
}
func (x *StDoReplyReq) GetSrc() int32 {
if x != nil && x.Src != nil {
return *x.Src
}
return 0
}
type StDoReplyRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Reply *StReply `protobuf:"bytes,2,opt"`
BusiRspData []byte `protobuf:"bytes,3,opt"`
}
func (x *StDoReplyRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StDoReplyRsp) GetReply() *StReply {
if x != nil {
return x.Reply
}
return nil
}
func (x *StDoReplyRsp) GetBusiRspData() []byte {
if x != nil {
return x.BusiRspData
}
return nil
}
type StDoSecurityReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
Comment *StComment `protobuf:"bytes,3,opt"`
Reply *StReply `protobuf:"bytes,4,opt"`
Poster *StUser `protobuf:"bytes,5,opt"`
SecType *int32 `protobuf:"varint,6,opt"`
}
func (x *StDoSecurityReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StDoSecurityReq) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StDoSecurityReq) GetComment() *StComment {
if x != nil {
return x.Comment
}
return nil
}
func (x *StDoSecurityReq) GetReply() *StReply {
if x != nil {
return x.Reply
}
return nil
}
func (x *StDoSecurityReq) GetPoster() *StUser {
if x != nil {
return x.Poster
}
return nil
}
func (x *StDoSecurityReq) GetSecType() int32 {
if x != nil && x.SecType != nil {
return *x.SecType
}
return 0
}
type StDoSecurityRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
}
func (x *StDoSecurityRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
type StModifyFeedReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
MBitmap *uint64 `protobuf:"varint,3,opt"`
From *int32 `protobuf:"varint,4,opt"`
Src *int32 `protobuf:"varint,5,opt"`
ModifyFeedExtInfo []*CommonEntry `protobuf:"bytes,6,rep"`
}
func (x *StModifyFeedReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StModifyFeedReq) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StModifyFeedReq) GetMBitmap() uint64 {
if x != nil && x.MBitmap != nil {
return *x.MBitmap
}
return 0
}
func (x *StModifyFeedReq) GetFrom() int32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StModifyFeedReq) GetSrc() int32 {
if x != nil && x.Src != nil {
return *x.Src
}
return 0
}
func (x *StModifyFeedReq) GetModifyFeedExtInfo() []*CommonEntry {
if x != nil {
return x.ModifyFeedExtInfo
}
return nil
}
type StModifyFeedRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
BusiRspData []byte `protobuf:"bytes,3,opt"`
}
func (x *StModifyFeedRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StModifyFeedRsp) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StModifyFeedRsp) GetBusiRspData() []byte {
if x != nil {
return x.BusiRspData
}
return nil
}
type StPublishFeedReq struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
BusiReqData []byte `protobuf:"bytes,3,opt"`
From *int32 `protobuf:"varint,4,opt"`
Src *int32 `protobuf:"varint,5,opt"`
StoreFeedExtInfo []*CommonEntry `protobuf:"bytes,6,rep"`
JsonFeed *string `protobuf:"bytes,7,opt"`
ClientContent *StClientContent `protobuf:"bytes,8,opt"`
}
func (x *StPublishFeedReq) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StPublishFeedReq) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StPublishFeedReq) GetBusiReqData() []byte {
if x != nil {
return x.BusiReqData
}
return nil
}
func (x *StPublishFeedReq) GetFrom() int32 {
if x != nil && x.From != nil {
return *x.From
}
return 0
}
func (x *StPublishFeedReq) GetSrc() int32 {
if x != nil && x.Src != nil {
return *x.Src
}
return 0
}
func (x *StPublishFeedReq) GetStoreFeedExtInfo() []*CommonEntry {
if x != nil {
return x.StoreFeedExtInfo
}
return nil
}
func (x *StPublishFeedReq) GetJsonFeed() string {
if x != nil && x.JsonFeed != nil {
return *x.JsonFeed
}
return ""
}
func (x *StPublishFeedReq) GetClientContent() *StClientContent {
if x != nil {
return x.ClientContent
}
return nil
}
type StPublishFeedRsp struct {
ExtInfo *StCommonExt `protobuf:"bytes,1,opt"`
Feed *StFeed `protobuf:"bytes,2,opt"`
BusiRspData []byte `protobuf:"bytes,3,opt"`
}
func (x *StPublishFeedRsp) GetExtInfo() *StCommonExt {
if x != nil {
return x.ExtInfo
}
return nil
}
func (x *StPublishFeedRsp) GetFeed() *StFeed {
if x != nil {
return x.Feed
}
return nil
}
func (x *StPublishFeedRsp) GetBusiRspData() []byte {
if x != nil {
return x.BusiRspData
}
return nil
}

View File

@ -0,0 +1,154 @@
syntax = "proto2";
package channel;
option go_package = "pb/channel;channel";
import "pb/channel/GuildFeedCloudMeta.proto";
import "pb/channel/GuildChannelBase.proto";
message StAlterFeedReq {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional bytes busiReqData = 3;
optional uint64 mBitmap = 4;
optional int32 from = 5;
optional int32 src = 6;
repeated CommonEntry alterFeedExtInfo = 7;
optional string jsonFeed = 8;
optional StClientContent clientContent = 9;
}
message StAlterFeedRsp {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional bytes busiRspData = 3;
}
message StClientContent {
repeated StClientImageContent clientImageContents = 1;
repeated StClientVideoContent clientVideoContents = 2;
}
message StClientImageContent {
optional string taskId = 1;
optional string picId = 2;
optional string url = 3;
}
message StClientVideoContent {
optional string taskId = 1;
optional string videoId = 2;
optional string videoUrl = 3;
optional string coverUrl = 4;
}
message StDelFeedReq {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional int32 from = 3;
optional int32 src = 4;
}
message StDelFeedRsp {
optional StCommonExt extInfo = 1;
}
message StDoCommentReq {
optional StCommonExt extInfo = 1;
optional uint32 commentType = 2;
optional StComment comment = 3;
optional StFeed feed = 4;
optional int32 from = 5;
optional bytes busiReqData = 6;
optional int32 src = 7;
}
message StDoCommentRsp {
optional StCommonExt extInfo = 1;
optional StComment comment = 2;
optional bytes busiRspData = 3;
}
message StDoLikeReq {
optional StCommonExt extInfo = 1;
optional uint32 likeType = 2;
optional StLike like = 3;
optional StFeed feed = 4;
optional bytes busiReqData = 5;
optional StComment comment = 6;
optional StReply reply = 7;
optional int32 from = 8;
optional int32 src = 9;
optional StEmotionReactionInfo emotionReaction = 10;
}
message StDoLikeRsp {
optional StCommonExt extInfo = 1;
optional StLike like = 2;
optional bytes busiRspData = 3;
optional StEmotionReactionInfo emotionReaction = 4;
}
message StDoReplyReq {
optional StCommonExt extInfo = 1;
optional uint32 replyType = 2;
optional StReply reply = 3;
optional StComment comment = 4;
optional StFeed feed = 5;
optional int32 from = 6;
optional bytes busiReqData = 7;
optional int32 src = 8;
}
message StDoReplyRsp {
optional StCommonExt extInfo = 1;
optional StReply reply = 2;
optional bytes busiRspData = 3;
}
message StDoSecurityReq {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional StComment comment = 3;
optional StReply reply = 4;
optional StUser poster = 5;
optional int32 secType = 6;
}
message StDoSecurityRsp {
optional StCommonExt extInfo = 1;
}
message StModifyFeedReq {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional uint64 mBitmap = 3;
optional int32 from = 4;
optional int32 src = 5;
repeated CommonEntry modifyFeedExtInfo = 6;
}
message StModifyFeedRsp {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional bytes busiRspData = 3;
}
message StPublishFeedReq {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional bytes busiReqData = 3;
optional int32 from = 4;
optional int32 src = 5;
repeated CommonEntry storeFeedExtInfo = 6;
optional string jsonFeed = 7;
optional StClientContent clientContent = 8;
}
message StPublishFeedRsp {
optional StCommonExt extInfo = 1;
optional StFeed feed = 2;
optional bytes busiRspData = 3;
}

View File

@ -1,33 +1,47 @@
// Code generated by yaprotoc. DO NOT EDIT.
// source: channel/MsgResponsesSvr.proto
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/MsgResponsesSvr.proto
package channel
import (
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
)
type BatchGetMsgRspCountReq struct {
GuildMsgList []*GuildMsg `protobuf:"bytes,1,rep"`
}
func (x *BatchGetMsgRspCountReq) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *BatchGetMsgRspCountReq) GetGuildMsgList() []*GuildMsg {
if x != nil {
return x.GuildMsgList
}
return proto.Marshal(x)
return nil
}
type BatchGetMsgRspCountRsp struct {
GuildMsgInfoList []*GuildMsgInfo `protobuf:"bytes,1,rep"`
}
func (x *BatchGetMsgRspCountRsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *BatchGetMsgRspCountRsp) GetGuildMsgInfoList() []*GuildMsgInfo {
if x != nil {
return x.GuildMsgInfoList
}
return proto.Marshal(x)
return nil
}
type SvrChannelMsg struct {
ChannelId *uint64 `protobuf:"varint,1,opt"`
Id []*MsgId `protobuf:"bytes,2,rep"`
}
func (x *SvrChannelMsg) GetChannelId() uint64 {
if x != nil && x.ChannelId != nil {
return *x.ChannelId
}
return 0
}
func (x *SvrChannelMsg) GetId() []*MsgId {
if x != nil {
return x.Id
}
return nil
}
type ChannelMsgInfo struct {
@ -42,18 +56,19 @@ func (x *ChannelMsgInfo) GetChannelId() uint64 {
return 0
}
func (x *ChannelMsgInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelMsgInfo) GetRespData() []*MsgRespData {
if x != nil {
return x.RespData
}
return proto.Marshal(x)
return nil
}
type EmojiReaction struct {
EmojiId *string `protobuf:"bytes,1,opt"`
EmojiType *uint64 `protobuf:"varint,2,opt"`
Cnt *uint64 `protobuf:"varint,3,opt"`
IsClicked *bool `protobuf:"varint,4,opt"`
EmojiId *string `protobuf:"bytes,1,opt"`
EmojiType *uint64 `protobuf:"varint,2,opt"`
Cnt *uint64 `protobuf:"varint,3,opt"`
IsClicked *bool `protobuf:"varint,4,opt"`
IsDefaultEmoji *bool `protobuf:"varint,10001,opt"`
}
func (x *EmojiReaction) GetEmojiId() string {
@ -84,11 +99,11 @@ func (x *EmojiReaction) GetIsClicked() bool {
return false
}
func (x *EmojiReaction) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *EmojiReaction) GetIsDefaultEmoji() bool {
if x != nil && x.IsDefaultEmoji != nil {
return *x.IsDefaultEmoji
}
return proto.Marshal(x)
return false
}
type GuildMsg struct {
@ -103,11 +118,11 @@ func (x *GuildMsg) GetGuildId() uint64 {
return 0
}
func (x *GuildMsg) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *GuildMsg) GetChannelMsgList() []*SvrChannelMsg {
if x != nil {
return x.ChannelMsgList
}
return proto.Marshal(x)
return nil
}
type GuildMsgInfo struct {
@ -122,11 +137,11 @@ func (x *GuildMsgInfo) GetGuildId() uint64 {
return 0
}
func (x *GuildMsgInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *GuildMsgInfo) GetChannelMsgInfoList() []*ChannelMsgInfo {
if x != nil {
return x.ChannelMsgInfoList
}
return proto.Marshal(x)
return nil
}
type MsgCnt struct {
@ -134,11 +149,18 @@ type MsgCnt struct {
EmojiReaction []*EmojiReaction `protobuf:"bytes,2,rep"`
}
func (x *MsgCnt) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *MsgCnt) GetId() *MsgId {
if x != nil {
return x.Id
}
return proto.Marshal(x)
return nil
}
func (x *MsgCnt) GetEmojiReaction() []*EmojiReaction {
if x != nil {
return x.EmojiReaction
}
return nil
}
type MsgId struct {
@ -160,40 +182,21 @@ func (x *MsgId) GetSeq() uint64 {
return 0
}
func (x *MsgId) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type MsgRespData struct {
Id *MsgId `protobuf:"bytes,1,opt"`
Cnt []byte `protobuf:"bytes,2,opt"`
}
func (x *MsgRespData) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *MsgRespData) GetId() *MsgId {
if x != nil {
return x.Id
}
return proto.Marshal(x)
return nil
}
type SvrChannelMsg struct {
ChannelId *uint64 `protobuf:"varint,1,opt"`
Id []*MsgId `protobuf:"bytes,2,rep"`
}
func (x *SvrChannelMsg) GetChannelId() uint64 {
if x != nil && x.ChannelId != nil {
return *x.ChannelId
func (x *MsgRespData) GetCnt() []byte {
if x != nil {
return x.Cnt
}
return 0
}
func (x *SvrChannelMsg) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
return nil
}

View File

@ -1,7 +1,6 @@
syntax = "proto2";
option go_package = "channel;channel";
option go_package = "pb/channel;channel";
message BatchGetMsgRspCountReq {
repeated GuildMsg guildMsgList = 1;
@ -26,6 +25,7 @@ message EmojiReaction {
optional uint64 emojiType = 2;
optional uint64 cnt = 3;
optional bool isClicked = 4;
optional bool isDefaultEmoji = 10001;
}
message GuildMsg {

View File

@ -1,12 +1,10 @@
// Code generated by yaprotoc. DO NOT EDIT.
// source: channel/common.proto
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/common.proto
package channel
import (
msg "github.com/Mrs4s/MiraiGo/internal/protobuf/data/msg"
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
msg "github.com/Mrs4s/MiraiGo/client/pb/msg"
)
type ChannelContentHead struct {
@ -61,11 +59,70 @@ func (x *ChannelContentHead) GetTime() uint64 {
return 0
}
func (x *ChannelContentHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelContentHead) GetMeta() []byte {
if x != nil {
return x.Meta
}
return proto.Marshal(x)
return nil
}
type DirectMessageMember struct {
Uin *uint64 `protobuf:"varint,1,opt"`
Tinyid *uint64 `protobuf:"varint,2,opt"`
SourceGuildId *uint64 `protobuf:"varint,3,opt"`
SourceGuildName []byte `protobuf:"bytes,4,opt"`
NickName []byte `protobuf:"bytes,5,opt"`
MemberName []byte `protobuf:"bytes,6,opt"`
NotifyType *uint32 `protobuf:"varint,7,opt"`
}
func (x *DirectMessageMember) GetUin() uint64 {
if x != nil && x.Uin != nil {
return *x.Uin
}
return 0
}
func (x *DirectMessageMember) GetTinyid() uint64 {
if x != nil && x.Tinyid != nil {
return *x.Tinyid
}
return 0
}
func (x *DirectMessageMember) GetSourceGuildId() uint64 {
if x != nil && x.SourceGuildId != nil {
return *x.SourceGuildId
}
return 0
}
func (x *DirectMessageMember) GetSourceGuildName() []byte {
if x != nil {
return x.SourceGuildName
}
return nil
}
func (x *DirectMessageMember) GetNickName() []byte {
if x != nil {
return x.NickName
}
return nil
}
func (x *DirectMessageMember) GetMemberName() []byte {
if x != nil {
return x.MemberName
}
return nil
}
func (x *DirectMessageMember) GetNotifyType() uint32 {
if x != nil && x.NotifyType != nil {
return *x.NotifyType
}
return 0
}
type ChannelEvent struct {
@ -88,11 +145,11 @@ func (x *ChannelEvent) GetVersion() uint64 {
return 0
}
func (x *ChannelEvent) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelEvent) GetOpInfo() *ChannelMsgOpInfo {
if x != nil {
return x.OpInfo
}
return proto.Marshal(x)
return nil
}
type ChannelExtInfo struct {
@ -112,6 +169,27 @@ type ChannelExtInfo struct {
DirectMessageMember []*DirectMessageMember `protobuf:"bytes,14,rep"`
}
func (x *ChannelExtInfo) GetFromNick() []byte {
if x != nil {
return x.FromNick
}
return nil
}
func (x *ChannelExtInfo) GetGuildName() []byte {
if x != nil {
return x.GuildName
}
return nil
}
func (x *ChannelExtInfo) GetChannelName() []byte {
if x != nil {
return x.ChannelName
}
return nil
}
func (x *ChannelExtInfo) GetVisibility() uint32 {
if x != nil && x.Visibility != nil {
return *x.Visibility
@ -140,6 +218,13 @@ func (x *ChannelExtInfo) GetNameType() uint32 {
return 0
}
func (x *ChannelExtInfo) GetMemberName() []byte {
if x != nil {
return x.MemberName
}
return nil
}
func (x *ChannelExtInfo) GetTimestamp() uint32 {
if x != nil && x.Timestamp != nil {
return *x.Timestamp
@ -154,11 +239,32 @@ func (x *ChannelExtInfo) GetEventVersion() uint64 {
return 0
}
func (x *ChannelExtInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelExtInfo) GetEvents() []*ChannelEvent {
if x != nil {
return x.Events
}
return proto.Marshal(x)
return nil
}
func (x *ChannelExtInfo) GetFromRoleInfo() *ChannelRole {
if x != nil {
return x.FromRoleInfo
}
return nil
}
func (x *ChannelExtInfo) GetFreqLimitInfo() *ChannelFreqLimitInfo {
if x != nil {
return x.FreqLimitInfo
}
return nil
}
func (x *ChannelExtInfo) GetDirectMessageMember() []*DirectMessageMember {
if x != nil {
return x.DirectMessageMember
}
return nil
}
type ChannelFreqLimitInfo struct {
@ -188,13 +294,6 @@ func (x *ChannelFreqLimitInfo) GetLimitTimestamp() uint64 {
return 0
}
func (x *ChannelFreqLimitInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelInfo struct {
Id *uint64 `protobuf:"varint,1,opt"`
Name []byte `protobuf:"bytes,2,opt"`
@ -209,6 +308,13 @@ func (x *ChannelInfo) GetId() uint64 {
return 0
}
func (x *ChannelInfo) GetName() []byte {
if x != nil {
return x.Name
}
return nil
}
func (x *ChannelInfo) GetColor() uint32 {
if x != nil && x.Color != nil {
return *x.Color
@ -223,13 +329,6 @@ func (x *ChannelInfo) GetHoist() uint32 {
return 0
}
func (x *ChannelInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelLoginSig struct {
Type *uint32 `protobuf:"varint,1,opt"`
Sig []byte `protobuf:"bytes,2,opt"`
@ -243,6 +342,13 @@ func (x *ChannelLoginSig) GetType() uint32 {
return 0
}
func (x *ChannelLoginSig) GetSig() []byte {
if x != nil {
return x.Sig
}
return nil
}
func (x *ChannelLoginSig) GetAppid() uint32 {
if x != nil && x.Appid != nil {
return *x.Appid
@ -250,13 +356,6 @@ func (x *ChannelLoginSig) GetAppid() uint32 {
return 0
}
func (x *ChannelLoginSig) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelMeta struct {
FromUin *uint64 `protobuf:"varint,1,opt"`
LoginSig *ChannelLoginSig `protobuf:"bytes,2,opt"`
@ -269,11 +368,11 @@ func (x *ChannelMeta) GetFromUin() uint64 {
return 0
}
func (x *ChannelMeta) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelMeta) GetLoginSig() *ChannelLoginSig {
if x != nil {
return x.LoginSig
}
return proto.Marshal(x)
return nil
}
type ChannelMsgContent struct {
@ -283,17 +382,38 @@ type ChannelMsgContent struct {
ExtInfo *ChannelExtInfo `protobuf:"bytes,4,opt"`
}
func (x *ChannelMsgContent) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelMsgContent) GetHead() *ChannelMsgHead {
if x != nil {
return x.Head
}
return proto.Marshal(x)
return nil
}
func (x *ChannelMsgContent) GetCtrlHead() *ChannelMsgCtrlHead {
if x != nil {
return x.CtrlHead
}
return nil
}
func (x *ChannelMsgContent) GetBody() *msg.MessageBody {
if x != nil {
return x.Body
}
return nil
}
func (x *ChannelMsgContent) GetExtInfo() *ChannelExtInfo {
if x != nil {
return x.ExtInfo
}
return nil
}
type ChannelMsgCtrlHead struct {
IncludeUin []uint64 `protobuf:"varint,1,rep"`
ExcludeUin []uint64 `protobuf:"varint,2,rep"`
Featureid []uint64 `protobuf:"varint,3,rep"`
IncludeUin [][]byte `protobuf:"bytes,1,rep"`
// repeated uint64 excludeUin = 2; // bytes?
// repeated uint64 featureid = 3;
OfflineFlag *uint32 `protobuf:"varint,4,opt"`
Visibility *uint32 `protobuf:"varint,5,opt"`
CtrlFlag *uint64 `protobuf:"varint,6,opt"`
@ -306,6 +426,13 @@ type ChannelMsgCtrlHead struct {
PrivateType *uint32 `protobuf:"varint,13,opt"`
}
func (x *ChannelMsgCtrlHead) GetIncludeUin() [][]byte {
if x != nil {
return x.IncludeUin
}
return nil
}
func (x *ChannelMsgCtrlHead) GetOfflineFlag() uint32 {
if x != nil && x.OfflineFlag != nil {
return *x.OfflineFlag
@ -327,6 +454,13 @@ func (x *ChannelMsgCtrlHead) GetCtrlFlag() uint64 {
return 0
}
func (x *ChannelMsgCtrlHead) GetEvents() []*ChannelEvent {
if x != nil {
return x.Events
}
return nil
}
func (x *ChannelMsgCtrlHead) GetLevel() uint64 {
if x != nil && x.Level != nil {
return *x.Level
@ -334,6 +468,13 @@ func (x *ChannelMsgCtrlHead) GetLevel() uint64 {
return 0
}
func (x *ChannelMsgCtrlHead) GetPersonalLevels() []*PersonalLevel {
if x != nil {
return x.PersonalLevels
}
return nil
}
func (x *ChannelMsgCtrlHead) GetGuildSyncSeq() uint64 {
if x != nil && x.GuildSyncSeq != nil {
return *x.GuildSyncSeq
@ -362,23 +503,23 @@ func (x *ChannelMsgCtrlHead) GetPrivateType() uint32 {
return 0
}
func (x *ChannelMsgCtrlHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelMsgHead struct {
RoutingHead *ChannelRoutingHead `protobuf:"bytes,1,opt"`
ContentHead *ChannelContentHead `protobuf:"bytes,2,opt"`
}
func (x *ChannelMsgHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelMsgHead) GetRoutingHead() *ChannelRoutingHead {
if x != nil {
return x.RoutingHead
}
return proto.Marshal(x)
return nil
}
func (x *ChannelMsgHead) GetContentHead() *ChannelContentHead {
if x != nil {
return x.ContentHead
}
return nil
}
type ChannelMsgMeta struct {
@ -392,13 +533,6 @@ func (x *ChannelMsgMeta) GetAtAllSeq() uint64 {
return 0
}
func (x *ChannelMsgMeta) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelMsgOpInfo struct {
OperatorTinyid *uint64 `protobuf:"varint,1,opt"`
OperatorRole *uint64 `protobuf:"varint,2,opt"`
@ -442,11 +576,23 @@ func (x *ChannelMsgOpInfo) GetAtType() uint64 {
return 0
}
func (x *ChannelMsgOpInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
type PersonalLevel struct {
ToUin *uint64 `protobuf:"varint,1,opt"`
Level *uint64 `protobuf:"varint,2,opt"`
}
func (x *PersonalLevel) GetToUin() uint64 {
if x != nil && x.ToUin != nil {
return *x.ToUin
}
return proto.Marshal(x)
return 0
}
func (x *PersonalLevel) GetLevel() uint64 {
if x != nil && x.Level != nil {
return *x.Level
}
return 0
}
type ChannelRole struct {
@ -462,6 +608,13 @@ func (x *ChannelRole) GetId() uint64 {
return 0
}
func (x *ChannelRole) GetInfo() []byte {
if x != nil {
return x.Info
}
return nil
}
func (x *ChannelRole) GetFlag() uint32 {
if x != nil && x.Flag != nil {
return *x.Flag
@ -469,13 +622,6 @@ func (x *ChannelRole) GetFlag() uint32 {
return 0
}
func (x *ChannelRole) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelRoutingHead struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
ChannelId *uint64 `protobuf:"varint,2,opt"`
@ -534,81 +680,3 @@ func (x *ChannelRoutingHead) GetDirectMessageFlag() uint32 {
}
return 0
}
func (x *ChannelRoutingHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type DirectMessageMember struct {
Uin *uint64 `protobuf:"varint,1,opt"`
Tinyid *uint64 `protobuf:"varint,2,opt"`
SourceGuildId *uint64 `protobuf:"varint,3,opt"`
SourceGuildName []byte `protobuf:"bytes,4,opt"`
NickName []byte `protobuf:"bytes,5,opt"`
MemberName []byte `protobuf:"bytes,6,opt"`
NotifyType *uint32 `protobuf:"varint,7,opt"`
}
func (x *DirectMessageMember) GetUin() uint64 {
if x != nil && x.Uin != nil {
return *x.Uin
}
return 0
}
func (x *DirectMessageMember) GetTinyid() uint64 {
if x != nil && x.Tinyid != nil {
return *x.Tinyid
}
return 0
}
func (x *DirectMessageMember) GetSourceGuildId() uint64 {
if x != nil && x.SourceGuildId != nil {
return *x.SourceGuildId
}
return 0
}
func (x *DirectMessageMember) GetNotifyType() uint32 {
if x != nil && x.NotifyType != nil {
return *x.NotifyType
}
return 0
}
func (x *DirectMessageMember) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type PersonalLevel struct {
ToUin *uint64 `protobuf:"varint,1,opt"`
Level *uint64 `protobuf:"varint,2,opt"`
}
func (x *PersonalLevel) GetToUin() uint64 {
if x != nil && x.ToUin != nil {
return *x.ToUin
}
return 0
}
func (x *PersonalLevel) GetLevel() uint64 {
if x != nil && x.Level != nil {
return *x.Level
}
return 0
}
func (x *PersonalLevel) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}

View File

@ -2,9 +2,9 @@ syntax = "proto2";
package channel;
option go_package = "channel;channel";
option go_package = "pb/channel;channel";
import "msg/msg.proto";
import "pb/msg/msg.proto";
message ChannelContentHead {
optional uint64 type = 1;
@ -81,9 +81,9 @@ message ChannelMsgContent {
}
message ChannelMsgCtrlHead {
repeated uint64 includeUin = 1;
repeated uint64 excludeUin = 2;
repeated uint64 featureid = 3;
repeated bytes includeUin = 1;
// repeated uint64 excludeUin = 2; // bytes?
// repeated uint64 featureid = 3;
optional uint32 offlineFlag = 4;
optional uint32 visibility = 5;
optional uint64 ctrlFlag = 6;

View File

@ -1,22 +1,17 @@
// Code generated by yaprotoc. DO NOT EDIT.
// source: channel/msgpush.proto
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/msgpush.proto
package channel
import (
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
)
type FocusInfo struct {
ChannelIdList []uint64 `protobuf:"varint,1,rep"`
}
func (x *FocusInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *FocusInfo) GetChannelIdList() []uint64 {
if x != nil {
return x.ChannelIdList
}
return proto.Marshal(x)
return nil
}
type MsgOnlinePush struct {
@ -30,6 +25,13 @@ type MsgOnlinePush struct {
HugeFlag *uint32 `protobuf:"varint,8,opt"`
}
func (x *MsgOnlinePush) GetMsgs() []*ChannelMsgContent {
if x != nil {
return x.Msgs
}
return nil
}
func (x *MsgOnlinePush) GetGeneralFlag() uint32 {
if x != nil && x.GeneralFlag != nil {
return *x.GeneralFlag
@ -44,6 +46,13 @@ func (x *MsgOnlinePush) GetNeedResp() uint32 {
return 0
}
func (x *MsgOnlinePush) GetServerBuf() []byte {
if x != nil {
return x.ServerBuf
}
return nil
}
func (x *MsgOnlinePush) GetCompressFlag() uint32 {
if x != nil && x.CompressFlag != nil {
return *x.CompressFlag
@ -51,6 +60,20 @@ func (x *MsgOnlinePush) GetCompressFlag() uint32 {
return 0
}
func (x *MsgOnlinePush) GetCompressMsg() []byte {
if x != nil {
return x.CompressMsg
}
return nil
}
func (x *MsgOnlinePush) GetFocusInfo() *FocusInfo {
if x != nil {
return x.FocusInfo
}
return nil
}
func (x *MsgOnlinePush) GetHugeFlag() uint32 {
if x != nil && x.HugeFlag != nil {
return *x.HugeFlag
@ -58,33 +81,26 @@ func (x *MsgOnlinePush) GetHugeFlag() uint32 {
return 0
}
func (x *MsgOnlinePush) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type MsgPushResp struct {
ServerBuf []byte `protobuf:"bytes,1,opt"`
}
func (x *MsgPushResp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *MsgPushResp) GetServerBuf() []byte {
if x != nil {
return x.ServerBuf
}
return proto.Marshal(x)
return nil
}
type PressMsg struct {
Msgs []*ChannelMsgContent `protobuf:"bytes,1,rep"`
}
func (x *PressMsg) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *PressMsg) GetMsgs() []*ChannelMsgContent {
if x != nil {
return x.Msgs
}
return proto.Marshal(x)
return nil
}
type ServerBuf struct {
@ -107,9 +123,9 @@ func (x *ServerBuf) GetSvrPort() uint32 {
return 0
}
func (x *ServerBuf) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ServerBuf) GetEchoKey() []byte {
if x != nil {
return x.EchoKey
}
return proto.Marshal(x)
return nil
}

View File

@ -2,9 +2,9 @@ syntax = "proto2";
package channel;
option go_package = "channel;channel";
option go_package = "pb/channel;channel";
import "channel/common.proto";
import "pb/channel/common.proto";
message FocusInfo {
repeated uint64 channelIdList = 1;

View File

@ -1,22 +1,21 @@
// Code generated by yaprotoc. DO NOT EDIT.
// source: channel/oidb0xf62.proto
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/oidb0xf62.proto
package channel
import (
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
msg "github.com/Mrs4s/MiraiGo/client/pb/msg"
)
type DF62ReqBody struct {
Msg *ChannelMsgContent `protobuf:"bytes,1,opt"`
}
func (x *DF62ReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *DF62ReqBody) GetMsg() *ChannelMsgContent {
if x != nil {
return x.Msg
}
return proto.Marshal(x)
return nil
}
type DF62RspBody struct {
@ -27,6 +26,7 @@ type DF62RspBody struct {
ErrType *uint32 `protobuf:"varint,5,opt"`
TransSvrInfo *TransSvrInfo `protobuf:"bytes,6,opt"`
FreqLimitInfo *ChannelFreqLimitInfo `protobuf:"bytes,7,opt"`
Body *msg.MessageBody `protobuf:"bytes,8,opt"`
}
func (x *DF62RspBody) GetResult() uint32 {
@ -36,6 +36,13 @@ func (x *DF62RspBody) GetResult() uint32 {
return 0
}
func (x *DF62RspBody) GetErrmsg() []byte {
if x != nil {
return x.Errmsg
}
return nil
}
func (x *DF62RspBody) GetSendTime() uint32 {
if x != nil && x.SendTime != nil {
return *x.SendTime
@ -43,6 +50,13 @@ func (x *DF62RspBody) GetSendTime() uint32 {
return 0
}
func (x *DF62RspBody) GetHead() *ChannelMsgHead {
if x != nil {
return x.Head
}
return nil
}
func (x *DF62RspBody) GetErrType() uint32 {
if x != nil && x.ErrType != nil {
return *x.ErrType
@ -50,11 +64,25 @@ func (x *DF62RspBody) GetErrType() uint32 {
return 0
}
func (x *DF62RspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *DF62RspBody) GetTransSvrInfo() *TransSvrInfo {
if x != nil {
return x.TransSvrInfo
}
return proto.Marshal(x)
return nil
}
func (x *DF62RspBody) GetFreqLimitInfo() *ChannelFreqLimitInfo {
if x != nil {
return x.FreqLimitInfo
}
return nil
}
func (x *DF62RspBody) GetBody() *msg.MessageBody {
if x != nil {
return x.Body
}
return nil
}
type TransSvrInfo struct {
@ -78,9 +106,16 @@ func (x *TransSvrInfo) GetRetCode() int32 {
return 0
}
func (x *TransSvrInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *TransSvrInfo) GetErrMsg() []byte {
if x != nil {
return x.ErrMsg
}
return proto.Marshal(x)
return nil
}
func (x *TransSvrInfo) GetTransInfo() []byte {
if x != nil {
return x.TransInfo
}
return nil
}

View File

@ -2,8 +2,10 @@ syntax = "proto2";
package channel;
option go_package = "channel;channel";
import "channel/common.proto";
option go_package = "pb/channel;channel";
import "pb/channel/common.proto";
import "pb/msg/msg.proto";
message DF62ReqBody {
optional ChannelMsgContent msg = 1;
@ -17,6 +19,7 @@ message DF62RspBody {
optional uint32 errType = 5;
optional TransSvrInfo transSvrInfo = 6;
optional ChannelFreqLimitInfo freqLimitInfo = 7;
optional msg.MessageBody body = 8;
}
message TransSvrInfo {

View File

@ -2,7 +2,7 @@ syntax = "proto2";
package channel;
option go_package = "channel;channel";
option go_package = "pb/channel;channel";
message AppChannelMsg {
optional string summary = 1;
@ -142,7 +142,21 @@ message EventBody {
repeated MsgEvent events = 39;
optional SchedulerMsg scheduler = 40;
optional AppChannelMsg appChannel = 41;
optional FeedEvent feedEvent = 44;
optional AppChannelMsg weakMsgAppChannel = 46;
optional ReadFeedNotify readFeedNotify = 48;
}
message FeedEvent {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
optional string feedId = 3;
optional string msgSummary = 4;
optional uint64 eventTime = 5;
}
message ReadFeedNotify {
optional uint64 reportTime = 2;
}
message GroupProStatus {
@ -286,9 +300,15 @@ message SwitchDetail {
message SwitchLiveRoom {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
optional uint64 roomId = 3;
optional uint64 tinyid = 4;
optional uint32 action = 5;
// optional uint64 roomId = 3;
// optional uint64 tinyid = 4;
optional SwitchLiveRoomUserInfo userInfo = 3;
optional uint32 action = 4; // JOIN = 1 QUIT = 2
}
message SwitchLiveRoomUserInfo {
optional uint64 tinyId = 1;
optional string nickname = 2;
}
message SwitchVoiceChannel {

View File

@ -1,13 +1,8 @@
// Code generated by yaprotoc. DO NOT EDIT.
// source: channel/synclogic.proto
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/synclogic.proto
package channel
import (
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
)
type ChannelMsg struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
ChannelId *uint64 `protobuf:"varint,2,opt"`
@ -52,11 +47,11 @@ func (x *ChannelMsg) GetRspEndSeq() uint64 {
return 0
}
func (x *ChannelMsg) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelMsg) GetMsgs() []*ChannelMsgContent {
if x != nil {
return x.Msgs
}
return proto.Marshal(x)
return nil
}
type ChannelMsgReq struct {
@ -65,6 +60,13 @@ type ChannelMsgReq struct {
DirectMessageFlag *uint32 `protobuf:"varint,3,opt"`
}
func (x *ChannelMsgReq) GetChannelParam() *ChannelParam {
if x != nil {
return x.ChannelParam
}
return nil
}
func (x *ChannelMsgReq) GetWithVersionFlag() uint32 {
if x != nil && x.WithVersionFlag != nil {
return *x.WithVersionFlag
@ -79,13 +81,6 @@ func (x *ChannelMsgReq) GetDirectMessageFlag() uint32 {
return 0
}
func (x *ChannelMsgReq) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelMsgRsp struct {
Result *uint32 `protobuf:"varint,1,opt"`
ErrMsg []byte `protobuf:"bytes,2,opt"`
@ -101,6 +96,20 @@ func (x *ChannelMsgRsp) GetResult() uint32 {
return 0
}
func (x *ChannelMsgRsp) GetErrMsg() []byte {
if x != nil {
return x.ErrMsg
}
return nil
}
func (x *ChannelMsgRsp) GetChannelMsg() *ChannelMsg {
if x != nil {
return x.ChannelMsg
}
return nil
}
func (x *ChannelMsgRsp) GetWithVersionFlag() uint32 {
if x != nil && x.WithVersionFlag != nil {
return *x.WithVersionFlag
@ -115,13 +124,6 @@ func (x *ChannelMsgRsp) GetGetMsgTime() uint64 {
return 0
}
func (x *ChannelMsgRsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelNode struct {
ChannelId *uint64 `protobuf:"varint,1,opt"`
Seq *uint64 `protobuf:"varint,2,opt"`
@ -186,6 +188,13 @@ func (x *ChannelNode) GetNotifyType() uint32 {
return 0
}
func (x *ChannelNode) GetChannelName() []byte {
if x != nil {
return x.ChannelName
}
return nil
}
func (x *ChannelNode) GetChannelType() uint32 {
if x != nil && x.ChannelType != nil {
return *x.ChannelType
@ -193,6 +202,20 @@ func (x *ChannelNode) GetChannelType() uint32 {
return 0
}
func (x *ChannelNode) GetMeta() []byte {
if x != nil {
return x.Meta
}
return nil
}
func (x *ChannelNode) GetReadMsgMeta() []byte {
if x != nil {
return x.ReadMsgMeta
}
return nil
}
func (x *ChannelNode) GetEventTime() uint32 {
if x != nil && x.EventTime != nil {
return *x.EventTime
@ -200,13 +223,6 @@ func (x *ChannelNode) GetEventTime() uint32 {
return 0
}
func (x *ChannelNode) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelParam struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
ChannelId *uint64 `protobuf:"varint,2,opt"`
@ -252,11 +268,18 @@ func (x *ChannelParam) GetTime() uint64 {
return 0
}
func (x *ChannelParam) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelParam) GetVersion() []uint64 {
if x != nil {
return x.Version
}
return proto.Marshal(x)
return nil
}
func (x *ChannelParam) GetSeqs() []*MsgCond {
if x != nil {
return x.Seqs
}
return nil
}
type DirectMessageSource struct {
@ -281,11 +304,25 @@ func (x *DirectMessageSource) GetGuildId() uint64 {
return 0
}
func (x *DirectMessageSource) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *DirectMessageSource) GetGuildName() []byte {
if x != nil {
return x.GuildName
}
return proto.Marshal(x)
return nil
}
func (x *DirectMessageSource) GetMemberName() []byte {
if x != nil {
return x.MemberName
}
return nil
}
func (x *DirectMessageSource) GetNickName() []byte {
if x != nil {
return x.NickName
}
return nil
}
type FirstViewMsg struct {
@ -311,6 +348,20 @@ func (x *FirstViewMsg) GetSeq() uint32 {
return 0
}
func (x *FirstViewMsg) GetGuildNodes() []*GuildNode {
if x != nil {
return x.GuildNodes
}
return nil
}
func (x *FirstViewMsg) GetChannelMsgs() []*ChannelMsg {
if x != nil {
return x.ChannelMsgs
}
return nil
}
func (x *FirstViewMsg) GetGetMsgTime() uint64 {
if x != nil && x.GetMsgTime != nil {
return *x.GetMsgTime
@ -318,11 +369,11 @@ func (x *FirstViewMsg) GetGetMsgTime() uint64 {
return 0
}
func (x *FirstViewMsg) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *FirstViewMsg) GetDirectMessageGuildNodes() []*GuildNode {
if x != nil {
return x.DirectMessageGuildNodes
}
return proto.Marshal(x)
return nil
}
type FirstViewReq struct {
@ -360,13 +411,6 @@ func (x *FirstViewReq) GetDirectMessageFlag() uint32 {
return 0
}
func (x *FirstViewReq) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type FirstViewRsp struct {
Result *uint32 `protobuf:"varint,1,opt"`
ErrMsg []byte `protobuf:"bytes,2,opt"`
@ -385,6 +429,13 @@ func (x *FirstViewRsp) GetResult() uint32 {
return 0
}
func (x *FirstViewRsp) GetErrMsg() []byte {
if x != nil {
return x.ErrMsg
}
return nil
}
func (x *FirstViewRsp) GetSeq() uint32 {
if x != nil && x.Seq != nil {
return *x.Seq
@ -427,13 +478,6 @@ func (x *FirstViewRsp) GetDirectMessageGuildCount() uint32 {
return 0
}
func (x *FirstViewRsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type GuildNode struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
GuildCode *uint64 `protobuf:"varint,2,opt"`
@ -456,11 +500,25 @@ func (x *GuildNode) GetGuildCode() uint64 {
return 0
}
func (x *GuildNode) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *GuildNode) GetChannelNodes() []*ChannelNode {
if x != nil {
return x.ChannelNodes
}
return proto.Marshal(x)
return nil
}
func (x *GuildNode) GetGuildName() []byte {
if x != nil {
return x.GuildName
}
return nil
}
func (x *GuildNode) GetPeerSource() *DirectMessageSource {
if x != nil {
return x.PeerSource
}
return nil
}
type MsgCond struct {
@ -482,13 +540,6 @@ func (x *MsgCond) GetEventVersion() uint64 {
return 0
}
func (x *MsgCond) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type MultiChannelMsg struct {
PushFlag *uint32 `protobuf:"varint,1,opt"`
Seq *uint32 `protobuf:"varint,2,opt"`
@ -510,6 +561,13 @@ func (x *MultiChannelMsg) GetSeq() uint32 {
return 0
}
func (x *MultiChannelMsg) GetChannelMsgs() []*ChannelMsg {
if x != nil {
return x.ChannelMsgs
}
return nil
}
func (x *MultiChannelMsg) GetGetMsgTime() uint64 {
if x != nil && x.GetMsgTime != nil {
return *x.GetMsgTime
@ -517,19 +575,19 @@ func (x *MultiChannelMsg) GetGetMsgTime() uint64 {
return 0
}
func (x *MultiChannelMsg) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type MultiChannelMsgReq struct {
ChannelParams []*ChannelParam `protobuf:"bytes,1,rep"`
Seq *uint32 `protobuf:"varint,2,opt"`
DirectMessageFlag *uint32 `protobuf:"varint,3,opt"`
}
func (x *MultiChannelMsgReq) GetChannelParams() []*ChannelParam {
if x != nil {
return x.ChannelParams
}
return nil
}
func (x *MultiChannelMsgReq) GetSeq() uint32 {
if x != nil && x.Seq != nil {
return *x.Seq
@ -544,13 +602,6 @@ func (x *MultiChannelMsgReq) GetDirectMessageFlag() uint32 {
return 0
}
func (x *MultiChannelMsgReq) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type MultiChannelMsgRsp struct {
Result *uint32 `protobuf:"varint,1,opt"`
ErrMsg []byte `protobuf:"bytes,2,opt"`
@ -564,6 +615,13 @@ func (x *MultiChannelMsgRsp) GetResult() uint32 {
return 0
}
func (x *MultiChannelMsgRsp) GetErrMsg() []byte {
if x != nil {
return x.ErrMsg
}
return nil
}
func (x *MultiChannelMsgRsp) GetSeq() uint32 {
if x != nil && x.Seq != nil {
return *x.Seq
@ -571,18 +629,18 @@ func (x *MultiChannelMsgRsp) GetSeq() uint32 {
return 0
}
func (x *MultiChannelMsgRsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ReqBody struct {
ChannelParam *ChannelParam `protobuf:"bytes,1,opt"`
DirectMessageFlag *uint32 `protobuf:"varint,2,opt"`
}
func (x *ReqBody) GetChannelParam() *ChannelParam {
if x != nil {
return x.ChannelParam
}
return nil
}
func (x *ReqBody) GetDirectMessageFlag() uint32 {
if x != nil && x.DirectMessageFlag != nil {
return *x.DirectMessageFlag
@ -590,13 +648,6 @@ func (x *ReqBody) GetDirectMessageFlag() uint32 {
return 0
}
func (x *ReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type RspBody struct {
Result *uint32 `protobuf:"varint,1,opt"`
ErrMsg []byte `protobuf:"bytes,2,opt"`
@ -610,9 +661,16 @@ func (x *RspBody) GetResult() uint32 {
return 0
}
func (x *RspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *RspBody) GetErrMsg() []byte {
if x != nil {
return x.ErrMsg
}
return proto.Marshal(x)
return nil
}
func (x *RspBody) GetChannelMsg() *ChannelMsg {
if x != nil {
return x.ChannelMsg
}
return nil
}

View File

@ -2,9 +2,9 @@ syntax = "proto2";
package channel;
option go_package = "channel;channel";
option go_package = "pb/channel;channel";
import "channel/common.proto";
import "pb/channel/common.proto";
message ChannelMsg {
optional uint64 guildId = 1;

View File

@ -1,59 +1,18 @@
// Code generated by yaprotoc. DO NOT EDIT.
// source: channel/unknown.proto
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: pb/channel/unknown.proto
package channel
import (
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
)
type ChannelListRsp struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
Channels []*GuildChannelInfo `protobuf:"bytes,2,rep"`
}
func (x *ChannelListRsp) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *ChannelListRsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelOidb0Xf55Rsp struct {
Info *GuildChannelInfo `protobuf:"bytes,1,opt"`
}
func (x *ChannelOidb0Xf55Rsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ChannelOidb0Xf57Rsp struct {
Rsp *GuildMetaRsp `protobuf:"bytes,1,opt"`
}
func (x *ChannelOidb0Xf57Rsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
// see sub_37628C
type ChannelOidb0Xf5BRsp struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
Bots []*GuildMemberInfo `protobuf:"bytes,4,rep"`
Members []*GuildMemberInfo `protobuf:"bytes,5,rep"`
AdminInfo *GuildAdminInfo `protobuf:"bytes,25,opt"`
GuildId *uint64 `protobuf:"varint,1,opt"`
Bots []*GuildMemberInfo `protobuf:"bytes,4,rep"`
Members []*GuildMemberInfo `protobuf:"bytes,5,rep"`
NextIndex *uint32 `protobuf:"varint,10,opt"`
Finished *uint32 `protobuf:"varint,9,opt"`
NextQueryParam *string `protobuf:"bytes,24,opt"`
MemberWithRoles []*GuildGroupMembersInfo `protobuf:"bytes,25,rep"`
NextRoleIdIndex *uint64 `protobuf:"varint,26,opt"`
}
func (x *ChannelOidb0Xf5BRsp) GetGuildId() uint64 {
@ -63,238 +22,249 @@ func (x *ChannelOidb0Xf5BRsp) GetGuildId() uint64 {
return 0
}
func (x *ChannelOidb0Xf5BRsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelOidb0Xf5BRsp) GetBots() []*GuildMemberInfo {
if x != nil {
return x.Bots
}
return proto.Marshal(x)
return nil
}
type ChannelOidb0Xf5DRsp struct {
Rsp *ChannelListRsp `protobuf:"bytes,1,opt"`
func (x *ChannelOidb0Xf5BRsp) GetMembers() []*GuildMemberInfo {
if x != nil {
return x.Members
}
return nil
}
func (x *ChannelOidb0Xf5DRsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelOidb0Xf5BRsp) GetNextIndex() uint32 {
if x != nil && x.NextIndex != nil {
return *x.NextIndex
}
return proto.Marshal(x)
return 0
}
func (x *ChannelOidb0Xf5BRsp) GetFinished() uint32 {
if x != nil && x.Finished != nil {
return *x.Finished
}
return 0
}
func (x *ChannelOidb0Xf5BRsp) GetNextQueryParam() string {
if x != nil && x.NextQueryParam != nil {
return *x.NextQueryParam
}
return ""
}
func (x *ChannelOidb0Xf5BRsp) GetMemberWithRoles() []*GuildGroupMembersInfo {
if x != nil {
return x.MemberWithRoles
}
return nil
}
func (x *ChannelOidb0Xf5BRsp) GetNextRoleIdIndex() uint64 {
if x != nil && x.NextRoleIdIndex != nil {
return *x.NextRoleIdIndex
}
return 0
}
type ChannelOidb0Xf88Rsp struct {
Profile *GuildUserProfile `protobuf:"bytes,1,opt"`
}
func (x *ChannelOidb0Xf88Rsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelOidb0Xf88Rsp) GetProfile() *GuildUserProfile {
if x != nil {
return x.Profile
}
return proto.Marshal(x)
return nil
}
type ChannelOidb0Xfc9Rsp struct {
Profile *GuildUserProfile `protobuf:"bytes,1,opt"`
}
func (x *ChannelOidb0Xfc9Rsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelOidb0Xfc9Rsp) GetProfile() *GuildUserProfile {
if x != nil {
return x.Profile
}
return proto.Marshal(x)
return nil
}
type GuildAdminInfo struct {
Admins []*GuildMemberInfo `protobuf:"bytes,2,rep"`
type ChannelOidb0Xf57Rsp struct {
Rsp *GuildMetaRsp `protobuf:"bytes,1,opt"`
}
func (x *GuildAdminInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *ChannelOidb0Xf57Rsp) GetRsp() *GuildMetaRsp {
if x != nil {
return x.Rsp
}
return proto.Marshal(x)
return nil
}
type GuildChannelInfo struct {
ChannelId *uint64 `protobuf:"varint,1,opt"`
ChannelName *string `protobuf:"bytes,2,opt"`
CreatorUin *int64 `protobuf:"varint,3,opt"`
CreateTime *int64 `protobuf:"varint,4,opt"`
GuildId *uint64 `protobuf:"varint,5,opt"`
FinalNotifyType *int32 `protobuf:"varint,6,opt"`
ChannelType *int32 `protobuf:"varint,7,opt"`
TalkPermission *int32 `protobuf:"varint,8,opt"`
CreatorTinyId *uint64 `protobuf:"varint,15,opt"`
VisibleType *int32 `protobuf:"varint,22,opt"`
TopMsg *GuildChannelTopMsgInfo `protobuf:"bytes,28,opt"`
CurrentSlowModeKey *int32 `protobuf:"varint,31,opt"`
SlowModeInfos []*GuildChannelSlowModeInfo `protobuf:"bytes,32,rep"`
type ChannelOidb0Xf55Rsp struct {
Info *GuildChannelInfo `protobuf:"bytes,1,opt"`
}
func (x *GuildChannelInfo) GetChannelId() uint64 {
if x != nil && x.ChannelId != nil {
return *x.ChannelId
func (x *ChannelOidb0Xf55Rsp) GetInfo() *GuildChannelInfo {
if x != nil {
return x.Info
}
return nil
}
type ChannelOidb0Xf5DRsp struct {
Rsp *ChannelListRsp `protobuf:"bytes,1,opt"`
}
func (x *ChannelOidb0Xf5DRsp) GetRsp() *ChannelListRsp {
if x != nil {
return x.Rsp
}
return nil
}
type ChannelOidb0X1017Rsp struct {
P1 *P10X1017 `protobuf:"bytes,1,opt"`
}
func (x *ChannelOidb0X1017Rsp) GetP1() *P10X1017 {
if x != nil {
return x.P1
}
return nil
}
type P10X1017 struct {
TinyId *uint64 `protobuf:"varint,1,opt"`
Roles []*GuildUserRole `protobuf:"bytes,3,rep"`
}
func (x *P10X1017) GetTinyId() uint64 {
if x != nil && x.TinyId != nil {
return *x.TinyId
}
return 0
}
func (x *GuildChannelInfo) GetChannelName() string {
if x != nil && x.ChannelName != nil {
return *x.ChannelName
func (x *P10X1017) GetRoles() []*GuildUserRole {
if x != nil {
return x.Roles
}
return ""
return nil
}
func (x *GuildChannelInfo) GetCreatorUin() int64 {
if x != nil && x.CreatorUin != nil {
return *x.CreatorUin
}
return 0
type ChannelOidb0X1019Rsp struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
Roles []*GuildRole `protobuf:"bytes,2,rep"`
}
func (x *GuildChannelInfo) GetCreateTime() int64 {
if x != nil && x.CreateTime != nil {
return *x.CreateTime
}
return 0
}
func (x *GuildChannelInfo) GetGuildId() uint64 {
func (x *ChannelOidb0X1019Rsp) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *GuildChannelInfo) GetFinalNotifyType() int32 {
if x != nil && x.FinalNotifyType != nil {
return *x.FinalNotifyType
func (x *ChannelOidb0X1019Rsp) GetRoles() []*GuildRole {
if x != nil {
return x.Roles
}
return nil
}
type ChannelOidb0X1016Rsp struct {
RoleId *uint64 `protobuf:"varint,2,opt"`
}
func (x *ChannelOidb0X1016Rsp) GetRoleId() uint64 {
if x != nil && x.RoleId != nil {
return *x.RoleId
}
return 0
}
func (x *GuildChannelInfo) GetChannelType() int32 {
if x != nil && x.ChannelType != nil {
return *x.ChannelType
type GuildMetaRsp struct {
GuildId *uint64 `protobuf:"varint,3,opt"`
Meta *GuildMeta `protobuf:"bytes,4,opt"`
}
func (x *GuildMetaRsp) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *GuildChannelInfo) GetTalkPermission() int32 {
if x != nil && x.TalkPermission != nil {
return *x.TalkPermission
func (x *GuildMetaRsp) GetMeta() *GuildMeta {
if x != nil {
return x.Meta
}
return nil
}
type ChannelListRsp struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
Channels []*GuildChannelInfo `protobuf:"bytes,2,rep"` // 5: Category infos
}
func (x *ChannelListRsp) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *GuildChannelInfo) GetCreatorTinyId() uint64 {
if x != nil && x.CreatorTinyId != nil {
return *x.CreatorTinyId
func (x *ChannelListRsp) GetChannels() []*GuildChannelInfo {
if x != nil {
return x.Channels
}
return nil
}
type GuildGroupMembersInfo struct {
RoleId *uint64 `protobuf:"varint,1,opt"`
Members []*GuildMemberInfo `protobuf:"bytes,2,rep"`
RoleName *string `protobuf:"bytes,3,opt"`
Color *uint32 `protobuf:"varint,4,opt"`
}
func (x *GuildGroupMembersInfo) GetRoleId() uint64 {
if x != nil && x.RoleId != nil {
return *x.RoleId
}
return 0
}
func (x *GuildChannelInfo) GetVisibleType() int32 {
if x != nil && x.VisibleType != nil {
return *x.VisibleType
func (x *GuildGroupMembersInfo) GetMembers() []*GuildMemberInfo {
if x != nil {
return x.Members
}
return 0
return nil
}
func (x *GuildChannelInfo) GetCurrentSlowModeKey() int32 {
if x != nil && x.CurrentSlowModeKey != nil {
return *x.CurrentSlowModeKey
}
return 0
}
func (x *GuildChannelInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type GuildChannelSlowModeInfo struct {
SlowModeKey *int32 `protobuf:"varint,1,opt"`
SpeakFrequency *int32 `protobuf:"varint,2,opt"`
SlowModeCircle *int32 `protobuf:"varint,3,opt"`
SlowModeText *string `protobuf:"bytes,4,opt"`
}
func (x *GuildChannelSlowModeInfo) GetSlowModeKey() int32 {
if x != nil && x.SlowModeKey != nil {
return *x.SlowModeKey
}
return 0
}
func (x *GuildChannelSlowModeInfo) GetSpeakFrequency() int32 {
if x != nil && x.SpeakFrequency != nil {
return *x.SpeakFrequency
}
return 0
}
func (x *GuildChannelSlowModeInfo) GetSlowModeCircle() int32 {
if x != nil && x.SlowModeCircle != nil {
return *x.SlowModeCircle
}
return 0
}
func (x *GuildChannelSlowModeInfo) GetSlowModeText() string {
if x != nil && x.SlowModeText != nil {
return *x.SlowModeText
func (x *GuildGroupMembersInfo) GetRoleName() string {
if x != nil && x.RoleName != nil {
return *x.RoleName
}
return ""
}
func (x *GuildChannelSlowModeInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type GuildChannelTopMsgInfo struct {
TopMsgSeq *uint64 `protobuf:"varint,1,opt"`
TopMsgTime *int64 `protobuf:"varint,2,opt"`
TopMsgOperatorTinyId *uint64 `protobuf:"varint,3,opt"`
}
func (x *GuildChannelTopMsgInfo) GetTopMsgSeq() uint64 {
if x != nil && x.TopMsgSeq != nil {
return *x.TopMsgSeq
func (x *GuildGroupMembersInfo) GetColor() uint32 {
if x != nil && x.Color != nil {
return *x.Color
}
return 0
}
func (x *GuildChannelTopMsgInfo) GetTopMsgTime() int64 {
if x != nil && x.TopMsgTime != nil {
return *x.TopMsgTime
}
return 0
}
func (x *GuildChannelTopMsgInfo) GetTopMsgOperatorTinyId() uint64 {
if x != nil && x.TopMsgOperatorTinyId != nil {
return *x.TopMsgOperatorTinyId
}
return 0
}
func (x *GuildChannelTopMsgInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
// see sub_374334
type GuildMemberInfo struct {
Title *string `protobuf:"bytes,2,opt"`
Nickname *string `protobuf:"bytes,3,opt"`
LastSpeakTime *int64 `protobuf:"varint,4,opt"`
Role *int32 `protobuf:"varint,5,opt"`
LastSpeakTime *int64 `protobuf:"varint,4,opt"` // uncertainty
Role *int32 `protobuf:"varint,5,opt"` // uncertainty
TinyId *uint64 `protobuf:"varint,8,opt"`
}
@ -333,11 +303,143 @@ func (x *GuildMemberInfo) GetTinyId() uint64 {
return 0
}
func (x *GuildMemberInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
// 频道系统用户资料
type GuildUserProfile struct {
TinyId *uint64 `protobuf:"varint,2,opt"`
Nickname *string `protobuf:"bytes,3,opt"`
AvatarUrl *string `protobuf:"bytes,6,opt"`
// 15: avatar url info
JoinTime *int64 `protobuf:"varint,16,opt"` // uncertainty
}
func (x *GuildUserProfile) GetTinyId() uint64 {
if x != nil && x.TinyId != nil {
return *x.TinyId
}
return proto.Marshal(x)
return 0
}
func (x *GuildUserProfile) GetNickname() string {
if x != nil && x.Nickname != nil {
return *x.Nickname
}
return ""
}
func (x *GuildUserProfile) GetAvatarUrl() string {
if x != nil && x.AvatarUrl != nil {
return *x.AvatarUrl
}
return ""
}
func (x *GuildUserProfile) GetJoinTime() int64 {
if x != nil && x.JoinTime != nil {
return *x.JoinTime
}
return 0
}
type GuildRole struct {
RoleId *uint64 `protobuf:"varint,1,opt"`
Name *string `protobuf:"bytes,2,opt"`
ArgbColor *uint32 `protobuf:"varint,3,opt"`
Independent *int32 `protobuf:"varint,4,opt"`
Num *int32 `protobuf:"varint,5,opt"`
Owned *int32 `protobuf:"varint,6,opt"` // 是否拥有 存疑
Disabled *int32 `protobuf:"varint,7,opt"` // 权限不足或不显示
MaxNum *int32 `protobuf:"varint,8,opt"` // 9: ?
}
func (x *GuildRole) GetRoleId() uint64 {
if x != nil && x.RoleId != nil {
return *x.RoleId
}
return 0
}
func (x *GuildRole) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *GuildRole) GetArgbColor() uint32 {
if x != nil && x.ArgbColor != nil {
return *x.ArgbColor
}
return 0
}
func (x *GuildRole) GetIndependent() int32 {
if x != nil && x.Independent != nil {
return *x.Independent
}
return 0
}
func (x *GuildRole) GetNum() int32 {
if x != nil && x.Num != nil {
return *x.Num
}
return 0
}
func (x *GuildRole) GetOwned() int32 {
if x != nil && x.Owned != nil {
return *x.Owned
}
return 0
}
func (x *GuildRole) GetDisabled() int32 {
if x != nil && x.Disabled != nil {
return *x.Disabled
}
return 0
}
func (x *GuildRole) GetMaxNum() int32 {
if x != nil && x.MaxNum != nil {
return *x.MaxNum
}
return 0
}
type GuildUserRole struct {
RoleId *uint64 `protobuf:"varint,1,opt"`
Name *string `protobuf:"bytes,2,opt"`
ArgbColor *uint32 `protobuf:"varint,3,opt"`
Independent *int32 `protobuf:"varint,4,opt"`
}
func (x *GuildUserRole) GetRoleId() uint64 {
if x != nil && x.RoleId != nil {
return *x.RoleId
}
return 0
}
func (x *GuildUserRole) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *GuildUserRole) GetArgbColor() uint32 {
if x != nil && x.ArgbColor != nil {
return *x.ArgbColor
}
return 0
}
func (x *GuildUserRole) GetIndependent() int32 {
if x != nil && x.Independent != nil {
return *x.Independent
}
return 0
}
type GuildMeta struct {
@ -439,70 +541,173 @@ func (x *GuildMeta) GetClientId() int32 {
return 0
}
func (x *GuildMeta) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
type GuildChannelInfo struct {
ChannelId *uint64 `protobuf:"varint,1,opt"`
ChannelName *string `protobuf:"bytes,2,opt"`
CreatorUin *int64 `protobuf:"varint,3,opt"`
CreateTime *int64 `protobuf:"varint,4,opt"`
GuildId *uint64 `protobuf:"varint,5,opt"`
FinalNotifyType *int32 `protobuf:"varint,6,opt"`
ChannelType *int32 `protobuf:"varint,7,opt"`
TalkPermission *int32 `protobuf:"varint,8,opt"`
// 11 - 14 : MsgInfo
CreatorTinyId *uint64 `protobuf:"varint,15,opt"`
// 16: Member info ?
VisibleType *int32 `protobuf:"varint,22,opt"`
TopMsg *GuildChannelTopMsgInfo `protobuf:"bytes,28,opt"`
CurrentSlowModeKey *int32 `protobuf:"varint,31,opt"`
SlowModeInfos []*GuildChannelSlowModeInfo `protobuf:"bytes,32,rep"`
}
func (x *GuildChannelInfo) GetChannelId() uint64 {
if x != nil && x.ChannelId != nil {
return *x.ChannelId
}
return proto.Marshal(x)
return 0
}
type GuildMetaRsp struct {
GuildId *uint64 `protobuf:"varint,3,opt"`
Meta *GuildMeta `protobuf:"bytes,4,opt"`
func (x *GuildChannelInfo) GetChannelName() string {
if x != nil && x.ChannelName != nil {
return *x.ChannelName
}
return ""
}
func (x *GuildMetaRsp) GetGuildId() uint64 {
func (x *GuildChannelInfo) GetCreatorUin() int64 {
if x != nil && x.CreatorUin != nil {
return *x.CreatorUin
}
return 0
}
func (x *GuildChannelInfo) GetCreateTime() int64 {
if x != nil && x.CreateTime != nil {
return *x.CreateTime
}
return 0
}
func (x *GuildChannelInfo) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *GuildMetaRsp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type GuildUserProfile struct {
TinyId *uint64 `protobuf:"varint,2,opt"`
Nickname *string `protobuf:"bytes,3,opt"`
AvatarUrl *string `protobuf:"bytes,6,opt"`
JoinTime *int64 `protobuf:"varint,16,opt"`
}
func (x *GuildUserProfile) GetTinyId() uint64 {
if x != nil && x.TinyId != nil {
return *x.TinyId
func (x *GuildChannelInfo) GetFinalNotifyType() int32 {
if x != nil && x.FinalNotifyType != nil {
return *x.FinalNotifyType
}
return 0
}
func (x *GuildUserProfile) GetNickname() string {
if x != nil && x.Nickname != nil {
return *x.Nickname
}
return ""
}
func (x *GuildUserProfile) GetAvatarUrl() string {
if x != nil && x.AvatarUrl != nil {
return *x.AvatarUrl
}
return ""
}
func (x *GuildUserProfile) GetJoinTime() int64 {
if x != nil && x.JoinTime != nil {
return *x.JoinTime
func (x *GuildChannelInfo) GetChannelType() int32 {
if x != nil && x.ChannelType != nil {
return *x.ChannelType
}
return 0
}
func (x *GuildUserProfile) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *GuildChannelInfo) GetTalkPermission() int32 {
if x != nil && x.TalkPermission != nil {
return *x.TalkPermission
}
return proto.Marshal(x)
return 0
}
func (x *GuildChannelInfo) GetCreatorTinyId() uint64 {
if x != nil && x.CreatorTinyId != nil {
return *x.CreatorTinyId
}
return 0
}
func (x *GuildChannelInfo) GetVisibleType() int32 {
if x != nil && x.VisibleType != nil {
return *x.VisibleType
}
return 0
}
func (x *GuildChannelInfo) GetTopMsg() *GuildChannelTopMsgInfo {
if x != nil {
return x.TopMsg
}
return nil
}
func (x *GuildChannelInfo) GetCurrentSlowModeKey() int32 {
if x != nil && x.CurrentSlowModeKey != nil {
return *x.CurrentSlowModeKey
}
return 0
}
func (x *GuildChannelInfo) GetSlowModeInfos() []*GuildChannelSlowModeInfo {
if x != nil {
return x.SlowModeInfos
}
return nil
}
type GuildChannelSlowModeInfo struct {
SlowModeKey *int32 `protobuf:"varint,1,opt"`
SpeakFrequency *int32 `protobuf:"varint,2,opt"`
SlowModeCircle *int32 `protobuf:"varint,3,opt"`
SlowModeText *string `protobuf:"bytes,4,opt"`
}
func (x *GuildChannelSlowModeInfo) GetSlowModeKey() int32 {
if x != nil && x.SlowModeKey != nil {
return *x.SlowModeKey
}
return 0
}
func (x *GuildChannelSlowModeInfo) GetSpeakFrequency() int32 {
if x != nil && x.SpeakFrequency != nil {
return *x.SpeakFrequency
}
return 0
}
func (x *GuildChannelSlowModeInfo) GetSlowModeCircle() int32 {
if x != nil && x.SlowModeCircle != nil {
return *x.SlowModeCircle
}
return 0
}
func (x *GuildChannelSlowModeInfo) GetSlowModeText() string {
if x != nil && x.SlowModeText != nil {
return *x.SlowModeText
}
return ""
}
type GuildChannelTopMsgInfo struct {
TopMsgSeq *uint64 `protobuf:"varint,1,opt"`
TopMsgTime *int64 `protobuf:"varint,2,opt"`
TopMsgOperatorTinyId *uint64 `protobuf:"varint,3,opt"`
}
func (x *GuildChannelTopMsgInfo) GetTopMsgSeq() uint64 {
if x != nil && x.TopMsgSeq != nil {
return *x.TopMsgSeq
}
return 0
}
func (x *GuildChannelTopMsgInfo) GetTopMsgTime() int64 {
if x != nil && x.TopMsgTime != nil {
return *x.TopMsgTime
}
return 0
}
func (x *GuildChannelTopMsgInfo) GetTopMsgOperatorTinyId() uint64 {
if x != nil && x.TopMsgOperatorTinyId != nil {
return *x.TopMsgOperatorTinyId
}
return 0
}

View File

@ -3,13 +3,18 @@ syntax = "proto2";
package channel;
option go_package = "channel;channel";
option go_package = "pb/channel;channel";
// see sub_37628C
message ChannelOidb0xf5bRsp {
optional uint64 guildId = 1;
repeated GuildMemberInfo bots = 4;
repeated GuildMemberInfo members = 5;
optional GuildAdminInfo adminInfo = 25;
optional uint32 nextIndex = 10;
optional uint32 finished = 9;
optional string nextQueryParam = 24;
repeated GuildGroupMembersInfo memberWithRoles = 25;
optional uint64 nextRoleIdIndex = 26;
}
message ChannelOidb0xf88Rsp {
@ -32,6 +37,49 @@ message ChannelOidb0xf5dRsp {
optional ChannelListRsp rsp = 1;
}
message ChannelOidb0x1017Rsp {
optional P10x1017 p1 = 1;
}
message P10x1017 {
optional uint64 tinyId = 1;
repeated GuildUserRole roles = 3;
}
message ChannelOidb0x1019Rsp {
optional uint64 guildId = 1;
repeated GuildRole roles = 2;
// 3: ?
// 4:
}
/*
message ChannelOidb0x100dReq { //
optional uint64 guildId = 1;
repeated uint64 roleId = 2;
repeated int32 unkonwn = 3; // 3: ? 1
repeated ModifyGuildRole role = 4;
}*/
/*
message ChannelOidb0x1016Req { //
optional uint64 guildId = 1;
repeated int32 unknown = 2; // 2: ? 1
optional ModifyGuildRole role = 3;
repeated uint64 initialUsers = 4;
}*/
message ChannelOidb0x1016Rsp {
optional uint64 roleId = 2;
}
/*
message ChannelOidb0x101aReq { //
optional uint64 guildId = 1;
repeated SetGuildRole setRoles = 2;
repeated SetGuildRole removeRoles = 3;
}*/
message GuildMetaRsp {
optional uint64 guildId = 3;
optional GuildMeta meta = 4;
@ -43,10 +91,14 @@ message ChannelListRsp {
// 5: Category infos
}
message GuildAdminInfo {
repeated GuildMemberInfo admins = 2;
message GuildGroupMembersInfo {
optional uint64 roleId = 1;
repeated GuildMemberInfo members = 2;
optional string roleName = 3;
optional uint32 color = 4;
}
// see sub_374334
message GuildMemberInfo {
optional string title = 2;
optional string nickname = 3;
@ -67,6 +119,38 @@ message GuildUserProfile {
// 25 current cards *uncertainty
}
message GuildRole {
optional uint64 roleId = 1;
optional string name = 2;
optional uint32 argbColor = 3;
optional int32 independent = 4;
optional int32 num = 5;
optional int32 owned = 6; //
optional int32 disabled = 7; //
optional int32 maxNum = 8;
// 9: ?
}
message GuildUserRole {
optional uint64 roleId = 1;
optional string name = 2;
optional uint32 argbColor = 3;
optional int32 independent = 4;
}
/*
message SetGuildRole {
optional uint64 roleId = 1;
optional uint64 targetId = 2;
}*/
/*
message ModifyGuildRole {
optional string roleName = 1;
optional uint32 color = 2;
optional int32 independent = 3; //
}*/
message GuildMeta {
optional uint64 guildCode = 2;
optional int64 createTime = 4;

File diff suppressed because it is too large Load Diff

View File

@ -1,68 +1,14 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: cmd0x352.proto
package cmd0x352
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subcmd *uint32 `protobuf:"varint,1,opt,name=subcmd" json:"subcmd,omitempty"`
TryupImgReq []*D352TryUpImgReq `protobuf:"bytes,2,rep,name=tryupImgReq" json:"tryupImgReq,omitempty"`
Subcmd *uint32 `protobuf:"varint,1,opt"`
TryupImgReq []*D352TryUpImgReq `protobuf:"bytes,2,rep"`
// repeated GetImgUrlReq getimgUrlReq = 3;
// repeated DelImgReq delImgReq = 4;
NetType *uint32 `protobuf:"varint,10,opt,name=netType" json:"netType,omitempty"`
}
func (x *ReqBody) Reset() {
*x = ReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x352_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReqBody) ProtoMessage() {}
func (x *ReqBody) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x352_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReqBody.ProtoReflect.Descriptor instead.
func (*ReqBody) Descriptor() ([]byte, []int) {
return file_cmd0x352_proto_rawDescGZIP(), []int{0}
NetType *uint32 `protobuf:"varint,10,opt"`
}
func (x *ReqBody) GetSubcmd() uint32 {
@ -87,48 +33,12 @@ func (x *ReqBody) GetNetType() uint32 {
}
type RspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subcmd *uint32 `protobuf:"varint,1,opt,name=subcmd" json:"subcmd,omitempty"`
TryupImgRsp []*TryUpImgRsp `protobuf:"bytes,2,rep,name=tryupImgRsp" json:"tryupImgRsp,omitempty"`
Subcmd *uint32 `protobuf:"varint,1,opt"`
TryupImgRsp []*TryUpImgRsp `protobuf:"bytes,2,rep"`
// repeated GetImgUrlRsp getimgUrlRsp = 3;
NewBigchan *bool `protobuf:"varint,4,opt,name=newBigchan" json:"newBigchan,omitempty"`
NewBigchan *bool `protobuf:"varint,4,opt"`
// repeated DelImgRsp delImgRsp = 5;
FailMsg []byte `protobuf:"bytes,10,opt,name=failMsg" json:"failMsg,omitempty"`
}
func (x *RspBody) Reset() {
*x = RspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x352_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RspBody) ProtoMessage() {}
func (x *RspBody) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x352_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RspBody.ProtoReflect.Descriptor instead.
func (*RspBody) Descriptor() ([]byte, []int) {
return file_cmd0x352_proto_rawDescGZIP(), []int{1}
FailMsg []byte `protobuf:"bytes,10,opt"`
}
func (x *RspBody) GetSubcmd() uint32 {
@ -160,65 +70,29 @@ func (x *RspBody) GetFailMsg() []byte {
}
type D352TryUpImgReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SrcUin *uint64 `protobuf:"varint,1,opt,name=srcUin" json:"srcUin,omitempty"`
DstUin *uint64 `protobuf:"varint,2,opt,name=dstUin" json:"dstUin,omitempty"`
FileId *uint64 `protobuf:"varint,3,opt,name=fileId" json:"fileId,omitempty"`
FileMd5 []byte `protobuf:"bytes,4,opt,name=fileMd5" json:"fileMd5,omitempty"`
FileSize *uint64 `protobuf:"varint,5,opt,name=fileSize" json:"fileSize,omitempty"`
FileName []byte `protobuf:"bytes,6,opt,name=fileName" json:"fileName,omitempty"`
SrcTerm *uint32 `protobuf:"varint,7,opt,name=srcTerm" json:"srcTerm,omitempty"`
PlatformType *uint32 `protobuf:"varint,8,opt,name=platformType" json:"platformType,omitempty"`
InnerIp *uint32 `protobuf:"varint,9,opt,name=innerIp" json:"innerIp,omitempty"`
AddressBook *bool `protobuf:"varint,10,opt,name=addressBook" json:"addressBook,omitempty"`
Retry *uint32 `protobuf:"varint,11,opt,name=retry" json:"retry,omitempty"`
BuType *uint32 `protobuf:"varint,12,opt,name=buType" json:"buType,omitempty"`
PicOriginal *bool `protobuf:"varint,13,opt,name=picOriginal" json:"picOriginal,omitempty"`
PicWidth *uint32 `protobuf:"varint,14,opt,name=picWidth" json:"picWidth,omitempty"`
PicHeight *uint32 `protobuf:"varint,15,opt,name=picHeight" json:"picHeight,omitempty"`
PicType *uint32 `protobuf:"varint,16,opt,name=picType" json:"picType,omitempty"`
BuildVer []byte `protobuf:"bytes,17,opt,name=buildVer" json:"buildVer,omitempty"`
FileIndex []byte `protobuf:"bytes,18,opt,name=fileIndex" json:"fileIndex,omitempty"`
StoreDays *uint32 `protobuf:"varint,19,opt,name=storeDays" json:"storeDays,omitempty"`
TryupStepflag *uint32 `protobuf:"varint,20,opt,name=tryupStepflag" json:"tryupStepflag,omitempty"`
RejectTryfast *bool `protobuf:"varint,21,opt,name=rejectTryfast" json:"rejectTryfast,omitempty"`
SrvUpload *uint32 `protobuf:"varint,22,opt,name=srvUpload" json:"srvUpload,omitempty"`
TransferUrl []byte `protobuf:"bytes,23,opt,name=transferUrl" json:"transferUrl,omitempty"`
}
func (x *D352TryUpImgReq) Reset() {
*x = D352TryUpImgReq{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x352_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *D352TryUpImgReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*D352TryUpImgReq) ProtoMessage() {}
func (x *D352TryUpImgReq) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x352_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use D352TryUpImgReq.ProtoReflect.Descriptor instead.
func (*D352TryUpImgReq) Descriptor() ([]byte, []int) {
return file_cmd0x352_proto_rawDescGZIP(), []int{2}
SrcUin *uint64 `protobuf:"varint,1,opt"`
DstUin *uint64 `protobuf:"varint,2,opt"`
FileId *uint64 `protobuf:"varint,3,opt"`
FileMd5 []byte `protobuf:"bytes,4,opt"`
FileSize *uint64 `protobuf:"varint,5,opt"`
FileName []byte `protobuf:"bytes,6,opt"`
SrcTerm *uint32 `protobuf:"varint,7,opt"`
PlatformType *uint32 `protobuf:"varint,8,opt"`
InnerIp *uint32 `protobuf:"varint,9,opt"`
AddressBook *bool `protobuf:"varint,10,opt"`
Retry *uint32 `protobuf:"varint,11,opt"`
BuType *uint32 `protobuf:"varint,12,opt"`
PicOriginal *bool `protobuf:"varint,13,opt"`
PicWidth *uint32 `protobuf:"varint,14,opt"`
PicHeight *uint32 `protobuf:"varint,15,opt"`
PicType *uint32 `protobuf:"varint,16,opt"`
BuildVer []byte `protobuf:"bytes,17,opt"`
FileIndex []byte `protobuf:"bytes,18,opt"`
StoreDays *uint32 `protobuf:"varint,19,opt"`
TryupStepflag *uint32 `protobuf:"varint,20,opt"`
RejectTryfast *bool `protobuf:"varint,21,opt"`
SrvUpload *uint32 `protobuf:"varint,22,opt"`
TransferUrl []byte `protobuf:"bytes,23,opt"`
}
func (x *D352TryUpImgReq) GetSrcUin() uint64 {
@ -383,65 +257,29 @@ func (x *D352TryUpImgReq) GetTransferUrl() []byte {
}
type TryUpImgRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FileId *uint64 `protobuf:"varint,1,opt,name=fileId" json:"fileId,omitempty"`
ClientIp *uint32 `protobuf:"varint,2,opt,name=clientIp" json:"clientIp,omitempty"`
Result *uint32 `protobuf:"varint,3,opt,name=result" json:"result,omitempty"`
FailMsg []byte `protobuf:"bytes,4,opt,name=failMsg" json:"failMsg,omitempty"`
FileExit *bool `protobuf:"varint,5,opt,name=fileExit" json:"fileExit,omitempty"`
FileId *uint64 `protobuf:"varint,1,opt"`
ClientIp *uint32 `protobuf:"varint,2,opt"`
Result *uint32 `protobuf:"varint,3,opt"`
FailMsg []byte `protobuf:"bytes,4,opt"`
FileExit *bool `protobuf:"varint,5,opt"`
// optional ImgInfo imgInfo = 6;
UpIp []uint32 `protobuf:"varint,7,rep,name=upIp" json:"upIp,omitempty"`
UpPort []uint32 `protobuf:"varint,8,rep,name=upPort" json:"upPort,omitempty"`
UpUkey []byte `protobuf:"bytes,9,opt,name=upUkey" json:"upUkey,omitempty"`
UpResid []byte `protobuf:"bytes,10,opt,name=upResid" json:"upResid,omitempty"`
UpUuid []byte `protobuf:"bytes,11,opt,name=upUuid" json:"upUuid,omitempty"`
UpOffset *uint64 `protobuf:"varint,12,opt,name=upOffset" json:"upOffset,omitempty"`
BlockSize *uint64 `protobuf:"varint,13,opt,name=blockSize" json:"blockSize,omitempty"`
EncryptDstip []byte `protobuf:"bytes,14,opt,name=encryptDstip" json:"encryptDstip,omitempty"`
Roamdays *uint32 `protobuf:"varint,15,opt,name=roamdays" json:"roamdays,omitempty"`
UpIp []uint32 `protobuf:"varint,7,rep"`
UpPort []uint32 `protobuf:"varint,8,rep"`
UpUkey []byte `protobuf:"bytes,9,opt"`
UpResid []byte `protobuf:"bytes,10,opt"`
UpUuid []byte `protobuf:"bytes,11,opt"`
UpOffset *uint64 `protobuf:"varint,12,opt"`
BlockSize *uint64 `protobuf:"varint,13,opt"`
EncryptDstip []byte `protobuf:"bytes,14,opt"`
Roamdays *uint32 `protobuf:"varint,15,opt"`
// repeated IPv6Info upIp6 = 26;
ClientIp6 []byte `protobuf:"bytes,27,opt,name=clientIp6" json:"clientIp6,omitempty"`
ThumbDownPara []byte `protobuf:"bytes,60,opt,name=thumbDownPara" json:"thumbDownPara,omitempty"`
OriginalDownPara []byte `protobuf:"bytes,61,opt,name=originalDownPara" json:"originalDownPara,omitempty"`
DownDomain []byte `protobuf:"bytes,62,opt,name=downDomain" json:"downDomain,omitempty"`
BigDownPara []byte `protobuf:"bytes,64,opt,name=bigDownPara" json:"bigDownPara,omitempty"`
BigThumbDownPara []byte `protobuf:"bytes,65,opt,name=bigThumbDownPara" json:"bigThumbDownPara,omitempty"`
HttpsUrlFlag *uint32 `protobuf:"varint,66,opt,name=httpsUrlFlag" json:"httpsUrlFlag,omitempty"` // optional TryUpInfo4Busi info4Busi = 1001;
}
func (x *TryUpImgRsp) Reset() {
*x = TryUpImgRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x352_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TryUpImgRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TryUpImgRsp) ProtoMessage() {}
func (x *TryUpImgRsp) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x352_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TryUpImgRsp.ProtoReflect.Descriptor instead.
func (*TryUpImgRsp) Descriptor() ([]byte, []int) {
return file_cmd0x352_proto_rawDescGZIP(), []int{3}
ClientIp6 []byte `protobuf:"bytes,27,opt"`
ThumbDownPara []byte `protobuf:"bytes,60,opt"`
OriginalDownPara []byte `protobuf:"bytes,61,opt"`
DownDomain []byte `protobuf:"bytes,62,opt"`
BigDownPara []byte `protobuf:"bytes,64,opt"`
BigThumbDownPara []byte `protobuf:"bytes,65,opt"`
HttpsUrlFlag *uint32 `protobuf:"varint,66,opt"` // optional TryUpInfo4Busi info4Busi = 1001;
}
func (x *TryUpImgRsp) GetFileId() uint64 {
@ -590,214 +428,3 @@ func (x *TryUpImgRsp) GetHttpsUrlFlag() uint32 {
}
return 0
}
var File_cmd0x352_proto protoreflect.FileDescriptor
var file_cmd0x352_proto_rawDesc = []byte{
0x0a, 0x0e, 0x63, 0x6d, 0x64, 0x30, 0x78, 0x33, 0x35, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x6f, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73,
0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x75, 0x62,
0x63, 0x6d, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x74, 0x72, 0x79, 0x75, 0x70, 0x49, 0x6d, 0x67, 0x52,
0x65, 0x71, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x33, 0x35, 0x32, 0x54,
0x72, 0x79, 0x55, 0x70, 0x49, 0x6d, 0x67, 0x52, 0x65, 0x71, 0x52, 0x0b, 0x74, 0x72, 0x79, 0x75,
0x70, 0x49, 0x6d, 0x67, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x54, 0x79,
0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x54, 0x79, 0x70,
0x65, 0x22, 0x8b, 0x01, 0x0a, 0x07, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a,
0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73,
0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x2e, 0x0a, 0x0b, 0x74, 0x72, 0x79, 0x75, 0x70, 0x49, 0x6d,
0x67, 0x52, 0x73, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x54, 0x72, 0x79,
0x55, 0x70, 0x49, 0x6d, 0x67, 0x52, 0x73, 0x70, 0x52, 0x0b, 0x74, 0x72, 0x79, 0x75, 0x70, 0x49,
0x6d, 0x67, 0x52, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x42, 0x69, 0x67, 0x63,
0x68, 0x61, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x42, 0x69,
0x67, 0x63, 0x68, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x4d, 0x73, 0x67,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x4d, 0x73, 0x67, 0x22,
0xad, 0x05, 0x0a, 0x0f, 0x44, 0x33, 0x35, 0x32, 0x54, 0x72, 0x79, 0x55, 0x70, 0x49, 0x6d, 0x67,
0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x72, 0x63, 0x55, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x04, 0x52, 0x06, 0x73, 0x72, 0x63, 0x55, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64,
0x73, 0x74, 0x55, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x64, 0x73, 0x74,
0x55, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x04, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x66,
0x69, 0x6c, 0x65, 0x4d, 0x64, 0x35, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x66, 0x69,
0x6c, 0x65, 0x4d, 0x64, 0x35, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x73, 0x72, 0x63, 0x54, 0x65, 0x72, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07,
0x73, 0x72, 0x63, 0x54, 0x65, 0x72, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66,
0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70,
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69,
0x6e, 0x6e, 0x65, 0x72, 0x49, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x69, 0x6e,
0x6e, 0x65, 0x72, 0x49, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x42, 0x6f, 0x6f, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a,
0x06, 0x62, 0x75, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x62,
0x75, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x69, 0x63, 0x4f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x61, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x69, 0x63, 0x4f,
0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x69, 0x63, 0x57, 0x69,
0x64, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x69, 0x63, 0x57, 0x69,
0x64, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x69, 0x63, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74,
0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x69, 0x63, 0x48, 0x65, 0x69, 0x67, 0x68,
0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x07, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62,
0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x62,
0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x61,
0x79, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44,
0x61, 0x79, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x72, 0x79, 0x75, 0x70, 0x53, 0x74, 0x65, 0x70,
0x66, 0x6c, 0x61, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x74, 0x72, 0x79, 0x75,
0x70, 0x53, 0x74, 0x65, 0x70, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x6a,
0x65, 0x63, 0x74, 0x54, 0x72, 0x79, 0x66, 0x61, 0x73, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0d, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x79, 0x66, 0x61, 0x73, 0x74, 0x12,
0x1c, 0x0a, 0x09, 0x73, 0x72, 0x76, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x16, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x09, 0x73, 0x72, 0x76, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x20, 0x0a,
0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x17, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x22,
0x81, 0x05, 0x0a, 0x0b, 0x54, 0x72, 0x79, 0x55, 0x70, 0x49, 0x6d, 0x67, 0x52, 0x73, 0x70, 0x12,
0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e,
0x74, 0x49, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e,
0x74, 0x49, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66,
0x61, 0x69, 0x6c, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x66, 0x61,
0x69, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x70, 0x49, 0x70, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52,
0x04, 0x75, 0x70, 0x49, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x75, 0x70, 0x55, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x75,
0x70, 0x55, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x70, 0x52, 0x65, 0x73, 0x69, 0x64,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, 0x70, 0x52, 0x65, 0x73, 0x69, 0x64, 0x12,
0x16, 0x0a, 0x06, 0x75, 0x70, 0x55, 0x75, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x06, 0x75, 0x70, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x4f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x75, 0x70, 0x4f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a,
0x65, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x73, 0x74, 0x69,
0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
0x44, 0x73, 0x74, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x61, 0x6d, 0x64, 0x61, 0x79,
0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x6f, 0x61, 0x6d, 0x64, 0x61, 0x79,
0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x36, 0x18, 0x1b,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x36, 0x12,
0x24, 0x0a, 0x0d, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x61, 0x72, 0x61,
0x18, 0x3c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x44, 0x6f, 0x77,
0x6e, 0x50, 0x61, 0x72, 0x61, 0x12, 0x2a, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
0x6c, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x18, 0x3d, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x61, 0x72,
0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18,
0x3e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69,
0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x69, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x61, 0x72, 0x61,
0x18, 0x40, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x69, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x50,
0x61, 0x72, 0x61, 0x12, 0x2a, 0x0a, 0x10, 0x62, 0x69, 0x67, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x44,
0x6f, 0x77, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x18, 0x41, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x62,
0x69, 0x67, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x12,
0x22, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x55, 0x72, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x18,
0x42, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x55, 0x72, 0x6c, 0x46,
0x6c, 0x61, 0x67, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x63, 0x6d, 0x64, 0x30, 0x78, 0x33,
0x35, 0x32,
}
var (
file_cmd0x352_proto_rawDescOnce sync.Once
file_cmd0x352_proto_rawDescData = file_cmd0x352_proto_rawDesc
)
func file_cmd0x352_proto_rawDescGZIP() []byte {
file_cmd0x352_proto_rawDescOnce.Do(func() {
file_cmd0x352_proto_rawDescData = protoimpl.X.CompressGZIP(file_cmd0x352_proto_rawDescData)
})
return file_cmd0x352_proto_rawDescData
}
var file_cmd0x352_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_cmd0x352_proto_goTypes = []interface{}{
(*ReqBody)(nil), // 0: ReqBody
(*RspBody)(nil), // 1: RspBody
(*D352TryUpImgReq)(nil), // 2: D352TryUpImgReq
(*TryUpImgRsp)(nil), // 3: TryUpImgRsp
}
var file_cmd0x352_proto_depIdxs = []int32{
2, // 0: ReqBody.tryupImgReq:type_name -> D352TryUpImgReq
3, // 1: RspBody.tryupImgRsp:type_name -> TryUpImgRsp
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_cmd0x352_proto_init() }
func file_cmd0x352_proto_init() {
if File_cmd0x352_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_cmd0x352_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd0x352_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd0x352_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*D352TryUpImgReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd0x352_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TryUpImgRsp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cmd0x352_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_cmd0x352_proto_goTypes,
DependencyIndexes: file_cmd0x352_proto_depIdxs,
MessageInfos: file_cmd0x352_proto_msgTypes,
}.Build()
File_cmd0x352_proto = out.File
file_cmd0x352_proto_rawDesc = nil
file_cmd0x352_proto_goTypes = nil
file_cmd0x352_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,66 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: cmd0x3f6.proto
package cmd0x3f6
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type C3F6ReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SubCmd *uint32 `protobuf:"varint,1,opt,name=subCmd" json:"subCmd,omitempty"`
CrmCommonHead *C3F6CRMMsgHead `protobuf:"bytes,2,opt,name=crmCommonHead" json:"crmCommonHead,omitempty"`
SubcmdLoginProcessCompleteReqBody *QDUserLoginProcessCompleteReqBody `protobuf:"bytes,42,opt,name=subcmdLoginProcessCompleteReqBody" json:"subcmdLoginProcessCompleteReqBody,omitempty"`
}
func (x *C3F6ReqBody) Reset() {
*x = C3F6ReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x3f6_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *C3F6ReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C3F6ReqBody) ProtoMessage() {}
func (x *C3F6ReqBody) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x3f6_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use C3F6ReqBody.ProtoReflect.Descriptor instead.
func (*C3F6ReqBody) Descriptor() ([]byte, []int) {
return file_cmd0x3f6_proto_rawDescGZIP(), []int{0}
SubCmd *uint32 `protobuf:"varint,1,opt"`
CrmCommonHead *C3F6CRMMsgHead `protobuf:"bytes,2,opt"`
SubcmdLoginProcessCompleteReqBody *QDUserLoginProcessCompleteReqBody `protobuf:"bytes,42,opt"`
}
func (x *C3F6ReqBody) GetSubCmd() uint32 {
@ -85,45 +31,9 @@ func (x *C3F6ReqBody) GetSubcmdLoginProcessCompleteReqBody() *QDUserLoginProcess
}
type C3F6RspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SubCmd *uint32 `protobuf:"varint,1,opt,name=subCmd" json:"subCmd,omitempty"`
CrmCommonHead *C3F6CRMMsgHead `protobuf:"bytes,2,opt,name=crmCommonHead" json:"crmCommonHead,omitempty"`
SubcmdLoginProcessCompleteRspBody *QDUserLoginProcessCompleteRspBody `protobuf:"bytes,42,opt,name=subcmdLoginProcessCompleteRspBody" json:"subcmdLoginProcessCompleteRspBody,omitempty"`
}
func (x *C3F6RspBody) Reset() {
*x = C3F6RspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x3f6_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *C3F6RspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C3F6RspBody) ProtoMessage() {}
func (x *C3F6RspBody) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x3f6_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use C3F6RspBody.ProtoReflect.Descriptor instead.
func (*C3F6RspBody) Descriptor() ([]byte, []int) {
return file_cmd0x3f6_proto_rawDescGZIP(), []int{1}
SubCmd *uint32 `protobuf:"varint,1,opt"`
CrmCommonHead *C3F6CRMMsgHead `protobuf:"bytes,2,opt"`
SubcmdLoginProcessCompleteRspBody *QDUserLoginProcessCompleteRspBody `protobuf:"bytes,42,opt"`
}
func (x *C3F6RspBody) GetSubCmd() uint32 {
@ -148,53 +58,17 @@ func (x *C3F6RspBody) GetSubcmdLoginProcessCompleteRspBody() *QDUserLoginProcess
}
type QDUserLoginProcessCompleteReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Kfext *uint64 `protobuf:"varint,1,opt,name=kfext" json:"kfext,omitempty"`
Pubno *uint32 `protobuf:"varint,2,opt,name=pubno" json:"pubno,omitempty"`
Buildno *uint32 `protobuf:"varint,3,opt,name=buildno" json:"buildno,omitempty"`
TerminalType *uint32 `protobuf:"varint,4,opt,name=terminalType" json:"terminalType,omitempty"`
Status *uint32 `protobuf:"varint,5,opt,name=status" json:"status,omitempty"`
LoginTime *uint32 `protobuf:"varint,6,opt,name=loginTime" json:"loginTime,omitempty"`
HardwareInfo *string `protobuf:"bytes,7,opt,name=hardwareInfo" json:"hardwareInfo,omitempty"`
SoftwareInfo *string `protobuf:"bytes,8,opt,name=softwareInfo" json:"softwareInfo,omitempty"`
Guid []byte `protobuf:"bytes,9,opt,name=guid" json:"guid,omitempty"`
AppName *string `protobuf:"bytes,10,opt,name=appName" json:"appName,omitempty"`
SubAppId *uint32 `protobuf:"varint,11,opt,name=subAppId" json:"subAppId,omitempty"`
}
func (x *QDUserLoginProcessCompleteReqBody) Reset() {
*x = QDUserLoginProcessCompleteReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x3f6_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QDUserLoginProcessCompleteReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QDUserLoginProcessCompleteReqBody) ProtoMessage() {}
func (x *QDUserLoginProcessCompleteReqBody) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x3f6_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QDUserLoginProcessCompleteReqBody.ProtoReflect.Descriptor instead.
func (*QDUserLoginProcessCompleteReqBody) Descriptor() ([]byte, []int) {
return file_cmd0x3f6_proto_rawDescGZIP(), []int{2}
Kfext *uint64 `protobuf:"varint,1,opt"`
Pubno *uint32 `protobuf:"varint,2,opt"`
Buildno *uint32 `protobuf:"varint,3,opt"`
TerminalType *uint32 `protobuf:"varint,4,opt"`
Status *uint32 `protobuf:"varint,5,opt"`
LoginTime *uint32 `protobuf:"varint,6,opt"`
HardwareInfo *string `protobuf:"bytes,7,opt"`
SoftwareInfo *string `protobuf:"bytes,8,opt"`
Guid []byte `protobuf:"bytes,9,opt"`
AppName *string `protobuf:"bytes,10,opt"`
SubAppId *uint32 `protobuf:"varint,11,opt"`
}
func (x *QDUserLoginProcessCompleteReqBody) GetKfext() uint64 {
@ -275,62 +149,26 @@ func (x *QDUserLoginProcessCompleteReqBody) GetSubAppId() uint32 {
}
type QDUserLoginProcessCompleteRspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ret *RetInfo `protobuf:"bytes,1,opt,name=ret" json:"ret,omitempty"`
Url *string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
Mobile *string `protobuf:"bytes,3,opt,name=mobile" json:"mobile,omitempty"`
ExternalMobile *string `protobuf:"bytes,4,opt,name=externalMobile" json:"externalMobile,omitempty"`
DataAnalysisPriv *bool `protobuf:"varint,5,opt,name=dataAnalysisPriv" json:"dataAnalysisPriv,omitempty"`
DeviceLock *bool `protobuf:"varint,6,opt,name=deviceLock" json:"deviceLock,omitempty"`
ModulePrivilege *uint64 `protobuf:"varint,7,opt,name=modulePrivilege" json:"modulePrivilege,omitempty"`
ModuleSubPrivilege []uint32 `protobuf:"varint,8,rep,name=moduleSubPrivilege" json:"moduleSubPrivilege,omitempty"`
MasterSet *uint32 `protobuf:"varint,9,opt,name=masterSet" json:"masterSet,omitempty"`
ExtSet *uint32 `protobuf:"varint,10,opt,name=extSet" json:"extSet,omitempty"`
CorpConfProperty *uint64 `protobuf:"varint,11,opt,name=corpConfProperty" json:"corpConfProperty,omitempty"`
Corpuin *uint64 `protobuf:"varint,12,opt,name=corpuin" json:"corpuin,omitempty"`
Kfaccount *uint64 `protobuf:"varint,13,opt,name=kfaccount" json:"kfaccount,omitempty"`
SecurityLevel *uint32 `protobuf:"varint,14,opt,name=securityLevel" json:"securityLevel,omitempty"`
MsgTitle *string `protobuf:"bytes,15,opt,name=msgTitle" json:"msgTitle,omitempty"`
SuccNoticeMsg *string `protobuf:"bytes,16,opt,name=succNoticeMsg" json:"succNoticeMsg,omitempty"`
NameAccount *uint64 `protobuf:"varint,17,opt,name=nameAccount" json:"nameAccount,omitempty"`
CrmMigrateFlag *uint32 `protobuf:"varint,18,opt,name=crmMigrateFlag" json:"crmMigrateFlag,omitempty"`
ExtuinName *string `protobuf:"bytes,19,opt,name=extuinName" json:"extuinName,omitempty"`
OpenAccountTime *uint32 `protobuf:"varint,20,opt,name=openAccountTime" json:"openAccountTime,omitempty"`
}
func (x *QDUserLoginProcessCompleteRspBody) Reset() {
*x = QDUserLoginProcessCompleteRspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x3f6_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QDUserLoginProcessCompleteRspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QDUserLoginProcessCompleteRspBody) ProtoMessage() {}
func (x *QDUserLoginProcessCompleteRspBody) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x3f6_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QDUserLoginProcessCompleteRspBody.ProtoReflect.Descriptor instead.
func (*QDUserLoginProcessCompleteRspBody) Descriptor() ([]byte, []int) {
return file_cmd0x3f6_proto_rawDescGZIP(), []int{3}
Ret *RetInfo `protobuf:"bytes,1,opt"`
Url *string `protobuf:"bytes,2,opt"`
Mobile *string `protobuf:"bytes,3,opt"`
ExternalMobile *string `protobuf:"bytes,4,opt"`
DataAnalysisPriv *bool `protobuf:"varint,5,opt"`
DeviceLock *bool `protobuf:"varint,6,opt"`
ModulePrivilege *uint64 `protobuf:"varint,7,opt"`
ModuleSubPrivilege []uint32 `protobuf:"varint,8,rep"`
MasterSet *uint32 `protobuf:"varint,9,opt"`
ExtSet *uint32 `protobuf:"varint,10,opt"`
CorpConfProperty *uint64 `protobuf:"varint,11,opt"`
Corpuin *uint64 `protobuf:"varint,12,opt"`
Kfaccount *uint64 `protobuf:"varint,13,opt"`
SecurityLevel *uint32 `protobuf:"varint,14,opt"`
MsgTitle *string `protobuf:"bytes,15,opt"`
SuccNoticeMsg *string `protobuf:"bytes,16,opt"`
NameAccount *uint64 `protobuf:"varint,17,opt"`
CrmMigrateFlag *uint32 `protobuf:"varint,18,opt"`
ExtuinName *string `protobuf:"bytes,19,opt"`
OpenAccountTime *uint32 `protobuf:"varint,20,opt"`
}
func (x *QDUserLoginProcessCompleteRspBody) GetRet() *RetInfo {
@ -474,44 +312,8 @@ func (x *QDUserLoginProcessCompleteRspBody) GetOpenAccountTime() uint32 {
}
type RetInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RetCode *uint32 `protobuf:"varint,1,opt,name=retCode" json:"retCode,omitempty"`
ErrorMsg *string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"`
}
func (x *RetInfo) Reset() {
*x = RetInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x3f6_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetInfo) ProtoMessage() {}
func (x *RetInfo) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x3f6_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetInfo.ProtoReflect.Descriptor instead.
func (*RetInfo) Descriptor() ([]byte, []int) {
return file_cmd0x3f6_proto_rawDescGZIP(), []int{4}
RetCode *uint32 `protobuf:"varint,1,opt"`
ErrorMsg *string `protobuf:"bytes,2,opt"`
}
func (x *RetInfo) GetRetCode() uint32 {
@ -529,56 +331,20 @@ func (x *RetInfo) GetErrorMsg() string {
}
type C3F6CRMMsgHead struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CrmSubCmd *uint32 `protobuf:"varint,1,opt,name=crmSubCmd" json:"crmSubCmd,omitempty"`
HeadLen *uint32 `protobuf:"varint,2,opt,name=headLen" json:"headLen,omitempty"`
VerNo *uint32 `protobuf:"varint,3,opt,name=verNo" json:"verNo,omitempty"`
KfUin *uint64 `protobuf:"varint,4,opt,name=kfUin" json:"kfUin,omitempty"`
Seq *uint32 `protobuf:"varint,5,opt,name=seq" json:"seq,omitempty"`
PackNum *uint32 `protobuf:"varint,6,opt,name=packNum" json:"packNum,omitempty"`
CurPack *uint32 `protobuf:"varint,7,opt,name=curPack" json:"curPack,omitempty"`
BufSig *string `protobuf:"bytes,8,opt,name=bufSig" json:"bufSig,omitempty"`
Clienttype *uint32 `protobuf:"varint,9,opt,name=clienttype" json:"clienttype,omitempty"`
LaborUin *uint64 `protobuf:"varint,10,opt,name=laborUin" json:"laborUin,omitempty"`
LaborName *string `protobuf:"bytes,11,opt,name=laborName" json:"laborName,omitempty"`
Kfaccount *uint64 `protobuf:"varint,12,opt,name=kfaccount" json:"kfaccount,omitempty"`
TraceId *string `protobuf:"bytes,13,opt,name=traceId" json:"traceId,omitempty"`
AppId *uint32 `protobuf:"varint,14,opt,name=appId" json:"appId,omitempty"`
}
func (x *C3F6CRMMsgHead) Reset() {
*x = C3F6CRMMsgHead{}
if protoimpl.UnsafeEnabled {
mi := &file_cmd0x3f6_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *C3F6CRMMsgHead) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C3F6CRMMsgHead) ProtoMessage() {}
func (x *C3F6CRMMsgHead) ProtoReflect() protoreflect.Message {
mi := &file_cmd0x3f6_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use C3F6CRMMsgHead.ProtoReflect.Descriptor instead.
func (*C3F6CRMMsgHead) Descriptor() ([]byte, []int) {
return file_cmd0x3f6_proto_rawDescGZIP(), []int{5}
CrmSubCmd *uint32 `protobuf:"varint,1,opt"`
HeadLen *uint32 `protobuf:"varint,2,opt"`
VerNo *uint32 `protobuf:"varint,3,opt"`
KfUin *uint64 `protobuf:"varint,4,opt"`
Seq *uint32 `protobuf:"varint,5,opt"`
PackNum *uint32 `protobuf:"varint,6,opt"`
CurPack *uint32 `protobuf:"varint,7,opt"`
BufSig *string `protobuf:"bytes,8,opt"`
Clienttype *uint32 `protobuf:"varint,9,opt"`
LaborUin *uint64 `protobuf:"varint,10,opt"`
LaborName *string `protobuf:"bytes,11,opt"`
Kfaccount *uint64 `protobuf:"varint,12,opt"`
TraceId *string `protobuf:"bytes,13,opt"`
AppId *uint32 `protobuf:"varint,14,opt"`
}
func (x *C3F6CRMMsgHead) GetCrmSubCmd() uint32 {
@ -678,264 +444,3 @@ func (x *C3F6CRMMsgHead) GetAppId() uint32 {
}
return 0
}
var File_cmd0x3f6_proto protoreflect.FileDescriptor
var file_cmd0x3f6_proto_rawDesc = []byte{
0x0a, 0x0e, 0x63, 0x6d, 0x64, 0x30, 0x78, 0x33, 0x66, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xce, 0x01, 0x0a, 0x0b, 0x43, 0x33, 0x46, 0x36, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79,
0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x06, 0x73, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x12, 0x35, 0x0a, 0x0d, 0x63, 0x72, 0x6d, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x43, 0x33, 0x46, 0x36, 0x43, 0x52, 0x4d, 0x4d, 0x73, 0x67, 0x48, 0x65, 0x61, 0x64,
0x52, 0x0d, 0x63, 0x72, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x12,
0x70, 0x0a, 0x21, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x72,
0x6f, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71,
0x42, 0x6f, 0x64, 0x79, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x51, 0x44, 0x55,
0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x43,
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x21,
0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64,
0x79, 0x22, 0xce, 0x01, 0x0a, 0x0b, 0x43, 0x33, 0x46, 0x36, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64,
0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x06, 0x73, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x12, 0x35, 0x0a, 0x0d, 0x63, 0x72, 0x6d,
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0f, 0x2e, 0x43, 0x33, 0x46, 0x36, 0x43, 0x52, 0x4d, 0x4d, 0x73, 0x67, 0x48, 0x65, 0x61,
0x64, 0x52, 0x0d, 0x63, 0x72, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64,
0x12, 0x70, 0x0a, 0x21, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50,
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x73,
0x70, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x51, 0x44,
0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x52,
0x21, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x73, 0x70, 0x42, 0x6f,
0x64, 0x79, 0x22, 0xd5, 0x02, 0x0a, 0x21, 0x51, 0x44, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67,
0x69, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
0x65, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x66, 0x65, 0x78,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6b, 0x66, 0x65, 0x78, 0x74, 0x12, 0x14,
0x0a, 0x05, 0x70, 0x75, 0x62, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70,
0x75, 0x62, 0x6e, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6e, 0x6f, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6e, 0x6f, 0x12, 0x22,
0x0a, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x79,
0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f,
0x67, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6c,
0x6f, 0x67, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x61, 0x72, 0x64,
0x77, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0c,
0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x12, 0x0a, 0x04, 0x67, 0x75, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04,
0x67, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a,
0x0a, 0x08, 0x73, 0x75, 0x62, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x08, 0x73, 0x75, 0x62, 0x41, 0x70, 0x70, 0x49, 0x64, 0x22, 0xcd, 0x05, 0x0a, 0x21, 0x51,
0x44, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73,
0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79,
0x12, 0x1a, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
0x52, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03,
0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16,
0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x2a,
0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x50, 0x72,
0x69, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x41, 0x6e,
0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x50, 0x72, 0x69, 0x76, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65,
0x76, 0x69, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x18, 0x07, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69,
0x6c, 0x65, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x75,
0x62, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0d,
0x52, 0x12, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x50, 0x72, 0x69, 0x76, 0x69,
0x6c, 0x65, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65,
0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53,
0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f,
0x72, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, 0x6f, 0x72, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x50, 0x72,
0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x72, 0x70, 0x75, 0x69,
0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x6f, 0x72, 0x70, 0x75, 0x69, 0x6e,
0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x66, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20,
0x01, 0x28, 0x04, 0x52, 0x09, 0x6b, 0x66, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24,
0x0a, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18,
0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x54, 0x69, 0x74, 0x6c, 0x65,
0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x54, 0x69, 0x74, 0x6c, 0x65,
0x12, 0x24, 0x0a, 0x0d, 0x73, 0x75, 0x63, 0x63, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x4d, 0x73,
0x67, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x63, 0x63, 0x4e, 0x6f, 0x74,
0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x61, 0x6d,
0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x6d, 0x4d,
0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x0e, 0x63, 0x72, 0x6d, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67,
0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x75, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x13,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x75, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54,
0x69, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x3f, 0x0a, 0x07, 0x52, 0x65,
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x1a, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0xfa, 0x02, 0x0a, 0x0e,
0x43, 0x33, 0x46, 0x36, 0x43, 0x52, 0x4d, 0x4d, 0x73, 0x67, 0x48, 0x65, 0x61, 0x64, 0x12, 0x1c,
0x0a, 0x09, 0x63, 0x72, 0x6d, 0x53, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x09, 0x63, 0x72, 0x6d, 0x53, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x68, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x68,
0x65, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x65, 0x72, 0x4e, 0x6f, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x14, 0x0a, 0x05,
0x6b, 0x66, 0x55, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6b, 0x66, 0x55,
0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x03, 0x73, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x18,
0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x12, 0x18,
0x0a, 0x07, 0x63, 0x75, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x07, 0x63, 0x75, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x66, 0x53,
0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x66, 0x53, 0x69, 0x67,
0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x74, 0x79, 0x70, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x55, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x04, 0x52, 0x08, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x55, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
0x6c, 0x61, 0x62, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x66,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6b,
0x66, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63,
0x65, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65,
0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x63,
0x6d, 0x64, 0x30, 0x78, 0x33, 0x66, 0x36,
}
var (
file_cmd0x3f6_proto_rawDescOnce sync.Once
file_cmd0x3f6_proto_rawDescData = file_cmd0x3f6_proto_rawDesc
)
func file_cmd0x3f6_proto_rawDescGZIP() []byte {
file_cmd0x3f6_proto_rawDescOnce.Do(func() {
file_cmd0x3f6_proto_rawDescData = protoimpl.X.CompressGZIP(file_cmd0x3f6_proto_rawDescData)
})
return file_cmd0x3f6_proto_rawDescData
}
var file_cmd0x3f6_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_cmd0x3f6_proto_goTypes = []interface{}{
(*C3F6ReqBody)(nil), // 0: C3F6ReqBody
(*C3F6RspBody)(nil), // 1: C3F6RspBody
(*QDUserLoginProcessCompleteReqBody)(nil), // 2: QDUserLoginProcessCompleteReqBody
(*QDUserLoginProcessCompleteRspBody)(nil), // 3: QDUserLoginProcessCompleteRspBody
(*RetInfo)(nil), // 4: RetInfo
(*C3F6CRMMsgHead)(nil), // 5: C3F6CRMMsgHead
}
var file_cmd0x3f6_proto_depIdxs = []int32{
5, // 0: C3F6ReqBody.crmCommonHead:type_name -> C3F6CRMMsgHead
2, // 1: C3F6ReqBody.subcmdLoginProcessCompleteReqBody:type_name -> QDUserLoginProcessCompleteReqBody
5, // 2: C3F6RspBody.crmCommonHead:type_name -> C3F6CRMMsgHead
3, // 3: C3F6RspBody.subcmdLoginProcessCompleteRspBody:type_name -> QDUserLoginProcessCompleteRspBody
4, // 4: QDUserLoginProcessCompleteRspBody.ret:type_name -> RetInfo
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_cmd0x3f6_proto_init() }
func file_cmd0x3f6_proto_init() {
if File_cmd0x3f6_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_cmd0x3f6_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*C3F6ReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd0x3f6_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*C3F6RspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd0x3f6_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QDUserLoginProcessCompleteReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd0x3f6_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QDUserLoginProcessCompleteRspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd0x3f6_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd0x3f6_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*C3F6CRMMsgHead); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cmd0x3f6_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_cmd0x3f6_proto_goTypes,
DependencyIndexes: file_cmd0x3f6_proto_depIdxs,
MessageInfos: file_cmd0x3f6_proto_msgTypes,
}.Build()
File_cmd0x3f6_proto = out.File
file_cmd0x3f6_proto_rawDesc = nil
file_cmd0x3f6_proto_goTypes = nil
file_cmd0x3f6_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,64 +1,10 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: subcmd0x501.proto
package cmd0x6ff
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type C501ReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReqBody *SubCmd0X501ReqBody `protobuf:"bytes,1281,opt,name=ReqBody" json:"ReqBody,omitempty"`
}
func (x *C501ReqBody) Reset() {
*x = C501ReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_subcmd0x501_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *C501ReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C501ReqBody) ProtoMessage() {}
func (x *C501ReqBody) ProtoReflect() protoreflect.Message {
mi := &file_subcmd0x501_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use C501ReqBody.ProtoReflect.Descriptor instead.
func (*C501ReqBody) Descriptor() ([]byte, []int) {
return file_subcmd0x501_proto_rawDescGZIP(), []int{0}
ReqBody *SubCmd0X501ReqBody `protobuf:"bytes,1281,opt"`
}
func (x *C501ReqBody) GetReqBody() *SubCmd0X501ReqBody {
@ -69,43 +15,7 @@ func (x *C501ReqBody) GetReqBody() *SubCmd0X501ReqBody {
}
type C501RspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RspBody *SubCmd0X501RspBody `protobuf:"bytes,1281,opt,name=RspBody" json:"RspBody,omitempty"`
}
func (x *C501RspBody) Reset() {
*x = C501RspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_subcmd0x501_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *C501RspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C501RspBody) ProtoMessage() {}
func (x *C501RspBody) ProtoReflect() protoreflect.Message {
mi := &file_subcmd0x501_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use C501RspBody.ProtoReflect.Descriptor instead.
func (*C501RspBody) Descriptor() ([]byte, []int) {
return file_subcmd0x501_proto_rawDescGZIP(), []int{1}
RspBody *SubCmd0X501RspBody `protobuf:"bytes,1281,opt"`
}
func (x *C501RspBody) GetRspBody() *SubCmd0X501RspBody {
@ -116,50 +26,14 @@ func (x *C501RspBody) GetRspBody() *SubCmd0X501RspBody {
}
type SubCmd0X501ReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uin *uint64 `protobuf:"varint,1,opt,name=uin" json:"uin,omitempty"`
IdcId *uint32 `protobuf:"varint,2,opt,name=idcId" json:"idcId,omitempty"`
Appid *uint32 `protobuf:"varint,3,opt,name=appid" json:"appid,omitempty"`
LoginSigType *uint32 `protobuf:"varint,4,opt,name=loginSigType" json:"loginSigType,omitempty"`
LoginSigTicket []byte `protobuf:"bytes,5,opt,name=loginSigTicket" json:"loginSigTicket,omitempty"`
RequestFlag *uint32 `protobuf:"varint,6,opt,name=requestFlag" json:"requestFlag,omitempty"`
ServiceTypes []uint32 `protobuf:"varint,7,rep,name=serviceTypes" json:"serviceTypes,omitempty"`
Bid *uint32 `protobuf:"varint,8,opt,name=bid" json:"bid,omitempty"`
}
func (x *SubCmd0X501ReqBody) Reset() {
*x = SubCmd0X501ReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_subcmd0x501_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubCmd0X501ReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubCmd0X501ReqBody) ProtoMessage() {}
func (x *SubCmd0X501ReqBody) ProtoReflect() protoreflect.Message {
mi := &file_subcmd0x501_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubCmd0X501ReqBody.ProtoReflect.Descriptor instead.
func (*SubCmd0X501ReqBody) Descriptor() ([]byte, []int) {
return file_subcmd0x501_proto_rawDescGZIP(), []int{2}
Uin *uint64 `protobuf:"varint,1,opt"`
IdcId *uint32 `protobuf:"varint,2,opt"`
Appid *uint32 `protobuf:"varint,3,opt"`
LoginSigType *uint32 `protobuf:"varint,4,opt"`
LoginSigTicket []byte `protobuf:"bytes,5,opt"`
RequestFlag *uint32 `protobuf:"varint,6,opt"`
ServiceTypes []uint32 `protobuf:"varint,7,rep"`
Bid *uint32 `protobuf:"varint,8,opt"`
}
func (x *SubCmd0X501ReqBody) GetUin() uint64 {
@ -219,45 +93,9 @@ func (x *SubCmd0X501ReqBody) GetBid() uint32 {
}
type SubCmd0X501RspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SigSession []byte `protobuf:"bytes,1,opt,name=sigSession" json:"sigSession,omitempty"`
SessionKey []byte `protobuf:"bytes,2,opt,name=sessionKey" json:"sessionKey,omitempty"`
Addrs []*SrvAddrs `protobuf:"bytes,3,rep,name=addrs" json:"addrs,omitempty"`
}
func (x *SubCmd0X501RspBody) Reset() {
*x = SubCmd0X501RspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_subcmd0x501_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubCmd0X501RspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubCmd0X501RspBody) ProtoMessage() {}
func (x *SubCmd0X501RspBody) ProtoReflect() protoreflect.Message {
mi := &file_subcmd0x501_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubCmd0X501RspBody.ProtoReflect.Descriptor instead.
func (*SubCmd0X501RspBody) Descriptor() ([]byte, []int) {
return file_subcmd0x501_proto_rawDescGZIP(), []int{3}
SigSession []byte `protobuf:"bytes,1,opt"`
SessionKey []byte `protobuf:"bytes,2,opt"`
Addrs []*SrvAddrs `protobuf:"bytes,3,rep"`
}
func (x *SubCmd0X501RspBody) GetSigSession() []byte {
@ -282,44 +120,8 @@ func (x *SubCmd0X501RspBody) GetAddrs() []*SrvAddrs {
}
type SrvAddrs struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServiceType *uint32 `protobuf:"varint,1,opt,name=serviceType" json:"serviceType,omitempty"`
Addrs []*IpAddr `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"`
}
func (x *SrvAddrs) Reset() {
*x = SrvAddrs{}
if protoimpl.UnsafeEnabled {
mi := &file_subcmd0x501_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SrvAddrs) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SrvAddrs) ProtoMessage() {}
func (x *SrvAddrs) ProtoReflect() protoreflect.Message {
mi := &file_subcmd0x501_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SrvAddrs.ProtoReflect.Descriptor instead.
func (*SrvAddrs) Descriptor() ([]byte, []int) {
return file_subcmd0x501_proto_rawDescGZIP(), []int{4}
ServiceType *uint32 `protobuf:"varint,1,opt"`
Addrs []*IpAddr `protobuf:"bytes,2,rep"`
}
func (x *SrvAddrs) GetServiceType() uint32 {
@ -337,46 +139,10 @@ func (x *SrvAddrs) GetAddrs() []*IpAddr {
}
type IpAddr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type *uint32 `protobuf:"varint,1,opt,name=type" json:"type,omitempty"`
Ip *uint32 `protobuf:"fixed32,2,opt,name=ip" json:"ip,omitempty"`
Port *uint32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"`
Area *uint32 `protobuf:"varint,4,opt,name=area" json:"area,omitempty"`
}
func (x *IpAddr) Reset() {
*x = IpAddr{}
if protoimpl.UnsafeEnabled {
mi := &file_subcmd0x501_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IpAddr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IpAddr) ProtoMessage() {}
func (x *IpAddr) ProtoReflect() protoreflect.Message {
mi := &file_subcmd0x501_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IpAddr.ProtoReflect.Descriptor instead.
func (*IpAddr) Descriptor() ([]byte, []int) {
return file_subcmd0x501_proto_rawDescGZIP(), []int{5}
Type *uint32 `protobuf:"varint,1,opt"`
Ip *uint32 `protobuf:"fixed32,2,opt"`
Port *uint32 `protobuf:"varint,3,opt"`
Area *uint32 `protobuf:"varint,4,opt"`
}
func (x *IpAddr) GetType() uint32 {
@ -406,184 +172,3 @@ func (x *IpAddr) GetArea() uint32 {
}
return 0
}
var File_subcmd0x501_proto protoreflect.FileDescriptor
var file_subcmd0x501_proto_rawDesc = []byte{
0x0a, 0x11, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x30, 0x78, 0x35, 0x30, 0x31, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x0b, 0x43, 0x35, 0x30, 0x31, 0x52, 0x65, 0x71, 0x42, 0x6f,
0x64, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x81, 0x0a,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x53, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x30, 0x78, 0x35,
0x30, 0x31, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x07, 0x52, 0x65, 0x71, 0x42, 0x6f,
0x64, 0x79, 0x22, 0x3d, 0x0a, 0x0b, 0x43, 0x35, 0x30, 0x31, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64,
0x79, 0x12, 0x2e, 0x0a, 0x07, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x81, 0x0a, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x53, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x30, 0x78, 0x35, 0x30,
0x31, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x07, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64,
0x79, 0x22, 0xf6, 0x01, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x30, 0x78, 0x35, 0x30,
0x31, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x75, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x64,
0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x64, 0x63, 0x49, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53,
0x69, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6c, 0x6f,
0x67, 0x69, 0x6e, 0x53, 0x69, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x6f,
0x67, 0x69, 0x6e, 0x53, 0x69, 0x67, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x69, 0x67, 0x54, 0x69, 0x63, 0x6b,
0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x61,
0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x46, 0x6c, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54,
0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x62, 0x69, 0x64, 0x22, 0x75, 0x0a, 0x12, 0x53, 0x75,
0x62, 0x43, 0x6d, 0x64, 0x30, 0x78, 0x35, 0x30, 0x31, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79,
0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79,
0x12, 0x1f, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x09, 0x2e, 0x53, 0x72, 0x76, 0x41, 0x64, 0x64, 0x72, 0x73, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72,
0x73, 0x22, 0x4b, 0x0a, 0x08, 0x53, 0x72, 0x76, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x20, 0x0a,
0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
0x1d, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07,
0x2e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x22, 0x54,
0x0a, 0x06, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04,
0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04,
0x61, 0x72, 0x65, 0x61, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x63, 0x6d, 0x64, 0x30, 0x78,
0x36, 0x66, 0x66,
}
var (
file_subcmd0x501_proto_rawDescOnce sync.Once
file_subcmd0x501_proto_rawDescData = file_subcmd0x501_proto_rawDesc
)
func file_subcmd0x501_proto_rawDescGZIP() []byte {
file_subcmd0x501_proto_rawDescOnce.Do(func() {
file_subcmd0x501_proto_rawDescData = protoimpl.X.CompressGZIP(file_subcmd0x501_proto_rawDescData)
})
return file_subcmd0x501_proto_rawDescData
}
var file_subcmd0x501_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_subcmd0x501_proto_goTypes = []interface{}{
(*C501ReqBody)(nil), // 0: C501ReqBody
(*C501RspBody)(nil), // 1: C501RspBody
(*SubCmd0X501ReqBody)(nil), // 2: SubCmd0x501ReqBody
(*SubCmd0X501RspBody)(nil), // 3: SubCmd0x501RspBody
(*SrvAddrs)(nil), // 4: SrvAddrs
(*IpAddr)(nil), // 5: IpAddr
}
var file_subcmd0x501_proto_depIdxs = []int32{
2, // 0: C501ReqBody.ReqBody:type_name -> SubCmd0x501ReqBody
3, // 1: C501RspBody.RspBody:type_name -> SubCmd0x501RspBody
4, // 2: SubCmd0x501RspBody.addrs:type_name -> SrvAddrs
5, // 3: SrvAddrs.addrs:type_name -> IpAddr
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_subcmd0x501_proto_init() }
func file_subcmd0x501_proto_init() {
if File_subcmd0x501_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_subcmd0x501_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*C501ReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_subcmd0x501_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*C501RspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_subcmd0x501_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SubCmd0X501ReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_subcmd0x501_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SubCmd0X501RspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_subcmd0x501_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SrvAddrs); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_subcmd0x501_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IpAddr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_subcmd0x501_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_subcmd0x501_proto_goTypes,
DependencyIndexes: file_subcmd0x501_proto_depIdxs,
MessageInfos: file_subcmd0x501_proto_msgTypes,
}.Build()
File_subcmd0x501_proto = out.File
file_subcmd0x501_proto_rawDesc = nil
file_subcmd0x501_proto_goTypes = nil
file_subcmd0x501_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,6 @@ syntax = "proto3";
option go_package = "./;pb";
message DeviceInfo {
string bootloader = 1;
string procVersion = 2;

View File

@ -1,67 +1,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: group.proto
package exciting
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GroupFileUploadExt struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Unknown1 *int32 `protobuf:"varint,1,opt,name=unknown1" json:"unknown1,omitempty"`
Unknown2 *int32 `protobuf:"varint,2,opt,name=unknown2" json:"unknown2,omitempty"`
Entry *GroupFileUploadEntry `protobuf:"bytes,100,opt,name=entry" json:"entry,omitempty"`
Unknown3 *int32 `protobuf:"varint,3,opt,name=unknown3" json:"unknown3,omitempty"`
}
func (x *GroupFileUploadExt) Reset() {
*x = GroupFileUploadExt{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GroupFileUploadExt) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GroupFileUploadExt) ProtoMessage() {}
func (x *GroupFileUploadExt) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GroupFileUploadExt.ProtoReflect.Descriptor instead.
func (*GroupFileUploadExt) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{0}
Unknown1 *int32 `protobuf:"varint,1,opt"`
Unknown2 *int32 `protobuf:"varint,2,opt"`
Entry *GroupFileUploadEntry `protobuf:"bytes,100,opt"`
Unknown3 *int32 `protobuf:"varint,3,opt"`
}
func (x *GroupFileUploadExt) GetUnknown1() int32 {
@ -93,47 +39,11 @@ func (x *GroupFileUploadExt) GetUnknown3() int32 {
}
type GroupFileUploadEntry struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BusiBuff *ExcitingBusiInfo `protobuf:"bytes,100,opt,name=busiBuff" json:"busiBuff,omitempty"`
FileEntry *ExcitingFileEntry `protobuf:"bytes,200,opt,name=fileEntry" json:"fileEntry,omitempty"`
ClientInfo *ExcitingClientInfo `protobuf:"bytes,300,opt,name=clientInfo" json:"clientInfo,omitempty"`
FileNameInfo *ExcitingFileNameInfo `protobuf:"bytes,400,opt,name=fileNameInfo" json:"fileNameInfo,omitempty"`
Host *ExcitingHostConfig `protobuf:"bytes,500,opt,name=host" json:"host,omitempty"`
}
func (x *GroupFileUploadEntry) Reset() {
*x = GroupFileUploadEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GroupFileUploadEntry) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GroupFileUploadEntry) ProtoMessage() {}
func (x *GroupFileUploadEntry) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GroupFileUploadEntry.ProtoReflect.Descriptor instead.
func (*GroupFileUploadEntry) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{1}
BusiBuff *ExcitingBusiInfo `protobuf:"bytes,100,opt"`
FileEntry *ExcitingFileEntry `protobuf:"bytes,200,opt"`
ClientInfo *ExcitingClientInfo `protobuf:"bytes,300,opt"`
FileNameInfo *ExcitingFileNameInfo `protobuf:"bytes,400,opt"`
Host *ExcitingHostConfig `protobuf:"bytes,500,opt"`
}
func (x *GroupFileUploadEntry) GetBusiBuff() *ExcitingBusiInfo {
@ -172,46 +82,10 @@ func (x *GroupFileUploadEntry) GetHost() *ExcitingHostConfig {
}
type ExcitingBusiInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BusId *int32 `protobuf:"varint,1,opt,name=busId" json:"busId,omitempty"`
SenderUin *int64 `protobuf:"varint,100,opt,name=senderUin" json:"senderUin,omitempty"`
ReceiverUin *int64 `protobuf:"varint,200,opt,name=receiverUin" json:"receiverUin,omitempty"` // probable
GroupCode *int64 `protobuf:"varint,400,opt,name=groupCode" json:"groupCode,omitempty"` // probable
}
func (x *ExcitingBusiInfo) Reset() {
*x = ExcitingBusiInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExcitingBusiInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExcitingBusiInfo) ProtoMessage() {}
func (x *ExcitingBusiInfo) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExcitingBusiInfo.ProtoReflect.Descriptor instead.
func (*ExcitingBusiInfo) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{2}
BusId *int32 `protobuf:"varint,1,opt"`
SenderUin *int64 `protobuf:"varint,100,opt"`
ReceiverUin *int64 `protobuf:"varint,200,opt"` // probable
GroupCode *int64 `protobuf:"varint,400,opt"` // probable
}
func (x *ExcitingBusiInfo) GetBusId() int32 {
@ -243,47 +117,11 @@ func (x *ExcitingBusiInfo) GetGroupCode() int64 {
}
type ExcitingFileEntry struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FileSize *int64 `protobuf:"varint,100,opt,name=fileSize" json:"fileSize,omitempty"`
Md5 []byte `protobuf:"bytes,200,opt,name=md5" json:"md5,omitempty"`
Sha1 []byte `protobuf:"bytes,300,opt,name=sha1" json:"sha1,omitempty"`
FileId []byte `protobuf:"bytes,600,opt,name=fileId" json:"fileId,omitempty"`
UploadKey []byte `protobuf:"bytes,700,opt,name=uploadKey" json:"uploadKey,omitempty"`
}
func (x *ExcitingFileEntry) Reset() {
*x = ExcitingFileEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExcitingFileEntry) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExcitingFileEntry) ProtoMessage() {}
func (x *ExcitingFileEntry) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExcitingFileEntry.ProtoReflect.Descriptor instead.
func (*ExcitingFileEntry) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{3}
FileSize *int64 `protobuf:"varint,100,opt"`
Md5 []byte `protobuf:"bytes,200,opt"`
Sha1 []byte `protobuf:"bytes,300,opt"`
FileId []byte `protobuf:"bytes,600,opt"`
UploadKey []byte `protobuf:"bytes,700,opt"`
}
func (x *ExcitingFileEntry) GetFileSize() int64 {
@ -322,47 +160,11 @@ func (x *ExcitingFileEntry) GetUploadKey() []byte {
}
type ExcitingClientInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ClientType *int32 `protobuf:"varint,100,opt,name=clientType" json:"clientType,omitempty"` // probable
AppId *string `protobuf:"bytes,200,opt,name=appId" json:"appId,omitempty"`
TerminalType *int32 `protobuf:"varint,300,opt,name=terminalType" json:"terminalType,omitempty"` // probable
ClientVer *string `protobuf:"bytes,400,opt,name=clientVer" json:"clientVer,omitempty"`
Unknown *int32 `protobuf:"varint,600,opt,name=unknown" json:"unknown,omitempty"`
}
func (x *ExcitingClientInfo) Reset() {
*x = ExcitingClientInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExcitingClientInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExcitingClientInfo) ProtoMessage() {}
func (x *ExcitingClientInfo) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExcitingClientInfo.ProtoReflect.Descriptor instead.
func (*ExcitingClientInfo) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{4}
ClientType *int32 `protobuf:"varint,100,opt"` // probable
AppId *string `protobuf:"bytes,200,opt"`
TerminalType *int32 `protobuf:"varint,300,opt"` // probable
ClientVer *string `protobuf:"bytes,400,opt"`
Unknown *int32 `protobuf:"varint,600,opt"`
}
func (x *ExcitingClientInfo) GetClientType() int32 {
@ -401,43 +203,7 @@ func (x *ExcitingClientInfo) GetUnknown() int32 {
}
type ExcitingFileNameInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FileName *string `protobuf:"bytes,100,opt,name=fileName" json:"fileName,omitempty"`
}
func (x *ExcitingFileNameInfo) Reset() {
*x = ExcitingFileNameInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExcitingFileNameInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExcitingFileNameInfo) ProtoMessage() {}
func (x *ExcitingFileNameInfo) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExcitingFileNameInfo.ProtoReflect.Descriptor instead.
func (*ExcitingFileNameInfo) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{5}
FileName *string `protobuf:"bytes,100,opt"`
}
func (x *ExcitingFileNameInfo) GetFileName() string {
@ -448,43 +214,7 @@ func (x *ExcitingFileNameInfo) GetFileName() string {
}
type ExcitingHostConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Hosts []*ExcitingHostInfo `protobuf:"bytes,200,rep,name=hosts" json:"hosts,omitempty"`
}
func (x *ExcitingHostConfig) Reset() {
*x = ExcitingHostConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExcitingHostConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExcitingHostConfig) ProtoMessage() {}
func (x *ExcitingHostConfig) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExcitingHostConfig.ProtoReflect.Descriptor instead.
func (*ExcitingHostConfig) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{6}
Hosts []*ExcitingHostInfo `protobuf:"bytes,200,rep"`
}
func (x *ExcitingHostConfig) GetHosts() []*ExcitingHostInfo {
@ -495,44 +225,8 @@ func (x *ExcitingHostConfig) GetHosts() []*ExcitingHostInfo {
}
type ExcitingHostInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url *ExcitingUrlInfo `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
Port *int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
}
func (x *ExcitingHostInfo) Reset() {
*x = ExcitingHostInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExcitingHostInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExcitingHostInfo) ProtoMessage() {}
func (x *ExcitingHostInfo) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExcitingHostInfo.ProtoReflect.Descriptor instead.
func (*ExcitingHostInfo) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{7}
Url *ExcitingUrlInfo `protobuf:"bytes,1,opt"`
Port *int32 `protobuf:"varint,2,opt"`
}
func (x *ExcitingHostInfo) GetUrl() *ExcitingUrlInfo {
@ -550,44 +244,8 @@ func (x *ExcitingHostInfo) GetPort() int32 {
}
type ExcitingUrlInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Unknown *int32 `protobuf:"varint,1,opt,name=unknown" json:"unknown,omitempty"` // not https?
Host *string `protobuf:"bytes,2,opt,name=host" json:"host,omitempty"`
}
func (x *ExcitingUrlInfo) Reset() {
*x = ExcitingUrlInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_group_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExcitingUrlInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExcitingUrlInfo) ProtoMessage() {}
func (x *ExcitingUrlInfo) ProtoReflect() protoreflect.Message {
mi := &file_group_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExcitingUrlInfo.ProtoReflect.Descriptor instead.
func (*ExcitingUrlInfo) Descriptor() ([]byte, []int) {
return file_group_proto_rawDescGZIP(), []int{8}
Unknown *int32 `protobuf:"varint,1,opt"` // not https?
Host *string `protobuf:"bytes,2,opt"`
}
func (x *ExcitingUrlInfo) GetUnknown() int32 {
@ -603,257 +261,3 @@ func (x *ExcitingUrlInfo) GetHost() string {
}
return ""
}
var File_group_proto protoreflect.FileDescriptor
var file_group_proto_rawDesc = []byte{
0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01,
0x0a, 0x12, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61,
0x64, 0x45, 0x78, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x31,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x31,
0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x32, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x32, 0x12, 0x2b, 0x0a, 0x05,
0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x6b,
0x6e, 0x6f, 0x77, 0x6e, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x6e, 0x6b,
0x6e, 0x6f, 0x77, 0x6e, 0x33, 0x22, 0x94, 0x02, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46,
0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x2d,
0x0a, 0x08, 0x62, 0x75, 0x73, 0x69, 0x42, 0x75, 0x66, 0x66, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x45, 0x78, 0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x69, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x75, 0x73, 0x69, 0x42, 0x75, 0x66, 0x66, 0x12, 0x31, 0x0a,
0x09, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0xc8, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x45, 0x78, 0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0xac,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x45, 0x78, 0x63, 0x69, 0x74, 0x69, 0x6e, 0x67,
0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61,
0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x90, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x45, 0x78, 0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x28, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0xf4, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x13, 0x2e, 0x45, 0x78, 0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x22, 0x88, 0x01, 0x0a,
0x10, 0x45, 0x78, 0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x69, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x65,
0x72, 0x55, 0x69, 0x6e, 0x18, 0x64, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64,
0x65, 0x72, 0x55, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
0x72, 0x55, 0x69, 0x6e, 0x18, 0xc8, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x63,
0x65, 0x69, 0x76, 0x65, 0x72, 0x55, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x90, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x63, 0x69,
0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1a, 0x0a,
0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x03, 0x52,
0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x11, 0x0a, 0x03, 0x6d, 0x64, 0x35,
0x18, 0xc8, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x12, 0x13, 0x0a, 0x04,
0x73, 0x68, 0x61, 0x31, 0x18, 0xac, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x68, 0x61,
0x31, 0x12, 0x17, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0xd8, 0x04, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x70,
0x6c, 0x6f, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x18, 0xbc, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09,
0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x22, 0xaa, 0x01, 0x0a, 0x12, 0x45, 0x78,
0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x64,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
0x12, 0x15, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0xc8, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69,
0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0xac, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x09,
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x18, 0x90, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x07, 0x75,
0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0xd8, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75,
0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0x32, 0x0a, 0x14, 0x45, 0x78, 0x63, 0x69, 0x74, 0x69,
0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a,
0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x78,
0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x12, 0x28, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0xc8, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x45, 0x78, 0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x4a, 0x0a, 0x10, 0x45, 0x78,
0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22,
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x45, 0x78,
0x63, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x72, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x75,
0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3f, 0x0a, 0x0f, 0x45, 0x78, 0x63, 0x69, 0x74, 0x69,
0x6e, 0x67, 0x55, 0x72, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x6b,
0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e,
0x6f, 0x77, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x65, 0x78,
0x63, 0x69, 0x74, 0x69, 0x6e, 0x67,
}
var (
file_group_proto_rawDescOnce sync.Once
file_group_proto_rawDescData = file_group_proto_rawDesc
)
func file_group_proto_rawDescGZIP() []byte {
file_group_proto_rawDescOnce.Do(func() {
file_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_group_proto_rawDescData)
})
return file_group_proto_rawDescData
}
var file_group_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_group_proto_goTypes = []interface{}{
(*GroupFileUploadExt)(nil), // 0: GroupFileUploadExt
(*GroupFileUploadEntry)(nil), // 1: GroupFileUploadEntry
(*ExcitingBusiInfo)(nil), // 2: ExcitingBusiInfo
(*ExcitingFileEntry)(nil), // 3: ExcitingFileEntry
(*ExcitingClientInfo)(nil), // 4: ExcitingClientInfo
(*ExcitingFileNameInfo)(nil), // 5: ExcitingFileNameInfo
(*ExcitingHostConfig)(nil), // 6: ExcitingHostConfig
(*ExcitingHostInfo)(nil), // 7: ExcitingHostInfo
(*ExcitingUrlInfo)(nil), // 8: ExcitingUrlInfo
}
var file_group_proto_depIdxs = []int32{
1, // 0: GroupFileUploadExt.entry:type_name -> GroupFileUploadEntry
2, // 1: GroupFileUploadEntry.busiBuff:type_name -> ExcitingBusiInfo
3, // 2: GroupFileUploadEntry.fileEntry:type_name -> ExcitingFileEntry
4, // 3: GroupFileUploadEntry.clientInfo:type_name -> ExcitingClientInfo
5, // 4: GroupFileUploadEntry.fileNameInfo:type_name -> ExcitingFileNameInfo
6, // 5: GroupFileUploadEntry.host:type_name -> ExcitingHostConfig
7, // 6: ExcitingHostConfig.hosts:type_name -> ExcitingHostInfo
8, // 7: ExcitingHostInfo.url:type_name -> ExcitingUrlInfo
8, // [8:8] is the sub-list for method output_type
8, // [8:8] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
}
func init() { file_group_proto_init() }
func file_group_proto_init() {
if File_group_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GroupFileUploadExt); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GroupFileUploadEntry); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExcitingBusiInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExcitingFileEntry); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExcitingClientInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExcitingFileNameInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExcitingHostConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExcitingHostInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExcitingUrlInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_group_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_group_proto_goTypes,
DependencyIndexes: file_group_proto_depIdxs,
MessageInfos: file_group_proto_msgTypes,
}.Build()
File_group_proto = out.File
file_group_proto_rawDesc = nil
file_group_proto_goTypes = nil
file_group_proto_depIdxs = nil
}

View File

@ -1,66 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: faceroam.proto
package faceroam
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PlatInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Implat *int64 `protobuf:"varint,1,opt,name=implat" json:"implat,omitempty"`
Osver *string `protobuf:"bytes,2,opt,name=osver" json:"osver,omitempty"`
Mqqver *string `protobuf:"bytes,3,opt,name=mqqver" json:"mqqver,omitempty"`
}
func (x *PlatInfo) Reset() {
*x = PlatInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_faceroam_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PlatInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PlatInfo) ProtoMessage() {}
func (x *PlatInfo) ProtoReflect() protoreflect.Message {
mi := &file_faceroam_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PlatInfo.ProtoReflect.Descriptor instead.
func (*PlatInfo) Descriptor() ([]byte, []int) {
return file_faceroam_proto_rawDescGZIP(), []int{0}
Implat *int64 `protobuf:"varint,1,opt"`
Osver *string `protobuf:"bytes,2,opt"`
Mqqver *string `protobuf:"bytes,3,opt"`
}
func (x *PlatInfo) GetImplat() int64 {
@ -85,47 +31,11 @@ func (x *PlatInfo) GetMqqver() string {
}
type FaceroamReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Comm *PlatInfo `protobuf:"bytes,1,opt,name=comm" json:"comm,omitempty"`
Uin *uint64 `protobuf:"varint,2,opt,name=uin" json:"uin,omitempty"`
SubCmd *uint32 `protobuf:"varint,3,opt,name=subCmd" json:"subCmd,omitempty"`
ReqUserInfo *ReqUserInfo `protobuf:"bytes,4,opt,name=reqUserInfo" json:"reqUserInfo,omitempty"`
ReqDeleteItem *ReqDeleteItem `protobuf:"bytes,5,opt,name=reqDeleteItem" json:"reqDeleteItem,omitempty"`
}
func (x *FaceroamReqBody) Reset() {
*x = FaceroamReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_faceroam_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FaceroamReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FaceroamReqBody) ProtoMessage() {}
func (x *FaceroamReqBody) ProtoReflect() protoreflect.Message {
mi := &file_faceroam_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FaceroamReqBody.ProtoReflect.Descriptor instead.
func (*FaceroamReqBody) Descriptor() ([]byte, []int) {
return file_faceroam_proto_rawDescGZIP(), []int{1}
Comm *PlatInfo `protobuf:"bytes,1,opt"`
Uin *uint64 `protobuf:"varint,2,opt"`
SubCmd *uint32 `protobuf:"varint,3,opt"`
ReqUserInfo *ReqUserInfo `protobuf:"bytes,4,opt"`
ReqDeleteItem *ReqDeleteItem `protobuf:"bytes,5,opt"`
}
func (x *FaceroamReqBody) GetComm() *PlatInfo {
@ -164,43 +74,7 @@ func (x *FaceroamReqBody) GetReqDeleteItem() *ReqDeleteItem {
}
type ReqDeleteItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Filename []string `protobuf:"bytes,1,rep,name=filename" json:"filename,omitempty"`
}
func (x *ReqDeleteItem) Reset() {
*x = ReqDeleteItem{}
if protoimpl.UnsafeEnabled {
mi := &file_faceroam_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReqDeleteItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReqDeleteItem) ProtoMessage() {}
func (x *ReqDeleteItem) ProtoReflect() protoreflect.Message {
mi := &file_faceroam_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReqDeleteItem.ProtoReflect.Descriptor instead.
func (*ReqDeleteItem) Descriptor() ([]byte, []int) {
return file_faceroam_proto_rawDescGZIP(), []int{2}
Filename []string `protobuf:"bytes,1,rep"`
}
func (x *ReqDeleteItem) GetFilename() []string {
@ -211,85 +85,14 @@ func (x *ReqDeleteItem) GetFilename() []string {
}
type ReqUserInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ReqUserInfo) Reset() {
*x = ReqUserInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_faceroam_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReqUserInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReqUserInfo) ProtoMessage() {}
func (x *ReqUserInfo) ProtoReflect() protoreflect.Message {
mi := &file_faceroam_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReqUserInfo.ProtoReflect.Descriptor instead.
func (*ReqUserInfo) Descriptor() ([]byte, []int) {
return file_faceroam_proto_rawDescGZIP(), []int{3}
}
type FaceroamRspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ret *int64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"`
Errmsg *string `protobuf:"bytes,2,opt,name=errmsg" json:"errmsg,omitempty"`
SubCmd *uint32 `protobuf:"varint,3,opt,name=subCmd" json:"subCmd,omitempty"`
RspUserInfo *RspUserInfo `protobuf:"bytes,4,opt,name=rspUserInfo" json:"rspUserInfo,omitempty"`
RspDeleteItem *RspDeleteItem `protobuf:"bytes,5,opt,name=rspDeleteItem" json:"rspDeleteItem,omitempty"`
}
func (x *FaceroamRspBody) Reset() {
*x = FaceroamRspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_faceroam_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FaceroamRspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FaceroamRspBody) ProtoMessage() {}
func (x *FaceroamRspBody) ProtoReflect() protoreflect.Message {
mi := &file_faceroam_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FaceroamRspBody.ProtoReflect.Descriptor instead.
func (*FaceroamRspBody) Descriptor() ([]byte, []int) {
return file_faceroam_proto_rawDescGZIP(), []int{4}
Ret *int64 `protobuf:"varint,1,opt"`
Errmsg *string `protobuf:"bytes,2,opt"`
SubCmd *uint32 `protobuf:"varint,3,opt"`
RspUserInfo *RspUserInfo `protobuf:"bytes,4,opt"`
RspDeleteItem *RspDeleteItem `protobuf:"bytes,5,opt"`
}
func (x *FaceroamRspBody) GetRet() int64 {
@ -328,44 +131,8 @@ func (x *FaceroamRspBody) GetRspDeleteItem() *RspDeleteItem {
}
type RspDeleteItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Filename []string `protobuf:"bytes,1,rep,name=filename" json:"filename,omitempty"`
Ret []int64 `protobuf:"varint,2,rep,name=ret" json:"ret,omitempty"`
}
func (x *RspDeleteItem) Reset() {
*x = RspDeleteItem{}
if protoimpl.UnsafeEnabled {
mi := &file_faceroam_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RspDeleteItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RspDeleteItem) ProtoMessage() {}
func (x *RspDeleteItem) ProtoReflect() protoreflect.Message {
mi := &file_faceroam_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RspDeleteItem.ProtoReflect.Descriptor instead.
func (*RspDeleteItem) Descriptor() ([]byte, []int) {
return file_faceroam_proto_rawDescGZIP(), []int{5}
Filename []string `protobuf:"bytes,1,rep"`
Ret []int64 `protobuf:"varint,2,rep"`
}
func (x *RspDeleteItem) GetFilename() []string {
@ -383,47 +150,11 @@ func (x *RspDeleteItem) GetRet() []int64 {
}
type RspUserInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Filename []string `protobuf:"bytes,1,rep,name=filename" json:"filename,omitempty"`
DeleteFile []string `protobuf:"bytes,2,rep,name=deleteFile" json:"deleteFile,omitempty"`
Bid *string `protobuf:"bytes,3,opt,name=bid" json:"bid,omitempty"`
MaxRoamSize *uint32 `protobuf:"varint,4,opt,name=maxRoamSize" json:"maxRoamSize,omitempty"`
EmojiType []uint32 `protobuf:"varint,5,rep,name=emojiType" json:"emojiType,omitempty"`
}
func (x *RspUserInfo) Reset() {
*x = RspUserInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_faceroam_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RspUserInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RspUserInfo) ProtoMessage() {}
func (x *RspUserInfo) ProtoReflect() protoreflect.Message {
mi := &file_faceroam_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RspUserInfo.ProtoReflect.Descriptor instead.
func (*RspUserInfo) Descriptor() ([]byte, []int) {
return file_faceroam_proto_rawDescGZIP(), []int{6}
Filename []string `protobuf:"bytes,1,rep"`
DeleteFile []string `protobuf:"bytes,2,rep"`
Bid *string `protobuf:"bytes,3,opt"`
MaxRoamSize *uint32 `protobuf:"varint,4,opt"`
EmojiType []uint32 `protobuf:"varint,5,rep"`
}
func (x *RspUserInfo) GetFilename() []string {
@ -460,203 +191,3 @@ func (x *RspUserInfo) GetEmojiType() []uint32 {
}
return nil
}
var File_faceroam_proto protoreflect.FileDescriptor
var file_faceroam_proto_rawDesc = []byte{
0x0a, 0x0e, 0x66, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x50, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06,
0x69, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x69, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x73, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x73, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x71,
0x71, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x71, 0x71, 0x76,
0x65, 0x72, 0x22, 0xc0, 0x01, 0x0a, 0x0f, 0x46, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x61, 0x6d, 0x52,
0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x1d, 0x0a, 0x04, 0x63, 0x6f, 0x6d, 0x6d, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x04, 0x63, 0x6f, 0x6d, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01,
0x28, 0x04, 0x52, 0x03, 0x75, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x43, 0x6d,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x12,
0x2e, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x52, 0x65, 0x71, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x34, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d,
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x52, 0x65, 0x71, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x2b, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61,
0x6d, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x22, 0xb9, 0x01, 0x0a, 0x0f, 0x46, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x61, 0x6d, 0x52, 0x73,
0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6d, 0x73,
0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x12,
0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x06, 0x73, 0x75, 0x62, 0x43, 0x6d, 0x64, 0x12, 0x2e, 0x0a, 0x0b, 0x72, 0x73, 0x70, 0x55, 0x73,
0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x52,
0x73, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x73, 0x70, 0x55,
0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0d, 0x72, 0x73, 0x70, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
0x2e, 0x52, 0x73, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0d,
0x72, 0x73, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x3d, 0x0a,
0x0d, 0x52, 0x73, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a,
0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x72, 0x65, 0x74, 0x22, 0x9b, 0x01, 0x0a,
0x0b, 0x52, 0x73, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08,
0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08,
0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61,
0x78, 0x52, 0x6f, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x0b, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09,
0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52,
0x09, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f,
0x3b, 0x66, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x61, 0x6d,
}
var (
file_faceroam_proto_rawDescOnce sync.Once
file_faceroam_proto_rawDescData = file_faceroam_proto_rawDesc
)
func file_faceroam_proto_rawDescGZIP() []byte {
file_faceroam_proto_rawDescOnce.Do(func() {
file_faceroam_proto_rawDescData = protoimpl.X.CompressGZIP(file_faceroam_proto_rawDescData)
})
return file_faceroam_proto_rawDescData
}
var file_faceroam_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_faceroam_proto_goTypes = []interface{}{
(*PlatInfo)(nil), // 0: PlatInfo
(*FaceroamReqBody)(nil), // 1: FaceroamReqBody
(*ReqDeleteItem)(nil), // 2: ReqDeleteItem
(*ReqUserInfo)(nil), // 3: ReqUserInfo
(*FaceroamRspBody)(nil), // 4: FaceroamRspBody
(*RspDeleteItem)(nil), // 5: RspDeleteItem
(*RspUserInfo)(nil), // 6: RspUserInfo
}
var file_faceroam_proto_depIdxs = []int32{
0, // 0: FaceroamReqBody.comm:type_name -> PlatInfo
3, // 1: FaceroamReqBody.reqUserInfo:type_name -> ReqUserInfo
2, // 2: FaceroamReqBody.reqDeleteItem:type_name -> ReqDeleteItem
6, // 3: FaceroamRspBody.rspUserInfo:type_name -> RspUserInfo
5, // 4: FaceroamRspBody.rspDeleteItem:type_name -> RspDeleteItem
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_faceroam_proto_init() }
func file_faceroam_proto_init() {
if File_faceroam_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_faceroam_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PlatInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_faceroam_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FaceroamReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_faceroam_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReqDeleteItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_faceroam_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReqUserInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_faceroam_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FaceroamRspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_faceroam_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RspDeleteItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_faceroam_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RspUserInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_faceroam_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_faceroam_proto_goTypes,
DependencyIndexes: file_faceroam_proto_depIdxs,
MessageInfos: file_faceroam_proto_msgTypes,
}.Build()
File_faceroam_proto = out.File
file_faceroam_proto_rawDesc = nil
file_faceroam_proto_goTypes = nil
file_faceroam_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,65 +1,11 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: longmsg.proto
package longmsg
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type LongMsgDeleteReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgResid []byte `protobuf:"bytes,1,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
MsgType int32 `protobuf:"varint,2,opt,name=msgType,proto3" json:"msgType,omitempty"`
}
func (x *LongMsgDeleteReq) Reset() {
*x = LongMsgDeleteReq{}
if protoimpl.UnsafeEnabled {
mi := &file_longmsg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LongMsgDeleteReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LongMsgDeleteReq) ProtoMessage() {}
func (x *LongMsgDeleteReq) ProtoReflect() protoreflect.Message {
mi := &file_longmsg_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LongMsgDeleteReq.ProtoReflect.Descriptor instead.
func (*LongMsgDeleteReq) Descriptor() ([]byte, []int) {
return file_longmsg_proto_rawDescGZIP(), []int{0}
MsgResid []byte `protobuf:"bytes,1,opt"`
MsgType int32 `protobuf:"varint,2,opt"`
}
func (x *LongMsgDeleteReq) GetMsgResid() []byte {
@ -77,44 +23,8 @@ func (x *LongMsgDeleteReq) GetMsgType() int32 {
}
type LongMsgDeleteRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
MsgResid []byte `protobuf:"bytes,2,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
}
func (x *LongMsgDeleteRsp) Reset() {
*x = LongMsgDeleteRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_longmsg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LongMsgDeleteRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LongMsgDeleteRsp) ProtoMessage() {}
func (x *LongMsgDeleteRsp) ProtoReflect() protoreflect.Message {
mi := &file_longmsg_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LongMsgDeleteRsp.ProtoReflect.Descriptor instead.
func (*LongMsgDeleteRsp) Descriptor() ([]byte, []int) {
return file_longmsg_proto_rawDescGZIP(), []int{1}
Result int32 `protobuf:"varint,1,opt"`
MsgResid []byte `protobuf:"bytes,2,opt"`
}
func (x *LongMsgDeleteRsp) GetResult() int32 {
@ -132,46 +42,10 @@ func (x *LongMsgDeleteRsp) GetMsgResid() []byte {
}
type LongMsgDownReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SrcUin int32 `protobuf:"varint,1,opt,name=srcUin,proto3" json:"srcUin,omitempty"`
MsgResid []byte `protobuf:"bytes,2,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
MsgType int32 `protobuf:"varint,3,opt,name=msgType,proto3" json:"msgType,omitempty"`
NeedCache int32 `protobuf:"varint,4,opt,name=needCache,proto3" json:"needCache,omitempty"`
}
func (x *LongMsgDownReq) Reset() {
*x = LongMsgDownReq{}
if protoimpl.UnsafeEnabled {
mi := &file_longmsg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LongMsgDownReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LongMsgDownReq) ProtoMessage() {}
func (x *LongMsgDownReq) ProtoReflect() protoreflect.Message {
mi := &file_longmsg_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LongMsgDownReq.ProtoReflect.Descriptor instead.
func (*LongMsgDownReq) Descriptor() ([]byte, []int) {
return file_longmsg_proto_rawDescGZIP(), []int{2}
SrcUin int32 `protobuf:"varint,1,opt"`
MsgResid []byte `protobuf:"bytes,2,opt"`
MsgType int32 `protobuf:"varint,3,opt"`
NeedCache int32 `protobuf:"varint,4,opt"`
}
func (x *LongMsgDownReq) GetSrcUin() int32 {
@ -203,45 +77,9 @@ func (x *LongMsgDownReq) GetNeedCache() int32 {
}
type LongMsgDownRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
MsgResid []byte `protobuf:"bytes,2,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
MsgContent []byte `protobuf:"bytes,3,opt,name=msgContent,proto3" json:"msgContent,omitempty"`
}
func (x *LongMsgDownRsp) Reset() {
*x = LongMsgDownRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_longmsg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LongMsgDownRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LongMsgDownRsp) ProtoMessage() {}
func (x *LongMsgDownRsp) ProtoReflect() protoreflect.Message {
mi := &file_longmsg_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LongMsgDownRsp.ProtoReflect.Descriptor instead.
func (*LongMsgDownRsp) Descriptor() ([]byte, []int) {
return file_longmsg_proto_rawDescGZIP(), []int{3}
Result int32 `protobuf:"varint,1,opt"`
MsgResid []byte `protobuf:"bytes,2,opt"`
MsgContent []byte `protobuf:"bytes,3,opt"`
}
func (x *LongMsgDownRsp) GetResult() int32 {
@ -266,49 +104,13 @@ func (x *LongMsgDownRsp) GetMsgContent() []byte {
}
type LongMsgUpReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgType int32 `protobuf:"varint,1,opt,name=msgType,proto3" json:"msgType,omitempty"`
DstUin int64 `protobuf:"varint,2,opt,name=dstUin,proto3" json:"dstUin,omitempty"`
MsgId int32 `protobuf:"varint,3,opt,name=msgId,proto3" json:"msgId,omitempty"`
MsgContent []byte `protobuf:"bytes,4,opt,name=msgContent,proto3" json:"msgContent,omitempty"`
StoreType int32 `protobuf:"varint,5,opt,name=storeType,proto3" json:"storeType,omitempty"`
MsgUkey []byte `protobuf:"bytes,6,opt,name=msgUkey,proto3" json:"msgUkey,omitempty"`
NeedCache int32 `protobuf:"varint,7,opt,name=needCache,proto3" json:"needCache,omitempty"`
}
func (x *LongMsgUpReq) Reset() {
*x = LongMsgUpReq{}
if protoimpl.UnsafeEnabled {
mi := &file_longmsg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LongMsgUpReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LongMsgUpReq) ProtoMessage() {}
func (x *LongMsgUpReq) ProtoReflect() protoreflect.Message {
mi := &file_longmsg_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LongMsgUpReq.ProtoReflect.Descriptor instead.
func (*LongMsgUpReq) Descriptor() ([]byte, []int) {
return file_longmsg_proto_rawDescGZIP(), []int{4}
MsgType int32 `protobuf:"varint,1,opt"`
DstUin int64 `protobuf:"varint,2,opt"`
MsgId int32 `protobuf:"varint,3,opt"`
MsgContent []byte `protobuf:"bytes,4,opt"`
StoreType int32 `protobuf:"varint,5,opt"`
MsgUkey []byte `protobuf:"bytes,6,opt"`
NeedCache int32 `protobuf:"varint,7,opt"`
}
func (x *LongMsgUpReq) GetMsgType() int32 {
@ -361,45 +163,9 @@ func (x *LongMsgUpReq) GetNeedCache() int32 {
}
type LongMsgUpRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
MsgId int32 `protobuf:"varint,2,opt,name=msgId,proto3" json:"msgId,omitempty"`
MsgResid []byte `protobuf:"bytes,3,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
}
func (x *LongMsgUpRsp) Reset() {
*x = LongMsgUpRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_longmsg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LongMsgUpRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LongMsgUpRsp) ProtoMessage() {}
func (x *LongMsgUpRsp) ProtoReflect() protoreflect.Message {
mi := &file_longmsg_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LongMsgUpRsp.ProtoReflect.Descriptor instead.
func (*LongMsgUpRsp) Descriptor() ([]byte, []int) {
return file_longmsg_proto_rawDescGZIP(), []int{5}
Result int32 `protobuf:"varint,1,opt"`
MsgId int32 `protobuf:"varint,2,opt"`
MsgResid []byte `protobuf:"bytes,3,opt"`
}
func (x *LongMsgUpRsp) GetResult() int32 {
@ -424,49 +190,13 @@ func (x *LongMsgUpRsp) GetMsgResid() []byte {
}
type LongReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subcmd int32 `protobuf:"varint,1,opt,name=subcmd,proto3" json:"subcmd,omitempty"`
TermType int32 `protobuf:"varint,2,opt,name=termType,proto3" json:"termType,omitempty"`
PlatformType int32 `protobuf:"varint,3,opt,name=platformType,proto3" json:"platformType,omitempty"`
MsgUpReq []*LongMsgUpReq `protobuf:"bytes,4,rep,name=msgUpReq,proto3" json:"msgUpReq,omitempty"`
MsgDownReq []*LongMsgDownReq `protobuf:"bytes,5,rep,name=msgDownReq,proto3" json:"msgDownReq,omitempty"`
MsgDelReq []*LongMsgDeleteReq `protobuf:"bytes,6,rep,name=msgDelReq,proto3" json:"msgDelReq,omitempty"`
AgentType int32 `protobuf:"varint,10,opt,name=agentType,proto3" json:"agentType,omitempty"`
}
func (x *LongReqBody) Reset() {
*x = LongReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_longmsg_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LongReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LongReqBody) ProtoMessage() {}
func (x *LongReqBody) ProtoReflect() protoreflect.Message {
mi := &file_longmsg_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LongReqBody.ProtoReflect.Descriptor instead.
func (*LongReqBody) Descriptor() ([]byte, []int) {
return file_longmsg_proto_rawDescGZIP(), []int{6}
Subcmd int32 `protobuf:"varint,1,opt"`
TermType int32 `protobuf:"varint,2,opt"`
PlatformType int32 `protobuf:"varint,3,opt"`
MsgUpReq []*LongMsgUpReq `protobuf:"bytes,4,rep"`
MsgDownReq []*LongMsgDownReq `protobuf:"bytes,5,rep"`
MsgDelReq []*LongMsgDeleteReq `protobuf:"bytes,6,rep"`
AgentType int32 `protobuf:"varint,10,opt"`
}
func (x *LongReqBody) GetSubcmd() int32 {
@ -519,46 +249,10 @@ func (x *LongReqBody) GetAgentType() int32 {
}
type LongRspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subcmd int32 `protobuf:"varint,1,opt,name=subcmd,proto3" json:"subcmd,omitempty"`
MsgUpRsp []*LongMsgUpRsp `protobuf:"bytes,2,rep,name=msgUpRsp,proto3" json:"msgUpRsp,omitempty"`
MsgDownRsp []*LongMsgDownRsp `protobuf:"bytes,3,rep,name=msgDownRsp,proto3" json:"msgDownRsp,omitempty"`
MsgDelRsp []*LongMsgDeleteRsp `protobuf:"bytes,4,rep,name=msgDelRsp,proto3" json:"msgDelRsp,omitempty"`
}
func (x *LongRspBody) Reset() {
*x = LongRspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_longmsg_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LongRspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LongRspBody) ProtoMessage() {}
func (x *LongRspBody) ProtoReflect() protoreflect.Message {
mi := &file_longmsg_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LongRspBody.ProtoReflect.Descriptor instead.
func (*LongRspBody) Descriptor() ([]byte, []int) {
return file_longmsg_proto_rawDescGZIP(), []int{7}
Subcmd int32 `protobuf:"varint,1,opt"`
MsgUpRsp []*LongMsgUpRsp `protobuf:"bytes,2,rep"`
MsgDownRsp []*LongMsgDownRsp `protobuf:"bytes,3,rep"`
MsgDelRsp []*LongMsgDeleteRsp `protobuf:"bytes,4,rep"`
}
func (x *LongRspBody) GetSubcmd() int32 {
@ -588,241 +282,3 @@ func (x *LongRspBody) GetMsgDelRsp() []*LongMsgDeleteRsp {
}
return nil
}
var File_longmsg_proto protoreflect.FileDescriptor
var file_longmsg_proto_rawDesc = []byte{
0x0a, 0x0d, 0x6c, 0x6f, 0x6e, 0x67, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x48, 0x0a, 0x10, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x12,
0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x22, 0x46, 0x0a, 0x10, 0x4c, 0x6f, 0x6e,
0x67, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x73, 0x70, 0x12, 0x16, 0x0a,
0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69,
0x64, 0x22, 0x7c, 0x0a, 0x0e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e,
0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x72, 0x63, 0x55, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x72, 0x63, 0x55, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d,
0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d,
0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79,
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x22,
0x64, 0x0a, 0x0e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x73,
0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67,
0x52, 0x65, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67,
0x52, 0x65, 0x73, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x43, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xcc, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73,
0x67, 0x55, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65,
0x12, 0x16, 0x0a, 0x06, 0x64, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x06, 0x64, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x49,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1e,
0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c,
0x0a, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x05, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07,
0x6d, 0x73, 0x67, 0x55, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d,
0x73, 0x67, 0x55, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x43, 0x61,
0x63, 0x68, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x43,
0x61, 0x63, 0x68, 0x65, 0x22, 0x58, 0x0a, 0x0c, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x55,
0x70, 0x52, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05,
0x6d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67,
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x22, 0x90,
0x02, 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16,
0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54, 0x79,
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54, 0x79,
0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79,
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x55, 0x70, 0x52,
0x65, 0x71, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d,
0x73, 0x67, 0x55, 0x70, 0x52, 0x65, 0x71, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x55, 0x70, 0x52, 0x65,
0x71, 0x12, 0x2f, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x18,
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44,
0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52,
0x65, 0x71, 0x12, 0x2f, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x18,
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x52, 0x09, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x6c,
0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
0x65, 0x22, 0xb2, 0x01, 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64,
0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x29, 0x0a, 0x08, 0x6d, 0x73, 0x67,
0x55, 0x70, 0x52, 0x73, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x4c, 0x6f,
0x6e, 0x67, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x52, 0x73, 0x70, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x55,
0x70, 0x52, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52,
0x73, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d,
0x73, 0x67, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x44, 0x6f,
0x77, 0x6e, 0x52, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x52,
0x73, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x4d,
0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x73, 0x70, 0x52, 0x09, 0x6d, 0x73, 0x67,
0x44, 0x65, 0x6c, 0x52, 0x73, 0x70, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x3b, 0x6c, 0x6f, 0x6e,
0x67, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_longmsg_proto_rawDescOnce sync.Once
file_longmsg_proto_rawDescData = file_longmsg_proto_rawDesc
)
func file_longmsg_proto_rawDescGZIP() []byte {
file_longmsg_proto_rawDescOnce.Do(func() {
file_longmsg_proto_rawDescData = protoimpl.X.CompressGZIP(file_longmsg_proto_rawDescData)
})
return file_longmsg_proto_rawDescData
}
var file_longmsg_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_longmsg_proto_goTypes = []interface{}{
(*LongMsgDeleteReq)(nil), // 0: LongMsgDeleteReq
(*LongMsgDeleteRsp)(nil), // 1: LongMsgDeleteRsp
(*LongMsgDownReq)(nil), // 2: LongMsgDownReq
(*LongMsgDownRsp)(nil), // 3: LongMsgDownRsp
(*LongMsgUpReq)(nil), // 4: LongMsgUpReq
(*LongMsgUpRsp)(nil), // 5: LongMsgUpRsp
(*LongReqBody)(nil), // 6: LongReqBody
(*LongRspBody)(nil), // 7: LongRspBody
}
var file_longmsg_proto_depIdxs = []int32{
4, // 0: LongReqBody.msgUpReq:type_name -> LongMsgUpReq
2, // 1: LongReqBody.msgDownReq:type_name -> LongMsgDownReq
0, // 2: LongReqBody.msgDelReq:type_name -> LongMsgDeleteReq
5, // 3: LongRspBody.msgUpRsp:type_name -> LongMsgUpRsp
3, // 4: LongRspBody.msgDownRsp:type_name -> LongMsgDownRsp
1, // 5: LongRspBody.msgDelRsp:type_name -> LongMsgDeleteRsp
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_longmsg_proto_init() }
func file_longmsg_proto_init() {
if File_longmsg_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_longmsg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LongMsgDeleteReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_longmsg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LongMsgDeleteRsp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_longmsg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LongMsgDownReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_longmsg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LongMsgDownRsp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_longmsg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LongMsgUpReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_longmsg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LongMsgUpRsp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_longmsg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LongReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_longmsg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LongRspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_longmsg_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_longmsg_proto_goTypes,
DependencyIndexes: file_longmsg_proto_depIdxs,
MessageInfos: file_longmsg_proto_msgTypes,
}.Build()
File_longmsg_proto = out.File
file_longmsg_proto_rawDesc = nil
file_longmsg_proto_goTypes = nil
file_longmsg_proto_depIdxs = nil
}

View File

@ -1,71 +1,17 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: register_proxy.proto
package msf
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type DiscussList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DiscussCode *uint64 `protobuf:"varint,1,opt,name=discussCode" json:"discussCode,omitempty"`
DiscussSeq *uint64 `protobuf:"varint,2,opt,name=discussSeq" json:"discussSeq,omitempty"`
MemberSeq *uint64 `protobuf:"varint,3,opt,name=memberSeq" json:"memberSeq,omitempty"`
InfoSeq *uint64 `protobuf:"varint,4,opt,name=infoSeq" json:"infoSeq,omitempty"`
BHotGroup *bool `protobuf:"varint,5,opt,name=bHotGroup" json:"bHotGroup,omitempty"`
RedpackTime *uint64 `protobuf:"varint,6,opt,name=redpackTime" json:"redpackTime,omitempty"`
HasMsg *bool `protobuf:"varint,7,opt,name=hasMsg" json:"hasMsg,omitempty"`
DicussFlag *int64 `protobuf:"varint,8,opt,name=dicussFlag" json:"dicussFlag,omitempty"`
}
func (x *DiscussList) Reset() {
*x = DiscussList{}
if protoimpl.UnsafeEnabled {
mi := &file_register_proxy_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DiscussList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DiscussList) ProtoMessage() {}
func (x *DiscussList) ProtoReflect() protoreflect.Message {
mi := &file_register_proxy_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DiscussList.ProtoReflect.Descriptor instead.
func (*DiscussList) Descriptor() ([]byte, []int) {
return file_register_proxy_proto_rawDescGZIP(), []int{0}
DiscussCode *uint64 `protobuf:"varint,1,opt"`
DiscussSeq *uint64 `protobuf:"varint,2,opt"`
MemberSeq *uint64 `protobuf:"varint,3,opt"`
InfoSeq *uint64 `protobuf:"varint,4,opt"`
BHotGroup *bool `protobuf:"varint,5,opt"`
RedpackTime *uint64 `protobuf:"varint,6,opt"`
HasMsg *bool `protobuf:"varint,7,opt"`
DicussFlag *int64 `protobuf:"varint,8,opt"`
}
func (x *DiscussList) GetDiscussCode() uint64 {
@ -125,54 +71,18 @@ func (x *DiscussList) GetDicussFlag() int64 {
}
type GroupList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupCode *uint64 `protobuf:"varint,1,opt,name=groupCode" json:"groupCode,omitempty"`
GroupSeq *uint64 `protobuf:"varint,2,opt,name=groupSeq" json:"groupSeq,omitempty"`
MemberSeq *uint64 `protobuf:"varint,3,opt,name=memberSeq" json:"memberSeq,omitempty"`
Mask *uint64 `protobuf:"varint,4,opt,name=mask" json:"mask,omitempty"`
RedpackTime *uint64 `protobuf:"varint,5,opt,name=redpackTime" json:"redpackTime,omitempty"`
HasMsg *bool `protobuf:"varint,6,opt,name=hasMsg" json:"hasMsg,omitempty"`
GroupFlag *int64 `protobuf:"varint,7,opt,name=groupFlag" json:"groupFlag,omitempty"`
GroupType *uint64 `protobuf:"varint,8,opt,name=groupType" json:"groupType,omitempty"`
GroupNameSeq *uint32 `protobuf:"varint,9,opt,name=groupNameSeq" json:"groupNameSeq,omitempty"`
GroupMemberSeq *uint32 `protobuf:"varint,10,opt,name=groupMemberSeq" json:"groupMemberSeq,omitempty"`
UinFlagEx2 *uint32 `protobuf:"varint,11,opt,name=uinFlagEx2" json:"uinFlagEx2,omitempty"`
ImportantMsgLatestSeq *uint32 `protobuf:"varint,12,opt,name=importantMsgLatestSeq" json:"importantMsgLatestSeq,omitempty"`
}
func (x *GroupList) Reset() {
*x = GroupList{}
if protoimpl.UnsafeEnabled {
mi := &file_register_proxy_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GroupList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GroupList) ProtoMessage() {}
func (x *GroupList) ProtoReflect() protoreflect.Message {
mi := &file_register_proxy_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GroupList.ProtoReflect.Descriptor instead.
func (*GroupList) Descriptor() ([]byte, []int) {
return file_register_proxy_proto_rawDescGZIP(), []int{1}
GroupCode *uint64 `protobuf:"varint,1,opt"`
GroupSeq *uint64 `protobuf:"varint,2,opt"`
MemberSeq *uint64 `protobuf:"varint,3,opt"`
Mask *uint64 `protobuf:"varint,4,opt"`
RedpackTime *uint64 `protobuf:"varint,5,opt"`
HasMsg *bool `protobuf:"varint,6,opt"`
GroupFlag *int64 `protobuf:"varint,7,opt"`
GroupType *uint64 `protobuf:"varint,8,opt"`
GroupNameSeq *uint32 `protobuf:"varint,9,opt"`
GroupMemberSeq *uint32 `protobuf:"varint,10,opt"`
UinFlagEx2 *uint32 `protobuf:"varint,11,opt"`
ImportantMsgLatestSeq *uint32 `protobuf:"varint,12,opt"`
}
func (x *GroupList) GetGroupCode() uint64 {
@ -260,44 +170,8 @@ func (x *GroupList) GetImportantMsgLatestSeq() uint32 {
}
type SvcPbResponsePullDisMsgProxy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MemberSeq *uint64 `protobuf:"varint,1,opt,name=memberSeq" json:"memberSeq,omitempty"`
Content []byte `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"`
}
func (x *SvcPbResponsePullDisMsgProxy) Reset() {
*x = SvcPbResponsePullDisMsgProxy{}
if protoimpl.UnsafeEnabled {
mi := &file_register_proxy_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SvcPbResponsePullDisMsgProxy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SvcPbResponsePullDisMsgProxy) ProtoMessage() {}
func (x *SvcPbResponsePullDisMsgProxy) ProtoReflect() protoreflect.Message {
mi := &file_register_proxy_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SvcPbResponsePullDisMsgProxy.ProtoReflect.Descriptor instead.
func (*SvcPbResponsePullDisMsgProxy) Descriptor() ([]byte, []int) {
return file_register_proxy_proto_rawDescGZIP(), []int{2}
MemberSeq *uint64 `protobuf:"varint,1,opt"`
Content []byte `protobuf:"bytes,2,opt"`
}
func (x *SvcPbResponsePullDisMsgProxy) GetMemberSeq() uint64 {
@ -315,54 +189,18 @@ func (x *SvcPbResponsePullDisMsgProxy) GetContent() []byte {
}
type SvcRegisterProxyMsgResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result *uint32 `protobuf:"varint,1,opt,name=result" json:"result,omitempty"`
ErrMsg []byte `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
Flag *uint32 `protobuf:"varint,3,opt,name=flag" json:"flag,omitempty"`
Seq *uint32 `protobuf:"varint,4,opt,name=seq" json:"seq,omitempty"`
Info *SvcResponseMsgInfo `protobuf:"bytes,5,opt,name=info" json:"info,omitempty"`
GroupList []*GroupList `protobuf:"bytes,6,rep,name=groupList" json:"groupList,omitempty"`
DiscussList []*DiscussList `protobuf:"bytes,7,rep,name=discussList" json:"discussList,omitempty"`
GroupMsg []*SvcResponsePbPullGroupMsgProxy `protobuf:"bytes,8,rep,name=groupMsg" json:"groupMsg,omitempty"`
DiscussMsg []*SvcPbResponsePullDisMsgProxy `protobuf:"bytes,9,rep,name=discussMsg" json:"discussMsg,omitempty"`
C2CMsg []byte `protobuf:"bytes,10,opt,name=c2CMsg" json:"c2CMsg,omitempty"`
PubAccountMsg []byte `protobuf:"bytes,11,opt,name=pubAccountMsg" json:"pubAccountMsg,omitempty"`
DiscussListFlag *uint32 `protobuf:"varint,12,opt,name=discussListFlag" json:"discussListFlag,omitempty"`
}
func (x *SvcRegisterProxyMsgResp) Reset() {
*x = SvcRegisterProxyMsgResp{}
if protoimpl.UnsafeEnabled {
mi := &file_register_proxy_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SvcRegisterProxyMsgResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SvcRegisterProxyMsgResp) ProtoMessage() {}
func (x *SvcRegisterProxyMsgResp) ProtoReflect() protoreflect.Message {
mi := &file_register_proxy_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SvcRegisterProxyMsgResp.ProtoReflect.Descriptor instead.
func (*SvcRegisterProxyMsgResp) Descriptor() ([]byte, []int) {
return file_register_proxy_proto_rawDescGZIP(), []int{3}
Result *uint32 `protobuf:"varint,1,opt"`
ErrMsg []byte `protobuf:"bytes,2,opt"`
Flag *uint32 `protobuf:"varint,3,opt"`
Seq *uint32 `protobuf:"varint,4,opt"`
Info *SvcResponseMsgInfo `protobuf:"bytes,5,opt"`
GroupList []*GroupList `protobuf:"bytes,6,rep"`
DiscussList []*DiscussList `protobuf:"bytes,7,rep"`
GroupMsg []*SvcResponsePbPullGroupMsgProxy `protobuf:"bytes,8,rep"`
DiscussMsg []*SvcPbResponsePullDisMsgProxy `protobuf:"bytes,9,rep"`
C2CMsg []byte `protobuf:"bytes,10,opt"`
PubAccountMsg []byte `protobuf:"bytes,11,opt"`
DiscussListFlag *uint32 `protobuf:"varint,12,opt"`
}
func (x *SvcRegisterProxyMsgResp) GetResult() uint32 {
@ -450,44 +288,8 @@ func (x *SvcRegisterProxyMsgResp) GetDiscussListFlag() uint32 {
}
type SvcResponseMsgInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupNum *uint32 `protobuf:"varint,1,opt,name=groupNum" json:"groupNum,omitempty"`
DiscussNum *uint32 `protobuf:"varint,2,opt,name=discussNum" json:"discussNum,omitempty"`
}
func (x *SvcResponseMsgInfo) Reset() {
*x = SvcResponseMsgInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_register_proxy_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SvcResponseMsgInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SvcResponseMsgInfo) ProtoMessage() {}
func (x *SvcResponseMsgInfo) ProtoReflect() protoreflect.Message {
mi := &file_register_proxy_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SvcResponseMsgInfo.ProtoReflect.Descriptor instead.
func (*SvcResponseMsgInfo) Descriptor() ([]byte, []int) {
return file_register_proxy_proto_rawDescGZIP(), []int{4}
GroupNum *uint32 `protobuf:"varint,1,opt"`
DiscussNum *uint32 `protobuf:"varint,2,opt"`
}
func (x *SvcResponseMsgInfo) GetGroupNum() uint32 {
@ -505,44 +307,8 @@ func (x *SvcResponseMsgInfo) GetDiscussNum() uint32 {
}
type SvcResponsePbPullGroupMsgProxy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MemberSeq *uint64 `protobuf:"varint,1,opt,name=memberSeq" json:"memberSeq,omitempty"`
Content []byte `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"`
}
func (x *SvcResponsePbPullGroupMsgProxy) Reset() {
*x = SvcResponsePbPullGroupMsgProxy{}
if protoimpl.UnsafeEnabled {
mi := &file_register_proxy_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SvcResponsePbPullGroupMsgProxy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SvcResponsePbPullGroupMsgProxy) ProtoMessage() {}
func (x *SvcResponsePbPullGroupMsgProxy) ProtoReflect() protoreflect.Message {
mi := &file_register_proxy_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SvcResponsePbPullGroupMsgProxy.ProtoReflect.Descriptor instead.
func (*SvcResponsePbPullGroupMsgProxy) Descriptor() ([]byte, []int) {
return file_register_proxy_proto_rawDescGZIP(), []int{5}
MemberSeq *uint64 `protobuf:"varint,1,opt"`
Content []byte `protobuf:"bytes,2,opt"`
}
func (x *SvcResponsePbPullGroupMsgProxy) GetMemberSeq() uint64 {
@ -558,231 +324,3 @@ func (x *SvcResponsePbPullGroupMsgProxy) GetContent() []byte {
}
return nil
}
var File_register_proxy_proto protoreflect.FileDescriptor
var file_register_proxy_proto_rawDesc = []byte{
0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x63, 0x75,
0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73,
0x73, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x64, 0x69, 0x73,
0x63, 0x75, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x63,
0x75, 0x73, 0x73, 0x53, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69,
0x73, 0x63, 0x75, 0x73, 0x73, 0x53, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62,
0x65, 0x72, 0x53, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x65, 0x6d,
0x62, 0x65, 0x72, 0x53, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x53, 0x65,
0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x71,
0x12, 0x1c, 0x0a, 0x09, 0x62, 0x48, 0x6f, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20,
0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x48, 0x6f, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20,
0x0a, 0x0b, 0x72, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65,
0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x4d, 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08,
0x52, 0x06, 0x68, 0x61, 0x73, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x63, 0x75,
0x73, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x69,
0x63, 0x75, 0x73, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x8f, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43,
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x71,
0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x71,
0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x65, 0x71, 0x18, 0x03, 0x20,
0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x65, 0x71, 0x12, 0x12,
0x0a, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x6d, 0x61,
0x73, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x69, 0x6d,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x4d, 0x73, 0x67, 0x18, 0x06,
0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x71, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x65, 0x71, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65,
0x72, 0x53, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x69, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x45,
0x78, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x75, 0x69, 0x6e, 0x46, 0x6c, 0x61,
0x67, 0x45, 0x78, 0x32, 0x12, 0x34, 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e,
0x74, 0x4d, 0x73, 0x67, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x65, 0x71, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x15, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x4d, 0x73,
0x67, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x65, 0x71, 0x22, 0x56, 0x0a, 0x1c, 0x53, 0x76,
0x63, 0x50, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x44,
0x69, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65,
0x6d, 0x62, 0x65, 0x72, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d,
0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x22, 0xd6, 0x03, 0x0a, 0x17, 0x53, 0x76, 0x63, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16,
0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06,
0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x12,
0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x66, 0x6c,
0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x03, 0x73, 0x65, 0x71, 0x12, 0x27, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x53, 0x76, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a,
0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0a, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x09, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x63, 0x75,
0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44,
0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x63,
0x75, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x4d, 0x73, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x53, 0x76, 0x63, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x62, 0x50, 0x75, 0x6c, 0x6c, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x4d, 0x73, 0x67, 0x12, 0x3d, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x4d,
0x73, 0x67, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x53, 0x76, 0x63, 0x50, 0x62,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x4d,
0x73, 0x67, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73,
0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x32, 0x43, 0x4d, 0x73, 0x67, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x32, 0x43, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x70,
0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x73,
0x67, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74,
0x46, 0x6c, 0x61, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x63,
0x75, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x50, 0x0a, 0x12, 0x53,
0x76, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x12, 0x1e, 0x0a,
0x0a, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x4e, 0x75, 0x6d, 0x22, 0x58, 0x0a,
0x1e, 0x53, 0x76, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x62, 0x50, 0x75,
0x6c, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12,
0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01,
0x28, 0x04, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x65, 0x71, 0x12, 0x18, 0x0a,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x3b, 0x6d, 0x73,
0x66,
}
var (
file_register_proxy_proto_rawDescOnce sync.Once
file_register_proxy_proto_rawDescData = file_register_proxy_proto_rawDesc
)
func file_register_proxy_proto_rawDescGZIP() []byte {
file_register_proxy_proto_rawDescOnce.Do(func() {
file_register_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_register_proxy_proto_rawDescData)
})
return file_register_proxy_proto_rawDescData
}
var file_register_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_register_proxy_proto_goTypes = []interface{}{
(*DiscussList)(nil), // 0: DiscussList
(*GroupList)(nil), // 1: GroupList
(*SvcPbResponsePullDisMsgProxy)(nil), // 2: SvcPbResponsePullDisMsgProxy
(*SvcRegisterProxyMsgResp)(nil), // 3: SvcRegisterProxyMsgResp
(*SvcResponseMsgInfo)(nil), // 4: SvcResponseMsgInfo
(*SvcResponsePbPullGroupMsgProxy)(nil), // 5: SvcResponsePbPullGroupMsgProxy
}
var file_register_proxy_proto_depIdxs = []int32{
4, // 0: SvcRegisterProxyMsgResp.info:type_name -> SvcResponseMsgInfo
1, // 1: SvcRegisterProxyMsgResp.groupList:type_name -> GroupList
0, // 2: SvcRegisterProxyMsgResp.discussList:type_name -> DiscussList
5, // 3: SvcRegisterProxyMsgResp.groupMsg:type_name -> SvcResponsePbPullGroupMsgProxy
2, // 4: SvcRegisterProxyMsgResp.discussMsg:type_name -> SvcPbResponsePullDisMsgProxy
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_register_proxy_proto_init() }
func file_register_proxy_proto_init() {
if File_register_proxy_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_register_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiscussList); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_register_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GroupList); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_register_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SvcPbResponsePullDisMsgProxy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_register_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SvcRegisterProxyMsgResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_register_proxy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SvcResponseMsgInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_register_proxy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SvcResponsePbPullGroupMsgProxy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_register_proxy_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_register_proxy_proto_goTypes,
DependencyIndexes: file_register_proxy_proto_depIdxs,
MessageInfos: file_register_proxy_proto_msgTypes,
}.Build()
File_register_proxy_proto = out.File
file_register_proxy_proto_rawDesc = nil
file_register_proxy_proto_goTypes = nil
file_register_proxy_proto_depIdxs = nil
}

View File

@ -0,0 +1,117 @@
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: TextMsgExt.proto
package msg
type ExtChannelInfo struct {
GuildId *uint64 `protobuf:"varint,1,opt"`
ChannelId *uint64 `protobuf:"varint,2,opt"`
}
func (x *ExtChannelInfo) GetGuildId() uint64 {
if x != nil && x.GuildId != nil {
return *x.GuildId
}
return 0
}
func (x *ExtChannelInfo) GetChannelId() uint64 {
if x != nil && x.ChannelId != nil {
return *x.ChannelId
}
return 0
}
type TextResvAttr struct {
Wording []byte `protobuf:"bytes,1,opt"`
TextAnalysisResult *uint32 `protobuf:"varint,2,opt"`
AtType *uint32 `protobuf:"varint,3,opt"`
AtMemberUin *uint64 `protobuf:"varint,4,opt"`
AtMemberTinyid *uint64 `protobuf:"varint,5,opt"`
AtMemberRoleInfo *ExtRoleInfo `protobuf:"bytes,6,opt"`
AtRoleInfo *ExtRoleInfo `protobuf:"bytes,7,opt"`
AtChannelInfo *ExtChannelInfo `protobuf:"bytes,8,opt"`
}
func (x *TextResvAttr) GetWording() []byte {
if x != nil {
return x.Wording
}
return nil
}
func (x *TextResvAttr) GetTextAnalysisResult() uint32 {
if x != nil && x.TextAnalysisResult != nil {
return *x.TextAnalysisResult
}
return 0
}
func (x *TextResvAttr) GetAtType() uint32 {
if x != nil && x.AtType != nil {
return *x.AtType
}
return 0
}
func (x *TextResvAttr) GetAtMemberUin() uint64 {
if x != nil && x.AtMemberUin != nil {
return *x.AtMemberUin
}
return 0
}
func (x *TextResvAttr) GetAtMemberTinyid() uint64 {
if x != nil && x.AtMemberTinyid != nil {
return *x.AtMemberTinyid
}
return 0
}
func (x *TextResvAttr) GetAtMemberRoleInfo() *ExtRoleInfo {
if x != nil {
return x.AtMemberRoleInfo
}
return nil
}
func (x *TextResvAttr) GetAtRoleInfo() *ExtRoleInfo {
if x != nil {
return x.AtRoleInfo
}
return nil
}
func (x *TextResvAttr) GetAtChannelInfo() *ExtChannelInfo {
if x != nil {
return x.AtChannelInfo
}
return nil
}
type ExtRoleInfo struct {
Id *uint64 `protobuf:"varint,1,opt"`
Info []byte `protobuf:"bytes,2,opt"`
Flag *uint32 `protobuf:"varint,3,opt"`
}
func (x *ExtRoleInfo) GetId() uint64 {
if x != nil && x.Id != nil {
return *x.Id
}
return 0
}
func (x *ExtRoleInfo) GetInfo() []byte {
if x != nil {
return x.Info
}
return nil
}
func (x *ExtRoleInfo) GetFlag() uint32 {
if x != nil && x.Flag != nil {
return *x.Flag
}
return 0
}

View File

@ -0,0 +1,25 @@
syntax = "proto2";
option go_package = "./;msg";
message ExtChannelInfo {
optional uint64 guildId = 1;
optional uint64 channelId = 2;
}
message TextResvAttr {
optional bytes wording = 1;
optional uint32 textAnalysisResult = 2;
optional uint32 atType = 3;
optional uint64 atMemberUin = 4;
optional uint64 atMemberTinyid = 5;
optional ExtRoleInfo atMemberRoleInfo = 6;
optional ExtRoleInfo atRoleInfo = 7;
optional ExtChannelInfo atChannelInfo = 8;
}
message ExtRoleInfo {
optional uint64 id = 1;
optional bytes info = 2;
optional uint32 flag = 3;
}

View File

@ -1,13 +1,8 @@
// Code generated by yaprotoc. DO NOT EDIT.
// source: msg/head.proto
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: head.proto
package msg
import (
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
)
type C2CHead struct {
ToUin *uint64 `protobuf:"varint,1,opt"`
FromUin *uint64 `protobuf:"varint,2,opt"`
@ -50,6 +45,27 @@ func (x *C2CHead) GetCcCmd() uint32 {
return 0
}
func (x *C2CHead) GetAuthPicSig() []byte {
if x != nil {
return x.AuthPicSig
}
return nil
}
func (x *C2CHead) GetAuthSig() []byte {
if x != nil {
return x.AuthSig
}
return nil
}
func (x *C2CHead) GetAuthBuf() []byte {
if x != nil {
return x.AuthBuf
}
return nil
}
func (x *C2CHead) GetServerTime() uint32 {
if x != nil && x.ServerTime != nil {
return *x.ServerTime
@ -78,13 +94,6 @@ func (x *C2CHead) GetPhoneNumber() string {
return ""
}
func (x *C2CHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type CSHead struct {
Uin *uint64 `protobuf:"varint,1,opt"`
Command *uint32 `protobuf:"varint,2,opt"`
@ -280,13 +289,6 @@ func (x *CSHead) GetIdcId() uint32 {
return 0
}
func (x *CSHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type DeltaHead struct {
TotalLen *uint64 `protobuf:"varint,1,opt"`
Offset *uint64 `protobuf:"varint,2,opt"`
@ -318,6 +320,20 @@ func (x *DeltaHead) GetAckOffset() uint64 {
return 0
}
func (x *DeltaHead) GetCookie() []byte {
if x != nil {
return x.Cookie
}
return nil
}
func (x *DeltaHead) GetAckCookie() []byte {
if x != nil {
return x.AckCookie
}
return nil
}
func (x *DeltaHead) GetResult() uint32 {
if x != nil && x.Result != nil {
return *x.Result
@ -332,11 +348,71 @@ func (x *DeltaHead) GetFlags() uint32 {
return 0
}
func (x *DeltaHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
type IMHead struct {
HeadType *uint32 `protobuf:"varint,1,opt"`
CsHead *CSHead `protobuf:"bytes,2,opt"`
S2CHead *S2CHead `protobuf:"bytes,3,opt"`
HttpconnHead *HttpConnHead `protobuf:"bytes,4,opt"`
PaintFlag *uint32 `protobuf:"varint,5,opt"`
LoginSig *LoginSig `protobuf:"bytes,6,opt"`
DeltaHead *DeltaHead `protobuf:"bytes,7,opt"`
C2CHead *C2CHead `protobuf:"bytes,8,opt"`
}
func (x *IMHead) GetHeadType() uint32 {
if x != nil && x.HeadType != nil {
return *x.HeadType
}
return proto.Marshal(x)
return 0
}
func (x *IMHead) GetCsHead() *CSHead {
if x != nil {
return x.CsHead
}
return nil
}
func (x *IMHead) GetS2CHead() *S2CHead {
if x != nil {
return x.S2CHead
}
return nil
}
func (x *IMHead) GetHttpconnHead() *HttpConnHead {
if x != nil {
return x.HttpconnHead
}
return nil
}
func (x *IMHead) GetPaintFlag() uint32 {
if x != nil && x.PaintFlag != nil {
return *x.PaintFlag
}
return 0
}
func (x *IMHead) GetLoginSig() *LoginSig {
if x != nil {
return x.LoginSig
}
return nil
}
func (x *IMHead) GetDeltaHead() *DeltaHead {
if x != nil {
return x.DeltaHead
}
return nil
}
func (x *IMHead) GetC2CHead() *C2CHead {
if x != nil {
return x.C2CHead
}
return nil
}
type HttpConnHead struct {
@ -486,6 +562,13 @@ func (x *HttpConnHead) GetFlag() uint32 {
return 0
}
func (x *HttpConnHead) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *HttpConnHead) GetCompressType() uint32 {
if x != nil && x.CompressType != nil {
return *x.CompressType
@ -507,6 +590,13 @@ func (x *HttpConnHead) GetErrorCode() uint32 {
return 0
}
func (x *HttpConnHead) GetRedirect() *RedirectMsg {
if x != nil {
return x.Redirect
}
return nil
}
func (x *HttpConnHead) GetCommandId() uint32 {
if x != nil && x.CommandId != nil {
return *x.CommandId
@ -521,43 +611,11 @@ func (x *HttpConnHead) GetServiceCmdid() uint32 {
return 0
}
func (x *HttpConnHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *HttpConnHead) GetOidbhead() *TransOidbHead {
if x != nil {
return x.Oidbhead
}
return proto.Marshal(x)
}
type IMHead struct {
HeadType *uint32 `protobuf:"varint,1,opt"`
CsHead *CSHead `protobuf:"bytes,2,opt"`
S2CHead *S2CHead `protobuf:"bytes,3,opt"`
HttpconnHead *HttpConnHead `protobuf:"bytes,4,opt"`
PaintFlag *uint32 `protobuf:"varint,5,opt"`
LoginSig *LoginSig `protobuf:"bytes,6,opt"`
DeltaHead *DeltaHead `protobuf:"bytes,7,opt"`
C2CHead *C2CHead `protobuf:"bytes,8,opt"`
}
func (x *IMHead) GetHeadType() uint32 {
if x != nil && x.HeadType != nil {
return *x.HeadType
}
return 0
}
func (x *IMHead) GetPaintFlag() uint32 {
if x != nil && x.PaintFlag != nil {
return *x.PaintFlag
}
return 0
}
func (x *IMHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
return nil
}
type LoginSig struct {
@ -572,11 +630,11 @@ func (x *LoginSig) GetType() uint32 {
return 0
}
func (x *LoginSig) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *LoginSig) GetSig() []byte {
if x != nil {
return x.Sig
}
return proto.Marshal(x)
return nil
}
type RedirectMsg struct {
@ -622,13 +680,6 @@ func (x *RedirectMsg) GetRedirectCount() uint32 {
return 0
}
func (x *RedirectMsg) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type S2CHead struct {
SubMsgtype *uint32 `protobuf:"varint,1,opt"`
MsgType *uint32 `protobuf:"varint,2,opt"`
@ -688,13 +739,6 @@ func (x *S2CHead) GetToUin() uint64 {
return 0
}
func (x *S2CHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type TransOidbHead struct {
Command *uint32 `protobuf:"varint,1,opt"`
ServiceType *uint32 `protobuf:"varint,2,opt"`
@ -729,10 +773,3 @@ func (x *TransOidbHead) GetErrorMsg() string {
}
return ""
}
func (x *TransOidbHead) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}

View File

@ -1,6 +1,5 @@
syntax = "proto2";
option go_package = "msg;msg";
option go_package = "./;msg";
message C2CHead {
optional uint64 toUin = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto2";
package msg;
option go_package = "msg;msg";
option go_package = "pb/msg;msg";
message GetMessageRequest {
optional SyncFlag syncFlag = 1;
@ -379,14 +379,14 @@ message Text {
}
message Attr {
optional sint32 codePage = 1;
optional uint32 time = 2;
optional uint32 random = 3;
optional uint32 color = 4;
optional uint32 size = 5;
optional uint32 effect = 6;
optional uint32 charSet = 7;
optional uint32 pitchAndFamily = 8;
optional int32 codePage = 1;
optional int32 time = 2;
optional int32 random = 3;
optional int32 color = 4;
optional int32 size = 5;
optional int32 effect = 6;
optional int32 charSet = 7;
optional int32 pitchAndFamily = 8;
optional string fontName = 9;
optional bytes reserveData = 10;
}
@ -855,3 +855,15 @@ message PbPushMsg {
optional uint32 generalFlag = 9;
optional uint64 bindUin = 10;
}
message MsgElemInfo_servtype37 {
optional bytes packid = 1;
optional bytes stickerid = 2;
optional uint32 qsid = 3;
optional uint32 sourcetype = 4;
optional uint32 stickertype = 5;
optional bytes resultid = 6;
optional bytes text = 7;
optional bytes surpriseid = 8;
optional uint32 randomtype = 9;
}

168
client/pb/msg/objmsg.pb.go Normal file
View File

@ -0,0 +1,168 @@
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: objmsg.proto
package msg
type MsgPic struct {
SmallPicUrl []byte `protobuf:"bytes,1,opt"`
OriginalPicUrl []byte `protobuf:"bytes,2,opt"`
LocalPicId int32 `protobuf:"varint,3,opt"`
}
func (x *MsgPic) GetSmallPicUrl() []byte {
if x != nil {
return x.SmallPicUrl
}
return nil
}
func (x *MsgPic) GetOriginalPicUrl() []byte {
if x != nil {
return x.OriginalPicUrl
}
return nil
}
func (x *MsgPic) GetLocalPicId() int32 {
if x != nil {
return x.LocalPicId
}
return 0
}
type ObjMsg struct {
MsgType int32 `protobuf:"varint,1,opt"`
Title []byte `protobuf:"bytes,2,opt"`
BytesAbstact []byte `protobuf:"bytes,3,opt"`
TitleExt []byte `protobuf:"bytes,5,opt"`
MsgPic []*MsgPic `protobuf:"bytes,6,rep"`
MsgContentInfo []*MsgContentInfo `protobuf:"bytes,7,rep"`
ReportIdShow int32 `protobuf:"varint,8,opt"`
}
func (x *ObjMsg) GetMsgType() int32 {
if x != nil {
return x.MsgType
}
return 0
}
func (x *ObjMsg) GetTitle() []byte {
if x != nil {
return x.Title
}
return nil
}
func (x *ObjMsg) GetBytesAbstact() []byte {
if x != nil {
return x.BytesAbstact
}
return nil
}
func (x *ObjMsg) GetTitleExt() []byte {
if x != nil {
return x.TitleExt
}
return nil
}
func (x *ObjMsg) GetMsgPic() []*MsgPic {
if x != nil {
return x.MsgPic
}
return nil
}
func (x *ObjMsg) GetMsgContentInfo() []*MsgContentInfo {
if x != nil {
return x.MsgContentInfo
}
return nil
}
func (x *ObjMsg) GetReportIdShow() int32 {
if x != nil {
return x.ReportIdShow
}
return 0
}
type MsgContentInfo struct {
ContentInfoId []byte `protobuf:"bytes,1,opt"`
MsgFile *MsgFile `protobuf:"bytes,2,opt"`
}
func (x *MsgContentInfo) GetContentInfoId() []byte {
if x != nil {
return x.ContentInfoId
}
return nil
}
func (x *MsgContentInfo) GetMsgFile() *MsgFile {
if x != nil {
return x.MsgFile
}
return nil
}
type MsgFile struct {
BusId int32 `protobuf:"varint,1,opt"`
FilePath []byte `protobuf:"bytes,2,opt"`
FileSize int64 `protobuf:"varint,3,opt"`
FileName string `protobuf:"bytes,4,opt"`
Int64DeadTime int64 `protobuf:"varint,5,opt"`
FileSha1 []byte `protobuf:"bytes,6,opt"`
Ext []byte `protobuf:"bytes,7,opt"`
}
func (x *MsgFile) GetBusId() int32 {
if x != nil {
return x.BusId
}
return 0
}
func (x *MsgFile) GetFilePath() []byte {
if x != nil {
return x.FilePath
}
return nil
}
func (x *MsgFile) GetFileSize() int64 {
if x != nil {
return x.FileSize
}
return 0
}
func (x *MsgFile) GetFileName() string {
if x != nil {
return x.FileName
}
return ""
}
func (x *MsgFile) GetInt64DeadTime() int64 {
if x != nil {
return x.Int64DeadTime
}
return 0
}
func (x *MsgFile) GetFileSha1() []byte {
if x != nil {
return x.FileSha1
}
return nil
}
func (x *MsgFile) GetExt() []byte {
if x != nil {
return x.Ext
}
return nil
}

View File

@ -1,13 +1,12 @@
syntax = "proto3";
option go_package = "msg;msg";
option go_package = "./;msg";
message MsgPic {
bytes smallPicUrl = 1;
bytes originalPicUrl = 2;
int32 localPicId = 3;
}
message ObjMsg {
int32 msgType = 1;
bytes title = 2;
@ -17,12 +16,10 @@ message ObjMsg {
repeated MsgContentInfo msgContentInfo = 7;
int32 reportIdShow = 8;
}
message MsgContentInfo {
bytes contentInfoId = 1;
MsgFile msgFile = 2;
}
message MsgFile {
int32 busId = 1;
bytes filePath = 2;

View File

@ -1,126 +1,60 @@
// Code generated by yaprotoc. DO NOT EDIT.
// source: msg/report.proto
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: report.proto
package msg
import (
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
)
type PbC2CReadedReportReq struct {
SyncCookie []byte `protobuf:"bytes,1,opt"`
PairInfo []*UinPairReadInfo `protobuf:"bytes,2,rep"`
type PbMsgReadedReportReq struct {
GrpReadReport []*PbGroupReadedReportReq `protobuf:"bytes,1,rep"`
DisReadReport []*PbDiscussReadedReportReq `protobuf:"bytes,2,rep"`
C2CReadReport *PbC2CReadedReportReq `protobuf:"bytes,3,opt"` //optional PbBindUinMsgReadedConfirmReq bindUinReadReport = 4;
}
func (x *PbC2CReadedReportReq) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
func (x *PbMsgReadedReportReq) GetGrpReadReport() []*PbGroupReadedReportReq {
if x != nil {
return x.GrpReadReport
}
return proto.Marshal(x)
return nil
}
type PbC2CReadedReportResp struct {
Result *uint32 `protobuf:"varint,1,opt"`
Errmsg *string `protobuf:"bytes,2,opt"`
SyncCookie []byte `protobuf:"bytes,3,opt"`
}
func (x *PbC2CReadedReportResp) GetResult() uint32 {
if x != nil && x.Result != nil {
return *x.Result
func (x *PbMsgReadedReportReq) GetDisReadReport() []*PbDiscussReadedReportReq {
if x != nil {
return x.DisReadReport
}
return 0
return nil
}
func (x *PbC2CReadedReportResp) GetErrmsg() string {
if x != nil && x.Errmsg != nil {
return *x.Errmsg
func (x *PbMsgReadedReportReq) GetC2CReadReport() *PbC2CReadedReportReq {
if x != nil {
return x.C2CReadReport
}
return ""
return nil
}
func (x *PbC2CReadedReportResp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
type PbMsgReadedReportResp struct {
GrpReadReport []*PbGroupReadedReportResp `protobuf:"bytes,1,rep"`
DisReadReport []*PbDiscussReadedReportResp `protobuf:"bytes,2,rep"`
C2CReadReport *PbC2CReadedReportResp `protobuf:"bytes,3,opt"` //optional PbBindUinMsgReadedConfirmResp bindUinReadReport = 4;
}
func (x *PbMsgReadedReportResp) GetGrpReadReport() []*PbGroupReadedReportResp {
if x != nil {
return x.GrpReadReport
}
return proto.Marshal(x)
return nil
}
type PbDiscussReadedReportReq struct {
ConfUin *uint64 `protobuf:"varint,1,opt"`
LastReadSeq *uint64 `protobuf:"varint,2,opt"`
}
func (x *PbDiscussReadedReportReq) GetConfUin() uint64 {
if x != nil && x.ConfUin != nil {
return *x.ConfUin
func (x *PbMsgReadedReportResp) GetDisReadReport() []*PbDiscussReadedReportResp {
if x != nil {
return x.DisReadReport
}
return 0
return nil
}
func (x *PbDiscussReadedReportReq) GetLastReadSeq() uint64 {
if x != nil && x.LastReadSeq != nil {
return *x.LastReadSeq
func (x *PbMsgReadedReportResp) GetC2CReadReport() *PbC2CReadedReportResp {
if x != nil {
return x.C2CReadReport
}
return 0
}
func (x *PbDiscussReadedReportReq) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type PbDiscussReadedReportResp struct {
Result *uint32 `protobuf:"varint,1,opt"`
Errmsg *string `protobuf:"bytes,2,opt"`
ConfUin *uint64 `protobuf:"varint,3,opt"`
MemberSeq *uint64 `protobuf:"varint,4,opt"`
ConfSeq *uint64 `protobuf:"varint,5,opt"`
}
func (x *PbDiscussReadedReportResp) GetResult() uint32 {
if x != nil && x.Result != nil {
return *x.Result
}
return 0
}
func (x *PbDiscussReadedReportResp) GetErrmsg() string {
if x != nil && x.Errmsg != nil {
return *x.Errmsg
}
return ""
}
func (x *PbDiscussReadedReportResp) GetConfUin() uint64 {
if x != nil && x.ConfUin != nil {
return *x.ConfUin
}
return 0
}
func (x *PbDiscussReadedReportResp) GetMemberSeq() uint64 {
if x != nil && x.MemberSeq != nil {
return *x.MemberSeq
}
return 0
}
func (x *PbDiscussReadedReportResp) GetConfSeq() uint64 {
if x != nil && x.ConfSeq != nil {
return *x.ConfSeq
}
return 0
}
func (x *PbDiscussReadedReportResp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
return nil
}
type PbGroupReadedReportReq struct {
@ -142,11 +76,109 @@ func (x *PbGroupReadedReportReq) GetLastReadSeq() uint64 {
return 0
}
func (x *PbGroupReadedReportReq) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
type PbDiscussReadedReportReq struct {
ConfUin *uint64 `protobuf:"varint,1,opt"`
LastReadSeq *uint64 `protobuf:"varint,2,opt"`
}
func (x *PbDiscussReadedReportReq) GetConfUin() uint64 {
if x != nil && x.ConfUin != nil {
return *x.ConfUin
}
return proto.Marshal(x)
return 0
}
func (x *PbDiscussReadedReportReq) GetLastReadSeq() uint64 {
if x != nil && x.LastReadSeq != nil {
return *x.LastReadSeq
}
return 0
}
type PbC2CReadedReportReq struct {
SyncCookie []byte `protobuf:"bytes,1,opt"`
PairInfo []*UinPairReadInfo `protobuf:"bytes,2,rep"`
}
func (x *PbC2CReadedReportReq) GetSyncCookie() []byte {
if x != nil {
return x.SyncCookie
}
return nil
}
func (x *PbC2CReadedReportReq) GetPairInfo() []*UinPairReadInfo {
if x != nil {
return x.PairInfo
}
return nil
}
type UinPairReadInfo struct {
PeerUin *uint64 `protobuf:"varint,1,opt"`
LastReadTime *uint32 `protobuf:"varint,2,opt"`
CrmSig []byte `protobuf:"bytes,3,opt"`
PeerType *uint32 `protobuf:"varint,4,opt"`
ChatType *uint32 `protobuf:"varint,5,opt"`
Cpid *uint64 `protobuf:"varint,6,opt"`
AioType *uint32 `protobuf:"varint,7,opt"`
ToTinyId *uint64 `protobuf:"varint,9,opt"`
}
func (x *UinPairReadInfo) GetPeerUin() uint64 {
if x != nil && x.PeerUin != nil {
return *x.PeerUin
}
return 0
}
func (x *UinPairReadInfo) GetLastReadTime() uint32 {
if x != nil && x.LastReadTime != nil {
return *x.LastReadTime
}
return 0
}
func (x *UinPairReadInfo) GetCrmSig() []byte {
if x != nil {
return x.CrmSig
}
return nil
}
func (x *UinPairReadInfo) GetPeerType() uint32 {
if x != nil && x.PeerType != nil {
return *x.PeerType
}
return 0
}
func (x *UinPairReadInfo) GetChatType() uint32 {
if x != nil && x.ChatType != nil {
return *x.ChatType
}
return 0
}
func (x *UinPairReadInfo) GetCpid() uint64 {
if x != nil && x.Cpid != nil {
return *x.Cpid
}
return 0
}
func (x *UinPairReadInfo) GetAioType() uint32 {
if x != nil && x.AioType != nil {
return *x.AioType
}
return 0
}
func (x *UinPairReadInfo) GetToTinyId() uint64 {
if x != nil && x.ToTinyId != nil {
return *x.ToTinyId
}
return 0
}
type PbGroupReadedReportResp struct {
@ -192,102 +224,72 @@ func (x *PbGroupReadedReportResp) GetGroupMsgSeq() uint64 {
return 0
}
func (x *PbGroupReadedReportResp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
type PbDiscussReadedReportResp struct {
Result *uint32 `protobuf:"varint,1,opt"`
Errmsg *string `protobuf:"bytes,2,opt"`
ConfUin *uint64 `protobuf:"varint,3,opt"`
MemberSeq *uint64 `protobuf:"varint,4,opt"`
ConfSeq *uint64 `protobuf:"varint,5,opt"`
}
type PbMsgReadedReportReq struct {
GrpReadReport []*PbGroupReadedReportReq `protobuf:"bytes,1,rep"`
DisReadReport []*PbDiscussReadedReportReq `protobuf:"bytes,2,rep"`
C2CReadReport *PbC2CReadedReportReq `protobuf:"bytes,3,opt"`
}
func (x *PbMsgReadedReportReq) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type PbMsgReadedReportResp struct {
GrpReadReport []*PbGroupReadedReportResp `protobuf:"bytes,1,rep"`
DisReadReport []*PbDiscussReadedReportResp `protobuf:"bytes,2,rep"`
C2CReadReport *PbC2CReadedReportResp `protobuf:"bytes,3,opt"`
}
func (x *PbMsgReadedReportResp) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type UinPairReadInfo struct {
PeerUin *uint64 `protobuf:"varint,1,opt"`
LastReadTime *uint32 `protobuf:"varint,2,opt"`
CrmSig []byte `protobuf:"bytes,3,opt"`
PeerType *uint32 `protobuf:"varint,4,opt"`
ChatType *uint32 `protobuf:"varint,5,opt"`
Cpid *uint64 `protobuf:"varint,6,opt"`
AioType *uint32 `protobuf:"varint,7,opt"`
ToTinyId *uint64 `protobuf:"varint,9,opt"`
}
func (x *UinPairReadInfo) GetPeerUin() uint64 {
if x != nil && x.PeerUin != nil {
return *x.PeerUin
func (x *PbDiscussReadedReportResp) GetResult() uint32 {
if x != nil && x.Result != nil {
return *x.Result
}
return 0
}
func (x *UinPairReadInfo) GetLastReadTime() uint32 {
if x != nil && x.LastReadTime != nil {
return *x.LastReadTime
func (x *PbDiscussReadedReportResp) GetErrmsg() string {
if x != nil && x.Errmsg != nil {
return *x.Errmsg
}
return ""
}
func (x *PbDiscussReadedReportResp) GetConfUin() uint64 {
if x != nil && x.ConfUin != nil {
return *x.ConfUin
}
return 0
}
func (x *UinPairReadInfo) GetPeerType() uint32 {
if x != nil && x.PeerType != nil {
return *x.PeerType
func (x *PbDiscussReadedReportResp) GetMemberSeq() uint64 {
if x != nil && x.MemberSeq != nil {
return *x.MemberSeq
}
return 0
}
func (x *UinPairReadInfo) GetChatType() uint32 {
if x != nil && x.ChatType != nil {
return *x.ChatType
func (x *PbDiscussReadedReportResp) GetConfSeq() uint64 {
if x != nil && x.ConfSeq != nil {
return *x.ConfSeq
}
return 0
}
func (x *UinPairReadInfo) GetCpid() uint64 {
if x != nil && x.Cpid != nil {
return *x.Cpid
type PbC2CReadedReportResp struct {
Result *uint32 `protobuf:"varint,1,opt"`
Errmsg *string `protobuf:"bytes,2,opt"`
SyncCookie []byte `protobuf:"bytes,3,opt"`
}
func (x *PbC2CReadedReportResp) GetResult() uint32 {
if x != nil && x.Result != nil {
return *x.Result
}
return 0
}
func (x *UinPairReadInfo) GetAioType() uint32 {
if x != nil && x.AioType != nil {
return *x.AioType
func (x *PbC2CReadedReportResp) GetErrmsg() string {
if x != nil && x.Errmsg != nil {
return *x.Errmsg
}
return 0
return ""
}
func (x *UinPairReadInfo) GetToTinyId() uint64 {
if x != nil && x.ToTinyId != nil {
return *x.ToTinyId
func (x *PbC2CReadedReportResp) GetSyncCookie() []byte {
if x != nil {
return x.SyncCookie
}
return 0
}
func (x *UinPairReadInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
return nil
}

View File

@ -1,6 +1,6 @@
syntax = "proto2";
option go_package = "msg;msg";
option go_package = "./;msg";
message PbMsgReadedReportReq {
repeated PbGroupReadedReportReq grpReadReport = 1;

File diff suppressed because it is too large Load Diff

View File

@ -1,64 +1,10 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: multimsg.proto
package multimsg
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ExternMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChannelType int32 `protobuf:"varint,1,opt,name=channelType,proto3" json:"channelType,omitempty"`
}
func (x *ExternMsg) Reset() {
*x = ExternMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_multimsg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExternMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExternMsg) ProtoMessage() {}
func (x *ExternMsg) ProtoReflect() protoreflect.Message {
mi := &file_multimsg_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExternMsg.ProtoReflect.Descriptor instead.
func (*ExternMsg) Descriptor() ([]byte, []int) {
return file_multimsg_proto_rawDescGZIP(), []int{0}
ChannelType int32 `protobuf:"varint,1,opt"`
}
func (x *ExternMsg) GetChannelType() int32 {
@ -69,45 +15,9 @@ func (x *ExternMsg) GetChannelType() int32 {
}
type MultiMsgApplyDownReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgResid []byte `protobuf:"bytes,1,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
MsgType int32 `protobuf:"varint,2,opt,name=msgType,proto3" json:"msgType,omitempty"`
SrcUin int64 `protobuf:"varint,3,opt,name=srcUin,proto3" json:"srcUin,omitempty"`
}
func (x *MultiMsgApplyDownReq) Reset() {
*x = MultiMsgApplyDownReq{}
if protoimpl.UnsafeEnabled {
mi := &file_multimsg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiMsgApplyDownReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiMsgApplyDownReq) ProtoMessage() {}
func (x *MultiMsgApplyDownReq) ProtoReflect() protoreflect.Message {
mi := &file_multimsg_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MultiMsgApplyDownReq.ProtoReflect.Descriptor instead.
func (*MultiMsgApplyDownReq) Descriptor() ([]byte, []int) {
return file_multimsg_proto_rawDescGZIP(), []int{1}
MsgResid []byte `protobuf:"bytes,1,opt"`
MsgType int32 `protobuf:"varint,2,opt"`
SrcUin int64 `protobuf:"varint,3,opt"`
}
func (x *MultiMsgApplyDownReq) GetMsgResid() []byte {
@ -132,51 +42,15 @@ func (x *MultiMsgApplyDownReq) GetSrcUin() int64 {
}
type MultiMsgApplyDownRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
ThumbDownPara []byte `protobuf:"bytes,2,opt,name=thumbDownPara,proto3" json:"thumbDownPara,omitempty"`
MsgKey []byte `protobuf:"bytes,3,opt,name=msgKey,proto3" json:"msgKey,omitempty"`
Uint32DownIp []int32 `protobuf:"varint,4,rep,packed,name=uint32DownIp,proto3" json:"uint32DownIp,omitempty"`
Uint32DownPort []int32 `protobuf:"varint,5,rep,packed,name=uint32DownPort,proto3" json:"uint32DownPort,omitempty"`
MsgResid []byte `protobuf:"bytes,6,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
MsgExternInfo *ExternMsg `protobuf:"bytes,7,opt,name=msgExternInfo,proto3" json:"msgExternInfo,omitempty"`
BytesDownIpV6 [][]byte `protobuf:"bytes,8,rep,name=bytesDownIpV6,proto3" json:"bytesDownIpV6,omitempty"`
Uint32DownV6Port []int32 `protobuf:"varint,9,rep,packed,name=uint32DownV6Port,proto3" json:"uint32DownV6Port,omitempty"`
}
func (x *MultiMsgApplyDownRsp) Reset() {
*x = MultiMsgApplyDownRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_multimsg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiMsgApplyDownRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiMsgApplyDownRsp) ProtoMessage() {}
func (x *MultiMsgApplyDownRsp) ProtoReflect() protoreflect.Message {
mi := &file_multimsg_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MultiMsgApplyDownRsp.ProtoReflect.Descriptor instead.
func (*MultiMsgApplyDownRsp) Descriptor() ([]byte, []int) {
return file_multimsg_proto_rawDescGZIP(), []int{2}
Result int32 `protobuf:"varint,1,opt"`
ThumbDownPara []byte `protobuf:"bytes,2,opt"`
MsgKey []byte `protobuf:"bytes,3,opt"`
Uint32DownIp []int32 `protobuf:"varint,4,rep"`
Uint32DownPort []int32 `protobuf:"varint,5,rep"`
MsgResid []byte `protobuf:"bytes,6,opt"`
MsgExternInfo *ExternMsg `protobuf:"bytes,7,opt"`
BytesDownIpV6 [][]byte `protobuf:"bytes,8,rep"`
Uint32DownV6Port []int32 `protobuf:"varint,9,rep"`
}
func (x *MultiMsgApplyDownRsp) GetResult() int32 {
@ -243,47 +117,11 @@ func (x *MultiMsgApplyDownRsp) GetUint32DownV6Port() []int32 {
}
type MultiMsgApplyUpReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DstUin int64 `protobuf:"varint,1,opt,name=dstUin,proto3" json:"dstUin,omitempty"`
MsgSize int64 `protobuf:"varint,2,opt,name=msgSize,proto3" json:"msgSize,omitempty"`
MsgMd5 []byte `protobuf:"bytes,3,opt,name=msgMd5,proto3" json:"msgMd5,omitempty"`
MsgType int32 `protobuf:"varint,4,opt,name=msgType,proto3" json:"msgType,omitempty"`
ApplyId int32 `protobuf:"varint,5,opt,name=applyId,proto3" json:"applyId,omitempty"`
}
func (x *MultiMsgApplyUpReq) Reset() {
*x = MultiMsgApplyUpReq{}
if protoimpl.UnsafeEnabled {
mi := &file_multimsg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiMsgApplyUpReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiMsgApplyUpReq) ProtoMessage() {}
func (x *MultiMsgApplyUpReq) ProtoReflect() protoreflect.Message {
mi := &file_multimsg_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MultiMsgApplyUpReq.ProtoReflect.Descriptor instead.
func (*MultiMsgApplyUpReq) Descriptor() ([]byte, []int) {
return file_multimsg_proto_rawDescGZIP(), []int{3}
DstUin int64 `protobuf:"varint,1,opt"`
MsgSize int64 `protobuf:"varint,2,opt"`
MsgMd5 []byte `protobuf:"bytes,3,opt"`
MsgType int32 `protobuf:"varint,4,opt"`
ApplyId int32 `protobuf:"varint,5,opt"`
}
func (x *MultiMsgApplyUpReq) GetDstUin() int64 {
@ -322,55 +160,19 @@ func (x *MultiMsgApplyUpReq) GetApplyId() int32 {
}
type MultiMsgApplyUpRsp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
MsgResid string `protobuf:"bytes,2,opt,name=msgResid,proto3" json:"msgResid,omitempty"`
MsgUkey []byte `protobuf:"bytes,3,opt,name=msgUkey,proto3" json:"msgUkey,omitempty"`
Uint32UpIp []int32 `protobuf:"varint,4,rep,packed,name=uint32UpIp,proto3" json:"uint32UpIp,omitempty"`
Uint32UpPort []int32 `protobuf:"varint,5,rep,packed,name=uint32UpPort,proto3" json:"uint32UpPort,omitempty"`
BlockSize int64 `protobuf:"varint,6,opt,name=blockSize,proto3" json:"blockSize,omitempty"`
UpOffset int64 `protobuf:"varint,7,opt,name=upOffset,proto3" json:"upOffset,omitempty"`
ApplyId int32 `protobuf:"varint,8,opt,name=applyId,proto3" json:"applyId,omitempty"`
MsgKey []byte `protobuf:"bytes,9,opt,name=msgKey,proto3" json:"msgKey,omitempty"`
MsgSig []byte `protobuf:"bytes,10,opt,name=msgSig,proto3" json:"msgSig,omitempty"`
MsgExternInfo *ExternMsg `protobuf:"bytes,11,opt,name=msgExternInfo,proto3" json:"msgExternInfo,omitempty"`
BytesUpIpV6 [][]byte `protobuf:"bytes,12,rep,name=bytesUpIpV6,proto3" json:"bytesUpIpV6,omitempty"`
Uint32UpV6Port []int32 `protobuf:"varint,13,rep,packed,name=uint32UpV6Port,proto3" json:"uint32UpV6Port,omitempty"`
}
func (x *MultiMsgApplyUpRsp) Reset() {
*x = MultiMsgApplyUpRsp{}
if protoimpl.UnsafeEnabled {
mi := &file_multimsg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiMsgApplyUpRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiMsgApplyUpRsp) ProtoMessage() {}
func (x *MultiMsgApplyUpRsp) ProtoReflect() protoreflect.Message {
mi := &file_multimsg_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MultiMsgApplyUpRsp.ProtoReflect.Descriptor instead.
func (*MultiMsgApplyUpRsp) Descriptor() ([]byte, []int) {
return file_multimsg_proto_rawDescGZIP(), []int{4}
Result int32 `protobuf:"varint,1,opt"`
MsgResid string `protobuf:"bytes,2,opt"`
MsgUkey []byte `protobuf:"bytes,3,opt"`
Uint32UpIp []int32 `protobuf:"varint,4,rep"`
Uint32UpPort []int32 `protobuf:"varint,5,rep"`
BlockSize int64 `protobuf:"varint,6,opt"`
UpOffset int64 `protobuf:"varint,7,opt"`
ApplyId int32 `protobuf:"varint,8,opt"`
MsgKey []byte `protobuf:"bytes,9,opt"`
MsgSig []byte `protobuf:"bytes,10,opt"`
MsgExternInfo *ExternMsg `protobuf:"bytes,11,opt"`
BytesUpIpV6 [][]byte `protobuf:"bytes,12,rep"`
Uint32UpV6Port []int32 `protobuf:"varint,13,rep"`
}
func (x *MultiMsgApplyUpRsp) GetResult() int32 {
@ -465,51 +267,15 @@ func (x *MultiMsgApplyUpRsp) GetUint32UpV6Port() []int32 {
}
type MultiReqBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subcmd int32 `protobuf:"varint,1,opt,name=subcmd,proto3" json:"subcmd,omitempty"`
TermType int32 `protobuf:"varint,2,opt,name=termType,proto3" json:"termType,omitempty"`
PlatformType int32 `protobuf:"varint,3,opt,name=platformType,proto3" json:"platformType,omitempty"`
NetType int32 `protobuf:"varint,4,opt,name=netType,proto3" json:"netType,omitempty"`
BuildVer string `protobuf:"bytes,5,opt,name=buildVer,proto3" json:"buildVer,omitempty"`
MultimsgApplyupReq []*MultiMsgApplyUpReq `protobuf:"bytes,6,rep,name=multimsgApplyupReq,proto3" json:"multimsgApplyupReq,omitempty"`
MultimsgApplydownReq []*MultiMsgApplyDownReq `protobuf:"bytes,7,rep,name=multimsgApplydownReq,proto3" json:"multimsgApplydownReq,omitempty"`
BuType int32 `protobuf:"varint,8,opt,name=buType,proto3" json:"buType,omitempty"`
ReqChannelType int32 `protobuf:"varint,9,opt,name=reqChannelType,proto3" json:"reqChannelType,omitempty"`
}
func (x *MultiReqBody) Reset() {
*x = MultiReqBody{}
if protoimpl.UnsafeEnabled {
mi := &file_multimsg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiReqBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiReqBody) ProtoMessage() {}
func (x *MultiReqBody) ProtoReflect() protoreflect.Message {
mi := &file_multimsg_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MultiReqBody.ProtoReflect.Descriptor instead.
func (*MultiReqBody) Descriptor() ([]byte, []int) {
return file_multimsg_proto_rawDescGZIP(), []int{5}
Subcmd int32 `protobuf:"varint,1,opt"`
TermType int32 `protobuf:"varint,2,opt"`
PlatformType int32 `protobuf:"varint,3,opt"`
NetType int32 `protobuf:"varint,4,opt"`
BuildVer string `protobuf:"bytes,5,opt"`
MultimsgApplyupReq []*MultiMsgApplyUpReq `protobuf:"bytes,6,rep"`
MultimsgApplydownReq []*MultiMsgApplyDownReq `protobuf:"bytes,7,rep"`
BuType int32 `protobuf:"varint,8,opt"`
ReqChannelType int32 `protobuf:"varint,9,opt"`
}
func (x *MultiReqBody) GetSubcmd() int32 {
@ -576,45 +342,9 @@ func (x *MultiReqBody) GetReqChannelType() int32 {
}
type MultiRspBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subcmd int32 `protobuf:"varint,1,opt,name=subcmd,proto3" json:"subcmd,omitempty"`
MultimsgApplyupRsp []*MultiMsgApplyUpRsp `protobuf:"bytes,2,rep,name=multimsgApplyupRsp,proto3" json:"multimsgApplyupRsp,omitempty"`
MultimsgApplydownRsp []*MultiMsgApplyDownRsp `protobuf:"bytes,3,rep,name=multimsgApplydownRsp,proto3" json:"multimsgApplydownRsp,omitempty"`
}
func (x *MultiRspBody) Reset() {
*x = MultiRspBody{}
if protoimpl.UnsafeEnabled {
mi := &file_multimsg_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MultiRspBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MultiRspBody) ProtoMessage() {}
func (x *MultiRspBody) ProtoReflect() protoreflect.Message {
mi := &file_multimsg_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MultiRspBody.ProtoReflect.Descriptor instead.
func (*MultiRspBody) Descriptor() ([]byte, []int) {
return file_multimsg_proto_rawDescGZIP(), []int{6}
Subcmd int32 `protobuf:"varint,1,opt"`
MultimsgApplyupRsp []*MultiMsgApplyUpRsp `protobuf:"bytes,2,rep"`
MultimsgApplydownRsp []*MultiMsgApplyDownRsp `protobuf:"bytes,3,rep"`
}
func (x *MultiRspBody) GetSubcmd() int32 {
@ -637,259 +367,3 @@ func (x *MultiRspBody) GetMultimsgApplydownRsp() []*MultiMsgApplyDownRsp {
}
return nil
}
var File_multimsg_proto protoreflect.FileDescriptor
var file_multimsg_proto_rawDesc = []byte{
0x0a, 0x0e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x2d, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x20, 0x0a,
0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22,
0x64, 0x0a, 0x14, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79,
0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65,
0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65,
0x73, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
0x06, 0x73, 0x72, 0x63, 0x55, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73,
0x72, 0x63, 0x55, 0x69, 0x6e, 0x22, 0xd8, 0x02, 0x0a, 0x14, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d,
0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70, 0x12, 0x16,
0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x44,
0x6f, 0x77, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x74,
0x68, 0x75, 0x6d, 0x62, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x12, 0x16, 0x0a, 0x06,
0x6d, 0x73, 0x67, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x73,
0x67, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f,
0x77, 0x6e, 0x49, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x44, 0x6f, 0x77, 0x6e, 0x49, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05,
0x52, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f, 0x77, 0x6e, 0x50, 0x6f, 0x72, 0x74,
0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x0d,
0x6d, 0x73, 0x67, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x07, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x4d, 0x73, 0x67, 0x52,
0x0d, 0x6d, 0x73, 0x67, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24,
0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x49, 0x70, 0x56, 0x36, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x44, 0x6f, 0x77, 0x6e,
0x49, 0x70, 0x56, 0x36, 0x12, 0x2a, 0x0a, 0x10, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f,
0x77, 0x6e, 0x56, 0x36, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52, 0x10,
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f, 0x77, 0x6e, 0x56, 0x36, 0x50, 0x6f, 0x72, 0x74,
0x22, 0x92, 0x01, 0x0a, 0x12, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70,
0x6c, 0x79, 0x55, 0x70, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x73, 0x74, 0x55, 0x69,
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x12,
0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x07, 0x6d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x73, 0x67,
0x4d, 0x64, 0x35, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x4d, 0x64,
0x35, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61,
0x70, 0x70, 0x6c, 0x79, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x70,
0x70, 0x6c, 0x79, 0x49, 0x64, 0x22, 0xa6, 0x03, 0x0a, 0x12, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d,
0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x55, 0x70, 0x52, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06,
0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x69, 0x64,
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x55, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x55, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x69,
0x6e, 0x74, 0x33, 0x32, 0x55, 0x70, 0x49, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a,
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x70, 0x49, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x75, 0x69,
0x6e, 0x74, 0x33, 0x32, 0x55, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05,
0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1c,
0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x75, 0x70, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
0x75, 0x70, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x6c,
0x79, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x79,
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x73,
0x67, 0x53, 0x69, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53,
0x69, 0x67, 0x12, 0x30, 0x0a, 0x0d, 0x6d, 0x73, 0x67, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x49,
0x6e, 0x66, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x45, 0x78, 0x74, 0x65,
0x72, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x0d, 0x6d, 0x73, 0x67, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x55, 0x70, 0x49,
0x70, 0x56, 0x36, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73,
0x55, 0x70, 0x49, 0x70, 0x56, 0x36, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32,
0x55, 0x70, 0x56, 0x36, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e,
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x70, 0x56, 0x36, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xec,
0x02, 0x0a, 0x0c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12,
0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54,
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x54,
0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54,
0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66,
0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x54, 0x79,
0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x54, 0x79, 0x70,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x12, 0x43, 0x0a,
0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70,
0x52, 0x65, 0x71, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4d, 0x75, 0x6c, 0x74,
0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x55, 0x70, 0x52, 0x65, 0x71, 0x52, 0x12,
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52,
0x65, 0x71, 0x12, 0x49, 0x0a, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70,
0x70, 0x6c, 0x79, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79,
0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x52, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73,
0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
0x06, 0x62, 0x75, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62,
0x75, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72,
0x65, 0x71, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb6, 0x01,
0x0a, 0x0c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x52, 0x73, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16,
0x0a, 0x06, 0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x73, 0x75, 0x62, 0x63, 0x6d, 0x64, 0x12, 0x43, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d,
0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52, 0x73, 0x70, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70,
0x6c, 0x79, 0x55, 0x70, 0x52, 0x73, 0x70, 0x52, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73,
0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x75, 0x70, 0x52, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x14, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x64, 0x6f, 0x77, 0x6e,
0x52, 0x73, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x4d, 0x75, 0x6c, 0x74,
0x69, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70,
0x52, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x64,
0x6f, 0x77, 0x6e, 0x52, 0x73, 0x70, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_multimsg_proto_rawDescOnce sync.Once
file_multimsg_proto_rawDescData = file_multimsg_proto_rawDesc
)
func file_multimsg_proto_rawDescGZIP() []byte {
file_multimsg_proto_rawDescOnce.Do(func() {
file_multimsg_proto_rawDescData = protoimpl.X.CompressGZIP(file_multimsg_proto_rawDescData)
})
return file_multimsg_proto_rawDescData
}
var file_multimsg_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_multimsg_proto_goTypes = []interface{}{
(*ExternMsg)(nil), // 0: ExternMsg
(*MultiMsgApplyDownReq)(nil), // 1: MultiMsgApplyDownReq
(*MultiMsgApplyDownRsp)(nil), // 2: MultiMsgApplyDownRsp
(*MultiMsgApplyUpReq)(nil), // 3: MultiMsgApplyUpReq
(*MultiMsgApplyUpRsp)(nil), // 4: MultiMsgApplyUpRsp
(*MultiReqBody)(nil), // 5: MultiReqBody
(*MultiRspBody)(nil), // 6: MultiRspBody
}
var file_multimsg_proto_depIdxs = []int32{
0, // 0: MultiMsgApplyDownRsp.msgExternInfo:type_name -> ExternMsg
0, // 1: MultiMsgApplyUpRsp.msgExternInfo:type_name -> ExternMsg
3, // 2: MultiReqBody.multimsgApplyupReq:type_name -> MultiMsgApplyUpReq
1, // 3: MultiReqBody.multimsgApplydownReq:type_name -> MultiMsgApplyDownReq
4, // 4: MultiRspBody.multimsgApplyupRsp:type_name -> MultiMsgApplyUpRsp
2, // 5: MultiRspBody.multimsgApplydownRsp:type_name -> MultiMsgApplyDownRsp
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_multimsg_proto_init() }
func file_multimsg_proto_init() {
if File_multimsg_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_multimsg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExternMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_multimsg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiMsgApplyDownReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_multimsg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiMsgApplyDownRsp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_multimsg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiMsgApplyUpReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_multimsg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiMsgApplyUpRsp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_multimsg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiReqBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_multimsg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MultiRspBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_multimsg_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_multimsg_proto_goTypes,
DependencyIndexes: file_multimsg_proto_depIdxs,
MessageInfos: file_multimsg_proto_msgTypes,
}.Build()
File_multimsg_proto = out.File
file_multimsg_proto_rawDesc = nil
file_multimsg_proto_goTypes = nil
file_multimsg_proto_depIdxs = nil
}

View File

@ -1,69 +1,15 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// Code generated by protoc-gen-golite. DO NOT EDIT.
// source: group0x857.proto
package notify
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type NotifyMsgBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OptMsgGrayTips *AIOGrayTipsInfo `protobuf:"bytes,5,opt,name=optMsgGrayTips,proto3" json:"optMsgGrayTips,omitempty"`
OptMsgRedTips *RedGrayTipsInfo `protobuf:"bytes,9,opt,name=optMsgRedTips,proto3" json:"optMsgRedTips,omitempty"`
OptMsgRecall *MessageRecallReminder `protobuf:"bytes,11,opt,name=optMsgRecall,proto3" json:"optMsgRecall,omitempty"`
OptGeneralGrayTip *GeneralGrayTipInfo `protobuf:"bytes,26,opt,name=optGeneralGrayTip,proto3" json:"optGeneralGrayTip,omitempty"`
QqGroupDigestMsg *QQGroupDigestMsg `protobuf:"bytes,33,opt,name=qqGroupDigestMsg,proto3" json:"qqGroupDigestMsg,omitempty"`
ServiceType int32 `protobuf:"varint,13,opt,name=serviceType,proto3" json:"serviceType,omitempty"`
}
func (x *NotifyMsgBody) Reset() {
*x = NotifyMsgBody{}
if protoimpl.UnsafeEnabled {
mi := &file_group0x857_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NotifyMsgBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NotifyMsgBody) ProtoMessage() {}
func (x *NotifyMsgBody) ProtoReflect() protoreflect.Message {
mi := &file_group0x857_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NotifyMsgBody.ProtoReflect.Descriptor instead.
func (*NotifyMsgBody) Descriptor() ([]byte, []int) {
return file_group0x857_proto_rawDescGZIP(), []int{0}
OptMsgGrayTips *AIOGrayTipsInfo `protobuf:"bytes,5,opt"`
OptMsgRedTips *RedGrayTipsInfo `protobuf:"bytes,9,opt"`
OptMsgRecall *MessageRecallReminder `protobuf:"bytes,11,opt"`
OptGeneralGrayTip *GeneralGrayTipInfo `protobuf:"bytes,26,opt"`
QqGroupDigestMsg *QQGroupDigestMsg `protobuf:"bytes,33,opt"`
ServiceType int32 `protobuf:"varint,13,opt"`
}
func (x *NotifyMsgBody) GetOptMsgGrayTips() *AIOGrayTipsInfo {
@ -109,48 +55,12 @@ func (x *NotifyMsgBody) GetServiceType() int32 {
}
type AIOGrayTipsInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ShowLatest uint32 `protobuf:"varint,1,opt,name=showLatest,proto3" json:"showLatest,omitempty"`
Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
Remind uint32 `protobuf:"varint,3,opt,name=remind,proto3" json:"remind,omitempty"`
Brief []byte `protobuf:"bytes,4,opt,name=brief,proto3" json:"brief,omitempty"`
ReceiverUin uint64 `protobuf:"varint,5,opt,name=receiverUin,proto3" json:"receiverUin,omitempty"`
ReliaoAdminOpt uint32 `protobuf:"varint,6,opt,name=reliaoAdminOpt,proto3" json:"reliaoAdminOpt,omitempty"`
}
func (x *AIOGrayTipsInfo) Reset() {
*x = AIOGrayTipsInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_group0x857_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AIOGrayTipsInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AIOGrayTipsInfo) ProtoMessage() {}
func (x *AIOGrayTipsInfo) ProtoReflect() protoreflect.Message {
mi := &file_group0x857_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AIOGrayTipsInfo.ProtoReflect.Descriptor instead.
func (*AIOGrayTipsInfo) Descriptor() ([]byte, []int) {
return file_group0x857_proto_rawDescGZIP(), []int{1}
ShowLatest uint32 `protobuf:"varint,1,opt"`
Content []byte `protobuf:"bytes,2,opt"`
Remind uint32 `protobuf:"varint,3,opt"`
Brief []byte `protobuf:"bytes,4,opt"`
ReceiverUin uint64 `protobuf:"varint,5,opt"`
ReliaoAdminOpt uint32 `protobuf:"varint,6,opt"`
}
func (x *AIOGrayTipsInfo) GetShowLatest() uint32 {
@ -196,50 +106,14 @@ func (x *AIOGrayTipsInfo) GetReliaoAdminOpt() uint32 {
}
type GeneralGrayTipInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BusiType uint64 `protobuf:"varint,1,opt,name=busiType,proto3" json:"busiType,omitempty"`
BusiId uint64 `protobuf:"varint,2,opt,name=busiId,proto3" json:"busiId,omitempty"`
CtrlFlag uint32 `protobuf:"varint,3,opt,name=ctrlFlag,proto3" json:"ctrlFlag,omitempty"`
C2CType uint32 `protobuf:"varint,4,opt,name=c2cType,proto3" json:"c2cType,omitempty"`
ServiceType uint32 `protobuf:"varint,5,opt,name=serviceType,proto3" json:"serviceType,omitempty"`
TemplId uint64 `protobuf:"varint,6,opt,name=templId,proto3" json:"templId,omitempty"`
MsgTemplParam []*TemplParam `protobuf:"bytes,7,rep,name=msgTemplParam,proto3" json:"msgTemplParam,omitempty"`
Content string `protobuf:"bytes,8,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *GeneralGrayTipInfo) Reset() {
*x = GeneralGrayTipInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_group0x857_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GeneralGrayTipInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GeneralGrayTipInfo) ProtoMessage() {}
func (x *GeneralGrayTipInfo) ProtoReflect() protoreflect.Message {
mi := &file_group0x857_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GeneralGrayTipInfo.ProtoReflect.Descriptor instead.
func (*GeneralGrayTipInfo) Descriptor() ([]byte, []int) {
return file_group0x857_proto_rawDescGZIP(), []int{2}
BusiType uint64 `protobuf:"varint,1,opt"`
BusiId uint64 `protobuf:"varint,2,opt"`
CtrlFlag uint32 `protobuf:"varint,3,opt"`
C2CType uint32 `protobuf:"varint,4,opt"`
ServiceType uint32 `protobuf:"varint,5,opt"`
TemplId uint64 `protobuf:"varint,6,opt"`
MsgTemplParam []*TemplParam `protobuf:"bytes,7,rep"`
Content string `protobuf:"bytes,8,opt"`
}
func (x *GeneralGrayTipInfo) GetBusiType() uint64 {
@ -299,44 +173,8 @@ func (x *GeneralGrayTipInfo) GetContent() string {
}
type TemplParam struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *TemplParam) Reset() {
*x = TemplParam{}
if protoimpl.UnsafeEnabled {
mi := &file_group0x857_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TemplParam) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TemplParam) ProtoMessage() {}
func (x *TemplParam) ProtoReflect() protoreflect.Message {
mi := &file_group0x857_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TemplParam.ProtoReflect.Descriptor instead.
func (*TemplParam) Descriptor() ([]byte, []int) {
return file_group0x857_proto_rawDescGZIP(), []int{3}
Name string `protobuf:"bytes,1,opt"`
Value string `protobuf:"bytes,2,opt"`
}
func (x *TemplParam) GetName() string {
@ -354,49 +192,13 @@ func (x *TemplParam) GetValue() string {
}
type MessageRecallReminder struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uin int64 `protobuf:"varint,1,opt,name=uin,proto3" json:"uin,omitempty"`
Nickname []byte `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"`
RecalledMsgList []*RecalledMessageMeta `protobuf:"bytes,3,rep,name=recalledMsgList,proto3" json:"recalledMsgList,omitempty"`
ReminderContent []byte `protobuf:"bytes,4,opt,name=reminderContent,proto3" json:"reminderContent,omitempty"`
Userdef []byte `protobuf:"bytes,5,opt,name=userdef,proto3" json:"userdef,omitempty"`
GroupType int32 `protobuf:"varint,6,opt,name=groupType,proto3" json:"groupType,omitempty"`
OpType int32 `protobuf:"varint,7,opt,name=opType,proto3" json:"opType,omitempty"`
}
func (x *MessageRecallReminder) Reset() {
*x = MessageRecallReminder{}
if protoimpl.UnsafeEnabled {
mi := &file_group0x857_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRecallReminder) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRecallReminder) ProtoMessage() {}
func (x *MessageRecallReminder) ProtoReflect() protoreflect.Message {
mi := &file_group0x857_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRecallReminder.ProtoReflect.Descriptor instead.
func (*MessageRecallReminder) Descriptor() ([]byte, []int) {
return file_group0x857_proto_rawDescGZIP(), []int{4}
Uin int64 `protobuf:"varint,1,opt"`
Nickname []byte `protobuf:"bytes,2,opt"`
RecalledMsgList []*RecalledMessageMeta `protobuf:"bytes,3,rep"`
ReminderContent []byte `protobuf:"bytes,4,opt"`
Userdef []byte `protobuf:"bytes,5,opt"`
GroupType int32 `protobuf:"varint,6,opt"`
OpType int32 `protobuf:"varint,7,opt"`
}
func (x *MessageRecallReminder) GetUin() int64 {
@ -449,48 +251,12 @@ func (x *MessageRecallReminder) GetOpType() int32 {
}
type RecalledMessageMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Seq int32 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
Time int32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
MsgRandom int32 `protobuf:"varint,3,opt,name=msgRandom,proto3" json:"msgRandom,omitempty"`
MsgType int32 `protobuf:"varint,4,opt,name=msgType,proto3" json:"msgType,omitempty"`
MsgFlag int32 `protobuf:"varint,5,opt,name=msgFlag,proto3" json:"msgFlag,omitempty"`
AuthorUin int64 `protobuf:"varint,6,opt,name=authorUin,proto3" json:"authorUin,omitempty"`
}
func (x *RecalledMessageMeta) Reset() {
*x = RecalledMessageMeta{}
if protoimpl.UnsafeEnabled {
mi := &file_group0x857_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RecalledMessageMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RecalledMessageMeta) ProtoMessage() {}
func (x *RecalledMessageMeta) ProtoReflect() protoreflect.Message {
mi := &file_group0x857_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RecalledMessageMeta.ProtoReflect.Descriptor instead.
func (*RecalledMessageMeta) Descriptor() ([]byte, []int) {
return file_group0x857_proto_rawDescGZIP(), []int{5}
Seq int32 `protobuf:"varint,1,opt"`
Time int32 `protobuf:"varint,2,opt"`
MsgRandom int32 `protobuf:"varint,3,opt"`
MsgType int32 `protobuf:"varint,4,opt"`
MsgFlag int32 `protobuf:"varint,5,opt"`
AuthorUin int64 `protobuf:"varint,6,opt"`
}
func (x *RecalledMessageMeta) GetSeq() int32 {
@ -536,52 +302,16 @@ func (x *RecalledMessageMeta) GetAuthorUin() int64 {
}
type RedGrayTipsInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ShowLatest uint32 `protobuf:"varint,1,opt,name=showLatest,proto3" json:"showLatest,omitempty"`
SenderUin uint64 `protobuf:"varint,2,opt,name=senderUin,proto3" json:"senderUin,omitempty"`
ReceiverUin uint64 `protobuf:"varint,3,opt,name=receiverUin,proto3" json:"receiverUin,omitempty"`
SenderRichContent string `protobuf:"bytes,4,opt,name=senderRichContent,proto3" json:"senderRichContent,omitempty"`
ReceiverRichContent string `protobuf:"bytes,5,opt,name=receiverRichContent,proto3" json:"receiverRichContent,omitempty"`
AuthKey []byte `protobuf:"bytes,6,opt,name=authKey,proto3" json:"authKey,omitempty"`
MsgType int32 `protobuf:"zigzag32,7,opt,name=msgType,proto3" json:"msgType,omitempty"`
LuckyFlag uint32 `protobuf:"varint,8,opt,name=luckyFlag,proto3" json:"luckyFlag,omitempty"`
HideFlag uint32 `protobuf:"varint,9,opt,name=hideFlag,proto3" json:"hideFlag,omitempty"`
LuckyUin uint64 `protobuf:"varint,12,opt,name=luckyUin,proto3" json:"luckyUin,omitempty"`
}
func (x *RedGrayTipsInfo) Reset() {
*x = RedGrayTipsInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_group0x857_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RedGrayTipsInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RedGrayTipsInfo) ProtoMessage() {}
func (x *RedGrayTipsInfo) ProtoReflect() protoreflect.Message {
mi := &file_group0x857_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RedGrayTipsInfo.ProtoReflect.Descriptor instead.
func (*RedGrayTipsInfo) Descriptor() ([]byte, []int) {
return file_group0x857_proto_rawDescGZIP(), []int{6}
ShowLatest uint32 `protobuf:"varint,1,opt"`
SenderUin uint64 `protobuf:"varint,2,opt"`
ReceiverUin uint64 `protobuf:"varint,3,opt"`
SenderRichContent string `protobuf:"bytes,4,opt"`
ReceiverRichContent string `protobuf:"bytes,5,opt"`
AuthKey []byte `protobuf:"bytes,6,opt"`
MsgType int32 `protobuf:"zigzag32,7,opt"`
LuckyFlag uint32 `protobuf:"varint,8,opt"`
HideFlag uint32 `protobuf:"varint,9,opt"`
LuckyUin uint64 `protobuf:"varint,12,opt"`
}
func (x *RedGrayTipsInfo) GetShowLatest() uint32 {
@ -655,53 +385,17 @@ func (x *RedGrayTipsInfo) GetLuckyUin() uint64 {
}
type QQGroupDigestMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupCode uint64 `protobuf:"varint,1,opt,name=groupCode,proto3" json:"groupCode,omitempty"`
Seq uint32 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"`
Random uint32 `protobuf:"varint,3,opt,name=random,proto3" json:"random,omitempty"`
OpType int32 `protobuf:"varint,4,opt,name=opType,proto3" json:"opType,omitempty"`
Sender uint64 `protobuf:"varint,5,opt,name=sender,proto3" json:"sender,omitempty"`
DigestOper uint64 `protobuf:"varint,6,opt,name=digestOper,proto3" json:"digestOper,omitempty"`
OpTime uint32 `protobuf:"varint,7,opt,name=opTime,proto3" json:"opTime,omitempty"`
LastestMsgSeq uint32 `protobuf:"varint,8,opt,name=lastestMsgSeq,proto3" json:"lastestMsgSeq,omitempty"`
OperNick []byte `protobuf:"bytes,9,opt,name=operNick,proto3" json:"operNick,omitempty"`
SenderNick []byte `protobuf:"bytes,10,opt,name=senderNick,proto3" json:"senderNick,omitempty"`
ExtInfo int32 `protobuf:"varint,11,opt,name=extInfo,proto3" json:"extInfo,omitempty"`
}
func (x *QQGroupDigestMsg) Reset() {
*x = QQGroupDigestMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_group0x857_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QQGroupDigestMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QQGroupDigestMsg) ProtoMessage() {}
func (x *QQGroupDigestMsg) ProtoReflect() protoreflect.Message {
mi := &file_group0x857_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QQGroupDigestMsg.ProtoReflect.Descriptor instead.
func (*QQGroupDigestMsg) Descriptor() ([]byte, []int) {
return file_group0x857_proto_rawDescGZIP(), []int{7}
GroupCode uint64 `protobuf:"varint,1,opt"`
Seq uint32 `protobuf:"varint,2,opt"`
Random uint32 `protobuf:"varint,3,opt"`
OpType int32 `protobuf:"varint,4,opt"`
Sender uint64 `protobuf:"varint,5,opt"`
DigestOper uint64 `protobuf:"varint,6,opt"`
OpTime uint32 `protobuf:"varint,7,opt"`
LastestMsgSeq uint32 `protobuf:"varint,8,opt"`
OperNick []byte `protobuf:"bytes,9,opt"`
SenderNick []byte `protobuf:"bytes,10,opt"`
ExtInfo int32 `protobuf:"varint,11,opt"`
}
func (x *QQGroupDigestMsg) GetGroupCode() uint64 {
@ -780,296 +474,3 @@ func (x *QQGroupDigestMsg) GetExtInfo() int32 {
}
return 0
}
var File_group0x857_proto protoreflect.FileDescriptor
var file_group0x857_proto_rawDesc = []byte{
0x0a, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x30, 0x78, 0x38, 0x35, 0x37, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xe1, 0x02, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x4d, 0x73, 0x67,
0x42, 0x6f, 0x64, 0x79, 0x12, 0x38, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x4d, 0x73, 0x67, 0x47, 0x72,
0x61, 0x79, 0x54, 0x69, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x41,
0x49, 0x4f, 0x47, 0x72, 0x61, 0x79, 0x54, 0x69, 0x70, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e,
0x6f, 0x70, 0x74, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x79, 0x54, 0x69, 0x70, 0x73, 0x12, 0x36,
0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x18,
0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x52, 0x65, 0x64, 0x47, 0x72, 0x61, 0x79, 0x54,
0x69, 0x70, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x4d, 0x73, 0x67, 0x52,
0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x4d, 0x73, 0x67,
0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x6d, 0x69,
0x6e, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x6f, 0x70, 0x74, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x61,
0x6c, 0x6c, 0x12, 0x41, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
0x47, 0x72, 0x61, 0x79, 0x54, 0x69, 0x70, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x47, 0x72, 0x61, 0x79, 0x54, 0x69, 0x70, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x11, 0x6f, 0x70, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x47, 0x72,
0x61, 0x79, 0x54, 0x69, 0x70, 0x12, 0x3d, 0x0a, 0x10, 0x71, 0x71, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x11, 0x2e, 0x51, 0x51, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4d,
0x73, 0x67, 0x52, 0x10, 0x71, 0x71, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x69, 0x67, 0x65, 0x73,
0x74, 0x4d, 0x73, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54,
0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0f, 0x41, 0x49, 0x4f, 0x47, 0x72,
0x61, 0x79, 0x54, 0x69, 0x70, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x68,
0x6f, 0x77, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
0x73, 0x68, 0x6f, 0x77, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05,
0x62, 0x72, 0x69, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x72, 0x69,
0x65, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x55, 0x69,
0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
0x72, 0x55, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x69, 0x61, 0x6f, 0x41, 0x64,
0x6d, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65,
0x6c, 0x69, 0x61, 0x6f, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x22, 0x87, 0x02, 0x0a,
0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x47, 0x72, 0x61, 0x79, 0x54, 0x69, 0x70, 0x49,
0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x69, 0x54, 0x79, 0x70, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x62, 0x75, 0x73, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
0x06, 0x62, 0x75, 0x73, 0x69, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x74, 0x72, 0x6c, 0x46,
0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x74, 0x72, 0x6c, 0x46,
0x6c, 0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x32, 0x63, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x32, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a,
0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
0x18, 0x0a, 0x07, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04,
0x52, 0x07, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x0d, 0x6d, 0x73, 0x67,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0b, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x0d, 0x6d,
0x73, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x36, 0x0a, 0x0a, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xff,
0x01, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c,
0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69,
0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6e, 0x69,
0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0f, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c,
0x65, 0x64, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x4d,
0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64,
0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0f, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x64, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x64, 0x65, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x70, 0x54, 0x79,
0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65,
0x22, 0xab, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1c,
0x0a, 0x09, 0x6d, 0x73, 0x67, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x09, 0x6d, 0x73, 0x67, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x18, 0x0a, 0x07,
0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d,
0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x46, 0x6c, 0x61,
0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x46, 0x6c, 0x61, 0x67,
0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x55, 0x69, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x55, 0x69, 0x6e, 0x22, 0xdb,
0x02, 0x0a, 0x0f, 0x52, 0x65, 0x64, 0x47, 0x72, 0x61, 0x79, 0x54, 0x69, 0x70, 0x73, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4c, 0x61, 0x74, 0x65,
0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x55, 0x69, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x55, 0x69, 0x6e,
0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x55, 0x69, 0x6e, 0x18,
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x55,
0x69, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x69, 0x63, 0x68,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73,
0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x12, 0x30, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x69, 0x63, 0x68,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72,
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07,
0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x52, 0x07, 0x6d,
0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x75, 0x63, 0x6b, 0x79, 0x46,
0x6c, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6c, 0x75, 0x63, 0x6b, 0x79,
0x46, 0x6c, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x69, 0x64, 0x65, 0x46, 0x6c, 0x61, 0x67,
0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x68, 0x69, 0x64, 0x65, 0x46, 0x6c, 0x61, 0x67,
0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x75, 0x63, 0x6b, 0x79, 0x55, 0x69, 0x6e, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x04, 0x52, 0x08, 0x6c, 0x75, 0x63, 0x6b, 0x79, 0x55, 0x69, 0x6e, 0x22, 0xbe, 0x02, 0x0a,
0x10, 0x51, 0x51, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4d, 0x73,
0x67, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x73, 0x65,
0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x70, 0x54,
0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x70, 0x54, 0x79, 0x70,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28,
0x04, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x67,
0x65, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64,
0x69, 0x67, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x70, 0x54,
0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x70, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x53,
0x65, 0x71, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x65, 0x73,
0x74, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x4e,
0x69, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x4e,
0x69, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63,
0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e,
0x69, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x78, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0b, 0x5a,
0x09, 0x2e, 0x2f, 0x3b, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
file_group0x857_proto_rawDescOnce sync.Once
file_group0x857_proto_rawDescData = file_group0x857_proto_rawDesc
)
func file_group0x857_proto_rawDescGZIP() []byte {
file_group0x857_proto_rawDescOnce.Do(func() {
file_group0x857_proto_rawDescData = protoimpl.X.CompressGZIP(file_group0x857_proto_rawDescData)
})
return file_group0x857_proto_rawDescData
}
var file_group0x857_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_group0x857_proto_goTypes = []interface{}{
(*NotifyMsgBody)(nil), // 0: NotifyMsgBody
(*AIOGrayTipsInfo)(nil), // 1: AIOGrayTipsInfo
(*GeneralGrayTipInfo)(nil), // 2: GeneralGrayTipInfo
(*TemplParam)(nil), // 3: TemplParam
(*MessageRecallReminder)(nil), // 4: MessageRecallReminder
(*RecalledMessageMeta)(nil), // 5: RecalledMessageMeta
(*RedGrayTipsInfo)(nil), // 6: RedGrayTipsInfo
(*QQGroupDigestMsg)(nil), // 7: QQGroupDigestMsg
}
var file_group0x857_proto_depIdxs = []int32{
1, // 0: NotifyMsgBody.optMsgGrayTips:type_name -> AIOGrayTipsInfo
6, // 1: NotifyMsgBody.optMsgRedTips:type_name -> RedGrayTipsInfo
4, // 2: NotifyMsgBody.optMsgRecall:type_name -> MessageRecallReminder
2, // 3: NotifyMsgBody.optGeneralGrayTip:type_name -> GeneralGrayTipInfo
7, // 4: NotifyMsgBody.qqGroupDigestMsg:type_name -> QQGroupDigestMsg
3, // 5: GeneralGrayTipInfo.msgTemplParam:type_name -> TemplParam
5, // 6: MessageRecallReminder.recalledMsgList:type_name -> RecalledMessageMeta
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_group0x857_proto_init() }
func file_group0x857_proto_init() {
if File_group0x857_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_group0x857_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NotifyMsgBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group0x857_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AIOGrayTipsInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group0x857_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GeneralGrayTipInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group0x857_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TemplParam); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group0x857_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRecallReminder); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group0x857_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RecalledMessageMeta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group0x857_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RedGrayTipsInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_group0x857_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QQGroupDigestMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_group0x857_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_group0x857_proto_goTypes,
DependencyIndexes: file_group0x857_proto_depIdxs,
MessageInfos: file_group0x857_proto_msgTypes,
}.Build()
File_group0x857_proto = out.File
file_group0x857_proto_rawDesc = nil
file_group0x857_proto_goTypes = nil
file_group0x857_proto_depIdxs = nil
}

Some files were not shown because too many files have changed in this diff Show More