mirror of https://github.com/2dust/v2rayN
Support update clash core
parent
aec8459761
commit
cf45e89b16
|
@ -67,9 +67,9 @@
|
||||||
this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem();
|
this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem();
|
this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem();
|
this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton();
|
||||||
this.tabGroup = new System.Windows.Forms.TabControl();
|
this.tabGroup = new System.Windows.Forms.TabControl();
|
||||||
this.qrCodeControl = new v2rayN.Forms.QRCodeControl();
|
this.qrCodeControl = new v2rayN.Forms.QRCodeControl();
|
||||||
this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton();
|
|
||||||
this.scBig = new System.Windows.Forms.SplitContainer();
|
this.scBig = new System.Windows.Forms.SplitContainer();
|
||||||
this.gbServers = new System.Windows.Forms.GroupBox();
|
this.gbServers = new System.Windows.Forms.GroupBox();
|
||||||
this.mainMsgControl = new v2rayN.Forms.MainMsgControl();
|
this.mainMsgControl = new v2rayN.Forms.MainMsgControl();
|
||||||
|
@ -111,6 +111,9 @@
|
||||||
this.tsbCheckUpdateN = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsbCheckUpdateN = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tsbCheckUpdateCore = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsbCheckUpdateCore = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tsbCheckUpdateXrayCore = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsbCheckUpdateXrayCore = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.tsbCheckUpdateClashCore = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.tsbCheckUpdateClashMetaCore = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.tsbCheckUpdateGeo = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsbCheckUpdateGeo = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
@ -208,6 +211,7 @@
|
||||||
this.menuExport2ShareUrl,
|
this.menuExport2ShareUrl,
|
||||||
this.menuExport2SubContent});
|
this.menuExport2SubContent});
|
||||||
this.cmsLv.Name = "cmsLv";
|
this.cmsLv.Name = "cmsLv";
|
||||||
|
this.cmsLv.OwnerItem = this.tsbServer;
|
||||||
resources.ApplyResources(this.cmsLv, "cmsLv");
|
resources.ApplyResources(this.cmsLv, "cmsLv");
|
||||||
//
|
//
|
||||||
// menuAddVmessServer
|
// menuAddVmessServer
|
||||||
|
@ -414,6 +418,13 @@
|
||||||
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
|
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
|
||||||
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
|
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
|
||||||
//
|
//
|
||||||
|
// tsbServer
|
||||||
|
//
|
||||||
|
this.tsbServer.DropDown = this.cmsLv;
|
||||||
|
this.tsbServer.Image = global::v2rayN.Properties.Resources.server;
|
||||||
|
resources.ApplyResources(this.tsbServer, "tsbServer");
|
||||||
|
this.tsbServer.Name = "tsbServer";
|
||||||
|
//
|
||||||
// tabGroup
|
// tabGroup
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tabGroup, "tabGroup");
|
resources.ApplyResources(this.tabGroup, "tabGroup");
|
||||||
|
@ -426,13 +437,6 @@
|
||||||
resources.ApplyResources(this.qrCodeControl, "qrCodeControl");
|
resources.ApplyResources(this.qrCodeControl, "qrCodeControl");
|
||||||
this.qrCodeControl.Name = "qrCodeControl";
|
this.qrCodeControl.Name = "qrCodeControl";
|
||||||
//
|
//
|
||||||
// tsbServer
|
|
||||||
//
|
|
||||||
this.tsbServer.DropDown = this.cmsLv;
|
|
||||||
this.tsbServer.Image = global::v2rayN.Properties.Resources.server;
|
|
||||||
resources.ApplyResources(this.tsbServer, "tsbServer");
|
|
||||||
this.tsbServer.Name = "tsbServer";
|
|
||||||
//
|
|
||||||
// scBig
|
// scBig
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.scBig, "scBig");
|
resources.ApplyResources(this.scBig, "scBig");
|
||||||
|
@ -707,6 +711,9 @@
|
||||||
this.tsbCheckUpdateN,
|
this.tsbCheckUpdateN,
|
||||||
this.tsbCheckUpdateCore,
|
this.tsbCheckUpdateCore,
|
||||||
this.tsbCheckUpdateXrayCore,
|
this.tsbCheckUpdateXrayCore,
|
||||||
|
this.toolStripSeparator16,
|
||||||
|
this.tsbCheckUpdateClashCore,
|
||||||
|
this.tsbCheckUpdateClashMetaCore,
|
||||||
this.toolStripSeparator15,
|
this.toolStripSeparator15,
|
||||||
this.tsbCheckUpdateGeo});
|
this.tsbCheckUpdateGeo});
|
||||||
this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate;
|
this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate;
|
||||||
|
@ -731,6 +738,23 @@
|
||||||
resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore");
|
resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore");
|
||||||
this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click);
|
this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click);
|
||||||
//
|
//
|
||||||
|
// toolStripSeparator16
|
||||||
|
//
|
||||||
|
this.toolStripSeparator16.Name = "toolStripSeparator16";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator16, "toolStripSeparator16");
|
||||||
|
//
|
||||||
|
// tsbCheckUpdateClashCore
|
||||||
|
//
|
||||||
|
this.tsbCheckUpdateClashCore.Name = "tsbCheckUpdateClashCore";
|
||||||
|
resources.ApplyResources(this.tsbCheckUpdateClashCore, "tsbCheckUpdateClashCore");
|
||||||
|
this.tsbCheckUpdateClashCore.Click += new System.EventHandler(this.tsbCheckUpdateClashCore_Click);
|
||||||
|
//
|
||||||
|
// tsbCheckUpdateClashMetaCore
|
||||||
|
//
|
||||||
|
this.tsbCheckUpdateClashMetaCore.Name = "tsbCheckUpdateClashMetaCore";
|
||||||
|
resources.ApplyResources(this.tsbCheckUpdateClashMetaCore, "tsbCheckUpdateClashMetaCore");
|
||||||
|
this.tsbCheckUpdateClashMetaCore.Click += new System.EventHandler(this.tsbCheckUpdateClashMetaCore_Click);
|
||||||
|
//
|
||||||
// toolStripSeparator15
|
// toolStripSeparator15
|
||||||
//
|
//
|
||||||
this.toolStripSeparator15.Name = "toolStripSeparator15";
|
this.toolStripSeparator15.Name = "toolStripSeparator15";
|
||||||
|
@ -936,6 +960,9 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem menuMoveDown;
|
private System.Windows.Forms.ToolStripMenuItem menuMoveDown;
|
||||||
private System.Windows.Forms.ToolStripMenuItem menuMoveBottom;
|
private System.Windows.Forms.ToolStripMenuItem menuMoveBottom;
|
||||||
private System.Windows.Forms.ToolStripMenuItem menuServerFilter;
|
private System.Windows.Forms.ToolStripMenuItem menuServerFilter;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateClashCore;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateClashMetaCore;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1327,6 +1327,16 @@ namespace v2rayN.Forms
|
||||||
CheckUpdateCore(ECoreType.Xray);
|
CheckUpdateCore(ECoreType.Xray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tsbCheckUpdateClashCore_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CheckUpdateCore(ECoreType.clash);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tsbCheckUpdateClashMetaCore_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CheckUpdateCore(ECoreType.clash_meta);
|
||||||
|
}
|
||||||
|
|
||||||
private void CheckUpdateCore(ECoreType type)
|
private void CheckUpdateCore(ECoreType type)
|
||||||
{
|
{
|
||||||
void _updateUI(bool success, string msg)
|
void _updateUI(bool success, string msg)
|
||||||
|
|
|
@ -320,8 +320,20 @@
|
||||||
<data name="menuExport2SubContent.Text" xml:space="preserve">
|
<data name="menuExport2SubContent.Text" xml:space="preserve">
|
||||||
<value>Export subscription (base64) share to clipboard</value>
|
<value>Export subscription (base64) share to clipboard</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="tsbServer.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||||
|
<value>Magenta</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>64, 53</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbServer.Text" xml:space="preserve">
|
||||||
|
<value>Servers</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbServer.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||||
|
<value>ImageAboveText</value>
|
||||||
|
</data>
|
||||||
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>356, 622</value>
|
<value>356, 600</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cmsLv.Name" xml:space="preserve">
|
<data name=">>cmsLv.Name" xml:space="preserve">
|
||||||
<value>cmsLv</value>
|
<value>cmsLv</value>
|
||||||
|
@ -470,18 +482,6 @@
|
||||||
<data name=">>scServers.ZOrder" xml:space="preserve">
|
<data name=">>scServers.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbServer.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
|
||||||
<value>Magenta</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbServer.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>64, 53</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbServer.Text" xml:space="preserve">
|
|
||||||
<value>Servers</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbServer.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
|
||||||
<value>ImageAboveText</value>
|
|
||||||
</data>
|
|
||||||
<data name="scBig.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="scBig.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -825,28 +825,43 @@
|
||||||
<value>6, 56</value>
|
<value>6, 56</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>203, 22</value>
|
<value>219, 22</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
||||||
<value>v2rayN (this software)</value>
|
<value>v2rayN (this software)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>203, 22</value>
|
<value>219, 22</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
|
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
|
||||||
<value>Update v2flyCore</value>
|
<value>Update v2fly Core</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdateXrayCore.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tsbCheckUpdateXrayCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>203, 22</value>
|
<value>219, 22</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdateXrayCore.Text" xml:space="preserve">
|
<data name="tsbCheckUpdateXrayCore.Text" xml:space="preserve">
|
||||||
<value>Update XrayCore</value>
|
<value>Update Xray Core</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripSeparator16.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>216, 6</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateClashCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>219, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateClashCore.Text" xml:space="preserve">
|
||||||
|
<value>Update clash Core</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateClashMetaCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>219, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateClashMetaCore.Text" xml:space="preserve">
|
||||||
|
<value>Update Clash.Meta Core</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="toolStripSeparator15.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="toolStripSeparator15.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>200, 6</value>
|
<value>216, 6</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdateGeo.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tsbCheckUpdateGeo.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>203, 22</value>
|
<value>219, 22</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdateGeo.Text" xml:space="preserve">
|
<data name="tsbCheckUpdateGeo.Text" xml:space="preserve">
|
||||||
<value>Update Geo files</value>
|
<value>Update Geo files</value>
|
||||||
|
@ -1391,6 +1406,24 @@
|
||||||
<data name=">>tsbCheckUpdateXrayCore.Type" xml:space="preserve">
|
<data name=">>tsbCheckUpdateXrayCore.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>toolStripSeparator16.Name" xml:space="preserve">
|
||||||
|
<value>toolStripSeparator16</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripSeparator16.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tsbCheckUpdateClashCore.Name" xml:space="preserve">
|
||||||
|
<value>tsbCheckUpdateClashCore</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tsbCheckUpdateClashCore.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=">>tsbCheckUpdateClashMetaCore.Name" xml:space="preserve">
|
||||||
|
<value>tsbCheckUpdateClashMetaCore</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tsbCheckUpdateClashMetaCore.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=">>toolStripSeparator15.Name" xml:space="preserve">
|
<data name=">>toolStripSeparator15.Name" xml:space="preserve">
|
||||||
<value>toolStripSeparator15</value>
|
<value>toolStripSeparator15</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -561,4 +561,10 @@
|
||||||
<data name="menuServerFilter.Text" xml:space="preserve">
|
<data name="menuServerFilter.Text" xml:space="preserve">
|
||||||
<value>设置服务器过滤器 (Ctrl+F)</value>
|
<value>设置服务器过滤器 (Ctrl+F)</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="tsbCheckUpdateClashCore.Text" xml:space="preserve">
|
||||||
|
<value>Update clash Core</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateClashMetaCore.Text" xml:space="preserve">
|
||||||
|
<value>Update Clash.Meta Core</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -69,7 +69,8 @@ namespace v2rayN.Handler
|
||||||
coreType = ECoreType.v2rayN,
|
coreType = ECoreType.v2rayN,
|
||||||
coreUrl = Global.NUrl,
|
coreUrl = Global.NUrl,
|
||||||
coreLatestUrl = Global.NUrl + "/latest",
|
coreLatestUrl = Global.NUrl + "/latest",
|
||||||
coreDownloadUrl = Global.NUrl + "/download/{0}/v2rayN.zip",
|
coreDownloadUrl32 = Global.NUrl + "/download/{0}/v2rayN.zip",
|
||||||
|
coreDownloadUrl64 = Global.NUrl + "/download/{0}/v2rayN.zip",
|
||||||
});
|
});
|
||||||
|
|
||||||
coreInfos.Add(new CoreInfo
|
coreInfos.Add(new CoreInfo
|
||||||
|
@ -79,7 +80,8 @@ namespace v2rayN.Handler
|
||||||
arguments = "",
|
arguments = "",
|
||||||
coreUrl = Global.v2flyCoreUrl,
|
coreUrl = Global.v2flyCoreUrl,
|
||||||
coreLatestUrl = Global.v2flyCoreUrl + "/latest",
|
coreLatestUrl = Global.v2flyCoreUrl + "/latest",
|
||||||
coreDownloadUrl = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
coreDownloadUrl32 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
|
coreDownloadUrl64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
match = "V2Ray"
|
match = "V2Ray"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -90,7 +92,8 @@ namespace v2rayN.Handler
|
||||||
arguments = "",
|
arguments = "",
|
||||||
coreUrl = Global.xrayCoreUrl,
|
coreUrl = Global.xrayCoreUrl,
|
||||||
coreLatestUrl = Global.xrayCoreUrl + "/latest",
|
coreLatestUrl = Global.xrayCoreUrl + "/latest",
|
||||||
coreDownloadUrl = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
|
coreDownloadUrl32 = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
|
||||||
|
coreDownloadUrl64 = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
|
||||||
match = "Xray"
|
match = "Xray"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -99,7 +102,11 @@ namespace v2rayN.Handler
|
||||||
coreType = ECoreType.clash,
|
coreType = ECoreType.clash,
|
||||||
coreExes = new List<string> { "clash-windows-amd64-v3", "clash-windows-amd64", "clash-windows-386", "clash" },
|
coreExes = new List<string> { "clash-windows-amd64-v3", "clash-windows-amd64", "clash-windows-386", "clash" },
|
||||||
arguments = "-f config.json",
|
arguments = "-f config.json",
|
||||||
coreUrl = Global.clashCoreUrl
|
coreUrl = Global.clashCoreUrl,
|
||||||
|
coreLatestUrl = Global.clashCoreUrl + "/latest",
|
||||||
|
coreDownloadUrl32 = Global.clashCoreUrl + "/download/{0}/clash-windows-386-{0}.zip",
|
||||||
|
coreDownloadUrl64 = Global.clashCoreUrl + "/download/{0}/clash-windows-amd64-{0}.zip",
|
||||||
|
match = "v"
|
||||||
});
|
});
|
||||||
|
|
||||||
coreInfos.Add(new CoreInfo
|
coreInfos.Add(new CoreInfo
|
||||||
|
@ -107,7 +114,10 @@ namespace v2rayN.Handler
|
||||||
coreType = ECoreType.clash_meta,
|
coreType = ECoreType.clash_meta,
|
||||||
coreExes = new List<string> { "Clash.Meta-windows-amd64v1", "Clash.Meta-windows-amd64", "Clash.Meta-windows-386", "Clash.Meta", "clash" },
|
coreExes = new List<string> { "Clash.Meta-windows-amd64v1", "Clash.Meta-windows-amd64", "Clash.Meta-windows-386", "Clash.Meta", "clash" },
|
||||||
arguments = "-f config.json",
|
arguments = "-f config.json",
|
||||||
coreUrl = Global.clashMetaCoreUrl
|
coreUrl = Global.clashMetaCoreUrl,
|
||||||
|
coreLatestUrl = Global.clashMetaCoreUrl + "/latest",
|
||||||
|
coreDownloadUrl32 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-386-{0}.zip",
|
||||||
|
coreDownloadUrl64 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-amd64-compatible-{0}.zip",
|
||||||
});
|
});
|
||||||
|
|
||||||
coreInfos.Add(new CoreInfo
|
coreInfos.Add(new CoreInfo
|
||||||
|
@ -115,7 +125,10 @@ namespace v2rayN.Handler
|
||||||
coreType = ECoreType.hysteria,
|
coreType = ECoreType.hysteria,
|
||||||
coreExes = new List<string> { "hysteria-tun-windows-6.0-amd64", "hysteria-tun-windows-6.0-386", "hysteria" },
|
coreExes = new List<string> { "hysteria-tun-windows-6.0-amd64", "hysteria-tun-windows-6.0-386", "hysteria" },
|
||||||
arguments = "",
|
arguments = "",
|
||||||
coreUrl = Global.hysteriaCoreUrl
|
coreUrl = Global.hysteriaCoreUrl,
|
||||||
|
coreLatestUrl = Global.hysteriaCoreUrl + "/latest",
|
||||||
|
coreDownloadUrl32 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-tun-windows-6.0-386.exe",
|
||||||
|
coreDownloadUrl64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-tun-windows-6.0-amd64.exe",
|
||||||
});
|
});
|
||||||
|
|
||||||
coreInfos.Add(new CoreInfo
|
coreInfos.Add(new CoreInfo
|
||||||
|
|
|
@ -295,7 +295,7 @@ namespace v2rayN.Handler
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var coreInfo = LazyConfig.Instance.GetCoreInfo(type);
|
var coreInfo = LazyConfig.Instance.GetCoreInfo(type);
|
||||||
string url = coreInfo.coreLatestUrl;
|
string url = coreInfo.coreLatestUrl;
|
||||||
|
|
||||||
var result = await (new DownloadHandle()).UrlRedirectAsync(url, true);
|
var result = await (new DownloadHandle()).UrlRedirectAsync(url, true);
|
||||||
if (!Utils.IsNullOrEmpty(result))
|
if (!Utils.IsNullOrEmpty(result))
|
||||||
|
@ -374,29 +374,41 @@ namespace v2rayN.Handler
|
||||||
string curVersion;
|
string curVersion;
|
||||||
string message;
|
string message;
|
||||||
string url;
|
string url;
|
||||||
if (type == ECoreType.v2fly)
|
switch (type)
|
||||||
{
|
{
|
||||||
curVersion = "v" + getCoreVersion(type);
|
case ECoreType.v2fly:
|
||||||
message = string.Format(ResUI.IsLatestCore, curVersion);
|
case ECoreType.Xray:
|
||||||
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
{
|
||||||
url = string.Format(coreInfo.coreDownloadUrl, version, osBit);
|
curVersion = "v" + getCoreVersion(type);
|
||||||
}
|
message = string.Format(ResUI.IsLatestCore, curVersion);
|
||||||
else if (type == ECoreType.Xray)
|
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
||||||
{
|
url = string.Format(coreInfo.coreDownloadUrl64, version, osBit);
|
||||||
curVersion = "v" + getCoreVersion(type);
|
break;
|
||||||
message = string.Format(ResUI.IsLatestCore, curVersion);
|
}
|
||||||
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
case ECoreType.clash:
|
||||||
url = string.Format(coreInfo.coreDownloadUrl, version, osBit);
|
case ECoreType.clash_meta:
|
||||||
}
|
{
|
||||||
else if (type == ECoreType.v2rayN)
|
curVersion = "";//getCoreVersion(type);
|
||||||
{
|
message = string.Format(ResUI.IsLatestCore, curVersion);
|
||||||
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
if (Environment.Is64BitProcess)
|
||||||
message = string.Format(ResUI.IsLatestN, curVersion);
|
{
|
||||||
url = string.Format(coreInfo.coreDownloadUrl, version);
|
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Type");
|
url = string.Format(coreInfo.coreDownloadUrl32, version);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ECoreType.v2rayN:
|
||||||
|
{
|
||||||
|
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
||||||
|
message = string.Format(ResUI.IsLatestN, curVersion);
|
||||||
|
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw new ArgumentException("Type");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curVersion == version)
|
if (curVersion == version)
|
||||||
|
|
|
@ -16,7 +16,9 @@ namespace v2rayN.Mode
|
||||||
|
|
||||||
public string coreLatestUrl { get; set; }
|
public string coreLatestUrl { get; set; }
|
||||||
|
|
||||||
public string coreDownloadUrl { get; set; }
|
public string coreDownloadUrl32 { get; set; }
|
||||||
|
|
||||||
|
public string coreDownloadUrl64 { get; set; }
|
||||||
|
|
||||||
public string match { get; set; }
|
public string match { get; set; }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue