From c2ea14151e7cbaf0f49da1177d9acf2bd3e7af1e Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Thu, 14 Apr 2022 11:10:06 +0800 Subject: [PATCH] add naiveproxy --- v2rayN/v2rayN/Forms/AddServer2Form.cs | 1 + v2rayN/v2rayN/Global.cs | 1 + v2rayN/v2rayN/Handler/LazyConfig.cs | 13 ++++++++++--- v2rayN/v2rayN/Mode/ECoreType.cs | 1 + 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/v2rayN/v2rayN/Forms/AddServer2Form.cs b/v2rayN/v2rayN/Forms/AddServer2Form.cs index 9ca7e2ff..089f82e1 100644 --- a/v2rayN/v2rayN/Forms/AddServer2Form.cs +++ b/v2rayN/v2rayN/Forms/AddServer2Form.cs @@ -22,6 +22,7 @@ namespace v2rayN.Forms cmbCoreType.Items.Add("clash"); cmbCoreType.Items.Add("clash_meta"); cmbCoreType.Items.Add("hysteria"); + cmbCoreType.Items.Add("naiveproxy"); cmbCoreType.Items.Add(string.Empty); txtAddress.ReadOnly = true; diff --git a/v2rayN/v2rayN/Global.cs b/v2rayN/v2rayN/Global.cs index 42cbca68..c0547e46 100644 --- a/v2rayN/v2rayN/Global.cs +++ b/v2rayN/v2rayN/Global.cs @@ -17,6 +17,7 @@ namespace v2rayN public const string clashCoreUrl = "https://github.com/Dreamacro/clash/releases"; public const string clashMetaCoreUrl = "https://github.com/MetaCubeX/Clash.Meta/releases"; public const string hysteriaCoreUrl = "https://github.com/HyNetwork/hysteria/releases"; + public const string naiveproxyCoreUrl = "https://github.com/klzgrad/naiveproxy/releases"; diff --git a/v2rayN/v2rayN/Handler/LazyConfig.cs b/v2rayN/v2rayN/Handler/LazyConfig.cs index 7b523757..57488ef2 100644 --- a/v2rayN/v2rayN/Handler/LazyConfig.cs +++ b/v2rayN/v2rayN/Handler/LazyConfig.cs @@ -96,9 +96,8 @@ namespace v2rayN.Handler { coreType = ECoreType.clash_meta, coreExes = new List { "Clash.Meta-windows-amd64v1", "Clash.Meta-windows-amd64", "Clash.Meta-windows-386", "Clash.Meta", "clash" }, - arguments = "-f config.yaml", - coreUrl = Global.clashMetaCoreUrl, - match = "Clash Meta" + arguments = "-f config.json", + coreUrl = Global.clashMetaCoreUrl }); coreInfos.Add(new CoreInfo @@ -108,6 +107,14 @@ namespace v2rayN.Handler arguments = "", coreUrl = Global.hysteriaCoreUrl }); + + coreInfos.Add(new CoreInfo + { + coreType = ECoreType.naiveproxy, + coreExes = new List { "naiveproxy", "naive" }, + arguments = "config.json", + coreUrl = Global.naiveproxyCoreUrl + }); } } diff --git a/v2rayN/v2rayN/Mode/ECoreType.cs b/v2rayN/v2rayN/Mode/ECoreType.cs index c714876d..511663f3 100644 --- a/v2rayN/v2rayN/Mode/ECoreType.cs +++ b/v2rayN/v2rayN/Mode/ECoreType.cs @@ -8,6 +8,7 @@ namespace v2rayN.Mode clash = 11, clash_meta = 12, hysteria = 21, + naiveproxy = 22, v2rayN = 99 } }