Repository navigation
Expand file tree
/
Copy pathVPNView.swift
More file actions
50 lines (45 loc) · 1.7 KB
/
Copy pathVPNView.swift
File metadata and controls
50 lines (45 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// VPNView.swift
// Secure_Recon
//
// Created by M1N0-H1DDEN on 29.11.2025.
//
import SwiftUI
struct VPNView: View {
@EnvironmentObject var engine: SecurityEngine
var body: some View {
ZStack {
Color.black.ignoresSafeArea()
VStack(alignment: .leading, spacing: 12) {
Text("VPN / TUNNELS")
.font(.system(size: 24, weight: .bold, design: .monospaced))
.foregroundColor(.green)
List {
ForEach(engine.vpnProfiles) { profile in
HStack {
VStack(alignment: .leading) {
Text(profile.name)
.foregroundColor(profile.isActive ? .green : .white)
Text(profile.serverAddress)
.font(.caption2)
.foregroundColor(.green.opacity(0.7))
if profile.usesTor {
Text("TOR chain enabled")
.font(.caption2)
.foregroundColor(.orange)
}
}
Spacer()
Button(profile.isActive ? "Disconnect" : "Connect") {
engine.toggleVPN(profile: profile)
}
.buttonStyle(.bordered)
}
}
}
.background(Color.black)
}
.padding()
}
}
}