mirror of https://github.com/2dust/v2rayN
commit
1be22a1a2c
|
@ -31,7 +31,7 @@
|
|||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.lvServers = new System.Windows.Forms.ListView();
|
||||
this.lvServers = new v2rayN.Forms.MainForm.ListViewFlickerFree();
|
||||
this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.menuAddVmessServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuAddShadowsocksServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -82,10 +82,14 @@
|
|||
this.toolSslSocksPortLab = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslSocksPort = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslBlank1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslHttpPortLab = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslHttpPort = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslPacPortLab = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslPacPort = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslBlank3 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tsMain = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -111,8 +115,7 @@
|
|||
this.tsbPromotion = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbClose = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolSslHttpPortLab = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslPacPortLab = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.menuRemoveDuplicateServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
|
@ -147,6 +150,7 @@
|
|||
this.lvServers.FullRowSelect = true;
|
||||
this.lvServers.GridLines = true;
|
||||
this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.lvServers.HideSelection = false;
|
||||
this.lvServers.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
|
||||
((System.Windows.Forms.ListViewItem)(resources.GetObject("lvServers.Items")))});
|
||||
this.lvServers.MultiSelect = false;
|
||||
|
@ -169,6 +173,7 @@
|
|||
this.menuScanScreen,
|
||||
this.toolStripSeparator1,
|
||||
this.menuRemoveServer,
|
||||
this.menuRemoveDuplicateServer,
|
||||
this.menuCopyServer,
|
||||
this.menuSetDefaultServer,
|
||||
this.toolStripSeparator3,
|
||||
|
@ -486,7 +491,9 @@
|
|||
this.toolSslBlank2,
|
||||
this.toolSslPacPortLab,
|
||||
this.toolSslPacPort,
|
||||
this.toolSslBlank3});
|
||||
this.toolSslBlank3,
|
||||
this.toolSslServerSpeed,
|
||||
this.toolSslBlank4});
|
||||
resources.ApplyResources(this.ssMain, "ssMain");
|
||||
this.ssMain.Name = "ssMain";
|
||||
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
|
||||
|
@ -507,6 +514,11 @@
|
|||
resources.ApplyResources(this.toolSslBlank1, "toolSslBlank1");
|
||||
this.toolSslBlank1.Spring = true;
|
||||
//
|
||||
// toolSslHttpPortLab
|
||||
//
|
||||
this.toolSslHttpPortLab.Name = "toolSslHttpPortLab";
|
||||
resources.ApplyResources(this.toolSslHttpPortLab, "toolSslHttpPortLab");
|
||||
//
|
||||
// toolSslHttpPort
|
||||
//
|
||||
this.toolSslHttpPort.Name = "toolSslHttpPort";
|
||||
|
@ -518,6 +530,11 @@
|
|||
resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2");
|
||||
this.toolSslBlank2.Spring = true;
|
||||
//
|
||||
// toolSslPacPortLab
|
||||
//
|
||||
this.toolSslPacPortLab.Name = "toolSslPacPortLab";
|
||||
resources.ApplyResources(this.toolSslPacPortLab, "toolSslPacPortLab");
|
||||
//
|
||||
// toolSslPacPort
|
||||
//
|
||||
this.toolSslPacPort.Name = "toolSslPacPort";
|
||||
|
@ -529,6 +546,16 @@
|
|||
resources.ApplyResources(this.toolSslBlank3, "toolSslBlank3");
|
||||
this.toolSslBlank3.Spring = true;
|
||||
//
|
||||
// toolSslServerSpeed
|
||||
//
|
||||
this.toolSslServerSpeed.Name = "toolSslServerSpeed";
|
||||
resources.ApplyResources(this.toolSslServerSpeed, "toolSslServerSpeed");
|
||||
//
|
||||
// toolSslBlank4
|
||||
//
|
||||
this.toolSslBlank4.Name = "toolSslBlank4";
|
||||
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
resources.ApplyResources(this.panel1, "panel1");
|
||||
|
@ -702,15 +729,11 @@
|
|||
this.tsbClose.Name = "tsbClose";
|
||||
this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click);
|
||||
//
|
||||
// toolSslHttpPortLab
|
||||
// menuRemoveDuplicateServer
|
||||
//
|
||||
this.toolSslHttpPortLab.Name = "toolSslHttpPortLab";
|
||||
resources.ApplyResources(this.toolSslHttpPortLab, "toolSslHttpPortLab");
|
||||
//
|
||||
// toolSslPacPortLab
|
||||
//
|
||||
this.toolSslPacPortLab.Name = "toolSslPacPortLab";
|
||||
resources.ApplyResources(this.toolSslPacPortLab, "toolSslPacPortLab");
|
||||
this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer";
|
||||
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
|
||||
this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
|
@ -726,6 +749,7 @@
|
|||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.MainForm_Load);
|
||||
this.Shown += new System.EventHandler(this.MainForm_Shown);
|
||||
this.VisibleChanged += new System.EventHandler(this.MainForm_VisibleChanged);
|
||||
this.Resize += new System.EventHandler(this.MainForm_Resize);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
|
@ -750,7 +774,7 @@
|
|||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox txtMsgBox;
|
||||
private System.Windows.Forms.ListView lvServers;
|
||||
private v2rayN.Forms.MainForm.ListViewFlickerFree lvServers;
|
||||
private System.Windows.Forms.NotifyIcon notifyMain;
|
||||
private System.Windows.Forms.ContextMenuStrip cmsMain;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuExit;
|
||||
|
@ -830,6 +854,9 @@
|
|||
private System.Windows.Forms.ToolStripStatusLabel toolSslSocksPortLab;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPortLab;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslPacPortLab;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslServerSpeed;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank4;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuRemoveDuplicateServer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,19 @@ namespace v2rayN.Forms
|
|||
private V2rayUpdateHandle v2rayUpdateHandle2;
|
||||
private List<int> lvSelecteds = new List<int>();
|
||||
|
||||
private StatisticsHandler statistics;
|
||||
|
||||
class ListViewFlickerFree: ListView
|
||||
{
|
||||
public ListViewFlickerFree()
|
||||
{
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer
|
||||
| ControlStyles.AllPaintingInWmPaint
|
||||
, true);
|
||||
UpdateStyles();
|
||||
}
|
||||
}
|
||||
|
||||
#region Window 事件
|
||||
|
||||
public MainForm()
|
||||
|
@ -39,7 +52,83 @@ namespace v2rayN.Forms
|
|||
ConfigHandler.LoadConfig(ref config);
|
||||
v2rayHandler = new V2rayHandler();
|
||||
v2rayHandler.ProcessEvent += v2rayHandler_ProcessEvent;
|
||||
statistics = new StatisticsHandler(config,
|
||||
(ulong totalUp, ulong totalDown, ulong up, ulong down, List<Mode.ServerStatistics> statistics) =>
|
||||
{
|
||||
double up_amount = 0.0, down_amount;
|
||||
string up_unit = "", down_unit;
|
||||
|
||||
up /= (ulong)(config.statisticsFreshRate / 1000f);
|
||||
down /= (ulong)(config.statisticsFreshRate / 1000f);
|
||||
|
||||
Utils.ToHumanReadable(up, out up_amount, out up_unit);
|
||||
Utils.ToHumanReadable(down, out down_amount, out down_unit);
|
||||
up_unit += "/s";
|
||||
down_unit += "/s";
|
||||
|
||||
toolSslBlank4.Text = string.Format(
|
||||
"{4}: {0:f2} {1} | {5}: {2:f2} {3}",
|
||||
up_amount,
|
||||
up_unit,
|
||||
down_amount,
|
||||
down_unit,
|
||||
UIRes.I18N("uploadSpeed"),
|
||||
UIRes.I18N("downloadSpeed")
|
||||
);
|
||||
|
||||
|
||||
List<string[]> datas = new List<string[]>();
|
||||
for (int i= 0; i < config.vmess.Count; i++)
|
||||
{
|
||||
string totalUp_ = string.Empty,
|
||||
totalDown_ = string.Empty,
|
||||
todayUp_ = string.Empty,
|
||||
todayDown_ = string.Empty;
|
||||
var index = statistics.FindIndex(item_ => (config.vmess[i].address == item_.address && config.vmess[i].port == item_.port));
|
||||
if (index != -1)
|
||||
{
|
||||
Func<ulong, string> human_fy = (amount) =>
|
||||
{
|
||||
double result;
|
||||
string unit;
|
||||
Utils.ToHumanReadable(amount, out result, out unit);
|
||||
return $"{string.Format("{0:f2}", result)}{unit}";
|
||||
};
|
||||
totalUp_ = human_fy(statistics[index].totalUp);
|
||||
totalDown_ = human_fy(statistics[index].totalDown);
|
||||
todayUp_ = human_fy(statistics[index].todayUp);
|
||||
todayDown_ = human_fy(statistics[index].todayDown);
|
||||
}
|
||||
|
||||
datas.Add(new string[] { totalUp_, totalDown_, todayUp_, todayDown_ });
|
||||
}
|
||||
|
||||
lvServers.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
lvServers.SuspendLayout();
|
||||
for (int i =0; i< datas.Count; i++)
|
||||
{
|
||||
lvServers.Items[i].SubItems[7].Text = datas[i][0];
|
||||
lvServers.Items[i].SubItems[8].Text = datas[i][1];
|
||||
lvServers.Items[i].SubItems[9].Text = datas[i][2];
|
||||
lvServers.Items[i].SubItems[10].Text = datas[i][3];
|
||||
}
|
||||
lvServers.ResumeLayout();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void MainForm_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (statistics == null || !statistics.Enable) return;
|
||||
if((sender as Form).Visible)
|
||||
{
|
||||
statistics.UpdateUI = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
statistics.UpdateUI = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void MainForm_Shown(object sender, EventArgs e)
|
||||
|
@ -59,9 +148,15 @@ namespace v2rayN.Forms
|
|||
{
|
||||
e.Cancel = true;
|
||||
|
||||
statistics.saveToFile();
|
||||
|
||||
HideForm();
|
||||
return;
|
||||
}
|
||||
if(e.CloseReason == CloseReason.ApplicationExitCall)
|
||||
{
|
||||
statistics.saveToFile();
|
||||
}
|
||||
}
|
||||
|
||||
private void MainForm_Resize(object sender, EventArgs e)
|
||||
|
@ -80,7 +175,7 @@ namespace v2rayN.Forms
|
|||
{
|
||||
//config.uiItem.mainQRCodeWidth = splitContainer1.SplitterDistance;
|
||||
}
|
||||
|
||||
|
||||
private const int WM_QUERYENDSESSION = 0x0011;
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
|
@ -90,6 +185,8 @@ namespace v2rayN.Forms
|
|||
Utils.SaveLog("Windows shutdown UnsetProxy");
|
||||
//CloseV2ray();
|
||||
ConfigHandler.ToJsonFile(config);
|
||||
if(statistics!=null && statistics.Enable)
|
||||
statistics.saveToFile();
|
||||
ProxySetting.UnsetProxy();
|
||||
m.Result = (IntPtr)1;
|
||||
break;
|
||||
|
@ -132,6 +229,16 @@ namespace v2rayN.Forms
|
|||
lvServers.Columns.Add(UIRes.I18N("LvPort"), 50, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvEncryptionMethod"), 90, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTransportProtocol"), 70, HorizontalAlignment.Left);
|
||||
|
||||
if(statistics != null && statistics.Enable)
|
||||
{
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalUploadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalDownloadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayUploadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayDownloadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
this.Width = 1250;
|
||||
}
|
||||
|
||||
lvServers.Columns.Add(UIRes.I18N("LvSubscription"), 50, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTestResults"), 100, HorizontalAlignment.Left);
|
||||
|
||||
|
@ -147,14 +254,38 @@ namespace v2rayN.Forms
|
|||
for (int k = 0; k < config.vmess.Count; k++)
|
||||
{
|
||||
string def = string.Empty;
|
||||
string totalUp = string.Empty,
|
||||
totalDown = string.Empty,
|
||||
todayUp = string.Empty,
|
||||
todayDown = string.Empty;
|
||||
if (config.index.Equals(k))
|
||||
{
|
||||
def = "√";
|
||||
}
|
||||
|
||||
VmessItem item = config.vmess[k];
|
||||
ListViewItem lvItem = new ListViewItem(new string[]
|
||||
|
||||
ListViewItem lvItem = null;
|
||||
if (statistics != null && statistics.Enable)
|
||||
{
|
||||
var index = statistics.Statistic.FindIndex(item_ => item_.address == item.address);
|
||||
if (index != -1)
|
||||
{
|
||||
Func<ulong, string> human_fy = (amount) =>
|
||||
{
|
||||
double result;
|
||||
string unit;
|
||||
Utils.ToHumanReadable(amount, out result, out unit);
|
||||
return $"{string.Format("{0:f2}", result)}{unit}";
|
||||
};
|
||||
totalUp = human_fy(statistics.Statistic[index].totalUp);
|
||||
totalDown = human_fy(statistics.Statistic[index].totalDown);
|
||||
todayUp = human_fy(statistics.Statistic[index].todayUp);
|
||||
todayDown = human_fy(statistics.Statistic[index].todayDown);
|
||||
}
|
||||
|
||||
lvItem = new ListViewItem(new string[]
|
||||
{
|
||||
def,
|
||||
((EConfigType)item.configType).ToString(),
|
||||
item.remarks,
|
||||
|
@ -164,10 +295,37 @@ namespace v2rayN.Forms
|
|||
//item.alterId.ToString(),
|
||||
item.security,
|
||||
item.network,
|
||||
totalUp,
|
||||
totalDown,
|
||||
todayUp,
|
||||
todayDown,
|
||||
item.getSubRemarks(config),
|
||||
item.testResult
|
||||
});
|
||||
lvServers.Items.Add(lvItem);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
lvItem = new ListViewItem(new string[]
|
||||
{
|
||||
def,
|
||||
((EConfigType)item.configType).ToString(),
|
||||
item.remarks,
|
||||
item.address,
|
||||
item.port.ToString(),
|
||||
//item.id,
|
||||
//item.alterId.ToString(),
|
||||
item.security,
|
||||
item.network,
|
||||
//totalUp,
|
||||
//totalDown,
|
||||
//todayUp,
|
||||
//todayDown,
|
||||
item.getSubRemarks(config),
|
||||
item.testResult
|
||||
});
|
||||
}
|
||||
|
||||
if(lvItem!=null) lvServers.Items.Add(lvItem);
|
||||
}
|
||||
|
||||
//if (lvServers.Items.Count > 0)
|
||||
|
@ -359,6 +517,17 @@ namespace v2rayN.Forms
|
|||
case Keys.A:
|
||||
menuSelectAll_Click(null, null);
|
||||
break;
|
||||
case Keys.T:
|
||||
// Speed test selected servers
|
||||
GetLvSelectedIndex();
|
||||
ServerSpeedTest();
|
||||
break;
|
||||
case Keys.P:
|
||||
// Ping selected servers
|
||||
GetLvSelectedIndex();
|
||||
ClearTestResult();
|
||||
bgwPing.RunWorkerAsync();
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (e.KeyCode)
|
||||
|
@ -412,6 +581,22 @@ namespace v2rayN.Forms
|
|||
|
||||
}
|
||||
|
||||
private void menuRemoveDuplicateServer_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<Mode.VmessItem> servers = null;
|
||||
Utils.DedupServerList(config.vmess, out servers);
|
||||
if (servers != null)
|
||||
{
|
||||
config.vmess = servers;
|
||||
}
|
||||
//刷新
|
||||
RefreshServers();
|
||||
LoadV2ray();
|
||||
|
||||
// save to config file
|
||||
ConfigHandler.ToJsonFile(config);
|
||||
}
|
||||
|
||||
private void menuCopyServer_Click(object sender, EventArgs e)
|
||||
{
|
||||
int index = GetLvSelectedIndex();
|
||||
|
@ -835,6 +1020,9 @@ namespace v2rayN.Forms
|
|||
|
||||
this.Visible = false;
|
||||
this.Close();
|
||||
|
||||
statistics.Close();
|
||||
|
||||
//this.Dispose();
|
||||
//System.Environment.Exit(System.Environment.ExitCode);
|
||||
Application.Exit();
|
||||
|
@ -884,6 +1072,7 @@ namespace v2rayN.Forms
|
|||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1394,8 +1583,7 @@ namespace v2rayN.Forms
|
|||
Utils.RegWriteValue(Global.MyRegPath, Global.MyRegKeyLanguage, value);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,6 +173,12 @@
|
|||
<data name="menuRemoveServer.Text" xml:space="preserve">
|
||||
<value>Remove selected server (multiple choice) (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Text" xml:space="preserve">
|
||||
<value>Remove duplicate server</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
|
@ -225,13 +231,13 @@
|
|||
<value>447, 22</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Text" xml:space="preserve">
|
||||
<value>Test server delay (multiple choice)</value>
|
||||
<value>Test server delay (multiple choice)(Ctrl+P)</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Text" xml:space="preserve">
|
||||
<value>Test server speed (multiple choice)</value>
|
||||
<value>Test server speed (multiple choice)(Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
|
@ -273,7 +279,7 @@
|
|||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>448, 468</value>
|
||||
<value>448, 512</value>
|
||||
</data>
|
||||
<data name=">>cmsLv.Name" xml:space="preserve">
|
||||
<value>cmsLv</value>
|
||||
|
@ -305,7 +311,7 @@
|
|||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="lvServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>726, 331</value>
|
||||
<value>638, 331</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="lvServers.TabIndex" type="System.Int32, mscorlib">
|
||||
|
@ -315,7 +321,7 @@
|
|||
<value>lvServers</value>
|
||||
</data>
|
||||
<data name=">>lvServers.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>v2rayN.Forms.MainForm+ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>lvServers.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
|
@ -375,10 +381,10 @@
|
|||
<value>100</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>986, 331</value>
|
||||
<value>898, 331</value>
|
||||
</data>
|
||||
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>726</value>
|
||||
<value>638</value>
|
||||
</data>
|
||||
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
|
@ -404,33 +410,12 @@
|
|||
<data name="cmsMain.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 164</value>
|
||||
</data>
|
||||
<data name=">>cmsMain.Name" xml:space="preserve">
|
||||
<value>cmsMain</value>
|
||||
</data>
|
||||
<data name=">>cmsMain.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="notifyMain.Text" xml:space="preserve">
|
||||
<value>v2rayN</value>
|
||||
</data>
|
||||
<data name="notifyMain.Visible" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="menuSysAgentEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="menuSysAgentEnabled.Text" xml:space="preserve">
|
||||
<value>Enable Http proxy</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Text" xml:space="preserve">
|
||||
<value>Http proxy mode</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
</data>
|
||||
|
@ -455,6 +440,12 @@
|
|||
<data name="menuKeepPAC.Text" xml:space="preserve">
|
||||
<value>Only open PAC, do not automatically configure PAC</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Text" xml:space="preserve">
|
||||
<value>Http proxy mode</value>
|
||||
</data>
|
||||
<data name="menuServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
|
@ -488,6 +479,21 @@
|
|||
<data name="menuExit.Text" xml:space="preserve">
|
||||
<value>Exit</value>
|
||||
</data>
|
||||
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 164</value>
|
||||
</data>
|
||||
<data name=">>cmsMain.Name" xml:space="preserve">
|
||||
<value>cmsMain</value>
|
||||
</data>
|
||||
<data name=">>cmsMain.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="notifyMain.Text" xml:space="preserve">
|
||||
<value>v2rayN</value>
|
||||
</data>
|
||||
<data name="notifyMain.Visible" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<metadata name="bgwPing.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>232, 17</value>
|
||||
</metadata>
|
||||
|
@ -501,7 +507,7 @@
|
|||
<value>0, 66</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 351</value>
|
||||
<value>904, 351</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
|
@ -537,7 +543,7 @@
|
|||
<value>Vertical</value>
|
||||
</data>
|
||||
<data name="txtMsgBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>986, 134</value>
|
||||
<value>898, 134</value>
|
||||
</data>
|
||||
<data name="txtMsgBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
|
@ -567,7 +573,7 @@
|
|||
<value>0, 17</value>
|
||||
</data>
|
||||
<data name="toolSslBlank1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>238, 17</value>
|
||||
<value>227, 17</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>38, 17</value>
|
||||
|
@ -579,7 +585,7 @@
|
|||
<value>0, 17</value>
|
||||
</data>
|
||||
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>238, 17</value>
|
||||
<value>227, 17</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>31, 17</value>
|
||||
|
@ -591,13 +597,25 @@
|
|||
<value>0, 17</value>
|
||||
</data>
|
||||
<data name="toolSslBlank3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>238, 17</value>
|
||||
<value>227, 17</value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>45, 17</value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.Text" xml:space="preserve">
|
||||
<value>SPEED</value>
|
||||
</data>
|
||||
<data name="toolSslBlank4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>31, 17</value>
|
||||
</data>
|
||||
<data name="toolSslBlank4.Text" xml:space="preserve">
|
||||
<value>N/A</value>
|
||||
</data>
|
||||
<data name="ssMain.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 151</value>
|
||||
</data>
|
||||
<data name="ssMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>986, 22</value>
|
||||
<value>898, 22</value>
|
||||
</data>
|
||||
<data name="ssMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
|
@ -624,7 +642,7 @@
|
|||
<value>0, 417</value>
|
||||
</data>
|
||||
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 176</value>
|
||||
<value>904, 176</value>
|
||||
</data>
|
||||
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
|
@ -651,7 +669,7 @@
|
|||
<value>0, 56</value>
|
||||
</data>
|
||||
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 10</value>
|
||||
<value>904, 10</value>
|
||||
</data>
|
||||
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
|
@ -671,42 +689,9 @@
|
|||
<metadata name="tsMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>409, 17</value>
|
||||
</metadata>
|
||||
<data name="tsMain.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 56</value>
|
||||
</data>
|
||||
<data name="tsMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Name" xml:space="preserve">
|
||||
<value>tsMain</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tsMain.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="tsbSub.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 53</value>
|
||||
</data>
|
||||
<data name="tsbSub.Text" xml:space="preserve">
|
||||
<value>Subscription</value>
|
||||
</data>
|
||||
<data name="tsbSub.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>197, 22</value>
|
||||
</data>
|
||||
|
@ -719,6 +704,18 @@
|
|||
<data name="tsbSubUpdate.Text" xml:space="preserve">
|
||||
<value>Update subscription</value>
|
||||
</data>
|
||||
<data name="tsbSub.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 53</value>
|
||||
</data>
|
||||
<data name="tsbSub.Text" xml:space="preserve">
|
||||
<value>Subscription</value>
|
||||
</data>
|
||||
<data name="tsbSub.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
|
@ -766,18 +763,6 @@
|
|||
<data name="toolStripSeparator7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>128, 53</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.Text" xml:space="preserve">
|
||||
<value>Check for updates</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
</data>
|
||||
|
@ -802,21 +787,21 @@
|
|||
<data name="tsbCheckClearPACList.Text" xml:space="preserve">
|
||||
<value>Simplify PAC (please set Core route)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="tsbHelp.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<data name="tsbCheckUpdate.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>48, 53</value>
|
||||
<data name="tsbCheckUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>128, 53</value>
|
||||
</data>
|
||||
<data name="tsbHelp.Text" xml:space="preserve">
|
||||
<value>Help</value>
|
||||
<data name="tsbCheckUpdate.Text" xml:space="preserve">
|
||||
<value>Check for updates</value>
|
||||
</data>
|
||||
<data name="tsbHelp.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<data name="tsbCheckUpdate.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="tsbAbout.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>187, 22</value>
|
||||
</data>
|
||||
|
@ -838,6 +823,18 @@
|
|||
<data name="tsbLanguageZhHans.Text" xml:space="preserve">
|
||||
<value>语言-[中文简体]</value>
|
||||
</data>
|
||||
<data name="tsbHelp.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>48, 53</value>
|
||||
</data>
|
||||
<data name="tsbHelp.Text" xml:space="preserve">
|
||||
<value>Help</value>
|
||||
</data>
|
||||
<data name="tsbHelp.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="tsbPromotion.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
|
@ -872,6 +869,27 @@
|
|||
<data name="tsbClose.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="tsMain.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>904, 56</value>
|
||||
</data>
|
||||
<data name="tsMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Name" xml:space="preserve">
|
||||
<value>tsMain</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tsMain.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
@ -882,7 +900,7 @@
|
|||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 593</value>
|
||||
<value>904, 593</value>
|
||||
</data>
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 4, 4, 4</value>
|
||||
|
@ -1148,6 +1166,12 @@
|
|||
<data name=">>toolSslBlank1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPortLab.Name" xml:space="preserve">
|
||||
<value>toolSslHttpPortLab</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPortLab.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPort.Name" xml:space="preserve">
|
||||
<value>toolSslHttpPort</value>
|
||||
</data>
|
||||
|
@ -1160,6 +1184,12 @@
|
|||
<data name=">>toolSslBlank2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslPacPortLab.Name" xml:space="preserve">
|
||||
<value>toolSslPacPortLab</value>
|
||||
</data>
|
||||
<data name=">>toolSslPacPortLab.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslPacPort.Name" xml:space="preserve">
|
||||
<value>toolSslPacPort</value>
|
||||
</data>
|
||||
|
@ -1172,6 +1202,18 @@
|
|||
<data name=">>toolSslBlank3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslServerSpeed.Name" xml:space="preserve">
|
||||
<value>toolSslServerSpeed</value>
|
||||
</data>
|
||||
<data name=">>toolSslServerSpeed.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank4.Name" xml:space="preserve">
|
||||
<value>toolSslBlank4</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator4.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator4</value>
|
||||
</data>
|
||||
|
@ -1310,17 +1352,11 @@
|
|||
<data name=">>tsbClose.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPortLab.Name" xml:space="preserve">
|
||||
<value>toolSslHttpPortLab</value>
|
||||
<data name=">>menuRemoveDuplicateServer.Name" xml:space="preserve">
|
||||
<value>menuRemoveDuplicateServer</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPortLab.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslPacPortLab.Name" xml:space="preserve">
|
||||
<value>toolSslPacPortLab</value>
|
||||
</data>
|
||||
<data name=">>toolSslPacPortLab.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>menuRemoveDuplicateServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>MainForm</value>
|
||||
|
|
|
@ -215,13 +215,13 @@
|
|||
<value>252, 22</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Text" xml:space="preserve">
|
||||
<value>测试服务器延迟(多选)</value>
|
||||
<value>测试服务器延迟(多选)(Ctrl+P)</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>252, 22</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Text" xml:space="preserve">
|
||||
<value>测试服务器速度(多选)</value>
|
||||
<value>测试服务器速度(多选)(Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>249, 6</value>
|
||||
|
@ -380,13 +380,13 @@
|
|||
</data>
|
||||
<data name="tsbReload.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd
|
||||
QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X
|
||||
jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY
|
||||
6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3
|
||||
NQwF4JkcFRWiUAB7IVW2FFPO3YqlgPd+LJf02e8Fdi3rMdIAcLDuf9UpeT0IS0G/hvhPm305vSl7EQFY
|
||||
B6zCvozvYGzRM8zEoeg5TPZwDaGvpHQni1yzSxbXPW9q+hF13ROHuJnQcjbhtQAAAABJRU5ErkJggg==
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAATdJREFUWEftloENAiEMRW8ER3AEN9ANdARHcAPdwBF0A91AN9INtC+5JvUCJwWM
|
||||
mvCTFw3QUiiU65qa/lUTYT6Ato9rJZyERwT6GFNdU+EihCYNwVhsqmgm3AR1fheOAitd9PCfNvp0HDbY
|
||||
FolV2MmZZCzX9J0FG0TRTlwFdbahIVE7Qe1IR5bYVnXCyr2yO5F1MNUBec25YtjomcCXSxhr9DmrV2Gr
|
||||
flyL4GSrYcm9tmnEZ7JsAC7DgWr5ydbXA8hOAcVjG8FTD6ocQgvXKrW8MqFWUfc1DAXgmRwVFaJQAHsh
|
||||
VbYUU87diqWA934sl/TZ7wV2Lesx0gBwsO5/1Sl5PQhLQb+G+E+bfTm9KXsRAVgHrMK+jO9gbNEzzMSh
|
||||
6DlM9nANoa+kdCeLXLNLFtc9b2r6EXXdE4e4mdByNuG1AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsbReload.Size" type="System.Drawing.Size, System.Drawing">
|
||||
|
@ -442,12 +442,18 @@
|
|||
</data>
|
||||
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
|
||||
GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg==
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAADJJREFUWEftzrENACAIRUFGdVMdTZkAG4zFXfI68kMAAD8ap9lUbpfyaDV19QAA
|
||||
8FDEBl3RImu5VcdbAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsbClose.Text" xml:space="preserve">
|
||||
<value> 关闭 </value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.Text" xml:space="preserve">
|
||||
<value>代理速度</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Text" xml:space="preserve">
|
||||
<value>移除重复的服务器</value>
|
||||
</data>
|
||||
</root>
|
|
@ -28,6 +28,7 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OptionSettingForm));
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
|
@ -82,6 +83,11 @@
|
|||
this.txtKcpmtu = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.tabPage7 = new System.Windows.Forms.TabPage();
|
||||
this.cbFreshrate = new System.Windows.Forms.ComboBox();
|
||||
this.tbCacheDays = new System.Windows.Forms.TextBox();
|
||||
this.lbFreshrate = new System.Windows.Forms.Label();
|
||||
this.lbCacheDays = new System.Windows.Forms.Label();
|
||||
this.chkEnableStatistics = new System.Windows.Forms.CheckBox();
|
||||
this.chkAllowLANConn = new System.Windows.Forms.CheckBox();
|
||||
this.txturlGFWList = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
|
@ -89,6 +95,7 @@
|
|||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.configBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
|
@ -102,6 +109,7 @@
|
|||
this.tabPage6.SuspendLayout();
|
||||
this.tabPage7.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.configBindingSource)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnClose
|
||||
|
@ -473,6 +481,11 @@
|
|||
//
|
||||
// tabPage7
|
||||
//
|
||||
this.tabPage7.Controls.Add(this.cbFreshrate);
|
||||
this.tabPage7.Controls.Add(this.tbCacheDays);
|
||||
this.tabPage7.Controls.Add(this.lbFreshrate);
|
||||
this.tabPage7.Controls.Add(this.lbCacheDays);
|
||||
this.tabPage7.Controls.Add(this.chkEnableStatistics);
|
||||
this.tabPage7.Controls.Add(this.chkAllowLANConn);
|
||||
this.tabPage7.Controls.Add(this.txturlGFWList);
|
||||
this.tabPage7.Controls.Add(this.label13);
|
||||
|
@ -481,6 +494,33 @@
|
|||
this.tabPage7.Name = "tabPage7";
|
||||
this.tabPage7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbFreshrate
|
||||
//
|
||||
this.cbFreshrate.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
|
||||
this.cbFreshrate.Name = "cbFreshrate";
|
||||
//
|
||||
// tbCacheDays
|
||||
//
|
||||
resources.ApplyResources(this.tbCacheDays, "tbCacheDays");
|
||||
this.tbCacheDays.Name = "tbCacheDays";
|
||||
//
|
||||
// lbFreshrate
|
||||
//
|
||||
resources.ApplyResources(this.lbFreshrate, "lbFreshrate");
|
||||
this.lbFreshrate.Name = "lbFreshrate";
|
||||
//
|
||||
// lbCacheDays
|
||||
//
|
||||
resources.ApplyResources(this.lbCacheDays, "lbCacheDays");
|
||||
this.lbCacheDays.Name = "lbCacheDays";
|
||||
//
|
||||
// chkEnableStatistics
|
||||
//
|
||||
resources.ApplyResources(this.chkEnableStatistics, "chkEnableStatistics");
|
||||
this.chkEnableStatistics.Name = "chkEnableStatistics";
|
||||
this.chkEnableStatistics.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkAllowLANConn
|
||||
//
|
||||
resources.ApplyResources(this.chkAllowLANConn, "chkAllowLANConn");
|
||||
|
@ -522,6 +562,10 @@
|
|||
resources.ApplyResources(this.panel1, "panel1");
|
||||
this.panel1.Name = "panel1";
|
||||
//
|
||||
// configBindingSource
|
||||
//
|
||||
this.configBindingSource.DataSource = typeof(v2rayN.Mode.Config);
|
||||
//
|
||||
// OptionSettingForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
|
@ -553,6 +597,7 @@
|
|||
this.tabPage7.ResumeLayout(false);
|
||||
this.tabPage7.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.configBindingSource)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -619,5 +664,11 @@
|
|||
private System.Windows.Forms.CheckBox chksniffingEnabled;
|
||||
private System.Windows.Forms.CheckBox chksniffingEnabled2;
|
||||
private System.Windows.Forms.Button btnSetDefRountingRule;
|
||||
private System.Windows.Forms.CheckBox chkEnableStatistics;
|
||||
private System.Windows.Forms.TextBox tbCacheDays;
|
||||
private System.Windows.Forms.Label lbCacheDays;
|
||||
private System.Windows.Forms.ComboBox cbFreshrate;
|
||||
private System.Windows.Forms.Label lbFreshrate;
|
||||
private System.Windows.Forms.BindingSource configBindingSource;
|
||||
}
|
||||
}
|
|
@ -106,6 +106,39 @@ namespace v2rayN.Forms
|
|||
|
||||
chkAllowLANConn.Checked = config.allowLANConn;
|
||||
|
||||
|
||||
var enableStatistics = config.enableStatistics;
|
||||
chkEnableStatistics.Checked = enableStatistics;
|
||||
|
||||
tbCacheDays.Enabled = enableStatistics;
|
||||
tbCacheDays.Text = config.CacheDays.ToString();
|
||||
|
||||
|
||||
var cbSource = new ComboItem[]
|
||||
{
|
||||
new ComboItem{ID = (int)Global.StatisticsFreshRate.quick, Text = UIRes.I18N("QuickFresh")},
|
||||
new ComboItem{ID = (int)Global.StatisticsFreshRate.medium, Text = UIRes.I18N("MediumFresh")},
|
||||
new ComboItem{ID = (int)Global.StatisticsFreshRate.slow, Text = UIRes.I18N("SlowFresh")},
|
||||
};
|
||||
cbFreshrate.DataSource = cbSource;
|
||||
|
||||
cbFreshrate.DisplayMember = "Text";
|
||||
cbFreshrate.ValueMember = "ID";
|
||||
|
||||
switch(config.statisticsFreshRate)
|
||||
{
|
||||
case (int)Global.StatisticsFreshRate.quick:
|
||||
cbFreshrate.SelectedItem = cbSource[0];
|
||||
break;
|
||||
case (int)Global.StatisticsFreshRate.medium:
|
||||
cbFreshrate.SelectedItem = cbSource[1];
|
||||
break;
|
||||
case (int)Global.StatisticsFreshRate.slow:
|
||||
cbFreshrate.SelectedItem = cbSource[2];
|
||||
break;
|
||||
}
|
||||
|
||||
cbFreshrate.Enabled = enableStatistics;
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
|
@ -293,6 +326,16 @@ namespace v2rayN.Forms
|
|||
|
||||
config.allowLANConn = chkAllowLANConn.Checked;
|
||||
|
||||
config.enableStatistics = chkEnableStatistics.Checked;
|
||||
|
||||
uint days = 0;
|
||||
var valid = uint.TryParse(tbCacheDays.Text, out days);
|
||||
if (!valid)
|
||||
days = 7;
|
||||
config.CacheDays = days;
|
||||
|
||||
config.statisticsFreshRate = (int)cbFreshrate.SelectedValue;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -358,4 +401,10 @@ namespace v2rayN.Forms
|
|||
labRoutingTips.Text = text;
|
||||
}
|
||||
}
|
||||
|
||||
class ComboItem
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -288,4 +288,13 @@
|
|||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>参数设置</value>
|
||||
</data>
|
||||
<data name="chkEnableStatistics.Text" xml:space="preserve">
|
||||
<value>启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端)</value>
|
||||
</data>
|
||||
<data name="lbCacheDays.Text" xml:space="preserve">
|
||||
<value>缓存天数(0-30, 0关闭缓存单独每天的数据使用情况)</value>
|
||||
</data>
|
||||
<data name="lbFreshrate.Text" xml:space="preserve">
|
||||
<value>统计刷新频率</value>
|
||||
</data>
|
||||
</root>
|
|
@ -141,6 +141,21 @@ namespace v2rayN
|
|||
/// </summary>
|
||||
public const string CustomIconName = "v2rayN.ico";
|
||||
|
||||
|
||||
public const string InboundAPITagName = "api";
|
||||
public const string InboundProxyTagName = "proxy";
|
||||
public const string Loopback = "127.0.0.1";
|
||||
public const string InboundAPIProtocal = "dokodemo-door";
|
||||
public const uint InboundAPIPort = 10085;
|
||||
public enum StatisticsFreshRate
|
||||
{
|
||||
quick = 500,
|
||||
medium = 1000,
|
||||
slow = 2000
|
||||
}
|
||||
public const string StatisticLogDirectory = "Statistics";
|
||||
public const string StatisticLogOverall = "overall.txt";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 全局变量
|
||||
|
|
|
@ -40,6 +40,15 @@ namespace v2rayN.Handler
|
|||
|
||||
////默认监听端口
|
||||
//config.pacPort = 8888;
|
||||
|
||||
// 默认缓存七天
|
||||
config.CacheDays = 7;
|
||||
|
||||
// 默认不开启统计
|
||||
config.enableStatistics = false;
|
||||
|
||||
// 默认中等刷新率
|
||||
config.statisticsFreshRate = (int)Global.StatisticsFreshRate.medium;
|
||||
}
|
||||
|
||||
//本地监听
|
||||
|
|
|
@ -0,0 +1,367 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics;
|
||||
|
||||
using v2rayN.Mode;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
class StatisticsHandler
|
||||
{
|
||||
private Config config_;
|
||||
private const string cliName_ = "v2ctl.exe";
|
||||
private string args_ = "";
|
||||
|
||||
private Process connector_;
|
||||
|
||||
private Thread workThread_;
|
||||
|
||||
Action<ulong, ulong, ulong, ulong, List<Mode.ServerStatistics>> updateFunc_;
|
||||
|
||||
private bool enabled_;
|
||||
public bool Enable
|
||||
{
|
||||
get { return enabled_; }
|
||||
set { enabled_ = value; }
|
||||
}
|
||||
|
||||
public bool UpdateUI;
|
||||
|
||||
private StringBuilder outputBuilder_;
|
||||
|
||||
public ulong TotalUp { get; private set; }
|
||||
|
||||
public ulong TotalDown { get; private set; }
|
||||
|
||||
public List<Mode.ServerStatistics> Statistic{ get; set; }
|
||||
|
||||
public ulong Up { get; private set; }
|
||||
|
||||
public ulong Down { get; private set; }
|
||||
|
||||
private string logPath_;
|
||||
|
||||
private bool exitFlag_; // true to close workThread_
|
||||
|
||||
public StatisticsHandler(Config config, Action<ulong, ulong, ulong, ulong, List<Mode.ServerStatistics>> update)
|
||||
{
|
||||
config_ = config;
|
||||
enabled_ = config.enableStatistics;
|
||||
UpdateUI = false;
|
||||
updateFunc_ = update;
|
||||
logPath_ = Utils.GetPath($"{Global.StatisticLogDirectory}\\");
|
||||
Statistic = new List<Mode.ServerStatistics>();
|
||||
exitFlag_ = false;
|
||||
|
||||
DeleteExpiredLog();
|
||||
foreach (var server in config.vmess)
|
||||
{
|
||||
var statistic = new ServerStatistics(server.remarks, server.address, server.port, 0, 0, 0, 0);
|
||||
Statistic.Add(statistic);
|
||||
}
|
||||
|
||||
loadFromFile();
|
||||
|
||||
outputBuilder_ = new StringBuilder();
|
||||
|
||||
var fullPath = Utils.GetPath(cliName_);
|
||||
|
||||
if (!File.Exists(fullPath))
|
||||
{
|
||||
connector_ = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// .\v2ctl.exe api --server="127.0.0.1:port" StatsService.QueryStats "reset:true"
|
||||
args_ = string.Format("api --server=\"127.0.0.1:{0}\" StatsService.QueryStats \"reset:true\"", Global.InboundAPIPort);
|
||||
|
||||
connector_ = new Process();
|
||||
connector_.StartInfo.FileName = fullPath;
|
||||
connector_.StartInfo.Arguments = args_;
|
||||
connector_.StartInfo.RedirectStandardOutput = true;
|
||||
connector_.StartInfo.UseShellExecute = false;
|
||||
connector_.StartInfo.CreateNoWindow = true;
|
||||
|
||||
|
||||
workThread_ = new Thread(new ThreadStart(run));
|
||||
workThread_.Start();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
exitFlag_ = true;
|
||||
connector_.Kill();
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (!exitFlag_)
|
||||
{
|
||||
if (enabled_)
|
||||
{
|
||||
var addr = config_.address();
|
||||
var port = config_.port();
|
||||
var cur = Statistic.FindIndex(item => item.address == addr && item.port == port);
|
||||
connector_.Start();
|
||||
string output = connector_.StandardOutput.ReadToEnd();
|
||||
UInt64 up = 0;
|
||||
UInt64 down = 0;
|
||||
|
||||
//TODO: parse output
|
||||
parseOutput(output, out up, out down);
|
||||
|
||||
Up = up;
|
||||
Down = down;
|
||||
|
||||
TotalUp += up;
|
||||
TotalDown += down;
|
||||
|
||||
if(cur != -1)
|
||||
{
|
||||
Statistic[cur].todayUp += up;
|
||||
Statistic[cur].todayDown += down;
|
||||
Statistic[cur].totalUp += up;
|
||||
Statistic[cur].totalDown += down;
|
||||
}
|
||||
|
||||
if (UpdateUI)
|
||||
updateFunc_(TotalUp, TotalDown, Up, Down, Statistic);
|
||||
Thread.Sleep(config_.statisticsFreshRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public void parseOutput(string source, out UInt64 up, out UInt64 down)
|
||||
{
|
||||
// (?<=name: ")(.*?)(?=")|(?<=value: )(.*?)
|
||||
var datas = Regex.Matches(source, "(?<=name: \")(?<name>.*?)(?=\").*?(?<=value: )(?<value>.*?)(?=>)", RegexOptions.Singleline);
|
||||
|
||||
up = 0; down = 0;
|
||||
|
||||
foreach(Match match in datas)
|
||||
{
|
||||
var g = match.Groups;
|
||||
var name = g["name"].Value;
|
||||
var value = g["value"].Value;
|
||||
var nStr = name.Split(">>>".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
var type = "";
|
||||
|
||||
name = name.Trim();
|
||||
value = value.Trim();
|
||||
|
||||
name = nStr[1];
|
||||
type = nStr[3];
|
||||
|
||||
try
|
||||
{
|
||||
if (name == Global.InboundProxyTagName)
|
||||
{
|
||||
if (type == "uplink")
|
||||
{
|
||||
up = UInt64.Parse(value);
|
||||
}
|
||||
else if (type == "downlink")
|
||||
{
|
||||
down = UInt64.Parse(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
public void saveToFile()
|
||||
{
|
||||
if(!Directory.Exists(logPath_))
|
||||
{
|
||||
Directory.CreateDirectory(logPath_);
|
||||
}
|
||||
|
||||
// 总流量统计文件
|
||||
var overallPath = Path.Combine(logPath_, Global.StatisticLogOverall);
|
||||
if (!File.Exists(overallPath))
|
||||
{
|
||||
File.Create(overallPath);
|
||||
}
|
||||
try
|
||||
{
|
||||
using (var overallWriter = new StreamWriter(overallPath))
|
||||
{
|
||||
double up_amount, down_amount;
|
||||
string up_unit, down_unit;
|
||||
|
||||
Utils.ToHumanReadable(TotalUp, out up_amount, out up_unit);
|
||||
Utils.ToHumanReadable(TotalDown, out down_amount, out down_unit);
|
||||
|
||||
overallWriter.WriteLine($"LastUpdate {DateTime.Now.ToLongDateString()} {DateTime.Now.ToLongTimeString()}");
|
||||
overallWriter.WriteLine($"UP {string.Format("{0:f2}", up_amount)}{up_unit} {TotalUp}");
|
||||
overallWriter.WriteLine($"DOWN {string.Format("{0:f2}", down_amount)}{down_unit} {TotalDown}");
|
||||
foreach(var s in Statistic)
|
||||
{
|
||||
overallWriter.WriteLine($"* {s.name} {s.address} {s.port} {s.totalUp} {s.totalDown}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
// 当天流量记录文件
|
||||
var dailyPath = Path.Combine(logPath_, $"{DateTime.Now.ToLongDateString()}.txt");
|
||||
if (!File.Exists(dailyPath))
|
||||
{
|
||||
File.Create(dailyPath);
|
||||
}
|
||||
try
|
||||
{
|
||||
using (var dailyWriter = new StreamWriter(dailyPath))
|
||||
{
|
||||
dailyWriter.WriteLine($"LastUpdate {DateTime.Now.ToLongDateString()} {DateTime.Now.ToLongTimeString()}");
|
||||
foreach (var s in Statistic)
|
||||
{
|
||||
dailyWriter.WriteLine($"* {s.name} {s.address} {s.port} {s.todayUp} {s.todayDown}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public void loadFromFile()
|
||||
{
|
||||
if (!Directory.Exists(logPath_)) return;
|
||||
|
||||
// 总流量统计文件
|
||||
///
|
||||
/// 文件结构
|
||||
/// LastUpdate [date] [time]
|
||||
/// UP [readable string] [amount]
|
||||
/// DOWN [readable string] [amount]
|
||||
/// 每行每个数据空格分隔
|
||||
///
|
||||
var overallPath = Path.Combine(logPath_, Global.StatisticLogOverall);
|
||||
if (File.Exists(overallPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var overallReader = new StreamReader(overallPath))
|
||||
{
|
||||
while (!overallReader.EndOfStream)
|
||||
{
|
||||
var line = overallReader.ReadLine();
|
||||
if (line.StartsWith("LastUpdate"))
|
||||
{
|
||||
|
||||
}
|
||||
else if (line.StartsWith("UP"))
|
||||
{
|
||||
var datas = line.Split(' ');
|
||||
if (datas.Length < 3) return;
|
||||
TotalUp = ulong.Parse(datas[2]);
|
||||
}
|
||||
else if (line.StartsWith("DOWN"))
|
||||
{
|
||||
var datas = line.Split(' ');
|
||||
if (datas.Length < 3) return;
|
||||
TotalDown = ulong.Parse(datas[2]);
|
||||
}
|
||||
else if (line.StartsWith("*"))
|
||||
{
|
||||
var datas = line.Split(' ');
|
||||
if (datas.Length < 6) return;
|
||||
var name = datas[1];
|
||||
var address = datas[2];
|
||||
var port = int.Parse(datas[3]);
|
||||
var totalUp = ulong.Parse(datas[4]);
|
||||
var totalDown = ulong.Parse(datas[5]);
|
||||
|
||||
var index = Statistic.FindIndex(item => item.address == address && item.port == port);
|
||||
if (index != -1)
|
||||
{
|
||||
Statistic[index].totalUp = totalUp;
|
||||
Statistic[index].totalDown = totalDown;
|
||||
}
|
||||
else
|
||||
{
|
||||
var s = new Mode.ServerStatistics(name, address, port, totalUp, totalDown, 0, 0);
|
||||
Statistic.Add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
// 当天流量记录文件
|
||||
var dailyPath = Path.Combine(logPath_, $"{DateTime.Now.ToLongDateString()}.txt");
|
||||
if (File.Exists(dailyPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var dailyReader = new StreamReader(dailyPath))
|
||||
{
|
||||
while (!dailyReader.EndOfStream)
|
||||
{
|
||||
var line = dailyReader.ReadLine();
|
||||
if (line.StartsWith("LastUpdate"))
|
||||
{
|
||||
|
||||
}
|
||||
else if (line.StartsWith("*"))
|
||||
{
|
||||
var datas = line.Split(' ');
|
||||
if (datas.Length < 6) return;
|
||||
var name = datas[1];
|
||||
var address = datas[2];
|
||||
var port = int.Parse(datas[3]);
|
||||
var todayUp = ulong.Parse(datas[4]);
|
||||
var todayDown = ulong.Parse(datas[5]);
|
||||
|
||||
var index = Statistic.FindIndex(item => item.address == address && item.port == port);
|
||||
if (index != -1)
|
||||
{
|
||||
Statistic[index].todayUp = todayUp;
|
||||
Statistic[index].todayDown = todayDown;
|
||||
}
|
||||
else
|
||||
{
|
||||
var s = new Mode.ServerStatistics(name, address, port, 0, 0, todayUp, todayDown);
|
||||
Statistic.Add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void DeleteExpiredLog()
|
||||
{
|
||||
if (!Directory.Exists(logPath_)) return;
|
||||
var dirInfo = new DirectoryInfo(logPath_);
|
||||
var files = dirInfo.GetFiles();
|
||||
foreach (var file in files)
|
||||
{
|
||||
if (file.Name == "overall.txt") continue;
|
||||
var name = file.Name.Split('.')[0];
|
||||
var ft = DateTime.Parse(name);
|
||||
var ct = DateTime.Now;
|
||||
var dur = ct - ft;
|
||||
if(dur.Days > config_.CacheDays)
|
||||
{
|
||||
file.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ using System.IO;
|
|||
using v2rayN.Mode;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
|
@ -78,6 +79,9 @@ namespace v2rayN.Handler
|
|||
//dns
|
||||
dns(config, ref v2rayConfig);
|
||||
|
||||
// TODO: 统计配置
|
||||
statistic(config, ref v2rayConfig);
|
||||
|
||||
Utils.ToJsonFile(v2rayConfig, fileName);
|
||||
|
||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
|
||||
|
@ -613,6 +617,51 @@ namespace v2rayN.Handler
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static int statistic(Config config, ref V2rayConfig v2rayConfig)
|
||||
{
|
||||
if (config.enableStatistics)
|
||||
{
|
||||
var tag = Global.InboundAPITagName;
|
||||
var apiObj = new Mode.API();
|
||||
var policyObj = new Mode.Policy();
|
||||
var policySystemSetting = new Mode.SystemPolicy();
|
||||
|
||||
string[] services = { "StatsService" };
|
||||
|
||||
v2rayConfig.stats = new Stats();
|
||||
|
||||
apiObj.tag = tag;
|
||||
apiObj.services = services.ToList();
|
||||
v2rayConfig.api = apiObj;
|
||||
|
||||
policySystemSetting.statsInboundDownlink = true;
|
||||
policySystemSetting.statsInboundUplink = true;
|
||||
policyObj.system = policySystemSetting;
|
||||
v2rayConfig.policy = policyObj;
|
||||
if(!v2rayConfig.inbounds.Exists(item => { return item.tag == tag; }))
|
||||
{
|
||||
var apiInbound = new Mode.Inbounds();
|
||||
var apiInboundSettings = new Mode.Inboundsettings();
|
||||
apiInbound.tag = tag;
|
||||
apiInbound.listen = Global.Loopback;
|
||||
apiInbound.port = config.port();
|
||||
apiInbound.protocol = Global.InboundAPIProtocal;
|
||||
apiInboundSettings.address = Global.Loopback;
|
||||
apiInbound.settings = apiInboundSettings;
|
||||
v2rayConfig.inbounds.Add(apiInbound);
|
||||
}
|
||||
if(!v2rayConfig.routing.rules.Exists(item => { return item.outboundTag == tag; }))
|
||||
{
|
||||
var apiRoutingRule = new Mode.RulesItem();
|
||||
apiRoutingRule.inboundTag = tag;
|
||||
apiRoutingRule.outboundTag = tag;
|
||||
apiRoutingRule.type = "field";
|
||||
v2rayConfig.routing.rules.Add(apiRoutingRule);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成v2ray的客户端配置文件(自定义配置)
|
||||
/// </summary>
|
||||
|
|
|
@ -91,6 +91,32 @@ namespace v2rayN.Mode
|
|||
/// </summary>
|
||||
public bool allowLANConn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 启用实时网速和流量统计
|
||||
/// </summary>
|
||||
public bool enableStatistics { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 视图刷新率
|
||||
/// </summary>
|
||||
public int statisticsFreshRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 统计数据缓存天数 [0, 30]
|
||||
/// * 0 关闭单独每天使用流量的缓存
|
||||
/// * 无论如何不会关闭总流量的缓存
|
||||
/// </summary>
|
||||
private uint cacheDays;
|
||||
public uint CacheDays {
|
||||
get { return cacheDays; }
|
||||
set
|
||||
{
|
||||
if (value < 0) cacheDays = 0;
|
||||
else if (value > 30) cacheDays = 30;
|
||||
else cacheDays = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义远程DNS
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace v2rayN.Mode
|
||||
{
|
||||
class ServerStatistics
|
||||
{
|
||||
public string name;
|
||||
public string address;
|
||||
public int port;
|
||||
public ulong totalUp;
|
||||
public ulong totalDown;
|
||||
public ulong todayUp;
|
||||
public ulong todayDown;
|
||||
|
||||
public ServerStatistics() { }
|
||||
public ServerStatistics(string name, string addr, int port, ulong totalUp, ulong totalDown, ulong todayUp, ulong todayDown)
|
||||
{
|
||||
this.name = name;
|
||||
this.address = addr;
|
||||
this.port = port;
|
||||
this.totalUp = totalUp;
|
||||
this.totalDown = totalDown;
|
||||
this.todayUp = todayUp;
|
||||
this.todayDown = todayDown;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,6 +21,43 @@ namespace v2rayN.Mode
|
|||
/// </summary>
|
||||
public List<Outbounds> outbounds { get; set; }
|
||||
|
||||
/// 网速统计
|
||||
/// 使用v2ray api功能
|
||||
///
|
||||
/// routing->rules 需要加上这一条
|
||||
/// {
|
||||
/// "inboundTag": [
|
||||
/// "api"
|
||||
/// ],
|
||||
/// "outboundTag": "api",
|
||||
/// "type": "field"
|
||||
/// }
|
||||
|
||||
/// <summary>
|
||||
/// 统计需要, 空对象
|
||||
/// </summary>
|
||||
public Stats stats { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 需要tag和services
|
||||
/// "api": {
|
||||
/// "tag": "api",
|
||||
/// "services": [
|
||||
/// "StatsService"
|
||||
/// ]
|
||||
/// }
|
||||
/// </summary>
|
||||
public API api { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// policy 都设置为true;
|
||||
/// "system": {
|
||||
/// "statsInboundUplink": true,
|
||||
/// "statsInboundDownlink": true
|
||||
/// }
|
||||
/// </summary>
|
||||
public Policy policy;
|
||||
|
||||
/// <summary>
|
||||
/// DNS 配置
|
||||
/// </summary>
|
||||
|
@ -31,6 +68,25 @@ namespace v2rayN.Mode
|
|||
public Routing routing { get; set; }
|
||||
}
|
||||
|
||||
public class Stats { };
|
||||
|
||||
public class API
|
||||
{
|
||||
public string tag { get; set; }
|
||||
public List<string> services { get; set; }
|
||||
}
|
||||
|
||||
public class Policy
|
||||
{
|
||||
public SystemPolicy system;
|
||||
}
|
||||
|
||||
public class SystemPolicy
|
||||
{
|
||||
public bool statsInboundUplink;
|
||||
public bool statsInboundDownlink;
|
||||
}
|
||||
|
||||
public class Log
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -49,6 +105,7 @@ namespace v2rayN.Mode
|
|||
|
||||
public class Inbounds
|
||||
{
|
||||
public string tag { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -92,6 +149,11 @@ namespace v2rayN.Mode
|
|||
/// </summary>
|
||||
public string ip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// api 使用
|
||||
/// </summary>
|
||||
public string address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -273,6 +335,8 @@ namespace v2rayN.Mode
|
|||
///
|
||||
/// </summary>
|
||||
public string port { get; set; }
|
||||
|
||||
public string inboundTag { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is automatically generated by Visual Studio .Net. It is
|
||||
used to store generic object data source configuration information.
|
||||
Renaming the file extension or editing the content of this file may
|
||||
cause the file to be unrecognizable by the program.
|
||||
-->
|
||||
<GenericObjectDataSource DisplayName="Config" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TypeInfo>v2rayN.Mode.Config, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||
</GenericObjectDataSource>
|
|
@ -1,10 +1,10 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -13,13 +13,13 @@ namespace v2rayN.Resx {
|
|||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class ResUI {
|
||||
|
@ -33,7 +33,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
|
@ -47,8 +47,8 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用此强类型资源类,为所有资源查找
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
|
@ -61,7 +61,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Batch export subscription to clipboard successfully 的本地化字符串。
|
||||
/// Looks up a localized string similar to Batch export subscription to clipboard successfully.
|
||||
/// </summary>
|
||||
internal static string BatchExportSubscriptionSuccessfully {
|
||||
get {
|
||||
|
@ -70,7 +70,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Batch export share URL to clipboard successfully 的本地化字符串。
|
||||
/// Looks up a localized string similar to Batch export share URL to clipboard successfully.
|
||||
/// </summary>
|
||||
internal static string BatchExportURLSuccessfully {
|
||||
get {
|
||||
|
@ -79,7 +79,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please check the server settings first 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please check the server settings first.
|
||||
/// </summary>
|
||||
internal static string CheckServerSettings {
|
||||
get {
|
||||
|
@ -88,7 +88,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 configuration format is incorrect 的本地化字符串。
|
||||
/// Looks up a localized string similar to configuration format is incorrect.
|
||||
/// </summary>
|
||||
internal static string ConfigurationFormatIncorrect {
|
||||
get {
|
||||
|
@ -97,7 +97,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound. 的本地化字符串。
|
||||
/// Looks up a localized string similar to Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound..
|
||||
/// </summary>
|
||||
internal static string CustomServerTips {
|
||||
get {
|
||||
|
@ -106,7 +106,16 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Whether to download? {0} 的本地化字符串。
|
||||
/// Looks up a localized string similar to DOWN.
|
||||
/// </summary>
|
||||
internal static string downloadSpeed {
|
||||
get {
|
||||
return ResourceManager.GetString("downloadSpeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Whether to download? {0}.
|
||||
/// </summary>
|
||||
internal static string DownloadYesNo {
|
||||
get {
|
||||
|
@ -115,7 +124,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Failed to convert configuration file 的本地化字符串。
|
||||
/// Looks up a localized string similar to Failed to convert configuration file.
|
||||
/// </summary>
|
||||
internal static string FailedConversionConfiguration {
|
||||
get {
|
||||
|
@ -124,7 +133,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Failed to generate default configuration file 的本地化字符串。
|
||||
/// Looks up a localized string similar to Failed to generate default configuration file.
|
||||
/// </summary>
|
||||
internal static string FailedGenDefaultConfiguration {
|
||||
get {
|
||||
|
@ -133,7 +142,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Failed to get the default configuration 的本地化字符串。
|
||||
/// Looks up a localized string similar to Failed to get the default configuration.
|
||||
/// </summary>
|
||||
internal static string FailedGetDefaultConfiguration {
|
||||
get {
|
||||
|
@ -142,7 +151,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Failed to import custom configuration server 的本地化字符串。
|
||||
/// Looks up a localized string similar to Failed to import custom configuration server.
|
||||
/// </summary>
|
||||
internal static string FailedImportedCustomServer {
|
||||
get {
|
||||
|
@ -151,7 +160,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Failed to read configuration file 的本地化字符串。
|
||||
/// Looks up a localized string similar to Failed to read configuration file.
|
||||
/// </summary>
|
||||
internal static string FailedReadConfiguration {
|
||||
get {
|
||||
|
@ -160,7 +169,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please fill in the correct format extra ID 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please fill in the correct format extra ID.
|
||||
/// </summary>
|
||||
internal static string FillCorrectAlterId {
|
||||
get {
|
||||
|
@ -169,7 +178,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please fill in the correct format server port 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please fill in the correct format server port.
|
||||
/// </summary>
|
||||
internal static string FillCorrectServerPort {
|
||||
get {
|
||||
|
@ -178,7 +187,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please fill in the KCP parameters correctly 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please fill in the KCP parameters correctly.
|
||||
/// </summary>
|
||||
internal static string FillKcpParameters {
|
||||
get {
|
||||
|
@ -187,7 +196,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please fill in the local listening port 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please fill in the local listening port.
|
||||
/// </summary>
|
||||
internal static string FillLocalListeningPort {
|
||||
get {
|
||||
|
@ -196,7 +205,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please fill in the password 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please fill in the password.
|
||||
/// </summary>
|
||||
internal static string FillPassword {
|
||||
get {
|
||||
|
@ -205,7 +214,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please fill in the server address 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please fill in the server address.
|
||||
/// </summary>
|
||||
internal static string FillServerAddress {
|
||||
get {
|
||||
|
@ -214,7 +223,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please fill in the user ID 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please fill in the user ID.
|
||||
/// </summary>
|
||||
internal static string FillUUID {
|
||||
get {
|
||||
|
@ -223,7 +232,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 is not the correct client configuration file, please check 的本地化字符串。
|
||||
/// Looks up a localized string similar to is not the correct client configuration file, please check.
|
||||
/// </summary>
|
||||
internal static string IncorrectClientConfiguration {
|
||||
get {
|
||||
|
@ -232,7 +241,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 is not the correct configuration, please check 的本地化字符串。
|
||||
/// Looks up a localized string similar to is not the correct configuration, please check.
|
||||
/// </summary>
|
||||
internal static string Incorrectconfiguration {
|
||||
get {
|
||||
|
@ -241,7 +250,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 is not the correct server configuration file, please check 的本地化字符串。
|
||||
/// Looks up a localized string similar to is not the correct server configuration file, please check.
|
||||
/// </summary>
|
||||
internal static string IncorrectServerConfiguration {
|
||||
get {
|
||||
|
@ -250,7 +259,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Initial Configuration 的本地化字符串。
|
||||
/// Looks up a localized string similar to Initial Configuration.
|
||||
/// </summary>
|
||||
internal static string InitialConfiguration {
|
||||
get {
|
||||
|
@ -259,7 +268,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Address 的本地化字符串。
|
||||
/// Looks up a localized string similar to Address.
|
||||
/// </summary>
|
||||
internal static string LvAddress {
|
||||
get {
|
||||
|
@ -268,7 +277,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Alias 的本地化字符串。
|
||||
/// Looks up a localized string similar to Alias.
|
||||
/// </summary>
|
||||
internal static string LvAlias {
|
||||
get {
|
||||
|
@ -277,7 +286,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Security 的本地化字符串。
|
||||
/// Looks up a localized string similar to Security.
|
||||
/// </summary>
|
||||
internal static string LvEncryptionMethod {
|
||||
get {
|
||||
|
@ -286,7 +295,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Port 的本地化字符串。
|
||||
/// Looks up a localized string similar to Port.
|
||||
/// </summary>
|
||||
internal static string LvPort {
|
||||
get {
|
||||
|
@ -295,7 +304,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Type 的本地化字符串。
|
||||
/// Looks up a localized string similar to Type.
|
||||
/// </summary>
|
||||
internal static string LvServiceType {
|
||||
get {
|
||||
|
@ -304,7 +313,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Subs 的本地化字符串。
|
||||
/// Looks up a localized string similar to Subs.
|
||||
/// </summary>
|
||||
internal static string LvSubscription {
|
||||
get {
|
||||
|
@ -313,7 +322,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Test Results 的本地化字符串。
|
||||
/// Looks up a localized string similar to Test Results.
|
||||
/// </summary>
|
||||
internal static string LvTestResults {
|
||||
get {
|
||||
|
@ -322,7 +331,43 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Transport 的本地化字符串。
|
||||
/// Looks up a localized string similar to Today download traffic.
|
||||
/// </summary>
|
||||
internal static string LvTodayDownloadDataAmount {
|
||||
get {
|
||||
return ResourceManager.GetString("LvTodayDownloadDataAmount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Today upload traffic.
|
||||
/// </summary>
|
||||
internal static string LvTodayUploadDataAmount {
|
||||
get {
|
||||
return ResourceManager.GetString("LvTodayUploadDataAmount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Total download traffic.
|
||||
/// </summary>
|
||||
internal static string LvTotalDownloadDataAmount {
|
||||
get {
|
||||
return ResourceManager.GetString("LvTotalDownloadDataAmount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Total upload traffic.
|
||||
/// </summary>
|
||||
internal static string LvTotalUploadDataAmount {
|
||||
get {
|
||||
return ResourceManager.GetString("LvTotalUploadDataAmount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Transport.
|
||||
/// </summary>
|
||||
internal static string LvTransportProtocol {
|
||||
get {
|
||||
|
@ -331,7 +376,16 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Clear original subscription content 的本地化字符串。
|
||||
/// Looks up a localized string similar to MediumFresh.
|
||||
/// </summary>
|
||||
internal static string MediumFresh {
|
||||
get {
|
||||
return ResourceManager.GetString("MediumFresh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Clear original subscription content.
|
||||
/// </summary>
|
||||
internal static string MsgClearSubscription {
|
||||
get {
|
||||
|
@ -340,7 +394,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Download V2rayCore successfully 的本地化字符串。
|
||||
/// Looks up a localized string similar to Download V2rayCore successfully.
|
||||
/// </summary>
|
||||
internal static string MsgDownloadV2rayCoreSuccessfully {
|
||||
get {
|
||||
|
@ -349,7 +403,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Failed to import subscription content 的本地化字符串。
|
||||
/// Looks up a localized string similar to Failed to import subscription content.
|
||||
/// </summary>
|
||||
internal static string MsgFailedImportSubscription {
|
||||
get {
|
||||
|
@ -358,7 +412,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Get the subscription content successfully 的本地化字符串。
|
||||
/// Looks up a localized string similar to Get the subscription content successfully.
|
||||
/// </summary>
|
||||
internal static string MsgGetSubscriptionSuccessfully {
|
||||
get {
|
||||
|
@ -367,7 +421,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 No valid subscriptions set 的本地化字符串。
|
||||
/// Looks up a localized string similar to No valid subscriptions set.
|
||||
/// </summary>
|
||||
internal static string MsgNoValidSubscription {
|
||||
get {
|
||||
|
@ -376,7 +430,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 PAC update failed 的本地化字符串。
|
||||
/// Looks up a localized string similar to PAC update failed.
|
||||
/// </summary>
|
||||
internal static string MsgPACUpdateFailed {
|
||||
get {
|
||||
|
@ -385,7 +439,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 PAC update succeeded 的本地化字符串。
|
||||
/// Looks up a localized string similar to PAC update succeeded.
|
||||
/// </summary>
|
||||
internal static string MsgPACUpdateSuccessfully {
|
||||
get {
|
||||
|
@ -394,7 +448,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Resolve V2rayCore successfully 的本地化字符串。
|
||||
/// Looks up a localized string similar to Resolve V2rayCore successfully.
|
||||
/// </summary>
|
||||
internal static string MsgParsingV2rayCoreSuccessfully {
|
||||
get {
|
||||
|
@ -403,7 +457,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Simplify PAC Success 的本地化字符串。
|
||||
/// Looks up a localized string similar to Simplify PAC Success.
|
||||
/// </summary>
|
||||
internal static string MsgSimplifyPAC {
|
||||
get {
|
||||
|
@ -412,7 +466,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start getting subscriptions 的本地化字符串。
|
||||
/// Looks up a localized string similar to Start getting subscriptions.
|
||||
/// </summary>
|
||||
internal static string MsgStartGettingSubscriptions {
|
||||
get {
|
||||
|
@ -421,7 +475,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start updating PAC... 的本地化字符串。
|
||||
/// Looks up a localized string similar to Start updating PAC....
|
||||
/// </summary>
|
||||
internal static string MsgStartUpdatingPAC {
|
||||
get {
|
||||
|
@ -430,7 +484,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start updating V2rayCore... 的本地化字符串。
|
||||
/// Looks up a localized string similar to Start updating V2rayCore....
|
||||
/// </summary>
|
||||
internal static string MsgStartUpdatingV2rayCore {
|
||||
get {
|
||||
|
@ -439,7 +493,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Subscription content decoding failed (non-BASE64 code) 的本地化字符串。
|
||||
/// Looks up a localized string similar to Subscription content decoding failed (non-BASE64 code).
|
||||
/// </summary>
|
||||
internal static string MsgSubscriptionDecodingFailed {
|
||||
get {
|
||||
|
@ -448,7 +502,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 is unpacking... 的本地化字符串。
|
||||
/// Looks up a localized string similar to is unpacking....
|
||||
/// </summary>
|
||||
internal static string MsgUnpacking {
|
||||
get {
|
||||
|
@ -457,7 +511,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Update subscription end 的本地化字符串。
|
||||
/// Looks up a localized string similar to Update subscription end.
|
||||
/// </summary>
|
||||
internal static string MsgUpdateSubscriptionEnd {
|
||||
get {
|
||||
|
@ -466,7 +520,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Update subscription starts 的本地化字符串。
|
||||
/// Looks up a localized string similar to Update subscription starts.
|
||||
/// </summary>
|
||||
internal static string MsgUpdateSubscriptionStart {
|
||||
get {
|
||||
|
@ -475,7 +529,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Update V2rayCore successfully 的本地化字符串。
|
||||
/// Looks up a localized string similar to Update V2rayCore successfully.
|
||||
/// </summary>
|
||||
internal static string MsgUpdateV2rayCoreSuccessfully {
|
||||
get {
|
||||
|
@ -484,7 +538,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Update V2rayCore successfully! Restarting service... 的本地化字符串。
|
||||
/// Looks up a localized string similar to Update V2rayCore successfully! Restarting service....
|
||||
/// </summary>
|
||||
internal static string MsgUpdateV2rayCoreSuccessfullyMore {
|
||||
get {
|
||||
|
@ -493,7 +547,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 This feature relies on the Http global proxy, please set it correctly first. 的本地化字符串。
|
||||
/// Looks up a localized string similar to This feature relies on the Http global proxy, please set it correctly first..
|
||||
/// </summary>
|
||||
internal static string NeedHttpGlobalProxy {
|
||||
get {
|
||||
|
@ -502,7 +556,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Non-vmess or ss protocol 的本地化字符串。
|
||||
/// Looks up a localized string similar to Non-vmess or ss protocol.
|
||||
/// </summary>
|
||||
internal static string NonvmessOrssProtocol {
|
||||
get {
|
||||
|
@ -511,7 +565,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 non-Vmess service, this feature is invalid 的本地化字符串。
|
||||
/// Looks up a localized string similar to non-Vmess service, this feature is invalid.
|
||||
/// </summary>
|
||||
internal static string NonVmessService {
|
||||
get {
|
||||
|
@ -520,7 +574,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 V2ray-core not found, download address: {0} 的本地化字符串。
|
||||
/// Looks up a localized string similar to V2ray-core not found, download address: {0}.
|
||||
/// </summary>
|
||||
internal static string NotFoundCore {
|
||||
get {
|
||||
|
@ -529,7 +583,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Scan completed, no valid QR code found 的本地化字符串。
|
||||
/// Looks up a localized string similar to Scan completed, no valid QR code found.
|
||||
/// </summary>
|
||||
internal static string NoValidQRcodeFound {
|
||||
get {
|
||||
|
@ -538,7 +592,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 operation failed, please check retry 的本地化字符串。
|
||||
/// Looks up a localized string similar to operation failed, please check retry.
|
||||
/// </summary>
|
||||
internal static string OperationFailed {
|
||||
get {
|
||||
|
@ -547,7 +601,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please Fill Remarks 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please Fill Remarks.
|
||||
/// </summary>
|
||||
internal static string PleaseFillRemarks {
|
||||
get {
|
||||
|
@ -556,7 +610,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please select the encryption method 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please select the encryption method.
|
||||
/// </summary>
|
||||
internal static string PleaseSelectEncryption {
|
||||
get {
|
||||
|
@ -565,7 +619,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please select an agreement 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please select an agreement.
|
||||
/// </summary>
|
||||
internal static string PleaseSelectProtocol {
|
||||
get {
|
||||
|
@ -574,7 +628,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please select the server first 的本地化字符串。
|
||||
/// Looks up a localized string similar to Please select the server first.
|
||||
/// </summary>
|
||||
internal static string PleaseSelectServer {
|
||||
get {
|
||||
|
@ -583,7 +637,16 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Are you sure to remove the server? 的本地化字符串。
|
||||
/// Looks up a localized string similar to QuickFresh.
|
||||
/// </summary>
|
||||
internal static string QuickFresh {
|
||||
get {
|
||||
return ResourceManager.GetString("QuickFresh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Are you sure to remove the server?.
|
||||
/// </summary>
|
||||
internal static string RemoveServer {
|
||||
get {
|
||||
|
@ -592,7 +655,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 The client configuration file is saved at: {0} 的本地化字符串。
|
||||
/// Looks up a localized string similar to The client configuration file is saved at: {0}.
|
||||
/// </summary>
|
||||
internal static string SaveClientConfigurationIn {
|
||||
get {
|
||||
|
@ -601,7 +664,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 The server configuration file is saved at: {0} 的本地化字符串。
|
||||
/// Looks up a localized string similar to The server configuration file is saved at: {0}.
|
||||
/// </summary>
|
||||
internal static string SaveServerConfigurationIn {
|
||||
get {
|
||||
|
@ -610,7 +673,16 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Note: After this function relies on the Http global proxy test, please manually adjust the Http global proxy and active node! 的本地化字符串。
|
||||
/// Looks up a localized string similar to SlowFresh.
|
||||
/// </summary>
|
||||
internal static string SlowFresh {
|
||||
get {
|
||||
return ResourceManager.GetString("SlowFresh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Note: After this function relies on the Http global proxy test, please manually adjust the Http global proxy and active node!.
|
||||
/// </summary>
|
||||
internal static string SpeedServerTips {
|
||||
get {
|
||||
|
@ -619,7 +691,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start service ({0})...... 的本地化字符串。
|
||||
/// Looks up a localized string similar to Start service ({0}).......
|
||||
/// </summary>
|
||||
internal static string StartService {
|
||||
get {
|
||||
|
@ -628,8 +700,8 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Successful configuration
|
||||
///{0} 的本地化字符串。
|
||||
/// Looks up a localized string similar to Successful configuration
|
||||
///{0}.
|
||||
/// </summary>
|
||||
internal static string SuccessfulConfiguration {
|
||||
get {
|
||||
|
@ -638,7 +710,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Successfully imported custom configuration server 的本地化字符串。
|
||||
/// Looks up a localized string similar to Successfully imported custom configuration server.
|
||||
/// </summary>
|
||||
internal static string SuccessfullyImportedCustomServer {
|
||||
get {
|
||||
|
@ -647,7 +719,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Imported bulk URL from clipboard successfully 的本地化字符串。
|
||||
/// Looks up a localized string similar to Imported bulk URL from clipboard successfully.
|
||||
/// </summary>
|
||||
internal static string SuccessfullyImportedServerViaClipboard {
|
||||
get {
|
||||
|
@ -656,12 +728,21 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Scan import URL successfully 的本地化字符串。
|
||||
/// Looks up a localized string similar to Scan import URL successfully.
|
||||
/// </summary>
|
||||
internal static string SuccessfullyImportedServerViaScan {
|
||||
get {
|
||||
return ResourceManager.GetString("SuccessfullyImportedServerViaScan", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UP.
|
||||
/// </summary>
|
||||
internal static string uploadSpeed {
|
||||
get {
|
||||
return ResourceManager.GetString("uploadSpeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -319,4 +319,31 @@
|
|||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||
<value>Update V2rayCore successfully! Restarting service...</value>
|
||||
</data>
|
||||
<data name="MediumFresh" xml:space="preserve">
|
||||
<value>MediumFresh</value>
|
||||
</data>
|
||||
<data name="QuickFresh" xml:space="preserve">
|
||||
<value>QuickFresh</value>
|
||||
</data>
|
||||
<data name="SlowFresh" xml:space="preserve">
|
||||
<value>SlowFresh</value>
|
||||
</data>
|
||||
<data name="downloadSpeed" xml:space="preserve">
|
||||
<value>DOWN</value>
|
||||
</data>
|
||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||
<value>Today download traffic</value>
|
||||
</data>
|
||||
<data name="LvTodayUploadDataAmount" xml:space="preserve">
|
||||
<value>Today upload traffic</value>
|
||||
</data>
|
||||
<data name="LvTotalDownloadDataAmount" xml:space="preserve">
|
||||
<value>Total download traffic</value>
|
||||
</data>
|
||||
<data name="LvTotalUploadDataAmount" xml:space="preserve">
|
||||
<value>Total upload traffic</value>
|
||||
</data>
|
||||
<data name="uploadSpeed" xml:space="preserve">
|
||||
<value>UP</value>
|
||||
</data>
|
||||
</root>
|
|
@ -319,4 +319,31 @@
|
|||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||
<value>更新V2rayCore成功!正在重启服务...</value>
|
||||
</data>
|
||||
<data name="MediumFresh" xml:space="preserve">
|
||||
<value>中等</value>
|
||||
</data>
|
||||
<data name="QuickFresh" xml:space="preserve">
|
||||
<value>快</value>
|
||||
</data>
|
||||
<data name="SlowFresh" xml:space="preserve">
|
||||
<value>慢</value>
|
||||
</data>
|
||||
<data name="downloadSpeed" xml:space="preserve">
|
||||
<value>下载</value>
|
||||
</data>
|
||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||
<value>今日下载</value>
|
||||
</data>
|
||||
<data name="LvTodayUploadDataAmount" xml:space="preserve">
|
||||
<value>今日上传</value>
|
||||
</data>
|
||||
<data name="LvTotalDownloadDataAmount" xml:space="preserve">
|
||||
<value>总下载</value>
|
||||
</data>
|
||||
<data name="LvTotalUploadDataAmount" xml:space="preserve">
|
||||
<value>总上传</value>
|
||||
</data>
|
||||
<data name="uploadSpeed" xml:space="preserve">
|
||||
<value>上传</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,25 +1,55 @@
|
|||
{
|
||||
"stats": {},
|
||||
"api": {
|
||||
"tag": "api",
|
||||
"services": [
|
||||
"StatsService"
|
||||
]
|
||||
},
|
||||
"policy": {
|
||||
"system": {
|
||||
"statsInboundUplink": true,
|
||||
"statsInboundDownlink": true
|
||||
}
|
||||
},
|
||||
"log": {
|
||||
"access": "",
|
||||
"error": "",
|
||||
"loglevel": "error"
|
||||
},
|
||||
"log": {
|
||||
"access": "Vaccess.log",
|
||||
"error": "Verror.log",
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"inbounds": [{
|
||||
"port": 10808,
|
||||
"protocol": "socks",
|
||||
"listen": "127.0.0.1",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
"inbounds": [
|
||||
{
|
||||
"tag": "proxy",
|
||||
"port": 10808,
|
||||
"protocol": "socks",
|
||||
"listen": "127.0.0.1",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
}
|
||||
}],
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": 10085,
|
||||
"protocol": "dokodemo-door",
|
||||
"settings": {
|
||||
"address": "127.0.0.1"
|
||||
},
|
||||
"tag": "api"
|
||||
}
|
||||
],
|
||||
"outbounds": [{
|
||||
"tag": "proxy",
|
||||
"protocol": "vmess",
|
||||
|
@ -66,6 +96,12 @@
|
|||
],
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"rules": []
|
||||
"rules": [
|
||||
{
|
||||
"inboundTag": "api",
|
||||
"outboundTag": "api",
|
||||
"type": "field"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -262,6 +262,69 @@ namespace v2rayN
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// byte 转成 有两位小数点的 方便阅读的数据
|
||||
/// 比如 2.50 MB
|
||||
/// </summary>
|
||||
/// <param name="amount">bytes</param>
|
||||
/// <param name="result">转换之后的数据</param>
|
||||
/// <param name="unit">单位</param>
|
||||
public static void ToHumanReadable(ulong amount, out double result, out string unit)
|
||||
{
|
||||
var factor = 1024u;
|
||||
var KBs = amount / factor;
|
||||
if(KBs > 0)
|
||||
{
|
||||
// multi KB
|
||||
var MBs = KBs / factor;
|
||||
if(MBs > 0)
|
||||
{
|
||||
// multi MB
|
||||
var GBs = MBs / factor;
|
||||
if(GBs > 0)
|
||||
{
|
||||
// multi GB
|
||||
var TBs = GBs / factor;
|
||||
if(TBs > 0)
|
||||
{
|
||||
// 你是魔鬼吗? 用这么多流量
|
||||
result = TBs + GBs % factor / (factor + 0.0);
|
||||
unit = "TB";
|
||||
return;
|
||||
}
|
||||
result = GBs + MBs % factor / (factor + 0.0);
|
||||
unit = "GB";
|
||||
return;
|
||||
}
|
||||
result = MBs + KBs % factor / (factor + 0.0);
|
||||
unit = "MB";
|
||||
return;
|
||||
}
|
||||
result = KBs + amount % factor / (factor + 0.0);
|
||||
unit = "KB";
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = amount;
|
||||
unit = "Byte";
|
||||
}
|
||||
}
|
||||
|
||||
public static void DedupServerList(List<Mode.VmessItem> source, out List<Mode.VmessItem> result)
|
||||
{
|
||||
var list = new List<Mode.VmessItem>();
|
||||
foreach (var item in source)
|
||||
{
|
||||
if(!list.Exists(i => item.address == i.address && item.port == i.port))
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
result = list;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
@ -142,6 +142,7 @@
|
|||
<Compile Include="Forms\SubSettingControl.Designer.cs">
|
||||
<DependentUpon>SubSettingControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Handler\StatisticsHandler.cs" />
|
||||
<Compile Include="Handler\V2rayUpdateHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\HttpWebServer.cs" />
|
||||
<Compile Include="HttpProxyHandler\HttpWebServerB.cs" />
|
||||
|
@ -156,6 +157,7 @@
|
|||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Mode\EMove.cs" />
|
||||
<Compile Include="Mode\ServerStatistics.cs" />
|
||||
<Compile Include="Mode\SysproxyConfig.cs" />
|
||||
<Compile Include="Mode\EConfigType.cs" />
|
||||
<Compile Include="Resx\ResUI.zh-Hans.Designer.cs">
|
||||
|
@ -290,6 +292,7 @@
|
|||
<EmbeddedResource Include="app.config">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\DataSources\v2rayN.Mode.Config.datasource" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
|
Loading…
Reference in New Issue