添加更多指令支持;

添加Form页面
This commit is contained in:
小白猿
2023-11-14 20:29:18 +08:00
parent 3c090e0e91
commit ba46b2e533
13 changed files with 693 additions and 21 deletions
+11 -1
View File
@@ -5,12 +5,22 @@ using BarrageGrab.Proxy.ProxyEventArgs;
namespace BarrageGrab.Proxy
{
internal interface ISystemProxy : IDisposable
public interface ISystemProxy : IDisposable
{
event EventHandler<WsMessageEventArgs> OnWebSocketData;
event EventHandler<HttpResponseEventArgs> OnFetchResponse;
/// <summary>
/// 关闭系统代理
/// </summary>
void CloseSystemProxy();
/// <summary>
/// 注册为系统代理
/// </summary>
void RegisterSystemProxy();
/// <summary>
/// 开始监听
/// </summary>
+3 -3
View File
@@ -91,9 +91,9 @@ namespace BarrageGrab.Proxy
}
/// <summary>
/// 注册系统代理
/// 注册为系统代理
/// </summary>
protected void RegisterSystemProxy()
public void RegisterSystemProxy()
{
RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);
registry.SetValue("ProxyEnable", 1);
@@ -103,7 +103,7 @@ namespace BarrageGrab.Proxy
/// <summary>
/// 关闭系统代理
/// </summary>
protected void CloseSystemProxy()
public void CloseSystemProxy()
{
RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);
registry.SetValue("ProxyEnable", 0);