Browse Source

Merge pull request #533 from samsong8610/master

Fixes #390 允许来自局域网的连接需要人工重启
pull/554/head
2dust 5 years ago committed by GitHub
parent
commit
c71caec9df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      v2rayN/v2rayN/Forms/MainForm.cs
  2. 5
      v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs

8
v2rayN/v2rayN/Forms/MainForm.cs

@ -352,6 +352,13 @@ namespace v2rayN.Forms
#endregion
#region http proxy 操作
private void RestartHttpProxy()
{
HttpProxyHandle.RestartHttpAgent(config, true);
}
#endregion
#region v2ray 操作
/// <summary>
@ -703,6 +710,7 @@ namespace v2rayN.Forms
//刷新
RefreshServers();
LoadV2ray();
RestartHttpProxy();
}
}

5
v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs

@ -121,6 +121,11 @@ namespace v2rayN.HttpProxyHandler
public static void RestartHttpAgent(Config config, bool forced)
{
bool isRestart = false;
if (config.listenerType == 0)
{
// 关闭http proxy时,直接返回
return;
}
//强制重启或者socks端口变化
if (forced)
{

Loading…
Cancel
Save