mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-29 03:02:53 +00:00
Compare commits
2 commits
9ffa6a4eb6
...
fa2b4b3dc9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa2b4b3dc9 | ||
|
|
23cacb8339 |
5 changed files with 27 additions and 20 deletions
2
.github/workflows/build-linux.yml
vendored
2
.github/workflows/build-linux.yml
vendored
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v5.0.0
|
uses: actions/setup-dotnet@v5.0.1
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/build-osx.yml
vendored
2
.github/workflows/build-osx.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.0
|
uses: actions/setup-dotnet@v5.0.1
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/build-windows-desktop.yml
vendored
2
.github/workflows/build-windows-desktop.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.0
|
uses: actions/setup-dotnet@v5.0.1
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/build-windows.yml
vendored
2
.github/workflows/build-windows.yml
vendored
|
|
@ -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.0
|
uses: actions/setup-dotnet@v5.0.1
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,22 +118,15 @@ public class BaseFmt
|
||||||
}
|
}
|
||||||
if (item.Extra.IsNotEmpty())
|
if (item.Extra.IsNotEmpty())
|
||||||
{
|
{
|
||||||
var extra = item.Extra;
|
var node = JsonUtils.ParseJson(item.Extra);
|
||||||
try
|
var extra = node != null
|
||||||
{
|
? JsonUtils.Serialize(node, new JsonSerializerOptions
|
||||||
var node = JsonNode.Parse(item.Extra);
|
|
||||||
if (node != null)
|
|
||||||
{
|
{
|
||||||
extra = node.ToJsonString(new JsonSerializerOptions
|
WriteIndented = false,
|
||||||
{
|
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
|
||||||
WriteIndented = false,
|
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
})
|
||||||
});
|
: item.Extra;
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
dicQuery.Add("extra", Utils.UrlEncode(extra));
|
dicQuery.Add("extra", Utils.UrlEncode(extra));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -253,7 +246,21 @@ 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");
|
||||||
item.Extra = GetQueryDecoded(query, "extra");
|
var extraDecoded = 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):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue