fix host in v2ray links #474
This commit is contained in:
+2
-2
@@ -522,7 +522,7 @@ func getTransportParams(t interface{}) map[string]string {
|
|||||||
}
|
}
|
||||||
if headers, ok := trasport["headers"].(map[string]interface{}); ok {
|
if headers, ok := trasport["headers"].(map[string]interface{}); ok {
|
||||||
if host, ok := headers["Host"].(string); ok {
|
if host, ok := headers["Host"].(string); ok {
|
||||||
params["peer"] = host
|
params["host"] = host
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "grpc":
|
case "grpc":
|
||||||
@@ -531,7 +531,7 @@ func getTransportParams(t interface{}) map[string]string {
|
|||||||
}
|
}
|
||||||
case "httpupgrade":
|
case "httpupgrade":
|
||||||
if host, ok := trasport["host"].(string); ok {
|
if host, ok := trasport["host"].(string); ok {
|
||||||
params["peer"] = host
|
params["host"] = host
|
||||||
}
|
}
|
||||||
if path, ok := trasport["path"].(string); ok {
|
if path, ok := trasport["path"].(string); ok {
|
||||||
params["path"] = path
|
params["path"] = path
|
||||||
|
|||||||
@@ -139,6 +139,12 @@ func shadowTlsOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func hysteriaOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
func hysteriaOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
||||||
|
delete(*out, "down_mbps")
|
||||||
|
delete(*out, "up_mbps")
|
||||||
|
delete(*out, "obfs")
|
||||||
|
delete(*out, "recv_window_conn")
|
||||||
|
delete(*out, "disable_mtu_discovery")
|
||||||
|
|
||||||
if upMbps, ok := inbound["down_mbps"]; ok {
|
if upMbps, ok := inbound["down_mbps"]; ok {
|
||||||
(*out)["up_mbps"] = upMbps
|
(*out)["up_mbps"] = upMbps
|
||||||
}
|
}
|
||||||
@@ -157,6 +163,10 @@ func hysteriaOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func hysteria2Out(out *map[string]interface{}, inbound map[string]interface{}) {
|
func hysteria2Out(out *map[string]interface{}, inbound map[string]interface{}) {
|
||||||
|
delete(*out, "down_mbps")
|
||||||
|
delete(*out, "up_mbps")
|
||||||
|
delete(*out, "obfs")
|
||||||
|
|
||||||
if upMbps, ok := inbound["down_mbps"]; ok {
|
if upMbps, ok := inbound["down_mbps"]; ok {
|
||||||
(*out)["up_mbps"] = upMbps
|
(*out)["up_mbps"] = upMbps
|
||||||
}
|
}
|
||||||
@@ -169,6 +179,8 @@ func hysteria2Out(out *map[string]interface{}, inbound map[string]interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func tuicOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
func tuicOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
||||||
|
delete(*out, "zero_rtt_handshake")
|
||||||
|
delete(*out, "heartbeat")
|
||||||
if congestionControl, ok := inbound["congestion_control"].(string); ok {
|
if congestionControl, ok := inbound["congestion_control"].(string); ok {
|
||||||
(*out)["congestion_control"] = congestionControl
|
(*out)["congestion_control"] = congestionControl
|
||||||
} else {
|
} else {
|
||||||
@@ -183,18 +195,21 @@ func tuicOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func vlessOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
func vlessOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
||||||
|
delete(*out, "transport")
|
||||||
if transport, ok := inbound["transport"]; ok {
|
if transport, ok := inbound["transport"]; ok {
|
||||||
(*out)["transport"] = transport
|
(*out)["transport"] = transport
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func trojanOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
func trojanOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
||||||
|
delete(*out, "transport")
|
||||||
if transport, ok := inbound["transport"]; ok {
|
if transport, ok := inbound["transport"]; ok {
|
||||||
(*out)["transport"] = transport
|
(*out)["transport"] = transport
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func vmessOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
func vmessOut(out *map[string]interface{}, inbound map[string]interface{}) {
|
||||||
|
delete(*out, "transport")
|
||||||
if transport, ok := inbound["transport"]; ok {
|
if transport, ok := inbound["transport"]; ok {
|
||||||
(*out)["transport"] = transport
|
(*out)["transport"] = transport
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user