mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-07-27 17:01:53 +08:00
update 2026-06-20 01:51:37
This commit is contained in:
parent
1ec80fbc61
commit
f85f422a5a
@ -99,7 +99,9 @@ local function build_common(node)
|
||||
elseif net == "http" then
|
||||
local opts = node["http-opts"]
|
||||
if opts then
|
||||
o.transport.host = get_first(opts.host)
|
||||
-- Clash http-opts carries the camouflage Host under headers.Host
|
||||
-- (a list), like ws-opts; opts.host is not standard for http.
|
||||
o.transport.host = get_first(opts.host) or (opts.headers and get_first(opts.headers.Host))
|
||||
o.transport.path = get_first(opts.path)
|
||||
end
|
||||
|
||||
|
||||
@ -597,7 +597,16 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
elseif result.type == "Xray" and info.net == "tcp" then
|
||||
info.net = "raw"
|
||||
end
|
||||
if info.net == 'h2' or info.net == 'http' then
|
||||
-- Clash 'network: http' = TCP + HTTP/1.1 header obfuscation (no TLS),
|
||||
-- i.e. Xray raw transport with tcp header type "http" -- NOT xhttp
|
||||
-- (splithttp). Normalize to 'raw' + guise 'http' so the tcp_guise
|
||||
-- block below handles it; the server otherwise replies HTTP 400.
|
||||
-- 'h2' still maps to xhttp (Xray dropped the standalone h2 transport).
|
||||
if info.net == 'http' and result.type == "Xray" then
|
||||
info.net = "raw"
|
||||
info.type = "http"
|
||||
result.transport = "raw"
|
||||
elseif info.net == 'h2' or info.net == 'http' then
|
||||
info.net = "http"
|
||||
result.transport = (result.type == "Xray") and "xhttp" or "http"
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user