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
|
@ -348,12 +348,19 @@ namespace v2rayN.Forms
|
|||
{
|
||||
Utils.SetClipboardData(e.ClickedItem.Text);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region http proxy 操作
|
||||
private void RestartHttpProxy()
|
||||
{
|
||||
HttpProxyHandle.RestartHttpAgent(config, true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region v2ray 操作
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 载入V2ray
|
||||
/// </summary>
|
||||
|
@ -703,6 +710,7 @@ namespace v2rayN.Forms
|
|||
//刷新
|
||||
RefreshServers();
|
||||
LoadV2ray();
|
||||
RestartHttpProxy();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue