feat: xhttp xmux
This commit is contained in:
16 files changed
+231
-18
No files matched your search
@@ -46,6 +46,8 @@ def xray_pin_server_names:
|
||||
# Slurped (a list of one), not an argument: it grows with the rules.
|
||||
$route_rules[0] as $route_rules
|
||||
| .outbounds = ($obs[0] + .outbounds)
|
||||
# proxy.xray.xhttpXmux.
|
||||
| .outbounds |= map(. @setXhttpXmux@)
|
||||
| if $xray_loglevel == "" then . else .log.loglevel = $xray_loglevel end
|
||||
| if $auth_enabled then
|
||||
(.inbounds[] | select(.protocol == "socks" and .tag == "mixed-in") | .settings.auth) = "password"
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
awgRuntimeDnsServer ? null,
|
||||
# proxy.listener on an address other machines reach (0.0.0.0, a LAN address).
|
||||
listenerExposed ? false,
|
||||
# derived.xhttpXmuxJq.
|
||||
xhttpXmuxJq ? "",
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -60,6 +62,7 @@ if pureXrayEnabled then
|
||||
(fillTemplate ./backend-filter-xray.template.jq {
|
||||
inherit selectionMode;
|
||||
hostClosedPorts = lib.concatStringsSep "," closedPorts;
|
||||
setXhttpXmux = xhttpXmuxJq;
|
||||
})
|
||||
else
|
||||
(fillTemplate ./backend-filter-sing-box.template.jq {
|
||||
|
||||
@@ -7,6 +7,7 @@ let
|
||||
jq
|
||||
hybridEnabled
|
||||
xraySidecarRoutingMark
|
||||
xhttpXmuxJq
|
||||
;
|
||||
in
|
||||
|
||||
@@ -21,6 +22,7 @@ lib.optionalString hybridEnabled (
|
||||
setSidecarMark = lib.optionalString (
|
||||
xraySidecarRoutingMark != null
|
||||
) "| .streamSettings.sockopt.mark = $mark";
|
||||
setXhttpXmux = xhttpXmuxJq;
|
||||
hopRoutingMark = lib.optionalString (
|
||||
routingMark != null
|
||||
) " + {routing_mark: ${toString routingMark}}";
|
||||
|
||||
@@ -30,6 +30,7 @@ _proxy_suite_add_xray_sidecar_obs() {
|
||||
| .value.tag as $tag
|
||||
| {outbound: (.value
|
||||
@setSidecarMark@
|
||||
@setXhttpXmux@
|
||||
| .streamSettings.sockopt.domainStrategy = (.streamSettings.sockopt.domainStrategy // "UseIP")),
|
||||
client: {id: $id, email: $tag},
|
||||
rule: {type: "field", inboundTag: ["sidecar-in"], user: [$tag], outboundTag: $tag},
|
||||
|
||||
Reference in new issue
Block a user