mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-29 03:02:53 +00:00
Compare commits
3 commits
852419472f
...
1423e87f43
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1423e87f43 | ||
|
|
963db90f4c | ||
|
|
d3e2e55ecf |
2 changed files with 17 additions and 4 deletions
|
|
@ -177,20 +177,27 @@ public class ShadowsocksFmt : BaseFmt
|
||||||
{
|
{
|
||||||
var pluginStr = queryParameters["plugin"];
|
var pluginStr = queryParameters["plugin"];
|
||||||
var pluginParts = pluginStr.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
|
var pluginParts = pluginStr.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
if (pluginParts.Length == 0)
|
if (pluginParts.Length == 0)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pluginName = pluginParts[0];
|
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
|
// Parse obfs-local plugin
|
||||||
if (pluginName == "obfs-local")
|
if (pluginName == "obfs-local")
|
||||||
{
|
{
|
||||||
var obfsMode = pluginParts.FirstOrDefault(t => t.StartsWith("obfs="));
|
var obfsMode = pluginParts.FirstOrDefault(t => t.StartsWith("obfs="));
|
||||||
var obfsHost = pluginParts.FirstOrDefault(t => t.StartsWith("obfs-host="));
|
var obfsHost = pluginParts.FirstOrDefault(t => t.StartsWith("obfs-host="));
|
||||||
|
|
||||||
if ((!obfsMode.IsNullOrEmpty()) && obfsMode.Contains("obfs=http") && obfsHost.IsNotEmpty())
|
if ((!obfsMode.IsNullOrEmpty()) && obfsMode.Contains("obfs=http") && obfsHost.IsNotEmpty())
|
||||||
{
|
{
|
||||||
obfsHost = obfsHost.Replace("obfs-host=", "");
|
obfsHost = obfsHost.Replace("obfs-host=", "");
|
||||||
|
|
@ -229,7 +236,7 @@ public class ShadowsocksFmt : BaseFmt
|
||||||
if (hasTls)
|
if (hasTls)
|
||||||
{
|
{
|
||||||
item.StreamSecurity = Global.StreamSecurity;
|
item.StreamSecurity = Global.StreamSecurity;
|
||||||
|
|
||||||
if (!certRaw.IsNullOrEmpty())
|
if (!certRaw.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
var certBase64 = certRaw.Replace("certRaw=", "");
|
var certBase64 = certRaw.Replace("certRaw=", "");
|
||||||
|
|
|
||||||
6
v2rayN/global.json
Normal file
6
v2rayN/global.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"sdk": {
|
||||||
|
"version": "8.0.416",
|
||||||
|
"rollForward": "disable"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue