Skip to content

Commit

Permalink
支持trojan server的日志显示
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfoxy committed May 1, 2020
1 parent 57ad360 commit a08cd45
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions v2rayN/v2rayN/Handler/V2rayHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,18 @@ private void V2rayStart(bool trojan = false)
ShowMsg(false, msg);
}
});
p.ErrorDataReceived += new DataReceivedEventHandler((sender, e) =>
{
if (!String.IsNullOrEmpty(e.Data))
{
string msg = e.Data + Environment.NewLine;
ShowMsg(false, msg);
}
});
p.Start();
p.PriorityClass = ProcessPriorityClass.High;
p.BeginOutputReadLine();
p.BeginErrorReadLine();
//processId = p.Id;
_process = p;

Expand All @@ -260,6 +269,7 @@ private void V2rayStart(bool trojan = false)
ShowMsg(true, msg);
}
}

/// <summary>
/// V2ray启动,新建进程,传入配置字符串
/// </summary>
Expand Down

0 comments on commit a08cd45

Please sign in to comment.