|
|
@ -1024,18 +1024,17 @@ namespace ServiceLib.Services.CoreConfig |
|
|
|
//request Host |
|
|
|
//request Host |
|
|
|
string request = Utils.GetEmbedText(Global.V2raySampleHttpRequestFileName); |
|
|
|
string request = Utils.GetEmbedText(Global.V2raySampleHttpRequestFileName); |
|
|
|
string[] arrHost = host.Split(','); |
|
|
|
string[] arrHost = host.Split(','); |
|
|
|
string host2 = string.Join("\",\"", arrHost); |
|
|
|
string host2 = string.Join(",".AppendQuotes(), arrHost); |
|
|
|
request = request.Replace("$requestHost$", $"\"{host2}\""); |
|
|
|
request = request.Replace("$requestHost$", $"{host2.AppendQuotes()}"); |
|
|
|
//request = request.Replace("$requestHost$", string.Format("\"{0}\"", config.requestHost())); |
|
|
|
request = request.Replace("$requestUserAgent$", $"{useragent.AppendQuotes()}"); |
|
|
|
request = request.Replace("$requestUserAgent$", $"\"{useragent}\""); |
|
|
|
|
|
|
|
//Path |
|
|
|
//Path |
|
|
|
string pathHttp = @"/"; |
|
|
|
string pathHttp = @"/"; |
|
|
|
if (Utils.IsNotEmpty(node.Path)) |
|
|
|
if (Utils.IsNotEmpty(node.Path)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
string[] arrPath = node.Path.Split(','); |
|
|
|
string[] arrPath = node.Path.Split(','); |
|
|
|
pathHttp = string.Join("\",\"", arrPath); |
|
|
|
pathHttp = string.Join(",".AppendQuotes(), arrPath); |
|
|
|
} |
|
|
|
} |
|
|
|
request = request.Replace("$requestPath$", $"\"{pathHttp}\""); |
|
|
|
request = request.Replace("$requestPath$", $"{pathHttp.AppendQuotes()}"); |
|
|
|
tcpSettings.header.request = JsonUtils.Deserialize<object>(request); |
|
|
|
tcpSettings.header.request = JsonUtils.Deserialize<object>(request); |
|
|
|
|
|
|
|
|
|
|
|
streamSettings.tcpSettings = tcpSettings; |
|
|
|
streamSettings.tcpSettings = tcpSettings; |
|
|
|