mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 12:32:10 +00:00
Add ws headers for sing-box
This commit is contained in:
parent
69b3178c13
commit
7845569319
5 changed files with 16 additions and 2 deletions
|
@ -367,6 +367,13 @@ namespace v2rayN.Handler
|
|||
case "ws":
|
||||
transport.type = "ws";
|
||||
transport.path = Utils.IsNullOrEmpty(node.path) ? null : node.path;
|
||||
if (!Utils.IsNullOrEmpty(node.requestHost))
|
||||
{
|
||||
transport.headers = new()
|
||||
{
|
||||
Host = node.requestHost
|
||||
};
|
||||
}
|
||||
break;
|
||||
|
||||
case "quic":
|
||||
|
|
|
@ -163,7 +163,7 @@ namespace v2rayN.Mode
|
|||
public bool enableTun { get; set; }
|
||||
public bool strictRoute { get; set; }
|
||||
public string stack { get; set; }
|
||||
public int mtu { get; set; }
|
||||
public int mtu { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
@ -148,12 +148,19 @@
|
|||
public string type { get; set; }
|
||||
public List<string>? host { get; set; }
|
||||
public string? path { get; set; }
|
||||
public Headers4Sbox? headers { get; set; }
|
||||
|
||||
public string service_name { get; set; }
|
||||
public string idle_timeout { get; set; }
|
||||
public string ping_timeout { get; set; }
|
||||
public bool? permit_without_stream { get; set; }
|
||||
}
|
||||
|
||||
public class Headers4Sbox
|
||||
{
|
||||
public string? Host { get; set; }
|
||||
}
|
||||
|
||||
public class Server4Sbox
|
||||
{
|
||||
public string tag { get; set; }
|
||||
|
|
|
@ -19,7 +19,6 @@ namespace v2rayN.ViewModels
|
|||
[Reactive] public string normalDNS { get; set; }
|
||||
[Reactive] public string normalDNS2 { get; set; }
|
||||
[Reactive] public string tunDNS2 { get; set; }
|
||||
|
||||
|
||||
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> ImportDefConfig4V2rayCmd { get; }
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace v2rayN.ViewModels
|
|||
|
||||
[Reactive]
|
||||
public string IP { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string Process { get; set; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue