From 9b077cc3f373c279a7f88f091823307507b33d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=99=BD=E7=8C=BF?= <1083092844@qq.com> Date: Thu, 6 Oct 2022 17:44:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BarrageGrab/App.config | 9 + BarrageGrab/Appsetting.cs | 29 + BarrageGrab/FiddlerProxy.cs | 139 ++ BarrageGrab/JsonEntity/BarrageMessages.cs | 131 ++ BarrageGrab/Program.cs | 58 + BarrageGrab/Properties/AssemblyInfo.cs | 36 + BarrageGrab/Properties/app.manifest | 73 + BarrageGrab/ProtoEntity/Messages.cs | 1784 +++++++++++++++++++++ BarrageGrab/ProtoEntity/Wss.cs | 51 + BarrageGrab/WssBarrageGrab.cs | 220 +++ BarrageGrab/WssBarrageService.cs | 216 +++ BarrageGrab/WssBarrageService.csproj | 122 ++ BarrageGrab/packages.config | 14 + BarrageGrab/proto/message.proto | 582 +++++++ BarrageGrab/proto/wss.proto | 12 + BarrageService.sln | 25 + 16 files changed, 3501 insertions(+) create mode 100644 BarrageGrab/App.config create mode 100644 BarrageGrab/Appsetting.cs create mode 100644 BarrageGrab/FiddlerProxy.cs create mode 100644 BarrageGrab/JsonEntity/BarrageMessages.cs create mode 100644 BarrageGrab/Program.cs create mode 100644 BarrageGrab/Properties/AssemblyInfo.cs create mode 100644 BarrageGrab/Properties/app.manifest create mode 100644 BarrageGrab/ProtoEntity/Messages.cs create mode 100644 BarrageGrab/ProtoEntity/Wss.cs create mode 100644 BarrageGrab/WssBarrageGrab.cs create mode 100644 BarrageGrab/WssBarrageService.cs create mode 100644 BarrageGrab/WssBarrageService.csproj create mode 100644 BarrageGrab/packages.config create mode 100644 BarrageGrab/proto/message.proto create mode 100644 BarrageGrab/proto/wss.proto create mode 100644 BarrageService.sln diff --git a/BarrageGrab/App.config b/BarrageGrab/App.config new file mode 100644 index 0000000..444c562 --- /dev/null +++ b/BarrageGrab/App.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/BarrageGrab/Appsetting.cs b/BarrageGrab/Appsetting.cs new file mode 100644 index 0000000..ab68991 --- /dev/null +++ b/BarrageGrab/Appsetting.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static System.Configuration.ConfigurationManager; +namespace BarrageGrab +{ + internal class Appsetting + { + private static readonly Appsetting ins = new Appsetting(); + + public static Appsetting Get() + { + return ins; + } + + /// + /// 过滤的进程 + /// + public string[] FilterProcess { get => AppSettings["filterProcess"].Trim().Split(','); } + + /// + /// 端口号 + /// + public int WsProt { get => int.Parse(AppSettings["wsListenPort"]); } + } +} diff --git a/BarrageGrab/FiddlerProxy.cs b/BarrageGrab/FiddlerProxy.cs new file mode 100644 index 0000000..f5a138a --- /dev/null +++ b/BarrageGrab/FiddlerProxy.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Threading.Tasks; +using ColorConsole; +using Fiddler; +using Microsoft.Win32; + +namespace BarrageGrab +{ + /// + /// FiddlerCore 代理程序 + /// + internal class FiddlerProxy : IDisposable + { + bool disposed = false; + public event EventHandler OnWebSocketData; + ConsoleWriter console = new ConsoleWriter(); + + public FiddlerProxy() + { + InitFiddler(); + } + + /// + /// 启动代理监听 + /// + public void Start() + { + FiddlerApplication.Startup(8887, FiddlerCoreStartupFlags.Default); + console.WriteLine("Fiddler代理已启动", ConsoleColor.Green); + } + + //初始化Fiddler + private void InitFiddler() + { + //这个名字随便 + FiddlerApplication.SetAppDisplayName("FiddlerCore"); + FiddlerApplication.OnWebSocketMessage += FiddlerApplication_OnWebSocketMessage; + + X509Certificate2 oRootCert; + if (null == CertMaker.GetRootCertificate()) + { + CertMaker.createRootCert(); + oRootCert = CertMaker.GetRootCertificate(); + X509Store certStore = new X509Store(StoreName.Root, StoreLocation.LocalMachine); + certStore.Open(OpenFlags.ReadWrite); + try + { + certStore.Add(oRootCert); + } + finally + { + certStore.Close(); + } + } + else + { + oRootCert = CertMaker.GetRootCertificate(); + } + FiddlerApplication.oDefaultClientCertificate = oRootCert; + //忽略服务器证书错误 + CONFIG.IgnoreServerCertErrors = true; + //信任证书 + CertMaker.trustRootCert(); + } + + private void FiddlerApplication_OnWebSocketMessage(object sender, WebSocketMessageEventArgs e) + { + var msg = e.oWSM; + OnWebSocketData?.Invoke(this, new WsMessageEventArgs(msg)); + } + + [DllImport(@"wininet", SetLastError = true, CharSet = CharSet.Auto, EntryPoint = "InternetSetOption", CallingConvention = CallingConvention.StdCall)] + private static extern bool InternetSetOption(int hInternet, int dmOption, IntPtr lpBuffer, int dwBufferLength); + private static void CloseSystemProxy() + { + //打开注册表 + var regKey = Registry.CurrentUser; + + const string subKeyPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"; + var optionKey = regKey.OpenSubKey(subKeyPath, true); + //更改健值,设置代理, + if (optionKey != null) optionKey.SetValue("ProxyEnable", 0); + + //激活代理设置 + InternetSetOption(0, 39, IntPtr.Zero, 0); + InternetSetOption(0, 37, IntPtr.Zero, 0); + } + + public void Dispose() + { + if (disposed) return; + FiddlerApplication.Shutdown(); + CloseSystemProxy(); + console.WriteLine("Fiddler代理已关闭"); + disposed = true; + } + + + public class WsMessageEventArgs + { + /// + /// 消息体 + /// + public WebSocketMessage Message { get; set; } + + /// + /// 进程ID + /// + public int ProcessID { get; set; } + + /// + /// 进程名 + /// + public string ProcessName { get; set; } + + + public WsMessageEventArgs(WebSocketMessage msg) + { + this.Message = msg; + + FieldInfo field = msg.GetType().GetField("_wsOwner", BindingFlags.NonPublic | BindingFlags.Instance); + WebSocket obj = (WebSocket)field.GetValue(msg); + field = obj.GetType().GetField("oCP", BindingFlags.NonPublic | BindingFlags.Instance); + ClientPipe ocp = (ClientPipe)field.GetValue(obj); + + this.ProcessID = ocp.LocalProcessID; + this.ProcessName = ocp.LocalProcessName; + } + } + } +} diff --git a/BarrageGrab/JsonEntity/BarrageMessages.cs b/BarrageGrab/JsonEntity/BarrageMessages.cs new file mode 100644 index 0000000..324b96b --- /dev/null +++ b/BarrageGrab/JsonEntity/BarrageMessages.cs @@ -0,0 +1,131 @@ +namespace BarrageGrab.JsonEntity +{ + /// + /// 弹幕消息类型 + /// + public enum BarrageMsgType + { + 无 = 0, + 消息, + 点赞, + 进入直播间, + 关注主播, + 送礼 + } + + /// + /// 数据包装器 + /// + public class BarrageMsgPack + { + /// + /// 消息类型 + /// + public BarrageMsgType Type { get; set; } + + /// + /// 消息对象 + /// + public string Data { get; set; } + + public BarrageMsgPack() + { + + } + + public BarrageMsgPack(string data, BarrageMsgType type) + { + this.Data = data; + this.Type = type; + } + } + + /// + /// 消息 + /// + public class Msg + { + /// + /// 用户数据 + /// + public MsgUser User { get; set; } + + /// + /// 消息内容 + /// + public string Content { get; set; } + + /// + /// 房间号 + /// + public long RoomId { get; set; } + } + + /// + /// 用户弹幕信息 + /// + public class MsgUser + { + /// + /// 真实ID + /// + public long Id { get; set; } + + /// + /// 自定义ID + /// + public string DisplayId { get; set; } + + /// + /// 昵称 + /// + public string Nickname { get; set; } + + /// + /// 等级 + /// + public int Level { get; set; } + + /// + /// 性别 1男 2女 + /// + public int Gender { get; set; } + } + + /// + /// 礼物消息 + /// + public class GiftMsg : Msg + { + /// + /// 礼物ID + /// + public long GiftId { get; set; } + + /// + /// 礼物名称 + /// + public string GiftName { get; set; } + + /// + /// 礼物数量 + /// + public long GiftCount { get; set; } + + /// + /// 抖币价格 + /// + public int GiamondCount { get; set; } + } + + /// + /// 点赞消息 + /// + public class LikeMsg : Msg + { + /// + /// 点赞数量 + /// + public long Count { get; set; } + } +} \ No newline at end of file diff --git a/BarrageGrab/Program.cs b/BarrageGrab/Program.cs new file mode 100644 index 0000000..2931ad6 --- /dev/null +++ b/BarrageGrab/Program.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace BarrageGrab +{ + public class Program + { + private delegate bool ControlCtrlDelegate(int CtrlType); + + static WssBarrageService server = null; + static void Main(string[] args) + { + SetConsoleCtrlHandler(cancelHandler, true);//捕获控制台关闭 + + server = new WssBarrageService(); + server.StartListen(); + + while (true) + { + var input = Console.ReadKey(); + switch (input.Key) + { + case ConsoleKey.Escape: goto end; + } + } + + end: + Console.ReadKey(); + Console.WriteLine("服务器已正常关闭,按任意键结束..."); + Console.ReadKey(); + } + + + [DllImport("kernel32.dll")] + private static extern bool SetConsoleCtrlHandler(ControlCtrlDelegate HandlerRoutine, bool Add); + private static ControlCtrlDelegate cancelHandler = new ControlCtrlDelegate(HandlerRoutine); + + public static bool HandlerRoutine(int CtrlType) + { + switch (CtrlType) + { + case 0: + //Console.WriteLine("0工具被强制关闭"); //Ctrl+C关闭 + //server.Close(); + break; + case 2: + Console.WriteLine("2工具被强制关闭");//按控制台关闭按钮关闭 + server.Close(); + break; + } + return false; + } + } +} diff --git a/BarrageGrab/Properties/AssemblyInfo.cs b/BarrageGrab/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cc5e8d2 --- /dev/null +++ b/BarrageGrab/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("LiveCompanionBarrageGrab")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LiveCompanionBarrageGrab")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("a07bb1da-d5c2-4eea-9f3f-e42aadb9c1d6")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BarrageGrab/Properties/app.manifest b/BarrageGrab/Properties/app.manifest new file mode 100644 index 0000000..5a95963 --- /dev/null +++ b/BarrageGrab/Properties/app.manifest @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BarrageGrab/ProtoEntity/Messages.cs b/BarrageGrab/ProtoEntity/Messages.cs new file mode 100644 index 0000000..d540394 --- /dev/null +++ b/BarrageGrab/ProtoEntity/Messages.cs @@ -0,0 +1,1784 @@ +// +// This file was generated by a tool; you should avoid making direct changes. +// Consider using 'partial classes' to extend these types +// Input: my.proto +// + + + +namespace BarrageGrab.ProtoEntity +{ +#pragma warning disable CS0612, CS0618, CS1591, CS3021, IDE0079, IDE1006, RCS1036, RCS1057, RCS1085, RCS1192 + [global::ProtoBuf.ProtoContract()] + public partial class Response : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"messages")] + public global::System.Collections.Generic.List Messages { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(2, Name = @"cursor")] + [global::System.ComponentModel.DefaultValue("")] + public string Cursor { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(3)] + public long fetchInterval { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"now")] + public long Now { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + [global::System.ComponentModel.DefaultValue("")] + public string internalExt { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(6)] + public int fetchType { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + [global::ProtoBuf.ProtoMap] + public global::System.Collections.Generic.Dictionary routeParams { get; } = new global::System.Collections.Generic.Dictionary(); + + [global::ProtoBuf.ProtoMember(8)] + public long heartbeatDuration { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public bool needAck { get; set; } + + [global::ProtoBuf.ProtoMember(10)] + [global::System.ComponentModel.DefaultValue("")] + public string pushServer { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(11)] + [global::System.ComponentModel.DefaultValue("")] + public string liveCursor { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(12)] + public bool historyNoMore { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class Message : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"method")] + [global::System.ComponentModel.DefaultValue("")] + public string Method { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(2, Name = @"payload")] + public byte[] Payload { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long msgId { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + public int msgType { get; set; } + + [global::ProtoBuf.ProtoMember(5, Name = @"offset")] + public long Offset { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class RoomUserSeqMessage : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"common")] + public Common Common { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"ranks")] + public global::System.Collections.Generic.List Ranks { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(3, Name = @"total")] + public long Total { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + [global::System.ComponentModel.DefaultValue("")] + public string popStr { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(5, Name = @"seats")] + public global::System.Collections.Generic.List Seats { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(6, Name = @"popularity")] + public long Popularity { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + public long totalUser { get; set; } + + [global::ProtoBuf.ProtoMember(8)] + [global::System.ComponentModel.DefaultValue("")] + public string totalUserStr { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(9)] + [global::System.ComponentModel.DefaultValue("")] + public string totalStr { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(10)] + [global::System.ComponentModel.DefaultValue("")] + public string onlineUserForAnchor { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(11)] + [global::System.ComponentModel.DefaultValue("")] + public string totalPvForAnchor { get; set; } = ""; + + [global::ProtoBuf.ProtoContract()] + public partial class Contributor : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"score")] + public long Score { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"user")] + public User User { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"rank")] + public long Rank { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"delta")] + public long Delta { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + public bool isHidden { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + [global::System.ComponentModel.DefaultValue("")] + public string scoreDescription { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(7)] + [global::System.ComponentModel.DefaultValue("")] + public string exactlyScore { get; set; } = ""; + + } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftMessage : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"common")] + public Common Common { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public long giftId { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long fanTicketCount { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + public long groupCount { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + public long repeatCount { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + public long comboCount { get; set; } + + [global::ProtoBuf.ProtoMember(7, Name = @"user")] + public User User { get; set; } + + [global::ProtoBuf.ProtoMember(8)] + public User toUser { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public int repeatEnd { get; set; } + + [global::ProtoBuf.ProtoMember(10)] + public TextEffect textEffect { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + public long groupId { get; set; } + + [global::ProtoBuf.ProtoMember(12)] + public long incomeTaskgifts { get; set; } + + [global::ProtoBuf.ProtoMember(13)] + public long roomFanTicketCount { get; set; } + + [global::ProtoBuf.ProtoMember(14, Name = @"priority")] + public GiftIMPriority Priority { get; set; } + + [global::ProtoBuf.ProtoMember(15, Name = @"gift")] + public GiftStruct Gift { get; set; } + + [global::ProtoBuf.ProtoMember(16)] + [global::System.ComponentModel.DefaultValue("")] + public string logId { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(17)] + public long sendType { get; set; } + + [global::ProtoBuf.ProtoMember(18)] + public PublicAreaCommon publicAreaCommon { get; set; } + + [global::ProtoBuf.ProtoMember(19)] + public Text trayDisplayText { get; set; } + + [global::ProtoBuf.ProtoMember(20)] + public long bannedDisplayEffects { get; set; } + + [global::ProtoBuf.ProtoMember(21)] + public GiftTrayInfo trayInfo { get; set; } + + [global::ProtoBuf.ProtoMember(24)] + public AssetEffectMixInfo assetEffectMixInfo { get; set; } + + [global::ProtoBuf.ProtoContract()] + public partial class TextEffect : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"portrait")] + public Detail Portrait { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"landscape")] + public Detail Landscape { get; set; } + + [global::ProtoBuf.ProtoContract()] + public partial class Detail : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"text")] + public Text Text { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public int textFontSize { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"background")] + public Image Background { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"start")] + public int Start { get; set; } + + [global::ProtoBuf.ProtoMember(5, Name = @"duration")] + public int Duration { get; set; } + + [global::ProtoBuf.ProtoMember(6, Name = @"x")] + public int X { get; set; } + + [global::ProtoBuf.ProtoMember(7, Name = @"y")] + public int Y { get; set; } + + [global::ProtoBuf.ProtoMember(8, Name = @"width")] + public int Width { get; set; } + + [global::ProtoBuf.ProtoMember(9, Name = @"height")] + public int Height { get; set; } + + [global::ProtoBuf.ProtoMember(10)] + public int shadowDx { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + public int shadowDy { get; set; } + + [global::ProtoBuf.ProtoMember(12)] + public int shadowRadius { get; set; } + + [global::ProtoBuf.ProtoMember(13)] + [global::System.ComponentModel.DefaultValue("")] + public string shadowColor { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(14)] + [global::System.ComponentModel.DefaultValue("")] + public string strokeColor { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(15)] + public int strokeWidth { get; set; } + + } + + } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class LikeMessage : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"common")] + public Common Common { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"count")] + public long Count { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"total")] + public long Total { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"color")] + public long Color { get; set; } + + [global::ProtoBuf.ProtoMember(5, Name = @"user")] + public User User { get; set; } + + [global::ProtoBuf.ProtoMember(6, Name = @"icon")] + [global::System.ComponentModel.DefaultValue("")] + public string Icon { get; set; } = ""; + + } + + [global::ProtoBuf.ProtoContract()] + public partial class ChatMessage : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"common")] + public Common Common { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"user")] + public User User { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"content")] + [global::System.ComponentModel.DefaultValue("")] + public string Content { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(4)] + public bool visibleToSender { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + public Image backgroundImage { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + [global::System.ComponentModel.DefaultValue("")] + public string fullScreenTextColor { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(7)] + public Image backgroundImageV2 { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public PublicAreaCommon publicAreaCommon { get; set; } + + [global::ProtoBuf.ProtoMember(10)] + public Image giftImage { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class SocialMessage : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"common")] + public Common Common { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"user")] + public User User { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long shareType { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"action")] + public long Action { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + [global::System.ComponentModel.DefaultValue("")] + public string shareTarget { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(6)] + public long followCount { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + public PublicAreaCommon publicAreaCommon { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class MemberMessage : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"common")] + public Common Common { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"user")] + public User User { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long memberCount { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"operator")] + public User Operator { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + public bool isSetToAdmin { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + public bool isTopUser { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + public long rankScore { get; set; } + + [global::ProtoBuf.ProtoMember(8)] + public long topUserNo { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public long enterType { get; set; } + + [global::ProtoBuf.ProtoMember(10, Name = @"action")] + public long Action { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + [global::System.ComponentModel.DefaultValue("")] + public string actionDescription { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(12)] + public long userId { get; set; } + + [global::ProtoBuf.ProtoMember(13)] + public EffectConfig effectConfig { get; set; } + + [global::ProtoBuf.ProtoMember(14)] + [global::System.ComponentModel.DefaultValue("")] + public string popStr { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(15)] + public EffectConfig enterEffectConfig { get; set; } + + [global::ProtoBuf.ProtoMember(16)] + public Image backgroundImage { get; set; } + + [global::ProtoBuf.ProtoMember(17)] + public Image backgroundImageV2 { get; set; } + + [global::ProtoBuf.ProtoMember(18)] + public Text anchorDisplayText { get; set; } + + [global::ProtoBuf.ProtoMember(19)] + public PublicAreaCommon publicAreaCommon { get; set; } + + [global::ProtoBuf.ProtoContract()] + public partial class EffectConfig : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"type")] + public long Type { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"icon")] + public Image Icon { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long avatarPos { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"text")] + public Text Text { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + public Image textIcon { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + public int stayTime { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + public long animAssetId { get; set; } + + [global::ProtoBuf.ProtoMember(8, Name = @"badge")] + public Image Badge { get; set; } + + [global::ProtoBuf.ProtoMember(9, Name = @"flexSettingArray", IsPacked = true)] + public long[] flexSettingArrays { get; set; } + + [global::ProtoBuf.ProtoMember(10)] + public Image textIconOverlay { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + public Image animatedBadge { get; set; } + + [global::ProtoBuf.ProtoMember(12)] + public bool hasSweepLight { get; set; } + + [global::ProtoBuf.ProtoMember(13, Name = @"textFlexSettingArray", IsPacked = true)] + public long[] textFlexSettingArrays { get; set; } + + [global::ProtoBuf.ProtoMember(14)] + public long centerAnimAssetId { get; set; } + + } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class ControlMessage : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"common")] + public Common Common { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"status")] + public int Status { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class FansclubMessage : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1)] + public Common commonInfo { get; set; } + + /// + /// 升级1 加入2 + /// + [global::ProtoBuf.ProtoMember(2, Name = @"type")] + public int Type { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"content")] + [global::System.ComponentModel.DefaultValue("")] + public string Content { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(4, Name = @"user")] + public User User { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class Common : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"method")] + [global::System.ComponentModel.DefaultValue("")] + public string Method { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(2)] + public long msgId { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long roomId { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + public long createTime { get; set; } + + [global::ProtoBuf.ProtoMember(5, Name = @"monitor")] + public int Monitor { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + public bool isShowMsg { get; set; } + + [global::ProtoBuf.ProtoMember(7, Name = @"describe")] + [global::System.ComponentModel.DefaultValue("")] + public string Describe { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(8)] + public Text displayText { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public long foldType { get; set; } + + [global::ProtoBuf.ProtoMember(10)] + public long anchorFoldType { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + public long priorityScore { get; set; } + + [global::ProtoBuf.ProtoMember(12)] + [global::System.ComponentModel.DefaultValue("")] + public string logId { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(13)] + [global::System.ComponentModel.DefaultValue("")] + public string msgProcessFilterK { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(14)] + [global::System.ComponentModel.DefaultValue("")] + public string msgProcessFilterV { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(15, Name = @"user")] + public User User { get; set; } + + [global::ProtoBuf.ProtoMember(16, Name = @"room")] + public Room Room { get; set; } + + [global::ProtoBuf.ProtoMember(17)] + public long anchorFoldTypeV2 { get; set; } + + [global::ProtoBuf.ProtoMember(18)] + public long processAtSeiTimeMs { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class Text : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"key")] + [global::System.ComponentModel.DefaultValue("")] + public string Key { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(2)] + [global::System.ComponentModel.DefaultValue("")] + public string defaultPattern { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(3)] + public TextFormat defaultFormat { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"pieces")] + public global::System.Collections.Generic.List Pieces { get; } = new global::System.Collections.Generic.List(); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class Room : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"id")] + public long Id { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + [global::System.ComponentModel.DefaultValue("")] + public string idStr { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(3, Name = @"status")] + public long Status { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + public long ownerUserId { get; set; } + + [global::ProtoBuf.ProtoMember(5, Name = @"title")] + [global::System.ComponentModel.DefaultValue("")] + public string Title { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(6)] + public long userCount { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + public long createTime { get; set; } + + [global::ProtoBuf.ProtoMember(8)] + public long linkmicLayout { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public long finishTime { get; set; } + + [global::ProtoBuf.ProtoMember(10, Name = @"extra")] + public RoomExtra Extra { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + [global::System.ComponentModel.DefaultValue("")] + public string dynamicCoverUri { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(12, Name = @"dynamicCoverDict")] + [global::ProtoBuf.ProtoMap] + public global::System.Collections.Generic.Dictionary dynamicCoverDicts { get; } = new global::System.Collections.Generic.Dictionary(); + + [global::ProtoBuf.ProtoMember(13)] + public long lastPingTime { get; set; } + + [global::ProtoBuf.ProtoMember(14)] + public long liveId { get; set; } + + [global::ProtoBuf.ProtoMember(15)] + public long streamProvider { get; set; } + + [global::ProtoBuf.ProtoMember(16)] + public long osType { get; set; } + + [global::ProtoBuf.ProtoMember(17)] + public long clientVersion { get; set; } + + [global::ProtoBuf.ProtoMember(18)] + public bool withLinkmic { get; set; } + + [global::ProtoBuf.ProtoMember(19)] + public bool enableRoomPerspective { get; set; } + + [global::ProtoBuf.ProtoMember(20, Name = @"cover")] + public Image Cover { get; set; } + + [global::ProtoBuf.ProtoMember(21)] + public Image dynamicCover { get; set; } + + [global::ProtoBuf.ProtoMember(22)] + public Image dynamicCoverLow { get; set; } + + [global::ProtoBuf.ProtoMember(23)] + [global::System.ComponentModel.DefaultValue("")] + public string shareUrl { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(24)] + [global::System.ComponentModel.DefaultValue("")] + public string anchorShareText { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(25)] + [global::System.ComponentModel.DefaultValue("")] + public string userShareText { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(26)] + public long streamId { get; set; } + + [global::ProtoBuf.ProtoMember(27)] + [global::System.ComponentModel.DefaultValue("")] + public string streamIdStr { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(28)] + public StreamUrl streamUrl { get; set; } + + [global::ProtoBuf.ProtoMember(29)] + public long mosaicStatus { get; set; } + + [global::ProtoBuf.ProtoMember(30)] + [global::System.ComponentModel.DefaultValue("")] + public string mosaicTip { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(31)] + public long cellStyle { get; set; } + + [global::ProtoBuf.ProtoMember(32)] + public LinkMic linkMic { get; set; } + + [global::ProtoBuf.ProtoMember(33)] + public long luckymoneyNum { get; set; } + + [global::ProtoBuf.ProtoMember(34, Name = @"decoList")] + public global::System.Collections.Generic.List decoLists { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(35)] + public global::System.Collections.Generic.List topFans { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(36, Name = @"stats")] + public RoomStats Stats { get; set; } + + [global::ProtoBuf.ProtoMember(37)] + [global::System.ComponentModel.DefaultValue("")] + public string sunDailyIconContent { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(38, Name = @"distance")] + [global::System.ComponentModel.DefaultValue("")] + public string Distance { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(39)] + [global::System.ComponentModel.DefaultValue("")] + public string distanceCity { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(40, Name = @"location")] + [global::System.ComponentModel.DefaultValue("")] + public string Location { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(41)] + [global::System.ComponentModel.DefaultValue("")] + public string realDistance { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(42)] + public Image feedRoomLabel { get; set; } + + [global::ProtoBuf.ProtoMember(43)] + [global::System.ComponentModel.DefaultValue("")] + public string commonLabelList { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(44)] + public RoomUserAttr livingRoomAttrs { get; set; } + + [global::ProtoBuf.ProtoMember(45, IsPacked = true)] + public long[] adminUserIds { get; set; } + + [global::ProtoBuf.ProtoMember(46, Name = @"owner")] + public User Owner { get; set; } + + [global::ProtoBuf.ProtoMember(47)] + [global::System.ComponentModel.DefaultValue("")] + public string privateInfo { get; set; } = ""; + + } + + [global::ProtoBuf.ProtoContract()] + public partial class RoomExtra : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class RoomStats : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class RoomUserAttr : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class StreamUrl : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class LinkMic : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class Decoration : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class TopFan : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class User : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"id")] + public long Id { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public long shortId { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"nickname")] + [global::System.ComponentModel.DefaultValue("")] + public string Nickname { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(4, Name = @"gender")] + public int Gender { get; set; } + + [global::ProtoBuf.ProtoMember(5, Name = @"signature")] + [global::System.ComponentModel.DefaultValue("")] + public string Signature { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(6, Name = @"level")] + public int Level { get; set; } + + [global::ProtoBuf.ProtoMember(7, Name = @"birthday")] + public long Birthday { get; set; } + + [global::ProtoBuf.ProtoMember(8, Name = @"telephone")] + [global::System.ComponentModel.DefaultValue("")] + public string Telephone { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(9)] + public Image avatarThumb { get; set; } + + [global::ProtoBuf.ProtoMember(10)] + public Image avatarMedium { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + public Image avatarLarge { get; set; } + + [global::ProtoBuf.ProtoMember(12, Name = @"verified")] + public bool Verified { get; set; } + + [global::ProtoBuf.ProtoMember(13, Name = @"experience")] + public int Experience { get; set; } + + [global::ProtoBuf.ProtoMember(14, Name = @"city")] + [global::System.ComponentModel.DefaultValue("")] + public string City { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(15, Name = @"status")] + public int Status { get; set; } + + [global::ProtoBuf.ProtoMember(16)] + public long createTime { get; set; } + + [global::ProtoBuf.ProtoMember(17)] + public long modifyTime { get; set; } + + [global::ProtoBuf.ProtoMember(18, Name = @"secret")] + public int Secret { get; set; } + + [global::ProtoBuf.ProtoMember(19)] + [global::System.ComponentModel.DefaultValue("")] + public string shareQrcodeUri { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(20)] + public int incomeSharePercent { get; set; } + + [global::ProtoBuf.ProtoMember(21)] + public Image badgeImageList { get; set; } + + [global::ProtoBuf.ProtoMember(22)] + public FollowInfo followInfo { get; set; } + + [global::ProtoBuf.ProtoMember(23)] + public PayGrade payGrade { get; set; } + + [global::ProtoBuf.ProtoMember(24)] + public FansClub fansClub { get; set; } + + [global::ProtoBuf.ProtoMember(25)] + public Border border { get; set; } + + [global::ProtoBuf.ProtoMember(26)] + [global::System.ComponentModel.DefaultValue("")] + public string specialId { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(27)] + public Image avatarBorder { get; set; } + + [global::ProtoBuf.ProtoMember(28, Name = @"medal")] + public Image Medal { get; set; } + + [global::ProtoBuf.ProtoMember(29)] + public global::System.Collections.Generic.List realTimeIcons { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(30)] + public global::System.Collections.Generic.List newRealTimeIcons { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(31)] + public long topVipNo { get; set; } + + [global::ProtoBuf.ProtoMember(32)] + public UserAttr userAttr { get; set; } + + [global::ProtoBuf.ProtoMember(33)] + public OwnRoom ownRoom { get; set; } + + [global::ProtoBuf.ProtoMember(34)] + public long payScore { get; set; } + + [global::ProtoBuf.ProtoMember(35)] + public long ticketCount { get; set; } + + [global::ProtoBuf.ProtoMember(36)] + public AnchorInfo anchorInfo { get; set; } + + [global::ProtoBuf.ProtoMember(37)] + public int linkMicStats { get; set; } + + [global::ProtoBuf.ProtoMember(38)] + [global::System.ComponentModel.DefaultValue("")] + public string displayId { get; set; } = ""; + + [global::ProtoBuf.ProtoContract()] + public partial class UserAttr : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class OwnRoom : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class AnchorInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class FollowInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1)] + public long followingCount { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public long followerCount { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long followStatus { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + public long pushStatus { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + [global::System.ComponentModel.DefaultValue("")] + public string remarkName { get; set; } = ""; + + } + + [global::ProtoBuf.ProtoContract()] + public partial class FansClub : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"data")] + public FansClubData Data { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"preferData")] + [global::ProtoBuf.ProtoMap] + public global::System.Collections.Generic.Dictionary preferDatas { get; } = new global::System.Collections.Generic.Dictionary(); + + [global::ProtoBuf.ProtoContract()] + public partial class FansClubData : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1)] + [global::System.ComponentModel.DefaultValue("")] + public string clubName { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(2, Name = @"level")] + public int Level { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public int userFansClubStatus { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"badge")] + public UserBadge Badge { get; set; } + + [global::ProtoBuf.ProtoMember(5, IsPacked = true)] + public long[] availableGiftIds { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + public long anchorId { get; set; } + + [global::ProtoBuf.ProtoContract()] + public partial class UserBadge : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"icons")] + [global::ProtoBuf.ProtoMap] + public global::System.Collections.Generic.Dictionary Icons { get; } = new global::System.Collections.Generic.Dictionary(); + + [global::ProtoBuf.ProtoMember(2, Name = @"title")] + [global::System.ComponentModel.DefaultValue("")] + public string Title { get; set; } = ""; + + } + + } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class Border : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GradeBuffInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1)] + public long buffLevel { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"status")] + public int Status { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long endTime { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"statsInfo")] + [global::ProtoBuf.ProtoMap] + public global::System.Collections.Generic.Dictionary statsInfoes { get; } = new global::System.Collections.Generic.Dictionary(); + + [global::ProtoBuf.ProtoMember(5)] + public Image buffBadge { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class PayGrade : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1)] + public long totalDiamondCount { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public Image diamondIcon { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"name")] + [global::System.ComponentModel.DefaultValue("")] + public string Name { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(4, Name = @"icon")] + public Image Icon { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + [global::System.ComponentModel.DefaultValue("")] + public string nextName { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(6, Name = @"level")] + public long Level { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + public Image nextIcon { get; set; } + + [global::ProtoBuf.ProtoMember(8)] + public long nextDiamond { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public long nowDiamond { get; set; } + + [global::ProtoBuf.ProtoMember(10)] + public long thisGradeMinDiamond { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + public long thisGradeMaxDiamond { get; set; } + + [global::ProtoBuf.ProtoMember(12)] + public long payDiamondBak { get; set; } + + [global::ProtoBuf.ProtoMember(13)] + [global::System.ComponentModel.DefaultValue("")] + public string gradeDescribe { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(14, Name = @"gradeIconList")] + public global::System.Collections.Generic.List gradeIconLists { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(15)] + public long screenChatType { get; set; } + + [global::ProtoBuf.ProtoMember(16)] + public Image imIcon { get; set; } + + [global::ProtoBuf.ProtoMember(17)] + public Image imIconWithLevel { get; set; } + + [global::ProtoBuf.ProtoMember(18)] + public Image liveIcon { get; set; } + + [global::ProtoBuf.ProtoMember(19)] + public Image newImIconWithLevel { get; set; } + + [global::ProtoBuf.ProtoMember(20)] + public Image newLiveIcon { get; set; } + + [global::ProtoBuf.ProtoMember(21)] + public long upgradeNeedConsume { get; set; } + + [global::ProtoBuf.ProtoMember(22)] + [global::System.ComponentModel.DefaultValue("")] + public string nextPrivileges { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(23, Name = @"background")] + public Image Background { get; set; } + + [global::ProtoBuf.ProtoMember(24)] + public Image backgroundBack { get; set; } + + [global::ProtoBuf.ProtoMember(25, Name = @"score")] + public long Score { get; set; } + + [global::ProtoBuf.ProtoMember(26)] + public User.GradeBuffInfo buffInfo { get; set; } + + [global::ProtoBuf.ProtoMember(1001)] + [global::System.ComponentModel.DefaultValue("")] + public string gradeBanner { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(1002)] + public Image profileDialogBg { get; set; } + + [global::ProtoBuf.ProtoMember(1003)] + public Image profileDialogBgBack { get; set; } + + [global::ProtoBuf.ProtoContract()] + public partial class GradeIcon : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"icon")] + public Image Icon { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public long iconDiamond { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"level")] + public long Level { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + [global::System.ComponentModel.DefaultValue("")] + public string levelStr { get; set; } = ""; + + } + + } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class TextFormat : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"color")] + [global::System.ComponentModel.DefaultValue("")] + public string Color { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(2, Name = @"bold")] + public bool Bold { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"italic")] + public bool Italic { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"weight")] + public int Weight { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + public int italicAngle { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + public int fontSize { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + public bool userHeightLightColor { get; set; } + + [global::ProtoBuf.ProtoMember(8)] + public bool useRemoteClor { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class TextPiece : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"type")] + public int Type { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"format")] + public TextFormat Format { get; set; } + + [global::ProtoBuf.ProtoMember(11)] + [global::System.ComponentModel.DefaultValue("")] + public string stringValue { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(21)] + public TextPieceUser userValue { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class Image : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"urlList")] + public global::System.Collections.Generic.List urlLists { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(2, Name = @"uri")] + [global::System.ComponentModel.DefaultValue("")] + public string Uri { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(3, Name = @"height")] + public long Height { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"width")] + public long Width { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + [global::System.ComponentModel.DefaultValue("")] + public string avgColor { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(6)] + public int imageType { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + [global::System.ComponentModel.DefaultValue("")] + public string openWebUrl { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(8)] + public Content content { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public bool isAnimated { get; set; } + + [global::ProtoBuf.ProtoContract()] + public partial class Content : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"name")] + [global::System.ComponentModel.DefaultValue("")] + public string Name { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(2)] + [global::System.ComponentModel.DefaultValue("")] + public string fontColor { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(3, Name = @"level")] + public long Level { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + [global::System.ComponentModel.DefaultValue("")] + public string alternativeText { get; set; } = ""; + + } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class TextPieceUser : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"user")] + public User User { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public bool withColon { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class PublicAreaCommon : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1)] + public Image userLabel { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public long userConsumeInRoom { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public long userSendGiftCntInRoom { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftIMPriority : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, IsPacked = true)] + public long[] queueSizes { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public long selfQueuePriority { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"priority")] + public long Priority { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftTrayInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1)] + public Text trayDisplayText { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public Image trayBaseImg { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public Image trayHeadImg { get; set; } + + [global::ProtoBuf.ProtoMember(4)] + public Image trayRightImg { get; set; } + + [global::ProtoBuf.ProtoMember(5)] + public long trayLevel { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + public Image trayDynamicImg { get; set; } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftStruct : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"image")] + public Image Image { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"describe")] + [global::System.ComponentModel.DefaultValue("")] + public string Describe { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(3, Name = @"notify")] + public bool Notify { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"duration")] + public long Duration { get; set; } + + [global::ProtoBuf.ProtoMember(5, Name = @"id")] + public long Id { get; set; } + + [global::ProtoBuf.ProtoMember(6)] + public GiftStructFansClubInfo fansclubInfo { get; set; } + + [global::ProtoBuf.ProtoMember(7)] + public bool forLinkmic { get; set; } + + [global::ProtoBuf.ProtoMember(8, Name = @"doodle")] + public bool Doodle { get; set; } + + [global::ProtoBuf.ProtoMember(9)] + public bool forFansclub { get; set; } + + [global::ProtoBuf.ProtoMember(10, Name = @"combo")] + public bool Combo { get; set; } + + [global::ProtoBuf.ProtoMember(11, Name = @"type")] + public int Type { get; set; } + + [global::ProtoBuf.ProtoMember(12)] + public int diamondCount { get; set; } + + [global::ProtoBuf.ProtoMember(13)] + public int isDisplayedOnPanel { get; set; } + + [global::ProtoBuf.ProtoMember(14)] + public long primaryEffectId { get; set; } + + [global::ProtoBuf.ProtoMember(15)] + public Image giftLabelIcon { get; set; } + + [global::ProtoBuf.ProtoMember(16, Name = @"name")] + [global::System.ComponentModel.DefaultValue("")] + public string Name { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(17, Name = @"region")] + [global::System.ComponentModel.DefaultValue("")] + public string Region { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(18, Name = @"manual")] + [global::System.ComponentModel.DefaultValue("")] + public string Manual { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(19)] + public bool forCustom { get; set; } + + [global::ProtoBuf.ProtoMember(20)] + [global::ProtoBuf.ProtoMap] + public global::System.Collections.Generic.Dictionary specialEffects { get; } = new global::System.Collections.Generic.Dictionary(); + + [global::ProtoBuf.ProtoMember(21, Name = @"icon")] + public Image Icon { get; set; } + + [global::ProtoBuf.ProtoMember(22)] + public int actionType { get; set; } + + [global::ProtoBuf.ProtoMember(23)] + public int watermelonSeeds { get; set; } + + [global::ProtoBuf.ProtoMember(24)] + [global::System.ComponentModel.DefaultValue("")] + public string goldEffect { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(25, Name = @"subs")] + public global::System.Collections.Generic.List Subs { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(26)] + public long goldenBeans { get; set; } + + [global::ProtoBuf.ProtoMember(27)] + public long honorLevel { get; set; } + + [global::ProtoBuf.ProtoMember(28)] + public int itemType { get; set; } + + [global::ProtoBuf.ProtoMember(29)] + [global::System.ComponentModel.DefaultValue("")] + public string schemeUrl { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(30)] + public GiftPanelOperation giftOperation { get; set; } + + [global::ProtoBuf.ProtoMember(31)] + [global::System.ComponentModel.DefaultValue("")] + public string eventName { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(32)] + public long nobleLevel { get; set; } + + [global::ProtoBuf.ProtoMember(33)] + [global::System.ComponentModel.DefaultValue("")] + public string guideUrl { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(34)] + public bool punishMedicine { get; set; } + + [global::ProtoBuf.ProtoMember(35)] + public bool forPortal { get; set; } + + [global::ProtoBuf.ProtoMember(36)] + [global::System.ComponentModel.DefaultValue("")] + public string businessText { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(37)] + public bool cnyGift { get; set; } + + [global::ProtoBuf.ProtoMember(38)] + public long appId { get; set; } + + [global::ProtoBuf.ProtoMember(39)] + public long vipLevel { get; set; } + + [global::ProtoBuf.ProtoMember(40)] + public bool isGray { get; set; } + + [global::ProtoBuf.ProtoMember(41)] + [global::System.ComponentModel.DefaultValue("")] + public string graySchemeUrl { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(42)] + public long giftScene { get; set; } + + [global::ProtoBuf.ProtoMember(43)] + public GiftBanner giftBanner { get; set; } + + [global::ProtoBuf.ProtoMember(44)] + public global::System.Collections.Generic.List triggerWords { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(45)] + public global::System.Collections.Generic.List giftBuffInfos { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoMember(46)] + public bool forFirstRecharge { get; set; } + + [global::ProtoBuf.ProtoMember(47)] + public Image dynamicImgForSelected { get; set; } + + [global::ProtoBuf.ProtoMember(48)] + public int afterSendAction { get; set; } + + [global::ProtoBuf.ProtoMember(49)] + public long giftOfflineTime { get; set; } + + [global::ProtoBuf.ProtoMember(50)] + [global::System.ComponentModel.DefaultValue("")] + public string topBarText { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(51)] + public Image topRightAvatar { get; set; } + + [global::ProtoBuf.ProtoMember(52)] + [global::System.ComponentModel.DefaultValue("")] + public string bannerSchemeUrl { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(53)] + public bool isLocked { get; set; } + + [global::ProtoBuf.ProtoMember(54)] + public long reqExtraType { get; set; } + + [global::ProtoBuf.ProtoMember(55, IsPacked = true)] + public long[] assetIds { get; set; } + + [global::ProtoBuf.ProtoMember(56)] + public GiftPreviewInfo giftPreviewInfo { get; set; } + + [global::ProtoBuf.ProtoMember(57)] + public GiftTip giftTip { get; set; } + + [global::ProtoBuf.ProtoMember(58)] + public int needSweepLightCount { get; set; } + + [global::ProtoBuf.ProtoMember(59, Name = @"groupInfo")] + public global::System.Collections.Generic.List groupInfoes { get; } = new global::System.Collections.Generic.List(); + + [global::ProtoBuf.ProtoContract()] + public partial class GiftStructFansClubInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1)] + public int minLevel { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public int insertPos { get; set; } + + } + + } + + [global::ProtoBuf.ProtoContract()] + public partial class AssetEffectMixInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class LuckyMoneyGiftMeta : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftPanelOperation : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftBanner : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftBuffInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftPreviewInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftTip : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class GiftGroupInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + + [global::ProtoBuf.ProtoContract()] + public partial class EffectMixImageInfo : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + } + +#pragma warning restore CS0612, CS0618, CS1591, CS3021, IDE0079, IDE1006, RCS1036, RCS1057, RCS1085, RCS1192 + +} + diff --git a/BarrageGrab/ProtoEntity/Wss.cs b/BarrageGrab/ProtoEntity/Wss.cs new file mode 100644 index 0000000..e08b473 --- /dev/null +++ b/BarrageGrab/ProtoEntity/Wss.cs @@ -0,0 +1,51 @@ +// +// This file was generated by a tool; you should avoid making direct changes. +// Consider using 'partial classes' to extend these types +// Input: my.proto +// + +namespace BarrageGrab.ProtoEntity +{ + #region Designer generated code +#pragma warning disable CS0612, CS0618, CS1591, CS3021, IDE0079, IDE1006, RCS1036, RCS1057, RCS1085, RCS1192 + [global::ProtoBuf.ProtoContract()] + public partial class WssResponse : global::ProtoBuf.IExtensible + { + private global::ProtoBuf.IExtension __pbn__extensionData; + global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing) + => global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing); + + [global::ProtoBuf.ProtoMember(1, Name = @"seqid")] + public ulong Seqid { get; set; } + + [global::ProtoBuf.ProtoMember(2, Name = @"logid")] + public ulong Logid { get; set; } + + [global::ProtoBuf.ProtoMember(3, Name = @"service")] + public ulong Service { get; set; } + + [global::ProtoBuf.ProtoMember(4, Name = @"method")] + public ulong Method { get; set; } + + [global::ProtoBuf.ProtoMember(5, Name = @"headers")] + [global::ProtoBuf.ProtoMap] + public global::System.Collections.Generic.Dictionary Headers { get; } = new global::System.Collections.Generic.Dictionary(); + + [global::ProtoBuf.ProtoMember(6)] + [global::System.ComponentModel.DefaultValue("")] + public string payloadEncoding { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(7)] + [global::System.ComponentModel.DefaultValue("")] + public string payloadType { get; set; } = ""; + + [global::ProtoBuf.ProtoMember(8, Name = @"payload")] + public byte[] Payload { get; set; } + + } + +#pragma warning restore CS0612, CS0618, CS1591, CS3021, IDE0079, IDE1006, RCS1036, RCS1057, RCS1085, RCS1192 + #endregion + +} + diff --git a/BarrageGrab/WssBarrageGrab.cs b/BarrageGrab/WssBarrageGrab.cs new file mode 100644 index 0000000..677e9a5 --- /dev/null +++ b/BarrageGrab/WssBarrageGrab.cs @@ -0,0 +1,220 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using BarrageGrab.ProtoEntity; +using ProtoBuf; + +namespace BarrageGrab +{ + /// + /// 本机Wss弹幕抓取器 + /// + public class WssBarrageGrab : IDisposable + { + FiddlerProxy proxy = new FiddlerProxy(); + Appsetting appsetting = Appsetting.Get(); + + /// + /// 进入直播间 + /// + public event EventHandler OnMemberMessage; + + /// + /// 关注 + /// + public event EventHandler OnSocialMessage; + + /// + /// 聊天 + /// + public event EventHandler OnChatMessage; + + /// + /// 点赞 + /// + public event EventHandler OnLikeMessage; + + /// + /// 礼物 + /// + public event EventHandler OnGiftMessage; + + /// + /// 直播间统计 + /// + public event EventHandler OnRoomUserSeqMessage; + + /// + /// 直播间状态变更 + /// + public event EventHandler OnControlMessage; + + /// + /// 粉丝团消息 + /// + public event EventHandler OnFansclubMessage; + + public WssBarrageGrab() + { + proxy.OnWebSocketData += Proxy_OnWebSocketData; + } + + public void Start() + { + proxy.Start(); + } + + public void Dispose() + { + proxy.Dispose(); + } + + //gzip解压缩 + private byte[] Decompress(byte[] zippedData) + { + MemoryStream ms = new MemoryStream(zippedData); + GZipStream compressedzipStream = new GZipStream(ms, CompressionMode.Decompress); + MemoryStream outBuffer = new MemoryStream(); + byte[] block = new byte[1024]; + while (true) + { + int bytesRead = compressedzipStream.Read(block, 0, block.Length); + if (bytesRead <= 0) + break; + else + outBuffer.Write(block, 0, bytesRead); + } + compressedzipStream.Close(); + return outBuffer.ToArray(); + } + + private void Proxy_OnWebSocketData(object sender, FiddlerProxy.WsMessageEventArgs e) + { + if (!appsetting.FilterProcess.Contains(e.ProcessName)) return; + var buff = e.Message.PayloadData; + if (buff.Length == 0) return; + if (buff[0] != 0x08) return; + + try + { + var enty = Serializer.Deserialize(new ReadOnlyMemory(buff)); + if (enty == null) return; + + //检测包格式 + if (!enty.Headers.Any(a => a.Key == "compress_type" && a.Value == "gzip")) return; + + //解压gzip + var odata = enty.Payload; + var decomp = Decompress(odata); + + var response = Serializer.Deserialize(new ReadOnlyMemory(decomp)); + response.Messages.ForEach(f => DoMessage(f)); + } + catch (Exception) { } + } + + private void DoMessage(Message msg) + { + try + { + switch (msg.Method) + { + case "WebcastMemberMessage": + { + var arg = Serializer.Deserialize(new ReadOnlyMemory(msg.Payload)); + this.OnMemberMessage?.Invoke(this, arg); + break; + } + case "WebcastSocialMessage": + { + var arg = Serializer.Deserialize(new ReadOnlyMemory(msg.Payload)); + this.OnSocialMessage?.Invoke(this, arg); + break; + } + case "WebcastChatMessage": + { + var arg = Serializer.Deserialize(new ReadOnlyMemory(msg.Payload)); + this.OnChatMessage?.Invoke(this, arg); + break; + } + case "WebcastLikeMessage": + { + var arg = Serializer.Deserialize(new ReadOnlyMemory(msg.Payload)); + this.OnLikeMessage?.Invoke(this, arg); + break; + } + case "WebcastGiftMessage": + { + var arg = Serializer.Deserialize(new ReadOnlyMemory(msg.Payload)); + + if (arg.Gift == null) + { + if (arg.giftId == 685) + { + arg.Gift = new ProtoEntity.GiftStruct() + { + Id = arg.giftId, + Name = "粉丝灯牌", + diamondCount = 1 + }; + } + else if (arg.giftId == 3389) + { + arg.Gift = new GiftStruct() + { + Id = arg.giftId, + Name = "欢乐盲盒", + diamondCount = 10 + }; + } + else if (arg.giftId == 4021) + { + arg.Gift = new GiftStruct() + { + Id = arg.giftId, + Name = "欢乐拼图", + diamondCount = 10 + }; + } + else + { + break; + } + } + + this.OnGiftMessage?.Invoke(this, arg); + break; + } + case "WebcastRoomUserSeqMessage": + { + var arg = Serializer.Deserialize(new ReadOnlyMemory(msg.Payload)); + this.OnRoomUserSeqMessage?.Invoke(this, arg); + break; + } + case "WebcastControlMessage": + { + var arg = Serializer.Deserialize(new ReadOnlyMemory(msg.Payload)); + this.OnControlMessage?.Invoke(this, arg); + break; + } + case "WebcastFansclubMessage": + { + var arg = Serializer.Deserialize(new ReadOnlyMemory(msg.Payload)); + this.OnFansclubMessage?.Invoke(this, arg); + break; + } + default: + break; + } + } + catch (Exception) + { + return; + } + } + } +} diff --git a/BarrageGrab/WssBarrageService.cs b/BarrageGrab/WssBarrageService.cs new file mode 100644 index 0000000..e76ccb1 --- /dev/null +++ b/BarrageGrab/WssBarrageService.cs @@ -0,0 +1,216 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.WebSockets; +using System.Text; +using System.Threading.Tasks; +using System.Timers; +using BarrageGrab.JsonEntity; +using ColorConsole; +using Fleck; +using Newtonsoft.Json; + +namespace BarrageGrab +{ + /// + /// 弹幕服务 + /// + internal class WssBarrageService + { + WebSocketServer socketServer; + Dictionary socketList = new Dictionary(); + Timer dieout = new Timer(10000); + ConsoleWriter console = new ConsoleWriter(); + WssBarrageGrab grab = new WssBarrageGrab(); + Appsetting Appsetting = Appsetting.Get(); + + public WssBarrageService() + { + var socket = new WebSocketServer($"ws://127.0.0.1:{Appsetting.WsProt}"); + socket.RestartAfterListenError = true;//异常重启 + + dieout.Elapsed += Dieout_Elapsed; + + this.grab.OnChatMessage += Grab_OnChatMessage; + this.grab.OnLikeMessage += Grab_OnLikeMessage; + this.grab.OnMemberMessage += Grab_OnMemberMessage; + this.grab.OnSocialMessage += Grab_OnSocialMessage; + this.grab.OnGiftMessage += Grab_OnGiftMessage; + + this.socketServer = socket; + //dieout.Start(); + } + + private MsgUser GetUser(dynamic obj) + { + MsgUser user = new MsgUser() + { + DisplayId = obj.User.displayId, + Gender = obj.User.Gender, + Id = obj.User.Id, + Level = obj.User.Level, + Nickname = obj.User.Nickname + }; + return user; + } + + private void Grab_OnGiftMessage(object sender, ProtoEntity.GiftMessage e) + { + var enty = new GiftMsg() + { + RoomId = e.Common.roomId, + Content = e.Common.Describe, + GiamondCount = e.Gift.diamondCount, + GiftCount = e.repeatCount, + GiftId = e.giftId, + GiftName = e.Gift.Name, + User = GetUser(e) + }; + var pack = new BarrageMsgPack(JsonConvert.SerializeObject(enty), BarrageMsgType.送礼); + var json = JsonConvert.SerializeObject(pack); + this.Broadcast(json); + } + + private void Grab_OnSocialMessage(object sender, ProtoEntity.SocialMessage e) + { + var enty = new Msg() + { + Content = e.Common.Describe, + RoomId = e.Common.roomId, + User = GetUser(e) + }; + var pack = new BarrageMsgPack(JsonConvert.SerializeObject(enty), BarrageMsgType.关注主播); + var json = JsonConvert.SerializeObject(pack); + this.Broadcast(json); + } + + private void Grab_OnMemberMessage(object sender, ProtoEntity.MemberMessage e) + { + var enty = new Msg() + { + Content = e.Common.Describe, + RoomId = e.Common.roomId, + User = GetUser(e) + }; + var pack = new BarrageMsgPack(JsonConvert.SerializeObject(enty), BarrageMsgType.进入直播间); + var json = JsonConvert.SerializeObject(pack); + this.Broadcast(json); + } + + private void Grab_OnLikeMessage(object sender, ProtoEntity.LikeMessage e) + { + var enty = new LikeMsg() + { + Count = e.Count, + Content = e.Common.Describe, + RoomId = e.Common.roomId, + User = GetUser(e) + }; + var pack = new BarrageMsgPack(JsonConvert.SerializeObject(enty), BarrageMsgType.点赞); + var json = JsonConvert.SerializeObject(pack); + this.Broadcast(json); + } + + private void Grab_OnChatMessage(object sender, ProtoEntity.ChatMessage e) + { + var enty = new Msg() + { + Content = e.Content, + RoomId = e.Common.roomId, + User = GetUser(e) + }; + var pack = new BarrageMsgPack(JsonConvert.SerializeObject(enty), BarrageMsgType.消息); + var json = JsonConvert.SerializeObject(pack); + this.Broadcast(json); + } + + private void Dieout_Elapsed(object sender, ElapsedEventArgs e) + { + var now = DateTime.Now; + var dieoutKvs = socketList.Where(w => w.Value.LastPing.AddSeconds(dieout.Interval * 3) < now).ToList(); + dieoutKvs.ForEach(f => f.Value.Socket.Close()); + } + + private void Listen(IWebSocketConnection socket) + { + //客户端url + string clientUrl = socket.ConnectionInfo.ClientIpAddress + ":" + socket.ConnectionInfo.ClientPort; + if (!socketList.ContainsKey(clientUrl)) + { + socketList.Add(clientUrl, new UserState(socket)); + console.WriteLine($"{DateTime.Now.ToLongTimeString()} 已经建立与[{clientUrl}]的连接", ConsoleColor.Green); + } + else + { + socketList[clientUrl].Socket = socket; + } + + socket.OnClose = () => + { + socketList.Remove(clientUrl); + console.WriteLine($"{DateTime.Now.ToLongTimeString()} 已经关闭与[{clientUrl}]的连接", ConsoleColor.Red); + }; + + socket.OnPing = (data) => + { + socketList[clientUrl].LastPing = DateTime.Now; + socket.SendPong(Encoding.UTF8.GetBytes("pong")); + }; + } + + /// + /// 广播消息 + /// + /// + public void Broadcast(string msg) + { + foreach (var user in socketList) + { + var socket = user.Value; + socket.Socket.Send(msg); + } + } + + public void StartListen() + { + this.grab.Start(); //启动代理 + this.socketServer.Start(Listen);//启动监听 + console.WriteLine($"{this.socketServer.Location} 弹幕服务已启动...", ConsoleColor.Green); + } + + /// + /// 关闭服务器连接 + /// + public void Close() + { + socketList.Values.ToList().ForEach(f => f.Socket.Close()); + socketList.Clear(); + socketServer.Dispose(); + grab.Dispose(); + + console.WriteLine("服务器已关闭..."); + } + + class UserState + { + /// + /// 套接字 + /// + public IWebSocketConnection Socket { get; set; } + + /// + /// 上次发起心跳包时间 + /// + public DateTime LastPing { get; set; } = DateTime.Now; + + public UserState() + { + + } + public UserState(IWebSocketConnection socket) + { + Socket = socket; + } + } + } +} diff --git a/BarrageGrab/WssBarrageService.csproj b/BarrageGrab/WssBarrageService.csproj new file mode 100644 index 0000000..582d0a9 --- /dev/null +++ b/BarrageGrab/WssBarrageService.csproj @@ -0,0 +1,122 @@ + + + + + Debug + AnyCPU + {A07BB1DA-D5C2-4EEA-9F3F-E42AADB9C1D6} + Exe + Properties + BarrageGrab + WssBarrageService + v4.8 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + LocalIntranet + + + false + + + Properties\app.manifest + + + + ..\packages\FiddlerCore.4.6.2.0\lib\net40\BasicFormatsForCore.dll + + + ..\packages\FiddlerCore.4.6.2.0\lib\net40\BCMakeCert.dll + + + ..\packages\FiddlerCore.4.6.2.0\lib\net40\CertMaker.dll + + + ..\packages\ColorConsole.1.0.1\lib\net40\ColorConsole.dll + + + ..\packages\FiddlerCore.4.6.2.0\lib\net40\FiddlerCore4.dll + + + ..\packages\Fleck.1.2.0\lib\net45\Fleck.dll + + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + + ..\packages\protobuf-net.3.1.22\lib\net462\protobuf-net.dll + + + ..\packages\protobuf-net.Core.3.1.22\lib\net462\protobuf-net.Core.dll + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.1.7.1\lib\net461\System.Collections.Immutable.dll + + + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + Always + + + + \ No newline at end of file diff --git a/BarrageGrab/packages.config b/BarrageGrab/packages.config new file mode 100644 index 0000000..4665f8b --- /dev/null +++ b/BarrageGrab/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BarrageGrab/proto/message.proto b/BarrageGrab/proto/message.proto new file mode 100644 index 0000000..4cd59c5 --- /dev/null +++ b/BarrageGrab/proto/message.proto @@ -0,0 +1,582 @@ +syntax = "proto3"; + +message Response{ + repeated Message messages = 1; + string cursor = 2; + int64 fetchInterval = 3; + int64 now = 4; + string internalExt = 5; + int32 fetchType = 6; + map routeParams = 7; + int64 heartbeatDuration = 8; + bool needAck = 9; + string pushServer = 10; + string liveCursor = 11; + bool historyNoMore = 12; +} + +message Message{ + string method = 1; + bytes payload = 2; + int64 msgId = 3; + int32 msgType = 4; + int64 offset = 5; +} + +message RoomUserSeqMessage { + Common common = 1; + repeated Contributor ranks = 2; + int64 total = 3; + string popStr = 4; + repeated Contributor seats = 5; + int64 popularity = 6; + int64 totalUser = 7; + string totalUserStr = 8; + string totalStr = 9; + string onlineUserForAnchor = 10; + string totalPvForAnchor = 11; + + message Contributor { + int64 score = 1; + User user = 2; + int64 rank = 3; + int64 delta = 4; + bool isHidden = 5; + string scoreDescription = 6; + string exactlyScore = 7; + } +} + +message GiftMessage { + Common common = 1; + int64 giftId = 2; + int64 fanTicketCount = 3; + int64 groupCount = 4; + int64 repeatCount = 5; + int64 comboCount = 6; + User user = 7; + User toUser = 8; + int32 repeatEnd = 9; + TextEffect textEffect = 10; + int64 groupId = 11; + int64 incomeTaskgifts = 12; + int64 roomFanTicketCount = 13; + GiftIMPriority priority = 14; + GiftStruct gift = 15; + string logId = 16; + int64 sendType = 17; + PublicAreaCommon publicAreaCommon = 18; + Text trayDisplayText = 19; + int64 bannedDisplayEffects = 20; + GiftTrayInfo trayInfo = 21; + AssetEffectMixInfo assetEffectMixInfo = 24; + + message TextEffect{ + Detail portrait = 1; + Detail landscape = 2; + + message Detail { + Text text = 1; + int32 textFontSize = 2; + Image background = 3; + int32 start = 4; + int32 duration = 5; + int32 x = 6; + int32 y = 7; + int32 width = 8; + int32 height = 9; + int32 shadowDx = 10; + int32 shadowDy = 11; + int32 shadowRadius = 12; + string shadowColor = 13; + string strokeColor = 14; + int32 strokeWidth = 15; + } + } +} + +message LikeMessage { + Common common = 1; + int64 count = 2; + int64 total = 3; + int64 color = 4; + User user = 5; + string icon = 6; +} + +message ChatMessage { + Common common = 1; + User user = 2; + string content = 3; + bool visibleToSender = 4; + Image backgroundImage = 5; + string fullScreenTextColor = 6; + Image backgroundImageV2 = 7; + PublicAreaCommon publicAreaCommon = 9; + Image giftImage = 10; +} + +message SocialMessage { + Common common = 1; + User user = 2; + int64 shareType = 3; + int64 action = 4; + string shareTarget = 5; + int64 followCount = 6; + PublicAreaCommon publicAreaCommon = 7; +} + +message MemberMessage{ + Common common = 1; + User user = 2; + int64 memberCount = 3; + User operator = 4; + bool isSetToAdmin = 5; + bool isTopUser = 6; + int64 rankScore = 7; + int64 topUserNo = 8; + int64 enterType = 9; + int64 action = 10; + string actionDescription = 11; + int64 userId = 12; + EffectConfig effectConfig = 13; + string popStr = 14; + EffectConfig enterEffectConfig = 15; + Image backgroundImage = 16; + Image backgroundImageV2 = 17; + Text anchorDisplayText = 18; + PublicAreaCommon publicAreaCommon = 19; + + message EffectConfig{ + int64 type = 1; + Image icon = 2; + int64 avatarPos = 3; + Text text = 4; + Image textIcon = 5; + int32 stayTime = 6; + int64 animAssetId = 7; + Image badge = 8; + repeated int64 flexSettingArray = 9; + Image textIconOverlay = 10; + Image animatedBadge = 11; + bool hasSweepLight = 12; + repeated int64 textFlexSettingArray = 13; + int64 centerAnimAssetId = 14; + } +} + +message ControlMessage { + Common common = 1; + int32 status = 2; +} + +message FansclubMessage { + Common commonInfo = 1; + // 升级是1,加入是2 + int32 type = 2; + string content = 3; + User user = 4; +} + +message Common{ + string method = 1; + int64 msgId = 2; + int64 roomId = 3; + int64 createTime = 4; + int32 monitor = 5; + bool isShowMsg = 6; + string describe = 7; + Text displayText = 8; + int64 foldType = 9; + int64 anchorFoldType = 10; + int64 priorityScore = 11; + string logId = 12; + string msgProcessFilterK = 13; + string msgProcessFilterV = 14; + User user = 15; + Room room = 16; + int64 anchorFoldTypeV2 = 17; + int64 processAtSeiTimeMs = 18; +} + +message Text{ + string key = 1; + string defaultPattern = 2; + TextFormat defaultFormat = 3; + repeated TextPiece pieces = 4; +} + +message Room { + int64 id = 1; + string idStr = 2; + int64 status = 3; + int64 ownerUserId = 4; + string title = 5; + int64 userCount = 6; + int64 createTime = 7; + int64 linkmicLayout = 8; + int64 finishTime = 9; + RoomExtra extra = 10; + string dynamicCoverUri = 11; + map dynamicCoverDict = 12; + int64 lastPingTime = 13; + int64 liveId = 14; + int64 streamProvider = 15; + int64 osType = 16; + int64 clientVersion = 17; + bool withLinkmic = 18; + bool enableRoomPerspective = 19; + Image cover = 20; + Image dynamicCover = 21; + Image dynamicCoverLow = 22; + string shareUrl = 23; + string anchorShareText = 24; + string userShareText = 25; + int64 streamId = 26; + string streamIdStr = 27; + StreamUrl streamUrl = 28; + int64 mosaicStatus = 29; + string mosaicTip = 30; + int64 cellStyle = 31; + LinkMic linkMic = 32; + int64 luckymoneyNum = 33; + repeated Decoration decoList = 34; + repeated TopFan topFans = 35; + RoomStats stats = 36; + string sunDailyIconContent = 37; + string distance = 38; + string distanceCity = 39; + string location = 40; + string realDistance = 41; + Image feedRoomLabel = 42; + string commonLabelList = 43; + RoomUserAttr livingRoomAttrs = 44; + repeated int64 adminUserIds = 45; + User owner = 46; + string privateInfo = 47; +} + +message RoomExtra{ + +} + +message RoomStats{ + +} + +message RoomUserAttr{ + +} + +message StreamUrl{ + +} + +message LinkMic { + +} + +message Decoration{ + +} + +message TopFan { + +} + +message User{ + int64 id = 1; + int64 shortId = 2; + string nickname = 3; + int32 gender = 4; + string signature = 5; + int32 level = 6; + int64 birthday = 7; + string telephone = 8; + Image avatarThumb = 9; + Image avatarMedium = 10; + Image avatarLarge = 11; + bool verified = 12; + int32 experience = 13; + string city = 14; + int32 status = 15; + int64 createTime = 16; + int64 modifyTime = 17; + int32 secret = 18; + string shareQrcodeUri = 19; + int32 incomeSharePercent = 20; + Image badgeImageList = 21; + FollowInfo followInfo = 22; + PayGrade payGrade = 23; + FansClub fansClub = 24; + Border border = 25; + string specialId = 26; + Image avatarBorder = 27; + Image medal = 28; + repeated Image realTimeIcons = 29; + repeated Image newRealTimeIcons = 30; + int64 topVipNo = 31; + UserAttr userAttr = 32; + OwnRoom ownRoom = 33; + int64 payScore = 34; + int64 ticketCount = 35; + AnchorInfo anchorInfo = 36; + int32 linkMicStats = 37; + string displayId = 38; + + message UserAttr { + + } + + message OwnRoom { + + } + + message AnchorInfo { + + } + + message FollowInfo { + int64 followingCount = 1; + int64 followerCount = 2; + int64 followStatus = 3; + int64 pushStatus = 4; + string remarkName = 5; + } + + message FansClub{ + FansClubData data = 1; + map preferData = 2; + + message FansClubData { + string clubName = 1; + int32 level = 2; + int32 userFansClubStatus = 3; + UserBadge badge = 4; + repeated int64 availableGiftIds = 5; + int64 anchorId = 6; + + message UserBadge { + map icons = 1; + string title = 2; + } + } + } + + message Border{ + + } + + message GradeBuffInfo { + int64 buffLevel = 1; + int32 status = 2; + int64 endTime = 3; + map statsInfo = 4; + Image buffBadge = 5; + } + + message PayGrade { + int64 totalDiamondCount = 1; + Image diamondIcon = 2; + string name = 3; + Image icon = 4; + string nextName = 5; + int64 level = 6; + Image nextIcon = 7; + int64 nextDiamond = 8; + int64 nowDiamond = 9; + int64 thisGradeMinDiamond = 10; + int64 thisGradeMaxDiamond = 11; + int64 payDiamondBak = 12; + string gradeDescribe = 13; + repeated GradeIcon gradeIconList = 14; + int64 screenChatType = 15; + Image imIcon = 16; + Image imIconWithLevel = 17; + Image liveIcon = 18; + Image newImIconWithLevel = 19; + Image newLiveIcon = 20; + int64 upgradeNeedConsume = 21; + string nextPrivileges = 22; + Image background = 23; + Image backgroundBack = 24; + int64 score = 25; + GradeBuffInfo buffInfo = 26; + string gradeBanner = 1001; + Image profileDialogBg = 1002; + Image profileDialogBgBack = 1003; + + message GradeIcon{ + Image icon = 1; + int64 iconDiamond = 2; + int64 level = 3; + string levelStr = 4; + } + } +} + +message TextFormat{ + string color = 1; + bool bold = 2; + bool italic = 3; + int32 weight = 4; + int32 italicAngle = 5; + int32 fontSize = 6; + bool userHeightLightColor = 7; + bool useRemoteClor = 8; +} + +message TextPiece{ + int32 type = 1; + TextFormat format = 2; + string stringValue = 11; + TextPieceUser userValue = 21; +} + +message Image{ + repeated string urlList = 1; + string uri = 2; + int64 height = 3; + int64 width = 4; + string avgColor = 5; + int32 imageType = 6; + string openWebUrl = 7; + Content content = 8; + bool isAnimated = 9; + + message Content { + string name = 1; + string fontColor = 2; + int64 level = 3; + string alternativeText = 4; + } +} + +message TextPieceUser{ + User user = 1; + bool withColon = 2; +} + +message PublicAreaCommon { + Image userLabel = 1; + int64 userConsumeInRoom = 2; + int64 userSendGiftCntInRoom = 3; +} + +message GiftIMPriority { + repeated int64 queueSizes = 1; + int64 selfQueuePriority = 2; + int64 priority = 3; +} + +message GiftTrayInfo{ + Text trayDisplayText = 1; + Image trayBaseImg = 2; + Image trayHeadImg = 3; + Image trayRightImg = 4; + int64 trayLevel = 5; + Image trayDynamicImg = 6; +} + +message GiftStruct { + Image image = 1; + string describe = 2; + bool notify = 3; + int64 duration = 4; + int64 id = 5; + GiftStructFansClubInfo fansclubInfo = 6; + bool forLinkmic = 7; + bool doodle = 8; + bool forFansclub = 9; + bool combo = 10; + int32 type = 11; + int32 diamondCount = 12; + int32 isDisplayedOnPanel = 13; + int64 primaryEffectId = 14; + Image giftLabelIcon = 15; + string name = 16; + string region = 17; + string manual = 18; + bool forCustom = 19; + map specialEffects = 20; + Image icon = 21; + int32 actionType = 22; + int32 watermelonSeeds = 23; + string goldEffect = 24; + repeated LuckyMoneyGiftMeta subs = 25; + int64 goldenBeans = 26; + int64 honorLevel = 27; + int32 itemType = 28; + string schemeUrl = 29; + GiftPanelOperation giftOperation = 30; + string eventName = 31; + int64 nobleLevel = 32; + string guideUrl = 33; + bool punishMedicine = 34; + bool forPortal = 35; + string businessText = 36; + bool cnyGift = 37; + int64 appId = 38; + int64 vipLevel = 39; + bool isGray = 40; + string graySchemeUrl = 41; + int64 giftScene = 42; + GiftBanner giftBanner = 43; + repeated string triggerWords = 44; + repeated GiftBuffInfo giftBuffInfos = 45; + bool forFirstRecharge = 46; + Image dynamicImgForSelected = 47; + int32 afterSendAction = 48; + int64 giftOfflineTime = 49; + string topBarText = 50; + Image topRightAvatar = 51; + string bannerSchemeUrl = 52; + bool isLocked = 53; + int64 reqExtraType = 54; + repeated int64 assetIds = 55; + GiftPreviewInfo giftPreviewInfo = 56; + GiftTip giftTip = 57; + int32 needSweepLightCount = 58; + repeated GiftGroupInfo groupInfo = 59; + + message GiftStructFansClubInfo { + int32 minLevel = 1; + int32 insertPos = 2; + } +} + +message AssetEffectMixInfo{ + +} + +message LuckyMoneyGiftMeta { + +} + +message GiftPanelOperation { + +} + +message GiftBanner { + +} + +message GiftBuffInfo{ + +} + +message GiftPreviewInfo{ + +} + +message GiftTip { + +} + +message GiftGroupInfo { + +} + +message EffectMixImageInfo { + +} \ No newline at end of file diff --git a/BarrageGrab/proto/wss.proto b/BarrageGrab/proto/wss.proto new file mode 100644 index 0000000..655fb98 --- /dev/null +++ b/BarrageGrab/proto/wss.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +message WssResponse{ + uint64 seqid = 1; + uint64 logid = 2; + uint64 service = 3; + uint64 method = 4; + map headers = 5; + string payloadEncoding = 6; + string payloadType = 7; + bytes payload = 8; +} \ No newline at end of file diff --git a/BarrageService.sln b/BarrageService.sln new file mode 100644 index 0000000..c4ba32d --- /dev/null +++ b/BarrageService.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32408.312 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WssBarrageService", "BarrageGrab\WssBarrageService.csproj", "{A07BB1DA-D5C2-4EEA-9F3F-E42AADB9C1D6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A07BB1DA-D5C2-4EEA-9F3F-E42AADB9C1D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A07BB1DA-D5C2-4EEA-9F3F-E42AADB9C1D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A07BB1DA-D5C2-4EEA-9F3F-E42AADB9C1D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A07BB1DA-D5C2-4EEA-9F3F-E42AADB9C1D6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D3F6B9CD-510D-4289-9FCD-F0F8C9AB2ED2} + EndGlobalSection +EndGlobal