mirror of https://github.com/2dust/v2rayN
commit
c71caec9df
|
@ -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 New Issue