Compare commits

..

No commits in common. "fa2b4b3dc909a92e682644c4c1ac24ab25a67bac" and "9ffa6a4eb654c8ec07137002463801045b9c175a" have entirely different histories.

5 changed files with 20 additions and 27 deletions

View file

@ -37,7 +37,7 @@ jobs:
fetch-depth: '0' fetch-depth: '0'
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v5.0.1 uses: actions/setup-dotnet@v5.0.0
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'

View file

@ -32,7 +32,7 @@ jobs:
fetch-depth: '0' fetch-depth: '0'
- name: Setup - name: Setup
uses: actions/setup-dotnet@v5.0.1 uses: actions/setup-dotnet@v5.0.0
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'

View file

@ -32,7 +32,7 @@ jobs:
fetch-depth: '0' fetch-depth: '0'
- name: Setup - name: Setup
uses: actions/setup-dotnet@v5.0.1 uses: actions/setup-dotnet@v5.0.0
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'

View file

@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v6.0.0 uses: actions/checkout@v6.0.0
- name: Setup - name: Setup
uses: actions/setup-dotnet@v5.0.1 uses: actions/setup-dotnet@v5.0.0
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'

View file

@ -118,15 +118,22 @@ public class BaseFmt
} }
if (item.Extra.IsNotEmpty()) if (item.Extra.IsNotEmpty())
{ {
var node = JsonUtils.ParseJson(item.Extra); var extra = item.Extra;
var extra = node != null try
? JsonUtils.Serialize(node, new JsonSerializerOptions {
var node = JsonNode.Parse(item.Extra);
if (node != null)
{
extra = node.ToJsonString(new JsonSerializerOptions
{ {
WriteIndented = false, WriteIndented = false,
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
}) });
: item.Extra; }
}
catch
{
}
dicQuery.Add("extra", Utils.UrlEncode(extra)); dicQuery.Add("extra", Utils.UrlEncode(extra));
} }
break; break;
@ -246,21 +253,7 @@ public class BaseFmt
item.RequestHost = GetQueryDecoded(query, "host"); item.RequestHost = GetQueryDecoded(query, "host");
item.Path = GetQueryDecoded(query, "path", "/"); item.Path = GetQueryDecoded(query, "path", "/");
item.HeaderType = GetQueryDecoded(query, "mode"); item.HeaderType = GetQueryDecoded(query, "mode");
var extraDecoded = GetQueryDecoded(query, "extra"); item.Extra = GetQueryDecoded(query, "extra");
if (extraDecoded.IsNotEmpty())
{
var node = JsonUtils.ParseJson(extraDecoded);
if (node != null)
{
extraDecoded = JsonUtils.Serialize(node, new JsonSerializerOptions
{
WriteIndented = true,
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
});
}
}
item.Extra = extraDecoded;
break; break;
case nameof(ETransport.http): case nameof(ETransport.http):