mirror of https://github.com/2dust/v2rayN
Improve traffic refresh
parent
43b96ea4e5
commit
0f099a19cd
|
@ -98,7 +98,7 @@
|
|||
public static readonly List<string> fingerprints = new List<string> { "chrome", "firefox", "safari", "randomized", "" };
|
||||
public static readonly List<string> allowInsecures = new List<string> { "true", "false", "" };
|
||||
public static readonly List<string> domainStrategy4Freedoms = new List<string> { "AsIs", "UseIP", "UseIPv4", "UseIPv6", "" };
|
||||
public static readonly List<string> Languages = new List<string> { "zh-Hans", "en" ,"fa-Ir" };
|
||||
public static readonly List<string> Languages = new List<string> { "zh-Hans", "en", "fa-Ir" };
|
||||
public static readonly List<string> alpns = new List<string> { "h2", "http/1.1", "h2,http/1.1", "" };
|
||||
public static readonly List<string> LogLevel = new List<string> { "debug", "info", "warning", "error", "none" };
|
||||
public static readonly List<string> InboundTags = new List<string> { "socks", "http", "socks2", "http2" };
|
||||
|
|
|
@ -91,6 +91,10 @@ namespace v2rayN.Handler
|
|||
if (Global.ShowInTaskbar)
|
||||
{
|
||||
server.indexId = config_.indexId;
|
||||
server.todayUp = _serverStatItem.todayUp;
|
||||
server.todayDown = _serverStatItem.todayDown;
|
||||
server.totalUp = _serverStatItem.totalUp;
|
||||
server.totalDown = _serverStatItem.totalDown;
|
||||
updateFunc_(server);
|
||||
}
|
||||
if (server.proxyUp != 0 || server.proxyDown != 0)
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
namespace v2rayN.Mode
|
||||
{
|
||||
[Serializable]
|
||||
class ServerSpeedItem
|
||||
class ServerSpeedItem : ServerStatItem
|
||||
{
|
||||
public string indexId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public long proxyUp
|
||||
{
|
||||
get; set;
|
||||
|
|
|
@ -611,7 +611,7 @@ namespace v2rayN
|
|||
catch (Exception ex)
|
||||
{
|
||||
SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -533,6 +533,24 @@ namespace v2rayN.ViewModels
|
|||
}
|
||||
SpeedProxyDisplay = string.Format("{0}:{1}/s¡ü | {2}/s¡ý", Global.agentTag, Utils.HumanFy(update.proxyUp), Utils.HumanFy(update.proxyDown));
|
||||
SpeedDirectDisplay = string.Format("{0}:{1}/s¡ü | {2}/s¡ý", Global.directTag, Utils.HumanFy(update.directUp), Utils.HumanFy(update.directDown));
|
||||
|
||||
if (update.proxyUp + update.proxyDown > 0)
|
||||
{
|
||||
var second = DateTime.Now.Second;
|
||||
if (second % 3 == 0)
|
||||
{
|
||||
var item = _profileItems.Where(it => it.indexId == update.indexId).FirstOrDefault();
|
||||
if (item != null)
|
||||
{
|
||||
item.todayDown = Utils.HumanFy(update.todayDown);
|
||||
item.todayUp = Utils.HumanFy(update.todayUp);
|
||||
item.totalDown = Utils.HumanFy(update.totalDown);
|
||||
item.totalUp = Utils.HumanFy(update.totalUp);
|
||||
|
||||
_profileItems.Replace(item, Utils.DeepCopy(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
Loading…
Reference in New Issue