Remove unused NetworkType::Trojan tombstone

The Trojan network type only ever existed as a non-runnable tombstone:
the SOCKS-era Trojan runtime it guarded against (BEP-0009) was never
merged to main, and no stored network uses it. Drop the enum value and
its dead match arms across the daemon, GTK summary, and Apple bindings.

The Trojan *protocol* outbound used by proxy-subscription nodes
(TrojanOutbound / ProxyOutbound::Trojan / isTrojanTCP) is unaffected.

- proto: remove `Trojan = 2`, add `reserved 2; reserved "Trojan";`
- daemon: drop ResolvedTunnel/ActiveTunnel::Trojan variants + match arms
  (runtime.rs) and the validate_network_payload arm (database.rs)
- gtk: drop the "Legacy Trojan Proxy" summary arm
- apple: drop the makeCard .trojan arm and regenerate the Swift
  NetworkType enum (case/rawValue/init/allCases/nameMap)

An unknown stored type now surfaces via the existing UNRECOGNIZED path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
JettChenT 2026-06-05 17:06:01 -07:00
parent 4d1f589280
commit 6c6bfe5434
6 changed files with 2 additions and 40 deletions

View file

@ -408,11 +408,6 @@ fn summarize_network(network: &Network) -> NetworkSummary {
match network.r#type() {
NetworkType::WireGuard => summarize_wireguard(network),
NetworkType::Tailnet => summarize_tailnet(network),
NetworkType::Trojan => NetworkSummary {
id: network.id,
title: "Legacy Trojan Proxy".to_owned(),
detail: "Unsupported SOCKS-era profile. Import a proxy subscription instead.".to_owned(),
},
NetworkType::ProxySubscription => summarize_proxy_subscription(network),
}
}