mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-06-19 01:35:30 +08:00
add http/2 option in v2ray pro
This commit is contained in:
parent
51a3526595
commit
4fc65fc04b
@ -100,6 +100,7 @@ network_type = s:taboption("main",ListValue, "network_type", translate("Network
|
|||||||
network_type:value("tcp")
|
network_type:value("tcp")
|
||||||
network_type:value("kcp")
|
network_type:value("kcp")
|
||||||
network_type:value("ws")
|
network_type:value("ws")
|
||||||
|
network_type:value("h2")
|
||||||
|
|
||||||
-- tcp settings
|
-- tcp settings
|
||||||
tcp_obfs = s:taboption("main",ListValue, "tcp_obfs", translate("TCP Obfs"))
|
tcp_obfs = s:taboption("main",ListValue, "tcp_obfs", translate("TCP Obfs"))
|
||||||
@ -159,6 +160,14 @@ ws_headers = s:taboption("main",Value, "ws_headers", translate("WebSocket Header
|
|||||||
ws_headers:depends("network_type", "ws")
|
ws_headers:depends("network_type", "ws")
|
||||||
ws_headers.datatype = "host"
|
ws_headers.datatype = "host"
|
||||||
|
|
||||||
|
-- http/2 settings
|
||||||
|
h2_path = s:taboption("main",Value, "h2_path", translate("HTTP Path"))
|
||||||
|
h2_path:depends("network_type", "h2")
|
||||||
|
|
||||||
|
h2_domain = s:taboption("main",Value, "h2_domain", translate("HTTP Domain"))
|
||||||
|
h2_domain:depends("network_type", "h2")
|
||||||
|
h2_domain.datatype = "host"
|
||||||
|
|
||||||
-- others
|
-- others
|
||||||
tls = s:taboption("main",Flag, "tls", translate("TLS"))
|
tls = s:taboption("main",Flag, "tls", translate("TLS"))
|
||||||
tls.rmempty = false
|
tls.rmempty = false
|
||||||
|
@ -137,6 +137,13 @@ local v2ray = {
|
|||||||
Host = ucursor:get(conf_path, "v2raypro", "ws_headers")
|
Host = ucursor:get(conf_path, "v2raypro", "ws_headers")
|
||||||
} or nil,
|
} or nil,
|
||||||
} or nil,
|
} or nil,
|
||||||
|
|
||||||
|
httpSettings = (v2ray_stream_mode == "h2") and {
|
||||||
|
path = ucursor:get(conf_path, "v2raypro", "h2_path"),
|
||||||
|
host = (ucursor:get(conf_path, "v2raypro", "h2_domain") ~= nil) and {
|
||||||
|
ucursor:get(conf_path, "v2raypro", "h2_domain")
|
||||||
|
} or nil,
|
||||||
|
} or nil,
|
||||||
},
|
},
|
||||||
mux = {
|
mux = {
|
||||||
enabled = (ucursor:get(conf_path, "v2raypro", "mux") == "1") and true or false
|
enabled = (ucursor:get(conf_path, "v2raypro", "mux") == "1") and true or false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user