mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
Merge pull request #533 from samsong8610/master
Fixes #390 允许来自局域网的连接需要人工重启
This commit is contained in:
commit
c71caec9df
2 changed files with 15 additions and 2 deletions
|
@ -352,6 +352,13 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region http proxy 操作
|
||||||
|
private void RestartHttpProxy()
|
||||||
|
{
|
||||||
|
HttpProxyHandle.RestartHttpAgent(config, true);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region v2ray 操作
|
#region v2ray 操作
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -703,6 +710,7 @@ namespace v2rayN.Forms
|
||||||
//刷新
|
//刷新
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
LoadV2ray();
|
LoadV2ray();
|
||||||
|
RestartHttpProxy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,11 @@ namespace v2rayN.HttpProxyHandler
|
||||||
public static void RestartHttpAgent(Config config, bool forced)
|
public static void RestartHttpAgent(Config config, bool forced)
|
||||||
{
|
{
|
||||||
bool isRestart = false;
|
bool isRestart = false;
|
||||||
|
if (config.listenerType == 0)
|
||||||
|
{
|
||||||
|
// 关闭http proxy时,直接返回
|
||||||
|
return;
|
||||||
|
}
|
||||||
//强制重启或者socks端口变化
|
//强制重启或者socks端口变化
|
||||||
if (forced)
|
if (forced)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue