Compare commits

...

15 Commits
5.37 ... 5.39

Author SHA1 Message Date
2dust
529b6613e9 up 5.39 2022-12-11 08:29:26 +08:00
2dust
8a5d8cdf8a Check Update 2022-12-11 08:29:11 +08:00
2dust
cdf35740d9 Update UpdateHandle.cs 2022-12-01 20:22:26 +08:00
2dust
76c40585fd bug fix 2022-11-06 20:20:09 +08:00
2dust
2bf58288d3 fix vless tls flow 2022-11-02 20:56:09 +08:00
2dust
ba2eac5290 up 5.38 2022-11-02 19:20:05 +08:00
2dust
23a4e4cc19 refresh ui after update sub 2022-11-02 19:19:26 +08:00
2dust
841a20cbd4 fix naiveproxy redirect output issue 2022-11-02 19:18:31 +08:00
2dust
f70ca77913 add xtls-rprx-vision 2022-11-01 11:32:10 +08:00
2dust
c97df99c5c Merge pull request #2740 from wh201906/patch-1
Add support for config file with .yml extension
2022-10-28 09:11:01 +08:00
Self Not Found
809e170018 Add support for config file with .yml extension 2022-10-28 00:09:25 +08:00
2dust
d0c8f5eb45 Revert "add domainStrategy4Freedoms"
This reverts commit d0f953f1d8.
2022-10-26 19:41:21 +08:00
2dust
d0f953f1d8 add domainStrategy4Freedoms 2022-10-26 19:38:38 +08:00
2dust
6d1636c540 fix update check 2022-10-26 19:09:40 +08:00
2dust
b3292729b0 fix ui 2022-10-15 07:50:48 +08:00
12 changed files with 706 additions and 673 deletions

View File

@@ -113,7 +113,7 @@ namespace v2rayN.Forms
OpenFileDialog fileDialog = new OpenFileDialog OpenFileDialog fileDialog = new OpenFileDialog
{ {
Multiselect = false, Multiselect = false,
Filter = "Config|*.json|YAML|*.yaml|All|*.*" Filter = "Config|*.json|YAML|*.yaml;*.yml|All|*.*"
}; };
if (fileDialog.ShowDialog() != DialogResult.OK) if (fileDialog.ShowDialog() != DialogResult.OK)
{ {

View File

@@ -1268,6 +1268,7 @@ namespace v2rayN.Forms
AppendText(false, msg); AppendText(false, msg);
if (success) if (success)
{ {
RefreshServers();
Global.reloadV2ray = true; Global.reloadV2ray = true;
await LoadV2ray(); await LoadV2ray();
} }
@@ -1369,15 +1370,17 @@ namespace v2rayN.Forms
private void tsbCheckUpdateN_Click(object sender, EventArgs e) private void tsbCheckUpdateN_Click(object sender, EventArgs e)
{ {
void _updateUI(bool success, string msg) Process.Start(Global.UpdateUrl);
{
AppendText(false, msg); //void _updateUI(bool success, string msg)
if (success) //{
{ // AppendText(false, msg);
menuExit_Click(null, null); // if (success)
} // {
}; // menuExit_Click(null, null);
(new UpdateHandle()).CheckUpdateGuiN(config, _updateUI, config.checkPreReleaseUpdate); // }
//};
//(new UpdateHandle()).CheckUpdateGuiN(config, _updateUI, config.checkPreReleaseUpdate);
} }
private void tsbCheckUpdateCore_Click(object sender, EventArgs e) private void tsbCheckUpdateCore_Click(object sender, EventArgs e)

View File

@@ -19,6 +19,8 @@ namespace v2rayN.Forms
private void OptionSettingForm_Load(object sender, EventArgs e) private void OptionSettingForm_Load(object sender, EventArgs e)
{ {
cmbSystemProxyAdvancedProtocol.Items.AddRange(Global.IEProxyProtocols.ToArray()); cmbSystemProxyAdvancedProtocol.Items.AddRange(Global.IEProxyProtocols.ToArray());
cmbdomainStrategy4Freedom.Items.Clear();
cmbdomainStrategy4Freedom.Items.AddRange(Global.domainStrategy4Freedoms.ToArray());
InitBase(); InitBase();

View File

@@ -59,6 +59,7 @@
// //
// gbTransport // gbTransport
// //
resources.ApplyResources(this.gbTransport, "gbTransport");
this.gbTransport.Controls.Add(this.panTlsMore); this.gbTransport.Controls.Add(this.panTlsMore);
this.gbTransport.Controls.Add(this.tipNetwork); this.gbTransport.Controls.Add(this.tipNetwork);
this.gbTransport.Controls.Add(this.txtPath); this.gbTransport.Controls.Add(this.txtPath);
@@ -74,12 +75,12 @@
this.gbTransport.Controls.Add(this.labHeaderType); this.gbTransport.Controls.Add(this.labHeaderType);
this.gbTransport.Controls.Add(this.labRequestHost); this.gbTransport.Controls.Add(this.labRequestHost);
this.gbTransport.Controls.Add(this.cmbHeaderType); this.gbTransport.Controls.Add(this.cmbHeaderType);
resources.ApplyResources(this.gbTransport, "gbTransport");
this.gbTransport.Name = "gbTransport"; this.gbTransport.Name = "gbTransport";
this.gbTransport.TabStop = false; this.gbTransport.TabStop = false;
// //
// panTlsMore // panTlsMore
// //
resources.ApplyResources(this.panTlsMore, "panTlsMore");
this.panTlsMore.Controls.Add(this.labfingerprint); this.panTlsMore.Controls.Add(this.labfingerprint);
this.panTlsMore.Controls.Add(this.cmbFingerprint); this.panTlsMore.Controls.Add(this.cmbFingerprint);
this.panTlsMore.Controls.Add(this.clbAlpn); this.panTlsMore.Controls.Add(this.clbAlpn);
@@ -88,7 +89,6 @@
this.panTlsMore.Controls.Add(this.labSNI); this.panTlsMore.Controls.Add(this.labSNI);
this.panTlsMore.Controls.Add(this.labAllowInsecure); this.panTlsMore.Controls.Add(this.labAllowInsecure);
this.panTlsMore.Controls.Add(this.cmbAllowInsecure); this.panTlsMore.Controls.Add(this.cmbAllowInsecure);
resources.ApplyResources(this.panTlsMore, "panTlsMore");
this.panTlsMore.Name = "panTlsMore"; this.panTlsMore.Name = "panTlsMore";
// //
// labfingerprint // labfingerprint
@@ -98,15 +98,15 @@
// //
// cmbFingerprint // cmbFingerprint
// //
resources.ApplyResources(this.cmbFingerprint, "cmbFingerprint");
this.cmbFingerprint.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbFingerprint.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbFingerprint.FormattingEnabled = true; this.cmbFingerprint.FormattingEnabled = true;
resources.ApplyResources(this.cmbFingerprint, "cmbFingerprint");
this.cmbFingerprint.Name = "cmbFingerprint"; this.cmbFingerprint.Name = "cmbFingerprint";
// //
// clbAlpn // clbAlpn
// //
this.clbAlpn.CheckOnClick = true;
resources.ApplyResources(this.clbAlpn, "clbAlpn"); resources.ApplyResources(this.clbAlpn, "clbAlpn");
this.clbAlpn.CheckOnClick = true;
this.clbAlpn.FormattingEnabled = true; this.clbAlpn.FormattingEnabled = true;
this.clbAlpn.Items.AddRange(new object[] { this.clbAlpn.Items.AddRange(new object[] {
resources.GetString("clbAlpn.Items"), resources.GetString("clbAlpn.Items"),
@@ -136,13 +136,13 @@
// //
// cmbAllowInsecure // cmbAllowInsecure
// //
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAllowInsecure.FormattingEnabled = true; this.cmbAllowInsecure.FormattingEnabled = true;
this.cmbAllowInsecure.Items.AddRange(new object[] { this.cmbAllowInsecure.Items.AddRange(new object[] {
resources.GetString("cmbAllowInsecure.Items"), resources.GetString("cmbAllowInsecure.Items"),
resources.GetString("cmbAllowInsecure.Items1"), resources.GetString("cmbAllowInsecure.Items1"),
resources.GetString("cmbAllowInsecure.Items2")}); resources.GetString("cmbAllowInsecure.Items2")});
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
this.cmbAllowInsecure.Name = "cmbAllowInsecure"; this.cmbAllowInsecure.Name = "cmbAllowInsecure";
// //
// tipNetwork // tipNetwork
@@ -157,9 +157,9 @@
// //
// cmbNetwork // cmbNetwork
// //
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
this.cmbNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbNetwork.FormattingEnabled = true; this.cmbNetwork.FormattingEnabled = true;
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
this.cmbNetwork.Name = "cmbNetwork"; this.cmbNetwork.Name = "cmbNetwork";
this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged); this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged);
// //
@@ -190,9 +190,9 @@
// //
// cmbStreamSecurity // cmbStreamSecurity
// //
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbStreamSecurity.FormattingEnabled = true; this.cmbStreamSecurity.FormattingEnabled = true;
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
this.cmbStreamSecurity.Name = "cmbStreamSecurity"; this.cmbStreamSecurity.Name = "cmbStreamSecurity";
this.cmbStreamSecurity.SelectedIndexChanged += new System.EventHandler(this.cmbStreamSecurity_SelectedIndexChanged); this.cmbStreamSecurity.SelectedIndexChanged += new System.EventHandler(this.cmbStreamSecurity_SelectedIndexChanged);
// //
@@ -218,9 +218,9 @@
// //
// cmbHeaderType // cmbHeaderType
// //
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
this.cmbHeaderType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbHeaderType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHeaderType.FormattingEnabled = true; this.cmbHeaderType.FormattingEnabled = true;
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
this.cmbHeaderType.Name = "cmbHeaderType"; this.cmbHeaderType.Name = "cmbHeaderType";
// //
// ServerTransportControl // ServerTransportControl

File diff suppressed because it is too large Load Diff

View File

@@ -119,49 +119,49 @@
</resheader> </resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tipNetwork.Size" type="System.Drawing.Size, System.Drawing"> <data name="tipNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value> <value>182, 15</value>
</data> </data>
<data name="tipNetwork.Text" xml:space="preserve"> <data name="tipNetwork.Text" xml:space="preserve">
<value>*默认tcp,选错会无法连接</value> <value>*默认tcp,选错会无法连接</value>
</data> </data>
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing"> <data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 28</value> <value>169, 36</value>
</data> </data>
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing"> <data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>208, 20</value> <value>290, 23</value>
</data> </data>
<data name="labNetwork.Size" type="System.Drawing.Size, System.Drawing"> <data name="labNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value> <value>139, 15</value>
</data> </data>
<data name="labNetwork.Text" xml:space="preserve"> <data name="labNetwork.Text" xml:space="preserve">
<value>传输协议(network)</value> <value>传输协议(network)</value>
</data> </data>
<data name="labPath.Size" type="System.Drawing.Size, System.Drawing"> <data name="labPath.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value> <value>85, 15</value>
</data> </data>
<data name="labPath.Text" xml:space="preserve"> <data name="labPath.Text" xml:space="preserve">
<value>路径(path)</value> <value>路径(path)</value>
</data> </data>
<data name="labStreamSecurity.Size" type="System.Drawing.Size, System.Drawing"> <data name="labStreamSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value> <value>122, 15</value>
</data> </data>
<data name="labStreamSecurity.Text" xml:space="preserve"> <data name="labStreamSecurity.Text" xml:space="preserve">
<value>传输层安全(tls)</value> <value>传输层安全(tls)</value>
</data> </data>
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing"> <data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 92</value> <value>169, 117</value>
</data> </data>
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing"> <data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>331, 20</value> <value>442, 20</value>
</data> </data>
<data name="labHeaderType.Size" type="System.Drawing.Size, System.Drawing"> <data name="labHeaderType.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value> <value>115, 15</value>
</data> </data>
<data name="labHeaderType.Text" xml:space="preserve"> <data name="labHeaderType.Text" xml:space="preserve">
<value>伪装类型(type)</value> <value>伪装类型(type)</value>
</data> </data>
<data name="labRequestHost.Size" type="System.Drawing.Size, System.Drawing"> <data name="labRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value> <value>115, 15</value>
</data> </data>
<data name="labRequestHost.Text" xml:space="preserve"> <data name="labRequestHost.Text" xml:space="preserve">
<value>伪装域名(host)</value> <value>伪装域名(host)</value>
@@ -169,25 +169,25 @@
<data name="gbTransport.Text" xml:space="preserve"> <data name="gbTransport.Text" xml:space="preserve">
<value>底层传输方式(transport)</value> <value>底层传输方式(transport)</value>
</data> </data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>282, 11</value>
</data>
<data name="clbAlpn.Location" type="System.Drawing.Point, System.Drawing"> <data name="clbAlpn.Location" type="System.Drawing.Point, System.Drawing">
<value>331, 7</value> <value>427, 9</value>
</data> </data>
<data name="clbAlpn.Size" type="System.Drawing.Size, System.Drawing"> <data name="clbAlpn.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 20</value> <value>208, 24</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>378, 14</value>
</data> </data>
<data name="txtSNI.Size" type="System.Drawing.Size, System.Drawing"> <data name="txtSNI.Size" type="System.Drawing.Size, System.Drawing">
<value>391, 21</value> <value>391, 25</value>
</data> </data>
<data name="labAllowInsecure.Size" type="System.Drawing.Size, System.Drawing"> <data name="labAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 12</value> <value>217, 15</value>
</data> </data>
<data name="labAllowInsecure.Text" xml:space="preserve"> <data name="labAllowInsecure.Text" xml:space="preserve">
<value>跳过证书验证(allowInsecure)</value> <value>跳过证书验证(allowInsecure)</value>
</data> </data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing"> <data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>183, 7</value> <value>247, 10</value>
</data> </data>
</root> </root>

View File

@@ -211,12 +211,13 @@ namespace v2rayN
public static readonly List<string> ssSecuritys = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "none", "plain" }; public static readonly List<string> ssSecuritys = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "none", "plain" };
public static readonly List<string> ssSecuritysInSagerNet = new List<string> { "none", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305", "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305", "rc4", "rc4-md5", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-cfb8", "aes-192-cfb8", "aes-256-cfb8", "aes-128-ofb", "aes-192-ofb", "aes-256-ofb", "bf-cfb", "cast5-cfb", "des-cfb", "idea-cfb", "rc2-cfb", "seed-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "camellia-128-cfb8", "camellia-192-cfb8", "camellia-256-cfb8", "salsa20", "chacha20", "chacha20-ietf", "xchacha20" }; public static readonly List<string> ssSecuritysInSagerNet = new List<string> { "none", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305", "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305", "rc4", "rc4-md5", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-cfb8", "aes-192-cfb8", "aes-256-cfb8", "aes-128-ofb", "aes-192-ofb", "aes-256-ofb", "bf-cfb", "cast5-cfb", "des-cfb", "idea-cfb", "rc2-cfb", "seed-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "camellia-128-cfb8", "camellia-192-cfb8", "camellia-256-cfb8", "salsa20", "chacha20", "chacha20-ietf", "xchacha20" };
public static readonly List<string> ssSecuritysInXray = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "xchacha20-poly1305", "xchacha20-ietf-poly1305", "none", "plain", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305" }; public static readonly List<string> ssSecuritysInXray = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "xchacha20-poly1305", "xchacha20-ietf-poly1305", "none", "plain", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305" };
public static readonly List<string> xtlsFlows = new List<string> { "", "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443" }; public static readonly List<string> xtlsFlows = new List<string> { "", "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443", "xtls-rprx-vision", "xtls-rprx-vision-udp443" };
public static readonly List<string> networks = new List<string> { "tcp", "kcp", "ws", "h2", "quic", "grpc" }; public static readonly List<string> networks = new List<string> { "tcp", "kcp", "ws", "h2", "quic", "grpc" };
public static readonly List<string> kcpHeaderTypes = new List<string> { "srtp", "utp", "wechat-video", "dtls", "wireguard" }; public static readonly List<string> kcpHeaderTypes = new List<string> { "srtp", "utp", "wechat-video", "dtls", "wireguard" };
public static readonly List<string> coreTypes = new List<string> { "v2fly", "SagerNet", "Xray", "v2fly_v5" }; public static readonly List<string> coreTypes = new List<string> { "v2fly", "SagerNet", "Xray", "v2fly_v5" };
public static readonly List<string> domainMatchers = new List<string> { "linear", "mph", "" }; public static readonly List<string> domainMatchers = new List<string> { "linear", "mph", "" };
public static readonly List<string> fingerprints = new List<string> { "chrome", "firefox", "safari", "randomized", "" }; public static readonly List<string> fingerprints = new List<string> { "chrome", "firefox", "safari", "randomized", "" };
public static readonly List<string> domainStrategy4Freedoms = new List<string> { "AsIs", "UseIP", "UseIPv4", "UseIPv6", "" };
public const string GrpcgunMode = "gun"; public const string GrpcgunMode = "gun";
public const string GrpcmultiMode = "multi"; public const string GrpcmultiMode = "multi";
public const string CheckMark = "√"; public const string CheckMark = "√";

View File

@@ -87,7 +87,8 @@ namespace v2rayN.Handler
coreDownloadUrl32 = 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", coreDownloadUrl64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
match = "V2Ray", match = "V2Ray",
versionArg = "-version" versionArg = "-version",
redirectInfo = true,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -100,7 +101,8 @@ namespace v2rayN.Handler
coreDownloadUrl32 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip", coreDownloadUrl32 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
coreDownloadUrl64 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip", coreDownloadUrl64 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
match = "V2Ray", match = "V2Ray",
versionArg = "version" versionArg = "version",
redirectInfo = true,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -113,7 +115,8 @@ namespace v2rayN.Handler
coreDownloadUrl32 = 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", coreDownloadUrl64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
match = "V2Ray", match = "V2Ray",
versionArg = "version" versionArg = "version",
redirectInfo = true,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -126,7 +129,8 @@ namespace v2rayN.Handler
coreDownloadUrl32 = 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", coreDownloadUrl64 = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
match = "Xray", match = "Xray",
versionArg = "-version" versionArg = "-version",
redirectInfo = true,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -139,7 +143,8 @@ namespace v2rayN.Handler
coreDownloadUrl32 = Global.clashCoreUrl + "/download/{0}/clash-windows-386-{0}.zip", coreDownloadUrl32 = Global.clashCoreUrl + "/download/{0}/clash-windows-386-{0}.zip",
coreDownloadUrl64 = Global.clashCoreUrl + "/download/{0}/clash-windows-amd64-{0}.zip", coreDownloadUrl64 = Global.clashCoreUrl + "/download/{0}/clash-windows-amd64-{0}.zip",
match = "v", match = "v",
versionArg = "-v" versionArg = "-v",
redirectInfo = true,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -152,7 +157,8 @@ namespace v2rayN.Handler
coreDownloadUrl32 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-386-{0}.zip", coreDownloadUrl32 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-386-{0}.zip",
coreDownloadUrl64 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-amd64-compatible-{0}.zip", coreDownloadUrl64 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-amd64-compatible-{0}.zip",
match = "v", match = "v",
versionArg = "-v" versionArg = "-v",
redirectInfo = true,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -164,6 +170,7 @@ namespace v2rayN.Handler
coreReleaseApiUrl = Global.hysteriaCoreUrl.Replace(@"https://github.com", @"https://api.github.com/repos"), coreReleaseApiUrl = Global.hysteriaCoreUrl.Replace(@"https://github.com", @"https://api.github.com/repos"),
coreDownloadUrl32 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-386.exe", coreDownloadUrl32 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-386.exe",
coreDownloadUrl64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-amd64.exe", coreDownloadUrl64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-amd64.exe",
redirectInfo = true,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -171,7 +178,8 @@ namespace v2rayN.Handler
coreType = ECoreType.naiveproxy, coreType = ECoreType.naiveproxy,
coreExes = new List<string> { "naiveproxy", "naive" }, coreExes = new List<string> { "naiveproxy", "naive" },
arguments = "config.json", arguments = "config.json",
coreUrl = Global.naiveproxyCoreUrl coreUrl = Global.naiveproxyCoreUrl,
redirectInfo = false,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -179,7 +187,8 @@ namespace v2rayN.Handler
coreType = ECoreType.tuic, coreType = ECoreType.tuic,
coreExes = new List<string> { "tuic-client", "tuic" }, coreExes = new List<string> { "tuic-client", "tuic" },
arguments = "-c config.json", arguments = "-c config.json",
coreUrl = Global.tuicCoreUrl coreUrl = Global.tuicCoreUrl,
redirectInfo = true,
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -187,7 +196,8 @@ namespace v2rayN.Handler
coreType = ECoreType.sing_box, coreType = ECoreType.sing_box,
coreExes = new List<string> { "sing-box-client", "sing-box" }, coreExes = new List<string> { "sing-box-client", "sing-box" },
arguments = "run", arguments = "run",
coreUrl = Global.singboxCoreUrl coreUrl = Global.singboxCoreUrl,
redirectInfo = true,
}); });
} }

View File

@@ -515,6 +515,16 @@ namespace v2rayN.Handler
outbound.mux.enabled = false; outbound.mux.enabled = false;
outbound.mux.concurrency = -1; outbound.mux.concurrency = -1;
} }
else if (node.streamSecurity == Global.StreamSecurity)
{
if (!Utils.IsNullOrEmpty(node.flow))
{
usersItem.flow = node.flow;
outbound.mux.enabled = false;
outbound.mux.concurrency = -1;
}
}
outbound.protocol = Global.vlessProtocolLite; outbound.protocol = Global.vlessProtocolLite;
outbound.settings.servers = null; outbound.settings.servers = null;

View File

@@ -63,7 +63,7 @@ namespace v2rayN.Handler
} }
//start a socks service //start a socks service
if (item.configType == EConfigType.Custom && item.preSocksPort > 0) if (_process != null && !_process.HasExited && item.configType == EConfigType.Custom && item.preSocksPort > 0)
{ {
var itemSocks = new VmessItem() var itemSocks = new VmessItem()
{ {
@@ -212,29 +212,34 @@ namespace v2rayN.Handler
Arguments = coreInfo.arguments, Arguments = coreInfo.arguments,
WorkingDirectory = Utils.StartupPath(), WorkingDirectory = Utils.StartupPath(),
UseShellExecute = false, UseShellExecute = false,
RedirectStandardOutput = true, RedirectStandardOutput = coreInfo.redirectInfo,
RedirectStandardError = true, RedirectStandardError = coreInfo.redirectInfo,
CreateNoWindow = true, CreateNoWindow = true,
StandardOutputEncoding = Encoding.UTF8, StandardOutputEncoding = coreInfo.redirectInfo ? Encoding.UTF8 : null,
StandardErrorEncoding = Encoding.UTF8 StandardErrorEncoding = coreInfo.redirectInfo ? Encoding.UTF8 : null,
} }
}; };
p.OutputDataReceived += (sender, e) => if (coreInfo.redirectInfo)
{ {
if (!String.IsNullOrEmpty(e.Data)) p.OutputDataReceived += (sender, e) =>
{ {
string msg = e.Data + Environment.NewLine; if (!String.IsNullOrEmpty(e.Data))
ShowMsg(false, msg); {
} string msg = e.Data + Environment.NewLine;
}; ShowMsg(false, msg);
}
};
}
p.Start(); p.Start();
p.PriorityClass = ProcessPriorityClass.High; if (coreInfo.redirectInfo)
p.BeginOutputReadLine(); {
p.BeginOutputReadLine();
}
_process = p; _process = p;
if (p.WaitForExit(1000)) if (p.WaitForExit(1000))
{ {
throw new Exception(p.StandardError.ReadToEnd()); throw new Exception(coreInfo.redirectInfo ? p.StandardError.ReadToEnd() : "启动进程失败并退出 (Failed to start the process and exited)");
} }
Global.processJob.AddProcess(p.Handle); Global.processJob.AddProcess(p.Handle);

View File

@@ -23,5 +23,7 @@ namespace v2rayN.Mode
public string match { get; set; } public string match { get; set; }
public string versionArg { get; set; } public string versionArg { get; set; }
public bool redirectInfo { get; set; }
} }
} }

View File

@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<Copyright>Copyright © 2019-2022 (GPLv3)</Copyright> <Copyright>Copyright © 2019-2022 (GPLv3)</Copyright>
<FileVersion>5.37</FileVersion> <FileVersion>5.39</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>v2rayN.ico</ApplicationIcon> <ApplicationIcon>v2rayN.ico</ApplicationIcon>