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

@ -25,7 +25,6 @@ public enum Burrow_NetworkType: SwiftProtobuf.Enum, Swift.CaseIterable {
public typealias RawValue = Int
case wireGuard // = 0
case tailnet // = 1
case trojan // = 2
case proxySubscription // = 3
case UNRECOGNIZED(Int)
@ -37,7 +36,6 @@ public enum Burrow_NetworkType: SwiftProtobuf.Enum, Swift.CaseIterable {
switch rawValue {
case 0: self = .wireGuard
case 1: self = .tailnet
case 2: self = .trojan
case 3: self = .proxySubscription
default: self = .UNRECOGNIZED(rawValue)
}
@ -47,7 +45,6 @@ public enum Burrow_NetworkType: SwiftProtobuf.Enum, Swift.CaseIterable {
switch self {
case .wireGuard: return 0
case .tailnet: return 1
case .trojan: return 2
case .proxySubscription: return 3
case .UNRECOGNIZED(let i): return i
}
@ -57,7 +54,6 @@ public enum Burrow_NetworkType: SwiftProtobuf.Enum, Swift.CaseIterable {
public static let allCases: [Burrow_NetworkType] = [
.wireGuard,
.tailnet,
.trojan,
.proxySubscription,
]
@ -246,7 +242,6 @@ extension Burrow_NetworkType: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "WireGuard"),
1: .same(proto: "Tailnet"),
2: .same(proto: "Trojan"),
3: .same(proto: "ProxySubscription"),
]
}

View file

@ -867,12 +867,6 @@ final class NetworkViewModel: Sendable {
WireGuardCard(network: network).card
case .tailnet:
TailnetCard(network: network).card
case .trojan:
unsupportedCard(
id: network.id,
title: "Legacy Trojan Proxy",
detail: "Unsupported SOCKS-era profile. Import a proxy subscription instead."
)
case .proxySubscription:
proxySubscriptionCard(network: network)
case .UNRECOGNIZED(let rawValue):