Compare commits

...

3 commits

Author SHA1 Message Date
DHR60
1423e87f43
Merge 963db90f4c into d3e2e55ecf 2025-11-20 06:18:22 +00:00
DHR60
963db90f4c stricter plugin name fix for SIP002 URI 2025-11-20 14:18:13 +08:00
2dust
d3e2e55ecf Add global.json for SDK configuration
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
Introduces a global.json file specifying the .NET SDK version (8.0.416) and disables rollForward to ensure consistent SDK usage across environments.
2025-11-20 10:12:44 +08:00
2 changed files with 17 additions and 4 deletions

View file

@ -177,20 +177,27 @@ public class ShadowsocksFmt : BaseFmt
{
var pluginStr = queryParameters["plugin"];
var pluginParts = pluginStr.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
if (pluginParts.Length == 0)
{
return null;
}
var pluginName = pluginParts[0];
// A typo in https://github.com/shadowsocks/shadowsocks-org/blob/6b1c064db4129de99c516294960e731934841c94/docs/doc/sip002.md?plain=1#L15
// "simple-obfs" should be "obfs-local"
if (pluginName == "simple-obfs")
{
pluginName = "obfs-local";
}
// Parse obfs-local plugin
if (pluginName == "obfs-local")
{
var obfsMode = pluginParts.FirstOrDefault(t => t.StartsWith("obfs="));
var obfsHost = pluginParts.FirstOrDefault(t => t.StartsWith("obfs-host="));
if ((!obfsMode.IsNullOrEmpty()) && obfsMode.Contains("obfs=http") && obfsHost.IsNotEmpty())
{
obfsHost = obfsHost.Replace("obfs-host=", "");
@ -229,7 +236,7 @@ public class ShadowsocksFmt : BaseFmt
if (hasTls)
{
item.StreamSecurity = Global.StreamSecurity;
if (!certRaw.IsNullOrEmpty())
{
var certBase64 = certRaw.Replace("certRaw=", "");

6
v2rayN/global.json Normal file
View file

@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.416",
"rollForward": "disable"
}
}