清理程序,并移除 BouncyCastle 的dll
This commit is contained in:
@@ -57,7 +57,7 @@ namespace BarrageGrab
|
|||||||
var hWnd = WinApi.GetConsoleWindow();
|
var hWnd = WinApi.GetConsoleWindow();
|
||||||
if (hWnd != IntPtr.Zero)
|
if (hWnd != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
WinApi.ShowWindow(hWnd, show? WinApi.CmdShow.SW_SHOW:WinApi.CmdShow.SW_HIDE);
|
WinApi.ShowWindow(hWnd, show ? WinApi.CmdShow.SW_SHOW : WinApi.CmdShow.SW_HIDE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ namespace BarrageGrab
|
|||||||
WebRoomId = webrid,
|
WebRoomId = webrid,
|
||||||
Title = "房间" + webrid
|
Title = "房间" + webrid
|
||||||
};
|
};
|
||||||
var succ = RoomInfoCache.TryAdd(roomid,info);
|
var succ = RoomInfoCache.TryAdd(roomid, info);
|
||||||
if (succ)
|
if (succ)
|
||||||
{
|
{
|
||||||
OnCache?.Invoke(this, new RoomCacheEventArgs()
|
OnCache?.Invoke(this, new RoomCacheEventArgs()
|
||||||
@@ -130,7 +130,7 @@ namespace BarrageGrab
|
|||||||
var succ = RoomInfoCache.TryAdd(roomid, roomInfo);
|
var succ = RoomInfoCache.TryAdd(roomid, roomInfo);
|
||||||
if (succ)
|
if (succ)
|
||||||
{
|
{
|
||||||
OnCache?.Invoke(this,new RoomCacheEventArgs()
|
OnCache?.Invoke(this, new RoomCacheEventArgs()
|
||||||
{
|
{
|
||||||
Model = 0,
|
Model = 0,
|
||||||
RoomInfo = roomInfo
|
RoomInfo = roomInfo
|
||||||
@@ -147,7 +147,7 @@ namespace BarrageGrab
|
|||||||
public string GetCachedWebRoomid(string roomid)
|
public string GetCachedWebRoomid(string roomid)
|
||||||
{
|
{
|
||||||
RoomInfo value;
|
RoomInfo value;
|
||||||
if (RoomInfoCache.TryGetValue(roomid,out value)) return value.WebRoomId??"未知";
|
if (RoomInfoCache.TryGetValue(roomid, out value)) return value.WebRoomId ?? "未知";
|
||||||
return "未知";
|
return "未知";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using BarrageGrab.Modles.JsonEntity;
|
using BarrageGrab.Modles.JsonEntity;
|
||||||
using static System.Configuration.ConfigurationManager;
|
using static System.Configuration.ConfigurationManager;
|
||||||
using System.Drawing;
|
|
||||||
|
|
||||||
namespace BarrageGrab
|
namespace BarrageGrab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO.Ports;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.IO.Ports;
|
|
||||||
using Jint;
|
|
||||||
using Jint.Runtime;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Jint;
|
||||||
using Jint.Native;
|
using Jint.Native;
|
||||||
|
using Jint.Runtime;
|
||||||
|
|
||||||
namespace BarrageGrab
|
namespace BarrageGrab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using BarrageGrab.Forms;
|
using System;
|
||||||
using BarrageGrab.Forms.Models;
|
|
||||||
using BarrageGrab.Modles.JsonEntity;
|
|
||||||
using BarrageGrab.Proxy;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -13,6 +9,10 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using BarrageGrab.Forms;
|
||||||
|
using BarrageGrab.Forms.Models;
|
||||||
|
using BarrageGrab.Modles.JsonEntity;
|
||||||
|
using BarrageGrab.Proxy;
|
||||||
|
|
||||||
namespace BarrageGrab
|
namespace BarrageGrab
|
||||||
{
|
{
|
||||||
@@ -96,7 +96,7 @@ namespace BarrageGrab
|
|||||||
{
|
{
|
||||||
AppSetting.Current.PushFilter = selected;
|
AppSetting.Current.PushFilter = selected;
|
||||||
}
|
}
|
||||||
if(cbx.Parent.Parent == this.tabPage_Log)
|
if (cbx.Parent.Parent == this.tabPage_Log)
|
||||||
{
|
{
|
||||||
AppSetting.Current.LogFilter = selected;
|
AppSetting.Current.LogFilter = selected;
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ namespace BarrageGrab
|
|||||||
return list.OrderBy(o => o).ToArray();
|
return list.OrderBy(o => o).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dictionary<int,string> GetMsgTypes()
|
private Dictionary<int, string> GetMsgTypes()
|
||||||
{
|
{
|
||||||
var dic = new Dictionary<int, string>();
|
var dic = new Dictionary<int, string>();
|
||||||
Type enumType = typeof(PackMsgType);
|
Type enumType = typeof(PackMsgType);
|
||||||
@@ -127,7 +127,7 @@ namespace BarrageGrab
|
|||||||
{
|
{
|
||||||
DescriptionAttribute attribute = (DescriptionAttribute)field.GetCustomAttribute(typeof(DescriptionAttribute), false);
|
DescriptionAttribute attribute = (DescriptionAttribute)field.GetCustomAttribute(typeof(DescriptionAttribute), false);
|
||||||
int value = (int)field.GetValue(null);
|
int value = (int)field.GetValue(null);
|
||||||
if (attribute != null && value>0)
|
if (attribute != null && value > 0)
|
||||||
{
|
{
|
||||||
dic.Add(value, attribute.Description);
|
dic.Add(value, attribute.Description);
|
||||||
}
|
}
|
||||||
@@ -225,7 +225,7 @@ namespace BarrageGrab
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//弹窗提示错误
|
//弹窗提示错误
|
||||||
MessageBox.Show(ex.Message,"设置失败");
|
MessageBox.Show(ex.Message, "设置失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using BarrageGrab.Modles;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using BarrageGrab.Modles;
|
||||||
|
|
||||||
namespace BarrageGrab.Forms.Models
|
namespace BarrageGrab.Forms.Models
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,7 @@ namespace BarrageGrab.Forms.Models
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
if (RoomInfo == null) return "NULL";
|
if (RoomInfo == null) return "NULL";
|
||||||
return $"({RoomInfo.WebRoomId}){RoomInfo?.Owner?.Nickname??"-1"}";
|
return $"({RoomInfo.WebRoomId}){RoomInfo?.Owner?.Nickname ?? "-1"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using BarrageGrab.Modles;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -8,6 +7,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using BarrageGrab.Modles;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace BarrageGrab.Forms
|
namespace BarrageGrab.Forms
|
||||||
@@ -18,7 +18,7 @@ namespace BarrageGrab.Forms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
//小驼峰
|
//小驼峰
|
||||||
var json = JsonConvert.SerializeObject(info,Formatting.Indented,new JsonSerializerSettings()
|
var json = JsonConvert.SerializeObject(info, Formatting.Indented, new JsonSerializerSettings()
|
||||||
{
|
{
|
||||||
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
|
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.IO;
|
|
||||||
using Jint;
|
using Jint;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Jint.Native;
|
using Jint.Native;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace BarrageGrab
|
namespace BarrageGrab
|
||||||
{
|
{
|
||||||
@@ -165,7 +165,7 @@ namespace BarrageGrab
|
|||||||
return eng.Invoke("byteToUint8Array", buff);
|
return eng.Invoke("byteToUint8Array", buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JsValue toNumber(byte[] buff,int startIndex = 0)
|
public JsValue toNumber(byte[] buff, int startIndex = 0)
|
||||||
{
|
{
|
||||||
return BitConverter.ToDouble(buff, startIndex);
|
return BitConverter.ToDouble(buff, startIndex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
using HtmlAgilityPack;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.InteropServices.ComTypes;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Runtime.InteropServices;
|
using HtmlAgilityPack;
|
||||||
using IWshRuntimeLibrary;
|
using IWshRuntimeLibrary;
|
||||||
using File = System.IO.File;
|
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System.Diagnostics;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Runtime.InteropServices.ComTypes;
|
using File = System.IO.File;
|
||||||
|
|
||||||
namespace BarrageGrab
|
namespace BarrageGrab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using NLog;
|
|
||||||
using BarrageGrab.Modles.JsonEntity;
|
using BarrageGrab.Modles.JsonEntity;
|
||||||
using System.IO;
|
using NLog;
|
||||||
|
|
||||||
namespace BarrageGrab
|
namespace BarrageGrab
|
||||||
{
|
{
|
||||||
@@ -83,7 +83,7 @@ namespace BarrageGrab
|
|||||||
{
|
{
|
||||||
var dir = Path.Combine(AppContext.BaseDirectory, "logs", "弹幕日志");
|
var dir = Path.Combine(AppContext.BaseDirectory, "logs", "弹幕日志");
|
||||||
var room = AppRuntime.RoomCaches.GetCachedWebRoomInfo(msg.RoomId.ToString());
|
var room = AppRuntime.RoomCaches.GetCachedWebRoomInfo(msg.RoomId.ToString());
|
||||||
if(room == null) return;
|
if (room == null) return;
|
||||||
var date = DateTime.Now.ToString("yyyy年MM月dd日直播");
|
var date = DateTime.Now.ToString("yyyy年MM月dd日直播");
|
||||||
var nickName = SafePathString(room?.Owner?.Nickname ?? "-1");
|
var nickName = SafePathString(room?.Owner?.Nickname ?? "-1");
|
||||||
dir = Path.Combine(dir, $"({room.WebRoomId}){nickName}", date, "场次" + msg.RoomId.ToString());
|
dir = Path.Combine(dir, $"({room.WebRoomId}){nickName}", date, "场次" + msg.RoomId.ToString());
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace BarrageGrab.Modles
|
|||||||
this.Code = -1;
|
this.Code = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BusinessExecption(string msg,object data) : base(msg)
|
public BusinessExecption(string msg, object data) : base(msg)
|
||||||
{
|
{
|
||||||
this.ErrorTarget = data;
|
this.ErrorTarget = data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace BarrageGrab.Modles.JsonEntity
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BarrageMsgPack(string data, PackMsgType type,string processName)
|
public BarrageMsgPack(string data, PackMsgType type, string processName)
|
||||||
{
|
{
|
||||||
Data = data;
|
Data = data;
|
||||||
Type = type;
|
Type = type;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace BarrageGrab.Modles
|
namespace BarrageGrab.Modles
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,13 +31,13 @@ namespace BarrageGrab
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="obj"></param>
|
/// <param name="obj"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string ToJson(this object obj,bool format = false)
|
public static string ToJson(this object obj, bool format = false)
|
||||||
{
|
{
|
||||||
if (obj is string)
|
if (obj is string)
|
||||||
{
|
{
|
||||||
return obj.ToString();
|
return obj.ToString();
|
||||||
}
|
}
|
||||||
return JsonConvert.SerializeObject(obj, format?Formatting.Indented:Formatting.None);
|
return JsonConvert.SerializeObject(obj, format ? Formatting.Indented : Formatting.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Sockets;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.IO;
|
|
||||||
using Jint.Runtime;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Jint.Runtime;
|
||||||
|
|
||||||
namespace BarrageGrab
|
namespace BarrageGrab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using System.Resources;
|
using System.Reflection;
|
||||||
using System.Reflection;
|
using System.Resources;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
using BarrageGrab.Proxy.ProxyEventArgs;
|
using BarrageGrab.Proxy.ProxyEventArgs;
|
||||||
|
|
||||||
namespace BarrageGrab.Proxy
|
namespace BarrageGrab.Proxy
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace BarrageGrab.Proxy.ProxyEventArgs
|
namespace BarrageGrab.Proxy.ProxyEventArgs
|
||||||
{
|
{
|
||||||
public class SystemProxyChangeEventArgs:EventArgs
|
public class SystemProxyChangeEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// True 以开启:False: 已关闭
|
/// True 以开启:False: 已关闭
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.Win32;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using BarrageGrab.Proxy.ProxyEventArgs;
|
using BarrageGrab.Proxy.ProxyEventArgs;
|
||||||
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace BarrageGrab.Proxy
|
namespace BarrageGrab.Proxy
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Net.Security;
|
using System.Net.Security;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
using System.Security.Policy;
|
||||||
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using BarrageGrab.Modles;
|
using BarrageGrab.Modles;
|
||||||
using BarrageGrab.Modles.JsonEntity;
|
using BarrageGrab.Modles.JsonEntity;
|
||||||
using BarrageGrab.Proxy.ProxyEventArgs;
|
using BarrageGrab.Proxy.ProxyEventArgs;
|
||||||
using Newtonsoft.Json.Linq;
|
using BrotliSharpLib;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using NLog.LayoutRenderers;
|
||||||
using Titanium.Web.Proxy;
|
using Titanium.Web.Proxy;
|
||||||
using Titanium.Web.Proxy.EventArguments;
|
using Titanium.Web.Proxy.EventArguments;
|
||||||
using Titanium.Web.Proxy.Http;
|
using Titanium.Web.Proxy.Http;
|
||||||
using Titanium.Web.Proxy.Models;
|
using Titanium.Web.Proxy.Models;
|
||||||
using Titanium.Web.Proxy.StreamExtended.Network;
|
using Titanium.Web.Proxy.StreamExtended.Network;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using HtmlDocument = HtmlAgilityPack.HtmlDocument;
|
using HtmlDocument = HtmlAgilityPack.HtmlDocument;
|
||||||
using System.Net.Http;
|
|
||||||
using System.Text;
|
|
||||||
using BrotliSharpLib;
|
|
||||||
using System.IO.Compression;
|
|
||||||
using System.Collections.Concurrent;
|
|
||||||
using System.Security.Policy;
|
|
||||||
using NLog.LayoutRenderers;
|
|
||||||
|
|
||||||
namespace BarrageGrab.Proxy
|
namespace BarrageGrab.Proxy
|
||||||
{
|
{
|
||||||
@@ -90,17 +90,18 @@ namespace BarrageGrab.Proxy
|
|||||||
|
|
||||||
proxyServer.CertificateManager.CertificateValidDays = 365 * 10;
|
proxyServer.CertificateManager.CertificateValidDays = 365 * 10;
|
||||||
proxyServer.CertificateManager.SaveFakeCertificates = true;
|
proxyServer.CertificateManager.SaveFakeCertificates = true;
|
||||||
|
proxyServer.CertificateManager.CertificateEngine = Titanium.Web.Proxy.Network.CertificateEngine.DefaultWindows;
|
||||||
|
proxyServer.CertificateManager.OverwritePfxFile = false;
|
||||||
proxyServer.CertificateManager.RootCertificate = GetCert();
|
proxyServer.CertificateManager.RootCertificate = GetCert();
|
||||||
if (proxyServer.CertificateManager.RootCertificate == null)
|
if (proxyServer.CertificateManager.RootCertificate == null)
|
||||||
{
|
{
|
||||||
Logger.PrintColor("正在进行证书安装,需要信任该证书才可进行https解密,若有提示请确定");
|
Logger.PrintColor("正在进行证书安装,需要信任该证书才可进行https解密,若有提示请确定");
|
||||||
proxyServer.CertificateManager.CreateRootCertificate();
|
proxyServer.CertificateManager.CreateRootCertificate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//信任证书
|
|
||||||
proxyServer.CertificateManager.CreateRootCertificate();
|
|
||||||
proxyServer.CertificateManager.TrustRootCertificate(true);
|
proxyServer.CertificateManager.TrustRootCertificate(true);
|
||||||
|
|
||||||
|
//https://github.com/justcoding121/titanium-web-proxy/issues/828
|
||||||
|
|
||||||
proxyServer.ServerCertificateValidationCallback += ProxyServer_ServerCertificateValidationCallback;
|
proxyServer.ServerCertificateValidationCallback += ProxyServer_ServerCertificateValidationCallback;
|
||||||
//proxyServer.BeforeRequest += ProxyServer_BeforeRequest;
|
//proxyServer.BeforeRequest += ProxyServer_BeforeRequest;
|
||||||
proxyServer.BeforeResponse += ProxyServer_BeforeResponse;
|
proxyServer.BeforeResponse += ProxyServer_BeforeResponse;
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Dynamic;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Net.WebSockets;
|
using System.Net.WebSockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using Fleck;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using BarrageGrab.Modles;
|
using BarrageGrab.Modles;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.IO.Compression;
|
|
||||||
using System.IO;
|
|
||||||
using BarrageGrab.Modles.JsonEntity;
|
using BarrageGrab.Modles.JsonEntity;
|
||||||
using BarrageGrab.Modles.ProtoEntity;
|
using BarrageGrab.Modles.ProtoEntity;
|
||||||
using System.Drawing;
|
using Fleck;
|
||||||
using System.Collections.Concurrent;
|
using Newtonsoft.Json;
|
||||||
using System.Dynamic;
|
using Newtonsoft.Json.Linq;
|
||||||
using static BarrageGrab.Modles.ProtoEntity.Image;
|
using static BarrageGrab.Modles.ProtoEntity.Image;
|
||||||
using static BarrageGrab.Modles.WebCastGift;
|
using static BarrageGrab.Modles.WebCastGift;
|
||||||
|
|
||||||
@@ -220,10 +220,10 @@ namespace BarrageGrab
|
|||||||
|
|
||||||
if (isAdmin)
|
if (isAdmin)
|
||||||
{
|
{
|
||||||
text+= " [管理员]";
|
text += " [管理员]";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isAnchor)
|
if (isAnchor)
|
||||||
{
|
{
|
||||||
text += " [主播]";
|
text += " [主播]";
|
||||||
}
|
}
|
||||||
@@ -286,7 +286,7 @@ namespace BarrageGrab
|
|||||||
{
|
{
|
||||||
if (msg == null) return;
|
if (msg == null) return;
|
||||||
var roomInfo = AppRuntime.RoomCaches.GetCachedWebRoomInfo(msg.RoomId.ToString());
|
var roomInfo = AppRuntime.RoomCaches.GetCachedWebRoomInfo(msg.RoomId.ToString());
|
||||||
if (roomInfo != null && roomInfo.Owner!=null)
|
if (roomInfo != null && roomInfo.Owner != null)
|
||||||
{
|
{
|
||||||
msg.Onwer = new RoomAnchorInfo()
|
msg.Onwer = new RoomAnchorInfo()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ using System.IO.Compression;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ProtoBuf;
|
using BarrageGrab.Modles.ProtoEntity;
|
||||||
using BarrageGrab.Proxy;
|
using BarrageGrab.Proxy;
|
||||||
using BarrageGrab.Proxy.ProxyEventArgs;
|
using BarrageGrab.Proxy.ProxyEventArgs;
|
||||||
using BarrageGrab.Modles.ProtoEntity;
|
using ProtoBuf;
|
||||||
|
|
||||||
namespace BarrageGrab
|
namespace BarrageGrab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,9 +70,6 @@
|
|||||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.8.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
<Reference Include="BouncyCastle.Crypto, Version=1.8.8.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Portable.BouncyCastle.1.8.8\lib\net40\BouncyCastle.Crypto.dll</HintPath>
|
<HintPath>..\packages\Portable.BouncyCastle.1.8.8\lib\net40\BouncyCastle.Crypto.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\BouncyCastle.Cryptography.2.0.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="BrotliSharpLib, Version=0.3.2.0, Culture=neutral, PublicKeyToken=3f4e2a1cd615fcb7, processorArchitecture=MSIL">
|
<Reference Include="BrotliSharpLib, Version=0.3.2.0, Culture=neutral, PublicKeyToken=3f4e2a1cd615fcb7, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BrotliSharpLib.0.3.3\lib\net451\BrotliSharpLib.dll</HintPath>
|
<HintPath>..\packages\BrotliSharpLib.0.3.3\lib\net451\BrotliSharpLib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -206,11 +203,11 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
|
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
Reference in New Issue
Block a user