Commit 3a242b6
authored
refactor: use openconnect delegation mechanism (#3)
* feat: Add tasks for OpenConnect CLI delegation refactor
- Introduced a comprehensive task list for refactoring OpenConnect CLI, organized by phases and user stories.
- Established foundational tasks for setup and core entity definitions.
- Defined user stories focusing on VPN connection, state tracking, disconnection, status querying, and error handling.
- Emphasized TDD approach with tasks for writing failing tests before implementation.
- Included checkpoints for each phase to ensure progress and functionality.
* feat: MVP -> Implement unit tests for VPN connection management and refactor CLI integration
- Added unit tests for `CliConnector`, `ConnectionEvent`, and `OutputParser` to ensure proper functionality and state transitions.
- Removed FFI-related files and infrastructure, transitioning to a pure Rust implementation.
- Refactored `run_vpn_on`, `run_vpn_off`, and `run_vpn_status` functions to utilize the new `CliConnector` for managing VPN connections.
- Implemented state management for VPN connections, including error handling and event logging.
- Updated main function to support asynchronous execution with Tokio.
* feat(cli): enhance setup command with colored output and lazy mode option
- Updated setup command to use colored output for better visibility.
- Added lazy mode configuration option to automatically connect to VPN when running 'akon' without arguments.
- Improved user prompts and messages for clarity.
feat(vpn): improve VPN connection handling and error suggestions
- Enhanced VPN connection logic to check for existing connections and handle reconnections gracefully.
- Added actionable suggestions for various VPN errors to assist users in troubleshooting.
- Improved output formatting for connection status and error messages.
test(vpn): add integration tests for VPN disconnect functionality
- Implemented comprehensive integration tests for VPN disconnect logic, state management, and error handling.
- Verified state file format, missing fields, and invalid JSON scenarios.
- Ensured proper cleanup of state files after disconnecting.
fix(tests): update VPN status tests for accurate exit codes
- Adjusted VPN status tests to check for correct exit codes when not connected.
- Improved assertions to validate output messages for disconnected status.
* feat(cli): prevent duplicate authenticating events
- Added a flag to track if the authenticating event has been sent
- Modified event handling to ensure only the first authenticating event is sent
* feat: update version numbers and improve installation process
- Bump version to 1.0.0 in Cargo.toml for both akon and akon-core
- Simplify installation instructions in README.md to use 'make install'
- Remove redundant setup-sudo.sh script, integrating its functionality into the Makefile
- Add version information to CLI command output1 parent 61299f5 commit 3a242b6
File tree
39 files changed
+8174
-733
lines changed- akon-core
- src
- config
- vpn
- tests
- specs/002-refactor-openconnect-to
- checklists
- contracts
- src
- cli
- tests
- integration
39 files changed
+8174
-733
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
43 | | - | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 3 | + | |
| 4 | + | |
12 | 5 | | |
13 | 6 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
27 | 11 | | |
28 | | - | |
29 | 12 | | |
30 | | - | |
31 | 13 | | |
32 | | - | |
33 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | | - | |
40 | 43 | | |
41 | | - | |
42 | 44 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 45 | + | |
| 46 | + | |
0 commit comments