mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-14 04:19:12 +00:00
Fixes NaiveProxy
This commit is contained in:
parent
6e750b4c03
commit
37a5b7f3b4
2 changed files with 5 additions and 1 deletions
|
@ -843,6 +843,10 @@ public class ConfigHandler
|
|||
profileItem.Address = profileItem.Address.TrimEx();
|
||||
profileItem.Id = profileItem.Id.TrimEx();
|
||||
profileItem.Network = string.Empty;
|
||||
if (!Global.NaiveProxyProtocols.Contains(profileItem.HeaderType))
|
||||
{
|
||||
profileItem.HeaderType = Global.NaiveProxyProtocols.FirstOrDefault()!;
|
||||
}
|
||||
if (profileItem.StreamSecurity.IsNullOrEmpty())
|
||||
{
|
||||
profileItem.StreamSecurity = Global.StreamSecurity;
|
||||
|
|
|
@ -35,7 +35,7 @@ public class CoreConfigNaiveService
|
|||
configJsonNode["listen"] = Global.SocksProtocol + Global.Loopback + ":" + AppHandler.Instance.GetLocalPort(EInboundProtocol.split).ToString();
|
||||
|
||||
// outbound
|
||||
configJsonNode["proxy"] = (node.Network == "quic" ? "quic://" : Global.HttpsProtocol) + node.Id + "@" + node.Address + ":" + node.Port;
|
||||
configJsonNode["proxy"] = (node.HeaderType == "quic" ? "quic://" : Global.HttpsProtocol) + node.Id + "@" + node.Address + ":" + node.Port;
|
||||
|
||||
ret.Success = true;
|
||||
ret.Data = JsonUtils.Serialize(configJsonNode, true);
|
||||
|
|
Loading…
Reference in a new issue