windows: the XRay-only backend; zapret beside the TUN
XRay alone (proxy.backend = "xray"), as upstream's xray.nix and its start-time filter make it: the mixed-in listener with its login, DNS remote and local ordered by the route mode with the servers' names on local, IPIfNonMatch routing in upstream's order and modes, zapret's direct lists; urltest as prefixed tags under a leastPing balancer and observatory, a pin or first as one exit; chains by dialerProxy; Tor, SSH, WARP, AmneziaWG and whitelist-bypass as SOCKS hops. What needs sing-box is refused for it, as upstream asserts (TUN, groups, rule sets, autoProxy, selector/failover, DoT, dns.strategy and the like). The service checks it with xray run -test and runs it with its component's geodata (XRAY_LOCATION_ASSET); latency tests and autoProxy stand aside. zapret beside the TUN: winws2 gets the TUN's addresses left out in its --wf-raw-filter (with the cutoff probe's ports); Flowseal's winws, which takes no ANDed part, gets its own filter as it saves it (--wf-save) with them left out, through --wf-raw. WinDivert negates single tests only: the part is spelled positively, and compiled by WinDivert's own parser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2dd563ed61
commit
d675fdddb5
15 files changed
+831
-34
No files matched your search
@@ -130,16 +130,10 @@ fn not_ported(cfg: &Config, v: &mut Issues) {
|
||||
v.warn(path, format!("{what} {IGNORED}"));
|
||||
}
|
||||
}
|
||||
if cfg.proxy.enable && cfg.proxy.backend == Backend::Xray {
|
||||
v.warn("proxy.backend", "the xray backend is not on Windows yet: the proxy does not start with it (sing-box or hybrid do)");
|
||||
}
|
||||
let z = &cfg.zapret;
|
||||
if z.enable && z.engine == ZapretEngine::DiscordYoutube && z.discord_youtube.include_extra_upstream_lists {
|
||||
v.warn("zapret.zapret-discord-youtube.includeExtraUpstreamLists", "Flowseal's Windows release has no instagram, soundcloud or twitter list: ignored");
|
||||
}
|
||||
if z.enable && cfg.proxy.tun.enable {
|
||||
v.warn("proxy.tun.enable", "TUN and zapret together: zapret's packets are not kept off the TUN on Windows yet; use one or the other");
|
||||
}
|
||||
}
|
||||
|
||||
fn proxy(cfg: &Config, v: &mut Issues) {
|
||||
@@ -309,6 +303,9 @@ fn proxy(cfg: &Config, v: &mut Issues) {
|
||||
if p.dns.fake_ip.enable && !sing_box {
|
||||
v.error("proxy.dns.fakeIp.enable", "fake IP needs the sing-box or hybrid backend");
|
||||
}
|
||||
if p.enable && p.backend == Backend::Xray {
|
||||
xray_backend(cfg, v);
|
||||
}
|
||||
if p.enable && !derived::has_available_outbounds(cfg) {
|
||||
v.warn("proxy.outbounds", "the proxy has no outbound or subscription yet; it starts once one is added");
|
||||
}
|
||||
@@ -336,6 +333,43 @@ fn proxy(cfg: &Config, v: &mut Issues) {
|
||||
}
|
||||
}
|
||||
|
||||
/// What upstream asserts unavailable with `proxy.backend = "xray"`, and the transparent modes
|
||||
/// this port has no XRay counterpart for. (Rule sets, groups, "failover", autoProxy, fake IP,
|
||||
/// program rules, per-app routing and sing-box JSON are refused with the other backend checks.)
|
||||
fn xray_backend(cfg: &Config, v: &mut Issues) {
|
||||
const NEEDS: &str = "needs the sing-box or hybrid backend";
|
||||
let p = &cfg.proxy;
|
||||
if p.selection == Selection::Selector {
|
||||
v.error("proxy.selection", format!("\"selector\" selection {NEEDS}"));
|
||||
}
|
||||
if p.dns.local.transport == super::DnsTransport::Tls || p.dns.remote.transport == super::DnsTransport::Tls {
|
||||
v.error("proxy.dns", "DoT (type \"tls\") is not supported with the xray backend; use udp or tcp DNS");
|
||||
}
|
||||
if p.dns.strategy.is_some() {
|
||||
v.error("proxy.dns.strategy", format!("dns.strategy {NEEDS}"));
|
||||
}
|
||||
if p.dns.client_subnet.is_some() {
|
||||
v.error("proxy.dns.clientSubnet", format!("dns.clientSubnet {NEEDS}"));
|
||||
}
|
||||
if !p.dns.sing_box.servers.is_empty() || !p.dns.sing_box.rules.is_empty() {
|
||||
v.error("proxy.dns.singBox", format!("dns.singBox.servers and rules {NEEDS}"));
|
||||
}
|
||||
if cfg.debug.connection_log.enable {
|
||||
v.error("debug.connectionLog.enable", format!("the connection log {NEEDS}"));
|
||||
}
|
||||
if p.tun.enable {
|
||||
v.error("proxy.tun.enable", "the TUN with the xray backend is not on Windows yet; use sing-box or hybrid for it");
|
||||
}
|
||||
if matches!(cfg.warp.as_outbound, Some(crate::config::WarpOutboundKind::SingBox)) && cfg.warp.enable {
|
||||
v.error("warp.asOutbound", "a sing-box WARP endpoint needs the sing-box or hybrid backend; use \"userspace\"");
|
||||
}
|
||||
for (name, prof) in &cfg.amnezia_wg.profiles {
|
||||
if cfg.amnezia_wg.enable && matches!(prof.as_outbound, Some(crate::config::AwgOutboundKind::SingBox)) {
|
||||
v.error(format!("amneziaWg.profiles.{name}.asOutbound"), "a sing-box AmneziaWG endpoint needs the sing-box or hybrid backend; use \"userspace\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn tunnels(cfg: &Config, v: &mut Issues) {
|
||||
let proxy_on = cfg.proxy.enable;
|
||||
|
||||
|
||||
Reference in new issue
Block a user