mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-04 14:02:11 +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":
|
case "ws":
|
||||||
transport.type = "ws";
|
transport.type = "ws";
|
||||||
transport.path = Utils.IsNullOrEmpty(node.path) ? null : node.path;
|
transport.path = Utils.IsNullOrEmpty(node.path) ? null : node.path;
|
||||||
|
if (!Utils.IsNullOrEmpty(node.requestHost))
|
||||||
|
{
|
||||||
|
transport.headers = new()
|
||||||
|
{
|
||||||
|
Host = node.requestHost
|
||||||
|
};
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "quic":
|
case "quic":
|
||||||
|
|
|
@ -148,12 +148,19 @@
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
public List<string>? host { get; set; }
|
public List<string>? host { get; set; }
|
||||||
public string? path { get; set; }
|
public string? path { get; set; }
|
||||||
|
public Headers4Sbox? headers { get; set; }
|
||||||
|
|
||||||
public string service_name { get; set; }
|
public string service_name { get; set; }
|
||||||
public string idle_timeout { get; set; }
|
public string idle_timeout { get; set; }
|
||||||
public string ping_timeout { get; set; }
|
public string ping_timeout { get; set; }
|
||||||
public bool? permit_without_stream { get; set; }
|
public bool? permit_without_stream { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Headers4Sbox
|
||||||
|
{
|
||||||
|
public string? Host { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class Server4Sbox
|
public class Server4Sbox
|
||||||
{
|
{
|
||||||
public string tag { get; set; }
|
public string tag { get; set; }
|
||||||
|
|
|
@ -20,7 +20,6 @@ namespace v2rayN.ViewModels
|
||||||
[Reactive] public string normalDNS2 { get; set; }
|
[Reactive] public string normalDNS2 { get; set; }
|
||||||
[Reactive] public string tunDNS2 { get; set; }
|
[Reactive] public string tunDNS2 { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> ImportDefConfig4V2rayCmd { get; }
|
public ReactiveCommand<Unit, Unit> ImportDefConfig4V2rayCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> ImportDefConfig4SingboxCmd { get; }
|
public ReactiveCommand<Unit, Unit> ImportDefConfig4SingboxCmd { get; }
|
||||||
|
|
|
@ -27,6 +27,7 @@ namespace v2rayN.ViewModels
|
||||||
|
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public string IP { get; set; }
|
public string IP { get; set; }
|
||||||
|
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public string Process { get; set; }
|
public string Process { get; set; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue