Compare commits

...

4 Commits

Author SHA1 Message Date
litoral05 dae218e1e9 adds old rsa support 2026-06-03 12:01:33 +01:00
litoral05 522f56b95f Added responsiveness + custom scrollbar 2026-05-18 13:58:40 +01:00
litoral05 8feb5213cf Finishes controllers tab + adds Manual to settings 2026-05-18 12:18:38 +01:00
litoral05 d9b4c081ce Finished controllers UI 2026-05-15 08:54:51 +01:00
33 changed files with 4869 additions and 759 deletions
@@ -0,0 +1,45 @@
# Details
Date : 2026-05-18 12:10:57
Directory c:\\Users\\User\\Desktop\\Projetos\\Deployed\\LR OpenWRT Tool\\Frontend\\lr-openwrt-tool\\src
Total : 30 files, 7309 codes, 2 comments, 1032 blanks, all 8343 lines
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
| [src/app/App.tsx](/src/app/App.tsx) | TypeScript JSX | 36 | 0 | 9 | 45 |
| [src/app/routes.tsx](/src/app/routes.tsx) | TypeScript JSX | 260 | 0 | 46 | 306 |
| [src/components/activity/ActivityLogs.tsx](/src/components/activity/ActivityLogs.tsx) | TypeScript JSX | 288 | 0 | 51 | 339 |
| [src/components/controllers/ControllersRoute.tsx](/src/components/controllers/ControllersRoute.tsx) | TypeScript JSX | 1,927 | 0 | 308 | 2,235 |
| [src/components/dashboard/IpPoolChart.tsx](/src/components/dashboard/IpPoolChart.tsx) | TypeScript JSX | 117 | 0 | 17 | 134 |
| [src/components/dashboard/MetricCard.tsx](/src/components/dashboard/MetricCard.tsx) | TypeScript JSX | 78 | 0 | 11 | 89 |
| [src/components/dashboard/NetworkTrafficChart.tsx](/src/components/dashboard/NetworkTrafficChart.tsx) | TypeScript JSX | 217 | 0 | 35 | 252 |
| [src/components/layout/AppShell.tsx](/src/components/layout/AppShell.tsx) | TypeScript JSX | 26 | 0 | 4 | 30 |
| [src/components/layout/Sidebar.tsx](/src/components/layout/Sidebar.tsx) | TypeScript JSX | 88 | 0 | 11 | 99 |
| [src/components/layout/TopBar.tsx](/src/components/layout/TopBar.tsx) | TypeScript JSX | 95 | 0 | 7 | 102 |
| [src/components/login/LoginScreen.tsx](/src/components/login/LoginScreen.tsx) | TypeScript JSX | 165 | 0 | 27 | 192 |
| [src/components/provisioning/ProvisioningWizard.tsx](/src/components/provisioning/ProvisioningWizard.tsx) | TypeScript JSX | 1,707 | 0 | 283 | 1,990 |
| [src/components/settings/BackendSettings.tsx](/src/components/settings/BackendSettings.tsx) | TypeScript JSX | 1,272 | 0 | 70 | 1,342 |
| [src/components/udp2raw/Udp2rawConfig.tsx](/src/components/udp2raw/Udp2rawConfig.tsx) | TypeScript JSX | 369 | 0 | 52 | 421 |
| [src/components/ui/Badge.tsx](/src/components/ui/Badge.tsx) | TypeScript JSX | 38 | 0 | 5 | 43 |
| [src/components/ui/Button.tsx](/src/components/ui/Button.tsx) | TypeScript JSX | 38 | 0 | 7 | 45 |
| [src/components/ui/Card.tsx](/src/components/ui/Card.tsx) | TypeScript JSX | 20 | 0 | 3 | 23 |
| [src/components/ui/Progress.tsx](/src/components/ui/Progress.tsx) | TypeScript JSX | 21 | 0 | 2 | 23 |
| [src/components/ui/Select.tsx](/src/components/ui/Select.tsx) | TypeScript JSX | 71 | 0 | 10 | 81 |
| [src/components/ui/StatusDot.tsx](/src/components/ui/StatusDot.tsx) | TypeScript JSX | 16 | 0 | 1 | 17 |
| [src/main.tsx](/src/main.tsx) | TypeScript JSX | 16 | 0 | 5 | 21 |
| [src/services/activityLogService.ts](/src/services/activityLogService.ts) | TypeScript | 62 | 0 | 14 | 76 |
| [src/services/apiClient.ts](/src/services/apiClient.ts) | TypeScript | 80 | 0 | 13 | 93 |
| [src/services/loginApi.ts](/src/services/loginApi.ts) | TypeScript | 15 | 0 | 2 | 17 |
| [src/services/vpnApi.ts](/src/services/vpnApi.ts) | TypeScript | 27 | 0 | 4 | 31 |
| [src/services/vpsApi.ts](/src/services/vpsApi.ts) | TypeScript | 142 | 2 | 20 | 164 |
| [src/styles/globals.css](/src/styles/globals.css) | PostCSS | 28 | 0 | 5 | 33 |
| [src/types/activity.ts](/src/types/activity.ts) | TypeScript | 20 | 0 | 2 | 22 |
| [src/types/api.ts](/src/types/api.ts) | TypeScript | 46 | 0 | 6 | 52 |
| [src/types/provisioning.ts](/src/types/provisioning.ts) | TypeScript | 24 | 0 | 2 | 26 |
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
@@ -0,0 +1,15 @@
# Diff Details
Date : 2026-05-18 12:10:57
Directory c:\\Users\\User\\Desktop\\Projetos\\Deployed\\LR OpenWRT Tool\\Frontend\\lr-openwrt-tool\\src
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
@@ -0,0 +1,2 @@
"filename", "language", "", "comment", "blank", "total"
"Total", "-", , 0, 0, 0
1 filename language comment blank total
2 Total - 0 0 0
@@ -0,0 +1,19 @@
# Diff Summary
Date : 2026-05-18 12:10:57
Directory c:\\Users\\User\\Desktop\\Projetos\\Deployed\\LR OpenWRT Tool\\Frontend\\lr-openwrt-tool\\src
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
@@ -0,0 +1,22 @@
Date : 2026-05-18 12:10:57
Directory : c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
Languages
+----------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------+------------+------------+------------+------------+------------+
+----------+------------+------------+------------+------------+------------+
Directories
+------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+------+------------+------------+------------+------------+------------+
+------+------------+------------+------------+------------+------------+
Files
+----------+----------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+----------+----------+------------+------------+------------+------------+
| Total | | 0 | 0 | 0 | 0 |
+----------+----------+------------+------------+------------+------------+
@@ -0,0 +1,32 @@
"filename", "language", "TypeScript", "PostCSS", "TypeScript JSX", "comment", "blank", "total"
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\App.tsx", "TypeScript JSX", 0, 0, 36, 0, 9, 45
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\routes.tsx", "TypeScript JSX", 0, 0, 260, 0, 46, 306
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\activity\ActivityLogs.tsx", "TypeScript JSX", 0, 0, 288, 0, 51, 339
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\controllers\ControllersRoute.tsx", "TypeScript JSX", 0, 0, 1927, 0, 308, 2235
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\IpPoolChart.tsx", "TypeScript JSX", 0, 0, 117, 0, 17, 134
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\MetricCard.tsx", "TypeScript JSX", 0, 0, 78, 0, 11, 89
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\NetworkTrafficChart.tsx", "TypeScript JSX", 0, 0, 217, 0, 35, 252
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\AppShell.tsx", "TypeScript JSX", 0, 0, 26, 0, 4, 30
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\Sidebar.tsx", "TypeScript JSX", 0, 0, 88, 0, 11, 99
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\TopBar.tsx", "TypeScript JSX", 0, 0, 95, 0, 7, 102
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\login\LoginScreen.tsx", "TypeScript JSX", 0, 0, 165, 0, 27, 192
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\provisioning\ProvisioningWizard.tsx", "TypeScript JSX", 0, 0, 1707, 0, 283, 1990
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\settings\BackendSettings.tsx", "TypeScript JSX", 0, 0, 1272, 0, 70, 1342
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\udp2raw\Udp2rawConfig.tsx", "TypeScript JSX", 0, 0, 369, 0, 52, 421
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Badge.tsx", "TypeScript JSX", 0, 0, 38, 0, 5, 43
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Button.tsx", "TypeScript JSX", 0, 0, 38, 0, 7, 45
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Card.tsx", "TypeScript JSX", 0, 0, 20, 0, 3, 23
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Progress.tsx", "TypeScript JSX", 0, 0, 21, 0, 2, 23
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Select.tsx", "TypeScript JSX", 0, 0, 71, 0, 10, 81
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\StatusDot.tsx", "TypeScript JSX", 0, 0, 16, 0, 1, 17
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\main.tsx", "TypeScript JSX", 0, 0, 16, 0, 5, 21
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\activityLogService.ts", "TypeScript", 62, 0, 0, 0, 14, 76
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\apiClient.ts", "TypeScript", 80, 0, 0, 0, 13, 93
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\loginApi.ts", "TypeScript", 15, 0, 0, 0, 2, 17
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpnApi.ts", "TypeScript", 27, 0, 0, 0, 4, 31
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpsApi.ts", "TypeScript", 142, 0, 0, 2, 20, 164
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\styles\globals.css", "PostCSS", 0, 28, 0, 0, 5, 33
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\activity.ts", "TypeScript", 20, 0, 0, 0, 2, 22
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\api.ts", "TypeScript", 46, 0, 0, 0, 6, 52
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\provisioning.ts", "TypeScript", 24, 0, 0, 0, 2, 26
"Total", "-", 416, 28, 6865, 2, 1032, 8343
1 filename language TypeScript PostCSS TypeScript JSX comment blank total
2 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\App.tsx TypeScript JSX 0 0 36 0 9 45
3 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\routes.tsx TypeScript JSX 0 0 260 0 46 306
4 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\activity\ActivityLogs.tsx TypeScript JSX 0 0 288 0 51 339
5 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\controllers\ControllersRoute.tsx TypeScript JSX 0 0 1927 0 308 2235
6 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\IpPoolChart.tsx TypeScript JSX 0 0 117 0 17 134
7 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\MetricCard.tsx TypeScript JSX 0 0 78 0 11 89
8 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\NetworkTrafficChart.tsx TypeScript JSX 0 0 217 0 35 252
9 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\AppShell.tsx TypeScript JSX 0 0 26 0 4 30
10 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\Sidebar.tsx TypeScript JSX 0 0 88 0 11 99
11 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\TopBar.tsx TypeScript JSX 0 0 95 0 7 102
12 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\login\LoginScreen.tsx TypeScript JSX 0 0 165 0 27 192
13 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\provisioning\ProvisioningWizard.tsx TypeScript JSX 0 0 1707 0 283 1990
14 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\settings\BackendSettings.tsx TypeScript JSX 0 0 1272 0 70 1342
15 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\udp2raw\Udp2rawConfig.tsx TypeScript JSX 0 0 369 0 52 421
16 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Badge.tsx TypeScript JSX 0 0 38 0 5 43
17 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Button.tsx TypeScript JSX 0 0 38 0 7 45
18 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Card.tsx TypeScript JSX 0 0 20 0 3 23
19 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Progress.tsx TypeScript JSX 0 0 21 0 2 23
20 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Select.tsx TypeScript JSX 0 0 71 0 10 81
21 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\StatusDot.tsx TypeScript JSX 0 0 16 0 1 17
22 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\main.tsx TypeScript JSX 0 0 16 0 5 21
23 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\activityLogService.ts TypeScript 62 0 0 0 14 76
24 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\apiClient.ts TypeScript 80 0 0 0 13 93
25 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\loginApi.ts TypeScript 15 0 0 0 2 17
26 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpnApi.ts TypeScript 27 0 0 0 4 31
27 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpsApi.ts TypeScript 142 0 0 2 20 164
28 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\styles\globals.css PostCSS 0 28 0 0 5 33
29 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\activity.ts TypeScript 20 0 0 0 2 22
30 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\api.ts TypeScript 46 0 0 0 6 52
31 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\provisioning.ts TypeScript 24 0 0 0 2 26
32 Total - 416 28 6865 2 1032 8343
File diff suppressed because one or more lines are too long
@@ -0,0 +1,38 @@
# Summary
Date : 2026-05-18 12:10:57
Directory c:\\Users\\User\\Desktop\\Projetos\\Deployed\\LR OpenWRT Tool\\Frontend\\lr-openwrt-tool\\src
Total : 30 files, 7309 codes, 2 comments, 1032 blanks, all 8343 lines
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| TypeScript JSX | 21 | 6,865 | 0 | 964 | 7,829 |
| TypeScript | 8 | 416 | 2 | 63 | 481 |
| PostCSS | 1 | 28 | 0 | 5 | 33 |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| . | 30 | 7,309 | 2 | 1,032 | 8,343 |
| . (Files) | 1 | 16 | 0 | 5 | 21 |
| app | 2 | 296 | 0 | 55 | 351 |
| components | 18 | 6,553 | 0 | 904 | 7,457 |
| components\\activity | 1 | 288 | 0 | 51 | 339 |
| components\\controllers | 1 | 1,927 | 0 | 308 | 2,235 |
| components\\dashboard | 3 | 412 | 0 | 63 | 475 |
| components\\layout | 3 | 209 | 0 | 22 | 231 |
| components\\login | 1 | 165 | 0 | 27 | 192 |
| components\\provisioning | 1 | 1,707 | 0 | 283 | 1,990 |
| components\\settings | 1 | 1,272 | 0 | 70 | 1,342 |
| components\\udp2raw | 1 | 369 | 0 | 52 | 421 |
| components\\ui | 6 | 204 | 0 | 28 | 232 |
| services | 5 | 326 | 2 | 53 | 381 |
| styles | 1 | 28 | 0 | 5 | 33 |
| types | 3 | 90 | 0 | 10 | 100 |
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
@@ -0,0 +1,71 @@
Date : 2026-05-18 12:10:57
Directory : c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src
Total : 30 files, 7309 codes, 2 comments, 1032 blanks, all 8343 lines
Languages
+----------------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------------+------------+------------+------------+------------+------------+
| TypeScript JSX | 21 | 6,865 | 0 | 964 | 7,829 |
| TypeScript | 8 | 416 | 2 | 63 | 481 |
| PostCSS | 1 | 28 | 0 | 5 | 33 |
+----------------+------------+------------+------------+------------+------------+
Directories
+-------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+-------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| . | 30 | 7,309 | 2 | 1,032 | 8,343 |
| . (Files) | 1 | 16 | 0 | 5 | 21 |
| app | 2 | 296 | 0 | 55 | 351 |
| components | 18 | 6,553 | 0 | 904 | 7,457 |
| components\activity | 1 | 288 | 0 | 51 | 339 |
| components\controllers | 1 | 1,927 | 0 | 308 | 2,235 |
| components\dashboard | 3 | 412 | 0 | 63 | 475 |
| components\layout | 3 | 209 | 0 | 22 | 231 |
| components\login | 1 | 165 | 0 | 27 | 192 |
| components\provisioning | 1 | 1,707 | 0 | 283 | 1,990 |
| components\settings | 1 | 1,272 | 0 | 70 | 1,342 |
| components\udp2raw | 1 | 369 | 0 | 52 | 421 |
| components\ui | 6 | 204 | 0 | 28 | 232 |
| services | 5 | 326 | 2 | 53 | 381 |
| styles | 1 | 28 | 0 | 5 | 33 |
| types | 3 | 90 | 0 | 10 | 100 |
+-------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
Files
+-------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+-------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\App.tsx | TypeScript JSX | 36 | 0 | 9 | 45 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\routes.tsx | TypeScript JSX | 260 | 0 | 46 | 306 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\activity\ActivityLogs.tsx | TypeScript JSX | 288 | 0 | 51 | 339 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\controllers\ControllersRoute.tsx | TypeScript JSX | 1,927 | 0 | 308 | 2,235 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\IpPoolChart.tsx | TypeScript JSX | 117 | 0 | 17 | 134 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\MetricCard.tsx | TypeScript JSX | 78 | 0 | 11 | 89 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\NetworkTrafficChart.tsx | TypeScript JSX | 217 | 0 | 35 | 252 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\AppShell.tsx | TypeScript JSX | 26 | 0 | 4 | 30 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\Sidebar.tsx | TypeScript JSX | 88 | 0 | 11 | 99 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\TopBar.tsx | TypeScript JSX | 95 | 0 | 7 | 102 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\login\LoginScreen.tsx | TypeScript JSX | 165 | 0 | 27 | 192 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\provisioning\ProvisioningWizard.tsx | TypeScript JSX | 1,707 | 0 | 283 | 1,990 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\settings\BackendSettings.tsx | TypeScript JSX | 1,272 | 0 | 70 | 1,342 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\udp2raw\Udp2rawConfig.tsx | TypeScript JSX | 369 | 0 | 52 | 421 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Badge.tsx | TypeScript JSX | 38 | 0 | 5 | 43 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Button.tsx | TypeScript JSX | 38 | 0 | 7 | 45 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Card.tsx | TypeScript JSX | 20 | 0 | 3 | 23 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Progress.tsx | TypeScript JSX | 21 | 0 | 2 | 23 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Select.tsx | TypeScript JSX | 71 | 0 | 10 | 81 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\StatusDot.tsx | TypeScript JSX | 16 | 0 | 1 | 17 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\main.tsx | TypeScript JSX | 16 | 0 | 5 | 21 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\activityLogService.ts | TypeScript | 62 | 0 | 14 | 76 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\apiClient.ts | TypeScript | 80 | 0 | 13 | 93 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\loginApi.ts | TypeScript | 15 | 0 | 2 | 17 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpnApi.ts | TypeScript | 27 | 0 | 4 | 31 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpsApi.ts | TypeScript | 142 | 2 | 20 | 164 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\styles\globals.css | PostCSS | 28 | 0 | 5 | 33 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\activity.ts | TypeScript | 20 | 0 | 2 | 22 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\api.ts | TypeScript | 46 | 0 | 6 | 52 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\provisioning.ts | TypeScript | 24 | 0 | 2 | 26 |
| Total | | 7,309 | 2 | 1,032 | 8,343 |
+-------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
@@ -0,0 +1,28 @@
# Details
Date : 2026-05-18 12:12:03
Directory c:\\Users\\User\\Desktop\\Projetos\\Deployed\\LR OpenWRT Tool\\Frontend\\lr-openwrt-tool\\src-tauri
Total : 13 files, 1139 codes, 0 comments, 220 blanks, all 1359 lines
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
| [src-tauri/build.rs](/src-tauri/build.rs) | Rust | 1 | 0 | 1 | 2 |
| [src-tauri/capabilities/default.json](/src-tauri/capabilities/default.json) | JSON | 11 | 0 | 0 | 11 |
| [src-tauri/icons/android/mipmap-anydpi-v26/ic\_launcher.xml](/src-tauri/icons/android/mipmap-anydpi-v26/ic_launcher.xml) | XML | 5 | 0 | 0 | 5 |
| [src-tauri/icons/android/values/ic\_launcher\_background.xml](/src-tauri/icons/android/values/ic_launcher_background.xml) | XML | 4 | 0 | 0 | 4 |
| [src-tauri/src/commands/controllers.rs](/src-tauri/src/commands/controllers.rs) | Rust | 127 | 0 | 20 | 147 |
| [src-tauri/src/commands/files.rs](/src-tauri/src/commands/files.rs) | Rust | 12 | 0 | 0 | 12 |
| [src-tauri/src/commands/mod.rs](/src-tauri/src/commands/mod.rs) | Rust | 5 | 0 | 0 | 5 |
| [src-tauri/src/commands/network.rs](/src-tauri/src/commands/network.rs) | Rust | 12 | 0 | 1 | 13 |
| [src-tauri/src/commands/router.rs](/src-tauri/src/commands/router.rs) | Rust | 679 | 0 | 162 | 841 |
| [src-tauri/src/commands/ssh.rs](/src-tauri/src/commands/ssh.rs) | Rust | 179 | 0 | 32 | 211 |
| [src-tauri/src/lib.rs](/src-tauri/src/lib.rs) | Rust | 62 | 0 | 3 | 65 |
| [src-tauri/src/main.rs](/src-tauri/src/main.rs) | Rust | 4 | 0 | 1 | 5 |
| [src-tauri/tauri.conf.json](/src-tauri/tauri.conf.json) | JSON | 38 | 0 | 0 | 38 |
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
@@ -0,0 +1,58 @@
# Diff Details
Date : 2026-05-18 12:12:03
Directory c:\\Users\\User\\Desktop\\Projetos\\Deployed\\LR OpenWRT Tool\\Frontend\\lr-openwrt-tool\\src-tauri
Total : 43 files, -6170 codes, -2 comments, -812 blanks, all -6984 lines
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
| [src-tauri/build.rs](/src-tauri/build.rs) | Rust | 1 | 0 | 1 | 2 |
| [src-tauri/capabilities/default.json](/src-tauri/capabilities/default.json) | JSON | 11 | 0 | 0 | 11 |
| [src-tauri/icons/android/mipmap-anydpi-v26/ic\_launcher.xml](/src-tauri/icons/android/mipmap-anydpi-v26/ic_launcher.xml) | XML | 5 | 0 | 0 | 5 |
| [src-tauri/icons/android/values/ic\_launcher\_background.xml](/src-tauri/icons/android/values/ic_launcher_background.xml) | XML | 4 | 0 | 0 | 4 |
| [src-tauri/src/commands/controllers.rs](/src-tauri/src/commands/controllers.rs) | Rust | 127 | 0 | 20 | 147 |
| [src-tauri/src/commands/files.rs](/src-tauri/src/commands/files.rs) | Rust | 12 | 0 | 0 | 12 |
| [src-tauri/src/commands/mod.rs](/src-tauri/src/commands/mod.rs) | Rust | 5 | 0 | 0 | 5 |
| [src-tauri/src/commands/network.rs](/src-tauri/src/commands/network.rs) | Rust | 12 | 0 | 1 | 13 |
| [src-tauri/src/commands/router.rs](/src-tauri/src/commands/router.rs) | Rust | 679 | 0 | 162 | 841 |
| [src-tauri/src/commands/ssh.rs](/src-tauri/src/commands/ssh.rs) | Rust | 179 | 0 | 32 | 211 |
| [src-tauri/src/lib.rs](/src-tauri/src/lib.rs) | Rust | 62 | 0 | 3 | 65 |
| [src-tauri/src/main.rs](/src-tauri/src/main.rs) | Rust | 4 | 0 | 1 | 5 |
| [src-tauri/tauri.conf.json](/src-tauri/tauri.conf.json) | JSON | 38 | 0 | 0 | 38 |
| [src/app/App.tsx](/src/app/App.tsx) | TypeScript JSX | -36 | 0 | -9 | -45 |
| [src/app/routes.tsx](/src/app/routes.tsx) | TypeScript JSX | -260 | 0 | -46 | -306 |
| [src/components/activity/ActivityLogs.tsx](/src/components/activity/ActivityLogs.tsx) | TypeScript JSX | -288 | 0 | -51 | -339 |
| [src/components/controllers/ControllersRoute.tsx](/src/components/controllers/ControllersRoute.tsx) | TypeScript JSX | -1,927 | 0 | -308 | -2,235 |
| [src/components/dashboard/IpPoolChart.tsx](/src/components/dashboard/IpPoolChart.tsx) | TypeScript JSX | -117 | 0 | -17 | -134 |
| [src/components/dashboard/MetricCard.tsx](/src/components/dashboard/MetricCard.tsx) | TypeScript JSX | -78 | 0 | -11 | -89 |
| [src/components/dashboard/NetworkTrafficChart.tsx](/src/components/dashboard/NetworkTrafficChart.tsx) | TypeScript JSX | -217 | 0 | -35 | -252 |
| [src/components/layout/AppShell.tsx](/src/components/layout/AppShell.tsx) | TypeScript JSX | -26 | 0 | -4 | -30 |
| [src/components/layout/Sidebar.tsx](/src/components/layout/Sidebar.tsx) | TypeScript JSX | -88 | 0 | -11 | -99 |
| [src/components/layout/TopBar.tsx](/src/components/layout/TopBar.tsx) | TypeScript JSX | -95 | 0 | -7 | -102 |
| [src/components/login/LoginScreen.tsx](/src/components/login/LoginScreen.tsx) | TypeScript JSX | -165 | 0 | -27 | -192 |
| [src/components/provisioning/ProvisioningWizard.tsx](/src/components/provisioning/ProvisioningWizard.tsx) | TypeScript JSX | -1,707 | 0 | -283 | -1,990 |
| [src/components/settings/BackendSettings.tsx](/src/components/settings/BackendSettings.tsx) | TypeScript JSX | -1,272 | 0 | -70 | -1,342 |
| [src/components/udp2raw/Udp2rawConfig.tsx](/src/components/udp2raw/Udp2rawConfig.tsx) | TypeScript JSX | -369 | 0 | -52 | -421 |
| [src/components/ui/Badge.tsx](/src/components/ui/Badge.tsx) | TypeScript JSX | -38 | 0 | -5 | -43 |
| [src/components/ui/Button.tsx](/src/components/ui/Button.tsx) | TypeScript JSX | -38 | 0 | -7 | -45 |
| [src/components/ui/Card.tsx](/src/components/ui/Card.tsx) | TypeScript JSX | -20 | 0 | -3 | -23 |
| [src/components/ui/Progress.tsx](/src/components/ui/Progress.tsx) | TypeScript JSX | -21 | 0 | -2 | -23 |
| [src/components/ui/Select.tsx](/src/components/ui/Select.tsx) | TypeScript JSX | -71 | 0 | -10 | -81 |
| [src/components/ui/StatusDot.tsx](/src/components/ui/StatusDot.tsx) | TypeScript JSX | -16 | 0 | -1 | -17 |
| [src/main.tsx](/src/main.tsx) | TypeScript JSX | -16 | 0 | -5 | -21 |
| [src/services/activityLogService.ts](/src/services/activityLogService.ts) | TypeScript | -62 | 0 | -14 | -76 |
| [src/services/apiClient.ts](/src/services/apiClient.ts) | TypeScript | -80 | 0 | -13 | -93 |
| [src/services/loginApi.ts](/src/services/loginApi.ts) | TypeScript | -15 | 0 | -2 | -17 |
| [src/services/vpnApi.ts](/src/services/vpnApi.ts) | TypeScript | -27 | 0 | -4 | -31 |
| [src/services/vpsApi.ts](/src/services/vpsApi.ts) | TypeScript | -142 | -2 | -20 | -164 |
| [src/styles/globals.css](/src/styles/globals.css) | PostCSS | -28 | 0 | -5 | -33 |
| [src/types/activity.ts](/src/types/activity.ts) | TypeScript | -20 | 0 | -2 | -22 |
| [src/types/api.ts](/src/types/api.ts) | TypeScript | -46 | 0 | -6 | -52 |
| [src/types/provisioning.ts](/src/types/provisioning.ts) | TypeScript | -24 | 0 | -2 | -26 |
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
@@ -0,0 +1,45 @@
"filename", "language", "JSON", "Rust", "XML", "TypeScript", "PostCSS", "TypeScript JSX", "comment", "blank", "total"
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\build.rs", "Rust", 0, 1, 0, 0, 0, 0, 0, 1, 2
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\capabilities\default.json", "JSON", 11, 0, 0, 0, 0, 0, 0, 0, 11
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\mipmap-anydpi-v26\ic_launcher.xml", "XML", 0, 0, 5, 0, 0, 0, 0, 0, 5
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\values\ic_launcher_background.xml", "XML", 0, 0, 4, 0, 0, 0, 0, 0, 4
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\controllers.rs", "Rust", 0, 127, 0, 0, 0, 0, 0, 20, 147
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\files.rs", "Rust", 0, 12, 0, 0, 0, 0, 0, 0, 12
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\mod.rs", "Rust", 0, 5, 0, 0, 0, 0, 0, 0, 5
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\network.rs", "Rust", 0, 12, 0, 0, 0, 0, 0, 1, 13
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\router.rs", "Rust", 0, 679, 0, 0, 0, 0, 0, 162, 841
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\ssh.rs", "Rust", 0, 179, 0, 0, 0, 0, 0, 32, 211
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\lib.rs", "Rust", 0, 62, 0, 0, 0, 0, 0, 3, 65
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\main.rs", "Rust", 0, 4, 0, 0, 0, 0, 0, 1, 5
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\tauri.conf.json", "JSON", 38, 0, 0, 0, 0, 0, 0, 0, 38
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\App.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -36, 0, -9, -45
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\routes.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -260, 0, -46, -306
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\activity\ActivityLogs.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -288, 0, -51, -339
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\controllers\ControllersRoute.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -1927, 0, -308, -2235
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\IpPoolChart.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -117, 0, -17, -134
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\MetricCard.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -78, 0, -11, -89
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\NetworkTrafficChart.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -217, 0, -35, -252
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\AppShell.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -26, 0, -4, -30
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\Sidebar.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -88, 0, -11, -99
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\TopBar.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -95, 0, -7, -102
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\login\LoginScreen.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -165, 0, -27, -192
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\provisioning\ProvisioningWizard.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -1707, 0, -283, -1990
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\settings\BackendSettings.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -1272, 0, -70, -1342
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\udp2raw\Udp2rawConfig.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -369, 0, -52, -421
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Badge.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -38, 0, -5, -43
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Button.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -38, 0, -7, -45
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Card.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -20, 0, -3, -23
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Progress.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -21, 0, -2, -23
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Select.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -71, 0, -10, -81
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\StatusDot.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -16, 0, -1, -17
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\main.tsx", "TypeScript JSX", 0, 0, 0, 0, 0, -16, 0, -5, -21
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\activityLogService.ts", "TypeScript", 0, 0, 0, -62, 0, 0, 0, -14, -76
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\apiClient.ts", "TypeScript", 0, 0, 0, -80, 0, 0, 0, -13, -93
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\loginApi.ts", "TypeScript", 0, 0, 0, -15, 0, 0, 0, -2, -17
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpnApi.ts", "TypeScript", 0, 0, 0, -27, 0, 0, 0, -4, -31
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpsApi.ts", "TypeScript", 0, 0, 0, -142, 0, 0, -2, -20, -164
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\styles\globals.css", "PostCSS", 0, 0, 0, 0, -28, 0, 0, -5, -33
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\activity.ts", "TypeScript", 0, 0, 0, -20, 0, 0, 0, -2, -22
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\api.ts", "TypeScript", 0, 0, 0, -46, 0, 0, 0, -6, -52
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\provisioning.ts", "TypeScript", 0, 0, 0, -24, 0, 0, 0, -2, -26
"Total", "-", 49, 1081, 9, -416, -28, -6865, -2, -812, -6984
1 filename language JSON Rust XML TypeScript PostCSS TypeScript JSX comment blank total
2 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\build.rs Rust 0 1 0 0 0 0 0 1 2
3 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\capabilities\default.json JSON 11 0 0 0 0 0 0 0 11
4 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\mipmap-anydpi-v26\ic_launcher.xml XML 0 0 5 0 0 0 0 0 5
5 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\values\ic_launcher_background.xml XML 0 0 4 0 0 0 0 0 4
6 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\controllers.rs Rust 0 127 0 0 0 0 0 20 147
7 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\files.rs Rust 0 12 0 0 0 0 0 0 12
8 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\mod.rs Rust 0 5 0 0 0 0 0 0 5
9 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\network.rs Rust 0 12 0 0 0 0 0 1 13
10 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\router.rs Rust 0 679 0 0 0 0 0 162 841
11 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\ssh.rs Rust 0 179 0 0 0 0 0 32 211
12 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\lib.rs Rust 0 62 0 0 0 0 0 3 65
13 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\main.rs Rust 0 4 0 0 0 0 0 1 5
14 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\tauri.conf.json JSON 38 0 0 0 0 0 0 0 38
15 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\App.tsx TypeScript JSX 0 0 0 0 0 -36 0 -9 -45
16 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\routes.tsx TypeScript JSX 0 0 0 0 0 -260 0 -46 -306
17 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\activity\ActivityLogs.tsx TypeScript JSX 0 0 0 0 0 -288 0 -51 -339
18 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\controllers\ControllersRoute.tsx TypeScript JSX 0 0 0 0 0 -1927 0 -308 -2235
19 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\IpPoolChart.tsx TypeScript JSX 0 0 0 0 0 -117 0 -17 -134
20 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\MetricCard.tsx TypeScript JSX 0 0 0 0 0 -78 0 -11 -89
21 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\NetworkTrafficChart.tsx TypeScript JSX 0 0 0 0 0 -217 0 -35 -252
22 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\AppShell.tsx TypeScript JSX 0 0 0 0 0 -26 0 -4 -30
23 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\Sidebar.tsx TypeScript JSX 0 0 0 0 0 -88 0 -11 -99
24 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\TopBar.tsx TypeScript JSX 0 0 0 0 0 -95 0 -7 -102
25 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\login\LoginScreen.tsx TypeScript JSX 0 0 0 0 0 -165 0 -27 -192
26 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\provisioning\ProvisioningWizard.tsx TypeScript JSX 0 0 0 0 0 -1707 0 -283 -1990
27 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\settings\BackendSettings.tsx TypeScript JSX 0 0 0 0 0 -1272 0 -70 -1342
28 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\udp2raw\Udp2rawConfig.tsx TypeScript JSX 0 0 0 0 0 -369 0 -52 -421
29 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Badge.tsx TypeScript JSX 0 0 0 0 0 -38 0 -5 -43
30 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Button.tsx TypeScript JSX 0 0 0 0 0 -38 0 -7 -45
31 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Card.tsx TypeScript JSX 0 0 0 0 0 -20 0 -3 -23
32 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Progress.tsx TypeScript JSX 0 0 0 0 0 -21 0 -2 -23
33 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Select.tsx TypeScript JSX 0 0 0 0 0 -71 0 -10 -81
34 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\StatusDot.tsx TypeScript JSX 0 0 0 0 0 -16 0 -1 -17
35 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\main.tsx TypeScript JSX 0 0 0 0 0 -16 0 -5 -21
36 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\activityLogService.ts TypeScript 0 0 0 -62 0 0 0 -14 -76
37 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\apiClient.ts TypeScript 0 0 0 -80 0 0 0 -13 -93
38 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\loginApi.ts TypeScript 0 0 0 -15 0 0 0 -2 -17
39 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpnApi.ts TypeScript 0 0 0 -27 0 0 0 -4 -31
40 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpsApi.ts TypeScript 0 0 0 -142 0 0 -2 -20 -164
41 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\styles\globals.css PostCSS 0 0 0 0 -28 0 0 -5 -33
42 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\activity.ts TypeScript 0 0 0 -20 0 0 0 -2 -22
43 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\api.ts TypeScript 0 0 0 -46 0 0 0 -6 -52
44 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\provisioning.ts TypeScript 0 0 0 -24 0 0 0 -2 -26
45 Total - 49 1081 9 -416 -28 -6865 -2 -812 -6984
@@ -0,0 +1,52 @@
# Diff Summary
Date : 2026-05-18 12:12:03
Directory c:\\Users\\User\\Desktop\\Projetos\\Deployed\\LR OpenWRT Tool\\Frontend\\lr-openwrt-tool\\src-tauri
Total : 43 files, -6170 codes, -2 comments, -812 blanks, all -6984 lines
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| Rust | 9 | 1,081 | 0 | 220 | 1,301 |
| JSON | 2 | 49 | 0 | 0 | 49 |
| XML | 2 | 9 | 0 | 0 | 9 |
| PostCSS | 1 | -28 | 0 | -5 | -33 |
| TypeScript | 8 | -416 | -2 | -63 | -481 |
| TypeScript JSX | 21 | -6,865 | 0 | -964 | -7,829 |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| . | 43 | -6,170 | -2 | -812 | -6,984 |
| . (Files) | 2 | 39 | 0 | 1 | 40 |
| .. | 30 | -7,309 | -2 | -1,032 | -8,343 |
| ..\\src | 30 | -7,309 | -2 | -1,032 | -8,343 |
| ..\\src (Files) | 1 | -16 | 0 | -5 | -21 |
| ..\\src\\app | 2 | -296 | 0 | -55 | -351 |
| ..\\src\\components | 18 | -6,553 | 0 | -904 | -7,457 |
| ..\\src\\components\\activity | 1 | -288 | 0 | -51 | -339 |
| ..\\src\\components\\controllers | 1 | -1,927 | 0 | -308 | -2,235 |
| ..\\src\\components\\dashboard | 3 | -412 | 0 | -63 | -475 |
| ..\\src\\components\\layout | 3 | -209 | 0 | -22 | -231 |
| ..\\src\\components\\login | 1 | -165 | 0 | -27 | -192 |
| ..\\src\\components\\provisioning | 1 | -1,707 | 0 | -283 | -1,990 |
| ..\\src\\components\\settings | 1 | -1,272 | 0 | -70 | -1,342 |
| ..\\src\\components\\udp2raw | 1 | -369 | 0 | -52 | -421 |
| ..\\src\\components\\ui | 6 | -204 | 0 | -28 | -232 |
| ..\\src\\services | 5 | -326 | -2 | -53 | -381 |
| ..\\src\\styles | 1 | -28 | 0 | -5 | -33 |
| ..\\src\\types | 3 | -90 | 0 | -10 | -100 |
| capabilities | 1 | 11 | 0 | 0 | 11 |
| icons | 2 | 9 | 0 | 0 | 9 |
| icons\\android | 2 | 9 | 0 | 0 | 9 |
| icons\\android\\mipmap-anydpi-v26 | 1 | 5 | 0 | 0 | 5 |
| icons\\android\\values | 1 | 4 | 0 | 0 | 4 |
| src | 8 | 1,080 | 0 | 219 | 1,299 |
| src (Files) | 2 | 66 | 0 | 4 | 70 |
| src\\commands | 6 | 1,014 | 0 | 215 | 1,229 |
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
@@ -0,0 +1,98 @@
Date : 2026-05-18 12:12:03
Directory : c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri
Total : 43 files, -6170 codes, -2 comments, -812 blanks, all -6984 lines
Languages
+----------------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------------+------------+------------+------------+------------+------------+
| Rust | 9 | 1,081 | 0 | 220 | 1,301 |
| JSON | 2 | 49 | 0 | 0 | 49 |
| XML | 2 | 9 | 0 | 0 | 9 |
| PostCSS | 1 | -28 | 0 | -5 | -33 |
| TypeScript | 8 | -416 | -2 | -63 | -481 |
| TypeScript JSX | 21 | -6,865 | 0 | -964 | -7,829 |
+----------------+------------+------------+------------+------------+------------+
Directories
+--------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+--------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| . | 43 | -6,170 | -2 | -812 | -6,984 |
| . (Files) | 2 | 39 | 0 | 1 | 40 |
| .. | 30 | -7,309 | -2 | -1,032 | -8,343 |
| ..\src | 30 | -7,309 | -2 | -1,032 | -8,343 |
| ..\src (Files) | 1 | -16 | 0 | -5 | -21 |
| ..\src\app | 2 | -296 | 0 | -55 | -351 |
| ..\src\components | 18 | -6,553 | 0 | -904 | -7,457 |
| ..\src\components\activity | 1 | -288 | 0 | -51 | -339 |
| ..\src\components\controllers | 1 | -1,927 | 0 | -308 | -2,235 |
| ..\src\components\dashboard | 3 | -412 | 0 | -63 | -475 |
| ..\src\components\layout | 3 | -209 | 0 | -22 | -231 |
| ..\src\components\login | 1 | -165 | 0 | -27 | -192 |
| ..\src\components\provisioning | 1 | -1,707 | 0 | -283 | -1,990 |
| ..\src\components\settings | 1 | -1,272 | 0 | -70 | -1,342 |
| ..\src\components\udp2raw | 1 | -369 | 0 | -52 | -421 |
| ..\src\components\ui | 6 | -204 | 0 | -28 | -232 |
| ..\src\services | 5 | -326 | -2 | -53 | -381 |
| ..\src\styles | 1 | -28 | 0 | -5 | -33 |
| ..\src\types | 3 | -90 | 0 | -10 | -100 |
| capabilities | 1 | 11 | 0 | 0 | 11 |
| icons | 2 | 9 | 0 | 0 | 9 |
| icons\android | 2 | 9 | 0 | 0 | 9 |
| icons\android\mipmap-anydpi-v26 | 1 | 5 | 0 | 0 | 5 |
| icons\android\values | 1 | 4 | 0 | 0 | 4 |
| src | 8 | 1,080 | 0 | 219 | 1,299 |
| src (Files) | 2 | 66 | 0 | 4 | 70 |
| src\commands | 6 | 1,014 | 0 | 215 | 1,229 |
+--------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
Files
+--------------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+--------------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\build.rs | Rust | 1 | 0 | 1 | 2 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\capabilities\default.json | JSON | 11 | 0 | 0 | 11 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\mipmap-anydpi-v26\ic_launcher.xml | XML | 5 | 0 | 0 | 5 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\values\ic_launcher_background.xml | XML | 4 | 0 | 0 | 4 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\controllers.rs | Rust | 127 | 0 | 20 | 147 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\files.rs | Rust | 12 | 0 | 0 | 12 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\mod.rs | Rust | 5 | 0 | 0 | 5 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\network.rs | Rust | 12 | 0 | 1 | 13 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\router.rs | Rust | 679 | 0 | 162 | 841 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\ssh.rs | Rust | 179 | 0 | 32 | 211 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\lib.rs | Rust | 62 | 0 | 3 | 65 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\main.rs | Rust | 4 | 0 | 1 | 5 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\tauri.conf.json | JSON | 38 | 0 | 0 | 38 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\App.tsx | TypeScript JSX | -36 | 0 | -9 | -45 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\app\routes.tsx | TypeScript JSX | -260 | 0 | -46 | -306 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\activity\ActivityLogs.tsx | TypeScript JSX | -288 | 0 | -51 | -339 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\controllers\ControllersRoute.tsx | TypeScript JSX | -1,927 | 0 | -308 | -2,235 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\IpPoolChart.tsx | TypeScript JSX | -117 | 0 | -17 | -134 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\MetricCard.tsx | TypeScript JSX | -78 | 0 | -11 | -89 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\dashboard\NetworkTrafficChart.tsx | TypeScript JSX | -217 | 0 | -35 | -252 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\AppShell.tsx | TypeScript JSX | -26 | 0 | -4 | -30 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\Sidebar.tsx | TypeScript JSX | -88 | 0 | -11 | -99 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\layout\TopBar.tsx | TypeScript JSX | -95 | 0 | -7 | -102 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\login\LoginScreen.tsx | TypeScript JSX | -165 | 0 | -27 | -192 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\provisioning\ProvisioningWizard.tsx | TypeScript JSX | -1,707 | 0 | -283 | -1,990 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\settings\BackendSettings.tsx | TypeScript JSX | -1,272 | 0 | -70 | -1,342 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\udp2raw\Udp2rawConfig.tsx | TypeScript JSX | -369 | 0 | -52 | -421 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Badge.tsx | TypeScript JSX | -38 | 0 | -5 | -43 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Button.tsx | TypeScript JSX | -38 | 0 | -7 | -45 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Card.tsx | TypeScript JSX | -20 | 0 | -3 | -23 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Progress.tsx | TypeScript JSX | -21 | 0 | -2 | -23 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\Select.tsx | TypeScript JSX | -71 | 0 | -10 | -81 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\components\ui\StatusDot.tsx | TypeScript JSX | -16 | 0 | -1 | -17 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\main.tsx | TypeScript JSX | -16 | 0 | -5 | -21 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\activityLogService.ts | TypeScript | -62 | 0 | -14 | -76 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\apiClient.ts | TypeScript | -80 | 0 | -13 | -93 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\loginApi.ts | TypeScript | -15 | 0 | -2 | -17 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpnApi.ts | TypeScript | -27 | 0 | -4 | -31 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\services\vpsApi.ts | TypeScript | -142 | -2 | -20 | -164 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\styles\globals.css | PostCSS | -28 | 0 | -5 | -33 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\activity.ts | TypeScript | -20 | 0 | -2 | -22 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\api.ts | TypeScript | -46 | 0 | -6 | -52 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src\types\provisioning.ts | TypeScript | -24 | 0 | -2 | -26 |
| Total | | -6,170 | -2 | -812 | -6,984 |
+--------------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
@@ -0,0 +1,15 @@
"filename", "language", "JSON", "Rust", "XML", "comment", "blank", "total"
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\build.rs", "Rust", 0, 1, 0, 0, 1, 2
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\capabilities\default.json", "JSON", 11, 0, 0, 0, 0, 11
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\mipmap-anydpi-v26\ic_launcher.xml", "XML", 0, 0, 5, 0, 0, 5
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\values\ic_launcher_background.xml", "XML", 0, 0, 4, 0, 0, 4
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\controllers.rs", "Rust", 0, 127, 0, 0, 20, 147
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\files.rs", "Rust", 0, 12, 0, 0, 0, 12
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\mod.rs", "Rust", 0, 5, 0, 0, 0, 5
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\network.rs", "Rust", 0, 12, 0, 0, 1, 13
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\router.rs", "Rust", 0, 679, 0, 0, 162, 841
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\ssh.rs", "Rust", 0, 179, 0, 0, 32, 211
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\lib.rs", "Rust", 0, 62, 0, 0, 3, 65
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\main.rs", "Rust", 0, 4, 0, 0, 1, 5
"c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\tauri.conf.json", "JSON", 38, 0, 0, 0, 0, 38
"Total", "-", 49, 1081, 9, 0, 220, 1359
1 filename language JSON Rust XML comment blank total
2 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\build.rs Rust 0 1 0 0 1 2
3 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\capabilities\default.json JSON 11 0 0 0 0 11
4 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\mipmap-anydpi-v26\ic_launcher.xml XML 0 0 5 0 0 5
5 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\values\ic_launcher_background.xml XML 0 0 4 0 0 4
6 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\controllers.rs Rust 0 127 0 0 20 147
7 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\files.rs Rust 0 12 0 0 0 12
8 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\mod.rs Rust 0 5 0 0 0 5
9 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\network.rs Rust 0 12 0 0 1 13
10 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\router.rs Rust 0 679 0 0 162 841
11 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\ssh.rs Rust 0 179 0 0 32 211
12 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\lib.rs Rust 0 62 0 0 3 65
13 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\main.rs Rust 0 4 0 0 1 5
14 c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\tauri.conf.json JSON 38 0 0 0 0 38
15 Total - 49 1081 9 0 220 1359
@@ -0,0 +1 @@
{"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/tauri.conf.json":{"language":"JSON","code":38,"comment":0,"blank":0},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/src/main.rs":{"language":"Rust","code":4,"comment":0,"blank":1},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/src/commands/ssh.rs":{"language":"Rust","code":179,"comment":0,"blank":32},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/src/commands/network.rs":{"language":"Rust","code":12,"comment":0,"blank":1},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/src/commands/mod.rs":{"language":"Rust","code":5,"comment":0,"blank":0},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/src/lib.rs":{"language":"Rust","code":62,"comment":0,"blank":3},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/src/commands/files.rs":{"language":"Rust","code":12,"comment":0,"blank":0},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/src/commands/router.rs":{"language":"Rust","code":679,"comment":0,"blank":162},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/icons/android/values/ic_launcher_background.xml":{"language":"XML","code":4,"comment":0,"blank":0},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/src/commands/controllers.rs":{"language":"Rust","code":127,"comment":0,"blank":20},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/capabilities/default.json":{"language":"JSON","code":11,"comment":0,"blank":0},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/build.rs":{"language":"Rust","code":1,"comment":0,"blank":1},"file:///c%3A/Users/User/Desktop/Projetos/Deployed/LR%20OpenWRT%20Tool/Frontend/lr-openwrt-tool/src-tauri/icons/android/mipmap-anydpi-v26/ic_launcher.xml":{"language":"XML","code":5,"comment":0,"blank":0}}
@@ -0,0 +1,32 @@
# Summary
Date : 2026-05-18 12:12:03
Directory c:\\Users\\User\\Desktop\\Projetos\\Deployed\\LR OpenWRT Tool\\Frontend\\lr-openwrt-tool\\src-tauri
Total : 13 files, 1139 codes, 0 comments, 220 blanks, all 1359 lines
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| Rust | 9 | 1,081 | 0 | 220 | 1,301 |
| JSON | 2 | 49 | 0 | 0 | 49 |
| XML | 2 | 9 | 0 | 0 | 9 |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| . | 13 | 1,139 | 0 | 220 | 1,359 |
| . (Files) | 2 | 39 | 0 | 1 | 40 |
| capabilities | 1 | 11 | 0 | 0 | 11 |
| icons | 2 | 9 | 0 | 0 | 9 |
| icons\\android | 2 | 9 | 0 | 0 | 9 |
| icons\\android\\mipmap-anydpi-v26 | 1 | 5 | 0 | 0 | 5 |
| icons\\android\\values | 1 | 4 | 0 | 0 | 4 |
| src | 8 | 1,080 | 0 | 219 | 1,299 |
| src (Files) | 2 | 66 | 0 | 4 | 70 |
| src\\commands | 6 | 1,014 | 0 | 215 | 1,229 |
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
@@ -0,0 +1,48 @@
Date : 2026-05-18 12:12:03
Directory : c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri
Total : 13 files, 1139 codes, 0 comments, 220 blanks, all 1359 lines
Languages
+----------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------+------------+------------+------------+------------+------------+
| Rust | 9 | 1,081 | 0 | 220 | 1,301 |
| JSON | 2 | 49 | 0 | 0 | 49 |
| XML | 2 | 9 | 0 | 0 | 9 |
+----------+------------+------------+------------+------------+------------+
Directories
+--------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+--------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| . | 13 | 1,139 | 0 | 220 | 1,359 |
| . (Files) | 2 | 39 | 0 | 1 | 40 |
| capabilities | 1 | 11 | 0 | 0 | 11 |
| icons | 2 | 9 | 0 | 0 | 9 |
| icons\android | 2 | 9 | 0 | 0 | 9 |
| icons\android\mipmap-anydpi-v26 | 1 | 5 | 0 | 0 | 5 |
| icons\android\values | 1 | 4 | 0 | 0 | 4 |
| src | 8 | 1,080 | 0 | 219 | 1,299 |
| src (Files) | 2 | 66 | 0 | 4 | 70 |
| src\commands | 6 | 1,014 | 0 | 215 | 1,229 |
+--------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
Files
+--------------------------------------------------------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+--------------------------------------------------------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\build.rs | Rust | 1 | 0 | 1 | 2 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\capabilities\default.json | JSON | 11 | 0 | 0 | 11 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\mipmap-anydpi-v26\ic_launcher.xml | XML | 5 | 0 | 0 | 5 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\icons\android\values\ic_launcher_background.xml | XML | 4 | 0 | 0 | 4 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\controllers.rs | Rust | 127 | 0 | 20 | 147 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\files.rs | Rust | 12 | 0 | 0 | 12 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\mod.rs | Rust | 5 | 0 | 0 | 5 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\network.rs | Rust | 12 | 0 | 1 | 13 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\router.rs | Rust | 679 | 0 | 162 | 841 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\commands\ssh.rs | Rust | 179 | 0 | 32 | 211 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\lib.rs | Rust | 62 | 0 | 3 | 65 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\src\main.rs | Rust | 4 | 0 | 1 | 5 |
| c:\Users\User\Desktop\Projetos\Deployed\LR OpenWRT Tool\Frontend\lr-openwrt-tool\src-tauri\tauri.conf.json | JSON | 38 | 0 | 0 | 38 |
| Total | | 1,139 | 0 | 220 | 1,359 |
+--------------------------------------------------------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
+147
View File
@@ -0,0 +1,147 @@
use ssh2::Session;
use std::{
io::Read,
net::{TcpStream, ToSocketAddrs},
time::Duration,
};
fn run_vps_command(
password: &str,
command: &str,
) -> Result<String, String> {
let address = "146.59.230.190:22";
let socket_address = address
.to_socket_addrs()
.map_err(|error| {
format!(
"failed to resolve VPS address: {}",
error
)
})?
.next()
.ok_or_else(|| {
format!(
"failed to resolve VPS address {}",
address
)
})?;
let tcp = TcpStream::connect_timeout(
&socket_address,
Duration::from_secs(8),
)
.map_err(|error| {
format!(
"failed to connect to VPS SSH: {}",
error
)
})?;
let _ = tcp.set_read_timeout(Some(
Duration::from_secs(30),
));
let _ = tcp.set_write_timeout(Some(
Duration::from_secs(30),
));
let mut session = Session::new()
.map_err(|error| {
format!(
"failed to create VPS SSH session: {}",
error
)
})?;
session.set_tcp_stream(tcp);
session.handshake().map_err(|error| {
format!(
"VPS SSH handshake failed: {}",
error
)
})?;
session
.userauth_password("lr-vpn", password)
.map_err(|error| {
format!(
"VPS SSH authentication failed: {}",
error
)
})?;
if !session.authenticated() {
return Err(
"VPS SSH authentication failed"
.into(),
);
}
let mut channel = session
.channel_session()
.map_err(|error| {
format!(
"failed to open VPS SSH channel: {}",
error
)
})?;
channel
.exec(command)
.map_err(|error| {
format!(
"failed to execute VPS command: {}",
error
)
})?;
let mut stdout = String::new();
channel
.read_to_string(&mut stdout)
.map_err(|error| {
format!(
"failed to read VPS command output: {}",
error
)
})?;
channel.wait_close().ok();
let exit_status = channel
.exit_status()
.map_err(|error| {
format!(
"failed to read VPS command exit status: {}",
error
)
})?;
if exit_status != 0 {
return Err(format!(
"VPS command failed with exit code {}:\n{}",
exit_status,
stdout
));
}
Ok(stdout)
}
#[tauri::command]
pub async fn list_controller_clients(
password: String,
) -> Result<String, String> {
if password.trim().is_empty() {
return Err(
"VPS password is required".into(),
);
}
run_vps_command(
&password,
"sudo /usr/local/sbin/lr-controllers-list",
)
}
+1
View File
@@ -2,3 +2,4 @@ pub mod files;
pub mod network; pub mod network;
pub mod router; pub mod router;
pub mod ssh; pub mod ssh;
pub mod controllers;
File diff suppressed because it is too large Load Diff
+64 -13
View File
@@ -49,6 +49,13 @@ pub async fn probe_router_ssh(
"ConnectTimeout=5", "ConnectTimeout=5",
"-o", "-o",
"StrictHostKeyChecking=accept-new", "StrictHostKeyChecking=accept-new",
// Legacy OpenWrt/Dropbear routers that only offer ssh-rsa.
"-o",
"HostKeyAlgorithms=+ssh-rsa",
"-o",
"PubkeyAcceptedAlgorithms=+ssh-rsa",
&format!("root@{}", ip), &format!("root@{}", ip),
"ubus call system board", "ubus call system board",
]) ])
@@ -97,6 +104,44 @@ pub async fn probe_router_ssh(
)) ))
} }
fn system_ssh_probe(ip: &str, command: &str) -> Result<String, String> {
let output = Command::new("ssh")
.args([
"-o",
"BatchMode=yes",
"-o",
"ConnectTimeout=5",
"-o",
"StrictHostKeyChecking=accept-new",
"-o",
"HostKeyAlgorithms=+ssh-rsa",
"-o",
"PubkeyAcceptedAlgorithms=+ssh-rsa",
&format!("root@{}", ip),
command,
])
.output()
.map_err(|error| format!("failed to run ssh command: {}", error))?;
let stdout = String::from_utf8_lossy(&output.stdout).to_string();
let stderr = String::from_utf8_lossy(&output.stderr).to_string();
if output.status.success() {
Ok(stdout)
} else {
Err(format!("SSH_FAILED: {}\n{}", stderr, stdout))
}
}
fn is_ssh_auth_failure(error: &str) -> bool {
let lowered = error.to_lowercase();
lowered.contains("permission denied")
|| lowered.contains("publickey,password")
|| lowered.contains("authentication failed")
}
use ssh2::Session; use ssh2::Session;
use std::{ use std::{
io::Read, io::Read,
@@ -158,20 +203,26 @@ pub async fn inspect_router_with_password(
format!("SSH handshake failed for {}: {}", ip, error) format!("SSH handshake failed for {}: {}", ip, error)
})?; })?;
session let auth_result = session.userauth_password("root", &password);
.userauth_password("root", &password)
.map_err(|error| {
format!(
"SSH authentication failed for root@{}: {}",
ip, error
)
})?;
if !session.authenticated() { if auth_result.is_err() || !session.authenticated() {
return Err(format!( let error = auth_result
"SSH authentication failed for root@{}", .err()
ip .map(|error| error.to_string())
)); .unwrap_or_else(|| format!("SSH authentication failed for root@{}", ip));
// If password auth fails but the local OpenSSH agent has a working key,
// still allow detection to succeed. This handles Windows/libssh2 agent gaps.
return system_ssh_probe(&ip, "ubus call system board").map_err(|system_error| {
if is_ssh_auth_failure(&system_error) {
format!(
"SSH authentication failed for root@{}: {}; system ssh fallback also failed: {}",
ip, error, system_error
)
} else {
system_error
}
});
} }
let mut channel = session.channel_session().map_err(|error| { let mut channel = session.channel_session().map_err(|error| {
+3 -1
View File
@@ -23,6 +23,7 @@ use commands::{
upload_udp2raw_binary upload_udp2raw_binary
}, },
ssh::{ inspect_router_with_password, probe_router_ssh, remove_known_host }, ssh::{ inspect_router_with_password, probe_router_ssh, remove_known_host },
controllers::{ list_controller_clients}
}; };
#[cfg_attr(mobile, tauri::mobile_entry_point)] #[cfg_attr(mobile, tauri::mobile_entry_point)]
@@ -54,7 +55,8 @@ pub fn run() {
run_udp2raw_setup, run_udp2raw_setup,
test_udp2raw_tunnel, test_udp2raw_tunnel,
check_udp2raw_router_status, check_udp2raw_router_status,
upload_udp2raw_binary upload_udp2raw_binary,
list_controller_clients
] ]
) )
.run(tauri::generate_context!()) .run(tauri::generate_context!())
+3
View File
@@ -30,6 +30,9 @@
"targets": "all", "targets": "all",
"icon": [ "icon": [
"icons/icon.ico" "icons/icon.ico"
],
"resources": [
"resources/**/*"
] ]
} }
} }
+5
View File
@@ -18,6 +18,7 @@ import { BackendSettings } from '@/components/settings/BackendSettings';
import { ActivityLogs } from '@/components/activity/ActivityLogs'; import { ActivityLogs } from '@/components/activity/ActivityLogs';
import { Card } from '@/components/ui/Card'; import { Card } from '@/components/ui/Card';
import { Udp2rawConfig } from '@/components/udp2raw/Udp2rawConfig'; import { Udp2rawConfig } from '@/components/udp2raw/Udp2rawConfig';
import { ControllersRoute } from '@/components/controllers/ControllersRoute';
import { vpnApi } from '@/services/vpnApi'; import { vpnApi } from '@/services/vpnApi';
import { vpsApi } from '@/services/vpsApi'; import { vpsApi } from '@/services/vpsApi';
@@ -281,6 +282,10 @@ export function RouteView({
return <DashboardRoute />; return <DashboardRoute />;
} }
if (active === 'Controladores') {
return <ControllersRoute />;
}
if (active === 'Provisionamento') { if (active === 'Provisionamento') {
return <ProvisioningWizard />; return <ProvisioningWizard />;
} }
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -8,6 +8,9 @@ type AppShellProps = PropsWithChildren<{
onLogout: () => void; onLogout: () => void;
}>; }>;
const scrollClass =
'[scrollbar-width:thin] [scrollbar-color:rgba(59,130,246,0.55)_transparent] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-blue-500/45 hover:[&::-webkit-scrollbar-thumb]:bg-blue-500/65';
export function AppShell({ export function AppShell({
active, active,
onSelect, onSelect,
@@ -22,7 +25,7 @@ export function AppShell({
onLogout={onLogout} onLogout={onLogout}
/> />
<main className="min-w-0 flex-1 overflow-auto p-4"> <main className={`min-w-0 flex-1 overflow-auto p-4 ${scrollClass}`}>
{children} {children}
</main> </main>
</div> </div>
+6 -6
View File
@@ -5,12 +5,14 @@ import {
RadioTower, RadioTower,
Settings, Settings,
Wrench, Wrench,
Router
} from 'lucide-react'; } from 'lucide-react';
import logoIcon from '@/assets/logo-icon.png'; import logoIcon from '@/assets/logo-icon.png';
const items = [ const items = [
['Painel', Gauge], ['Painel', Gauge],
['Controladores', Router],
['Configuração UDP2RAW', RadioTower], ['Configuração UDP2RAW', RadioTower],
['Provisionamento', Wrench], ['Provisionamento', Wrench],
['Registos de Atividade', FileClock], ['Registos de Atividade', FileClock],
@@ -57,18 +59,16 @@ export function Sidebar({
key={label} key={label}
type="button" type="button"
onClick={() => onSelect(label)} onClick={() => onSelect(label)}
className={`group flex w-full items-center gap-3 rounded-2xl px-4 py-3 text-left text-sm font-semibold transition-all duration-200 ${ className={`group flex w-full items-center gap-3 rounded-2xl px-4 py-3 text-left text-sm font-semibold transition-all duration-200 ${isActive
isActive
? 'border border-blue-500/20 bg-blue-500/15 text-white shadow-[0_0_25px_rgba(59,130,246,0.12)]' ? 'border border-blue-500/20 bg-blue-500/15 text-white shadow-[0_0_25px_rgba(59,130,246,0.12)]'
: 'border border-transparent text-slate-300 hover:border-white/5 hover:bg-white/[0.035] hover:text-white' : 'border border-transparent text-slate-300 hover:border-white/5 hover:bg-white/[0.035] hover:text-white'
}`} }`}
> >
<div <div
className={`rounded-xl p-2 transition ${ className={`rounded-xl p-2 transition ${isActive
isActive
? 'bg-blue-500/10 text-blue-300' ? 'bg-blue-500/10 text-blue-300'
: 'bg-white/[0.03] text-slate-400 group-hover:text-slate-200' : 'bg-white/[0.03] text-slate-400 group-hover:text-slate-200'
}`} }`}
> >
<Icon size={17} /> <Icon size={17} />
</div> </div>
@@ -92,55 +92,55 @@ const workflowSteps: Array<{
description: string; description: string;
icon: typeof Search; icon: typeof Search;
}> = [ }> = [
{ {
id: 'DETECT_ROUTER', id: 'DETECT_ROUTER',
title: 'Detetar Router', title: 'Detetar Router',
description: 'Ping e inspeção do router via SSH.', description: 'Ping e inspeção do router via SSH.',
icon: Search, icon: Search,
}, },
{ {
id: 'UPLOAD_FIRMWARE', id: 'UPLOAD_FIRMWARE',
title: 'Enviar Firmware', title: 'Enviar Firmware',
description: 'Copiar imagem de firmware para /tmp.', description: 'Copiar imagem de firmware para /tmp.',
icon: UploadCloud, icon: UploadCloud,
}, },
{ {
id: 'FLASH_FIRMWARE', id: 'FLASH_FIRMWARE',
title: 'Gravar Firmware', title: 'Gravar Firmware',
description: 'Executar sysupgrade -n /tmp/firmware.bin.', description: 'Executar sysupgrade -n /tmp/firmware.bin.',
icon: Cpu, icon: Cpu,
}, },
{ {
id: 'WAIT_REBOOT', id: 'WAIT_REBOOT',
title: 'Aguardar Reinício', title: 'Aguardar Reinício',
description: 'Bloquear ações enquanto o router reinicia.', description: 'Bloquear ações enquanto o router reinicia.',
icon: RefreshCw, icon: RefreshCw,
}, },
{ {
id: 'RECONNECT_ROUTER', id: 'RECONNECT_ROUTER',
title: 'Reconectar Router', title: 'Reconectar Router',
description: 'Reconectar Ethernet e aguardar SSH.', description: 'Reconectar Ethernet e aguardar SSH.',
icon: PlugZap, icon: PlugZap,
}, },
{ {
id: 'UPLOAD_PROVISIONING', id: 'UPLOAD_PROVISIONING',
title: 'Enviar Pacote', title: 'Enviar Pacote',
description: 'Copiar router.env e provision.sh.', description: 'Copiar router.env e provision.sh.',
icon: FileUp, icon: FileUp,
}, },
{ {
id: 'RUN_PROVISIONING', id: 'RUN_PROVISIONING',
title: 'Executar Provisionamento', title: 'Executar Provisionamento',
description: 'Executar script de configuração no router.', description: 'Executar script de configuração no router.',
icon: Terminal, icon: Terminal,
}, },
{ {
id: 'REGISTER_PEER', id: 'REGISTER_PEER',
title: 'Registar Peer VPS', title: 'Registar Peer VPS',
description: 'Aplicar peer WireGuard na VPS.', description: 'Aplicar peer WireGuard na VPS.',
icon: Network, icon: Network,
}, },
]; ];
const scrollClass = const scrollClass =
'[scrollbar-width:thin] [scrollbar-color:rgba(59,130,246,0.45)_transparent] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-blue-500/30 hover:[&::-webkit-scrollbar-thumb]:bg-blue-500/50'; '[scrollbar-width:thin] [scrollbar-color:rgba(59,130,246,0.45)_transparent] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-blue-500/30 hover:[&::-webkit-scrollbar-thumb]:bg-blue-500/50';
@@ -291,11 +291,7 @@ export function ProvisioningWizard() {
const [setupCompleteOpen, setSetupCompleteOpen] = const [setupCompleteOpen, setSetupCompleteOpen] =
useState(false); useState(false);
const effectivePassword = const effectivePassword = customPassword.trim() || routerPassword;
customIp.trim() &&
selectedIp === customIp.trim()
? customPassword
: routerPassword;
const provisioningStarted = const provisioningStarted =
activeStep !== 'DETECT_ROUTER' || activeStep !== 'DETECT_ROUTER' ||
@@ -598,6 +594,17 @@ export function ProvisioningWizard() {
'AUTH_REQUIRED', 'AUTH_REQUIRED',
) )
) { ) {
if (!effectivePassword.trim()) {
setStatus('auth_required');
addLog(
'O router requer palavra-passe SSH. Introduza a palavra-passe no campo "Acesso Personalizado ao Router" e volte a detetar.',
'warning',
);
return;
}
addLog( addLog(
'O router requer autenticação por palavra-passe. A tentar inspeção automática...', 'O router requer autenticação por palavra-passe. A tentar inspeção automática...',
'warning', 'warning',
@@ -798,11 +805,30 @@ export function ProvisioningWizard() {
return; return;
} catch (error) { } catch (error) {
const message = String(error);
const lowered = message.toLowerCase();
addLog( addLog(
`Tentativa de reconexão ${attempt}/30 falhou: ${String(error)}`, `Tentativa de reconexão ${attempt}/30 falhou: ${message}`,
'warning', 'warning',
); );
if (
lowered.includes('auth_required') ||
lowered.includes('permission denied') ||
lowered.includes('publickey,password')
) {
setStatus('auth_required');
setIsReconnecting(false);
addLog(
'O router está acessível por SSH, mas requer palavra-passe. Introduza a palavra-passe e carregue em Continuar novamente.',
'error',
);
return;
}
await new Promise((resolve) => await new Promise((resolve) =>
window.setTimeout(resolve, 5000), window.setTimeout(resolve, 5000),
); );
@@ -1002,28 +1028,57 @@ export function ProvisioningWizard() {
flashCompletionHandledRef.current = false; flashCompletionHandledRef.current = false;
setFlashSecondsRemaining(FLASH_SECONDS);
setFlashOverlayOpen(true);
addLog( addLog(
'A iniciar gravação do firmware com sysupgrade -n /tmp/firmware.bin', 'A iniciar gravação do firmware com sysupgrade -F -n /tmp/firmware.bin',
'warning', 'warning',
); );
try { try {
await invoke<string>( await invoke<string>('flash_router_sysupgrade', {
'flash_router_sysupgrade', ip: selectedIp,
{ password: effectivePassword,
ip: selectedIp, });
password: effectivePassword,
},
);
addLog( addLog(
'Comando de flash submetido. A sessão SSH pode desligar; a entrar na janela de espera protegida.', 'Comando de flash submetido. A sessão SSH pode desligar; a janela de espera protegida já está ativa.',
'success', 'success',
); );
} catch (error) { } catch (error) {
const message = String(error); const message = String(error);
const loweredMessage = message.toLowerCase(); const loweredMessage = message.toLowerCase();
if (
loweredMessage.includes('auth_required') ||
loweredMessage.includes('permission denied') ||
loweredMessage.includes('publickey,password')
) {
setFlashOverlayOpen(false);
setStatus('auth_required');
addLog(`Flash não iniciado: ${message}`, 'error');
return;
}
if (
loweredMessage.includes('device') &&
loweredMessage.includes('not supported') &&
loweredMessage.includes('image')
) {
setFlashOverlayOpen(false);
setStatus('failed');
addLog(
`Flash bloqueado por incompatibilidade de imagem: ${message}`,
'error',
);
return;
}
if ( if (
loweredMessage.includes('broken pipe') || loweredMessage.includes('broken pipe') ||
loweredMessage.includes('connection reset') || loweredMessage.includes('connection reset') ||
@@ -1038,35 +1093,61 @@ export function ProvisioningWizard() {
'O router aceitou o sysupgrade e desligou-se como esperado durante o flash.', 'O router aceitou o sysupgrade e desligou-se como esperado durante o flash.',
'warning', 'warning',
); );
} else {
setStatus('failed');
addLog(
`Falha no comando de flash antes do reinício: ${message}`,
'error',
);
return; return;
} }
}
setFlashSecondsRemaining(FLASH_SECONDS); setFlashOverlayOpen(false);
setFlashOverlayOpen(true); setStatus('failed');
addLog(
`Falha no comando de flash antes do reinício: ${message}`,
'error',
);
}
} }
async function prepareRouterEnv() { async function prepareRouterEnv() {
const timeoutMs = 15000;
try { try {
addLog( addLog(
'A pedir ao backend o próximo IP WireGuard disponível...', 'A pedir ao backend o próximo IP WireGuard disponível...',
); );
const response = await vpnApi.availableIp(); const timeoutPromise = new Promise<never>((_, reject) => {
window.setTimeout(() => {
reject(
new Error(
`TIMEOUT: o backend não respondeu ao pedido de próximo IP WireGuard em ${timeoutMs / 1000}s`,
),
);
}, timeoutMs);
});
const response = await Promise.race([
vpnApi.availableIp(),
timeoutPromise,
]);
const vpnIp = response.vpnIp; const vpnIp = response.vpnIp;
if (!vpnIp || typeof vpnIp !== 'string') {
throw new Error(
`Resposta inválida do backend ao pedir IP WireGuard: ${JSON.stringify(response)}`,
);
}
const vpnParts = vpnIp.split('.'); const vpnParts = vpnIp.split('.');
const routerId = const routerId =
vpnParts[vpnParts.length - 1] || ''; vpnParts[vpnParts.length - 1] || '';
if (!routerId) {
throw new Error(
`IP WireGuard inválido recebido do backend: ${vpnIp}`,
);
}
setRouterEnv((current) => ({ setRouterEnv((current) => ({
...current, ...current,
routerId, routerId,
@@ -1081,6 +1162,8 @@ export function ProvisioningWizard() {
setEnvModalOpen(true); setEnvModalOpen(true);
} catch (error) { } catch (error) {
setEnvModalOpen(false);
addLog( addLog(
`Falha ao obter IP WireGuard disponível: ${String(error)}`, `Falha ao obter IP WireGuard disponível: ${String(error)}`,
'error', 'error',
@@ -1175,11 +1258,10 @@ export function ProvisioningWizard() {
setRouterPassword(preset.password); setRouterPassword(preset.password);
setCustomIp(''); setCustomIp('');
}} }}
className={`rounded-2xl border p-4 text-left transition disabled:cursor-not-allowed disabled:opacity-60 ${ className={`rounded-2xl border p-4 text-left transition disabled:cursor-not-allowed disabled:opacity-60 ${active
active
? 'border-blue-500/40 bg-blue-500/10' ? 'border-blue-500/40 bg-blue-500/10'
: 'border-white/10 bg-white/[0.02] hover:border-blue-500/20 hover:bg-white/[0.04]' : 'border-white/10 bg-white/[0.02] hover:border-blue-500/20 hover:bg-white/[0.04]'
}`} }`}
> >
<Network <Network
size={18} size={18}
@@ -1209,11 +1291,10 @@ export function ProvisioningWizard() {
})} })}
<div <div
className={`rounded-2xl border p-4 transition md:col-span-2 ${ className={`rounded-2xl border p-4 transition md:col-span-2 ${customIp.trim()
customIp.trim()
? 'border-blue-500/40 bg-blue-500/10' ? 'border-blue-500/40 bg-blue-500/10'
: 'border-white/10 bg-white/[0.02]' : 'border-white/10 bg-white/[0.02]'
}`} }`}
> >
<div className="mb-3 flex items-center gap-3"> <div className="mb-3 flex items-center gap-3">
<Network <Network
@@ -1507,11 +1588,10 @@ function ModeButton({
type="button" type="button"
disabled={disabled} disabled={disabled}
onClick={onClick} onClick={onClick}
className={`rounded-2xl border p-4 text-left transition disabled:cursor-not-allowed disabled:opacity-60 ${ className={`rounded-2xl border p-4 text-left transition disabled:cursor-not-allowed disabled:opacity-60 ${active
active
? 'border-blue-500/40 bg-blue-500/10' ? 'border-blue-500/40 bg-blue-500/10'
: 'border-white/10 bg-white/[0.02] hover:border-blue-500/20 hover:bg-white/[0.04]' : 'border-white/10 bg-white/[0.02] hover:border-blue-500/20 hover:bg-white/[0.04]'
}`} }`}
> >
<p className="font-semibold text-white"> <p className="font-semibold text-white">
{title} {title}
@@ -1906,25 +1986,23 @@ function WorkflowStepCard({
return ( return (
<div <div
className={`rounded-2xl border p-3 transition ${ className={`rounded-2xl border p-3 transition ${done
done
? 'border-green-500/30 bg-green-500/10' ? 'border-green-500/30 bg-green-500/10'
: active : active
? 'border-blue-500/40 bg-blue-500/10' ? 'border-blue-500/40 bg-blue-500/10'
: blocked : blocked
? 'border-white/5 bg-white/[0.015] opacity-60' ? 'border-white/5 bg-white/[0.015] opacity-60'
: 'border-white/10 bg-white/[0.02]' : 'border-white/10 bg-white/[0.02]'
}`} }`}
> >
<div className="flex gap-3"> <div className="flex gap-3">
<div <div
className={`rounded-xl p-2 ${ className={`rounded-xl p-2 ${done
done
? 'bg-green-500/10 text-green-300' ? 'bg-green-500/10 text-green-300'
: active : active
? 'bg-blue-500/10 text-blue-300' ? 'bg-blue-500/10 text-blue-300'
: 'bg-slate-900 text-slate-500' : 'bg-slate-900 text-slate-500'
}`} }`}
> >
<Icon size={16} /> <Icon size={16} />
</div> </div>
File diff suppressed because it is too large Load Diff
+7 -4
View File
@@ -14,11 +14,13 @@ type ButtonProps =
const variants: Record<ButtonVariant, string> = { const variants: Record<ButtonVariant, string> = {
primary: primary:
'bg-blue-500 text-white hover:bg-blue-400', 'border border-white/10 bg-white/[0.035] text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.05)] hover:border-blue-400/30 hover:bg-blue-500/10 hover:text-blue-50',
secondary: secondary:
'border border-white/10 bg-white/[0.04] text-slate-200 hover:bg-white/[0.08]', 'border border-white/10 bg-white/[0.02] text-slate-200 hover:bg-white/[0.05] hover:text-white',
danger: danger:
'border border-red-500/20 bg-red-500/10 text-red-300 hover:bg-red-500/20', 'border border-red-500/20 bg-red-500/10 text-red-300 hover:border-red-400/30 hover:bg-red-500/20 hover:text-red-100',
}; };
export function Button({ export function Button({
@@ -31,7 +33,8 @@ export function Button({
<button <button
{...props} {...props}
className={clsx( className={clsx(
'inline-flex items-center justify-center gap-2 rounded-xl px-4 py-2 text-sm font-semibold transition disabled:cursor-not-allowed disabled:opacity-50', 'inline-flex items-center justify-center gap-2 rounded-2xl px-4 py-3 text-sm font-black tracking-[-0.01em] transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50',
'backdrop-blur-sm',
variants[variant], variants[variant],
className, className,
)} )}
+4 -4
View File
@@ -1,9 +1,9 @@
import type { AppSettings } from '@/types/api'; import type { AppSettings } from '@/types/api';
const defaults: AppSettings = { const defaults: AppSettings = { // FOR DEBUG AND DEV PURPOSES ONLY ==========================>
backendUrl: 'http://146.59.230.190:8080', backendUrl: 'http://146.59.230.190:8080',// FOR DEBUG AND DEV PURPOSES ONLY ==========================>
apiKey: apiKey:// FOR DEBUG AND DEV PURPOSES ONLY ==========================>
'b8184608fcab419da2ce9a220ee6017daaff637b627e43ebac31b6b7c3344349', 'b8184608fcab419da2ce9a220ee6017daaff637b627e43ebac31b6b7c3344349',// FOR DEBUG AND DEV PURPOSES ONLY ==========================>
}; };
const SETTINGS_KEY = const SETTINGS_KEY =
+149 -17
View File
@@ -1,31 +1,163 @@
import { apiRequest } from './apiClient'; import { apiRequest } from "./apiClient";
import type { import type { NetworkTrafficResponse, VpsHealth } from "@/types/api";
NetworkTrafficResponse,
VpsHealth, export type ControllerClient = {
} from '@/types/api'; id: string;
name: string;
file: string;
path: string;
controller_count: number;
modified_at: string;
};
export type ControllerClientsResponse = {
clients: ControllerClient[];
};
export type ControllerClientFileResponse = {
content: string;
};
export type RouterFirewallRule = {
id: string;
name: string;
proto: string;
srcZone: string;
destZone: string;
externalPort: string;
internalIp: string;
internalPort: string;
target: string;
};
export type RouterFirewallRulesResponse = {
ok: boolean;
routerHost: string;
rules: RouterFirewallRule[];
fetchedAt: string;
};
export const vpsApi = { export const vpsApi = {
health: () => health: () => apiRequest<VpsHealth>("/api/vps/health"),
apiRequest<VpsHealth>(
'/api/vps/health',
),
networkTraffic: () => networkTraffic: () =>
apiRequest<NetworkTrafficResponse>( apiRequest<NetworkTrafficResponse>("/api/vps/network-traffic"),
'/api/vps/network-traffic',
),
udp2rawTraffic: () => udp2rawTraffic: () =>
apiRequest<NetworkTrafficResponse>( apiRequest<NetworkTrafficResponse>("/api/vps/udp2raw-traffic"),
'/api/vps/udp2raw-traffic',
),
rollbackLastBackup: () => rollbackLastBackup: () =>
apiRequest<{ restored: boolean }>( apiRequest<{ restored: boolean }>(
'/api/vps/wireguard/rollback-last-backup', "/api/vps/wireguard/rollback-last-backup",
{ {
method: 'POST', method: "POST",
}, },
), ),
// ALL clients
listControllerClients: () =>
apiRequest<ControllerClientsResponse>("/api/vps/controllers/clients"),
// ONE client's .txt content
readControllerClient: (clientId: string) =>
apiRequest<ControllerClientFileResponse>(
`/api/vps/controllers/clients/${encodeURIComponent(clientId)}`,
),
updateControllerClient: (clientId: string, content: string) =>
apiRequest<ControllerClientFileResponse>(
`/api/vps/controllers/clients/${encodeURIComponent(clientId)}`,
{
method: "POST",
body: JSON.stringify({ content }),
},
),
createControllerClient: (name: string, password: string) =>
apiRequest<ControllerClientFileResponse>(`/api/vps/controllers/clients`, {
method: "POST",
body: JSON.stringify({
name,
password,
}),
}),
deleteControllerClient: (clientId: string) =>
apiRequest<ControllerClientFileResponse>(`/api/vps/controllers/clients`, {
method: "DELETE",
body: JSON.stringify({ clientId }),
}),
getRouterFirewallRules: (routerHost: string, routerPassword: string) =>
apiRequest<RouterFirewallRulesResponse>(
"/api/vps/controllers/routers/firewall/rules",
{
method: "POST",
body: JSON.stringify({
routerHost,
routerPassword,
}),
},
),
createRouterFirewallRule: (
routerHost: string,
routerPassword: string,
rule: RouterFirewallRule,
) =>
apiRequest<{
ok: boolean;
routerHost: string;
rule: RouterFirewallRule;
deletedId: string | null;
fetchedAt: string;
}>("/api/vps/controllers/routers/firewall/rules/create", {
method: "POST",
body: JSON.stringify({
routerHost,
routerPassword,
...rule,
}),
}),
updateRouterFirewallRule: (
routerHost: string,
routerPassword: string,
rule: RouterFirewallRule,
) =>
apiRequest<{
ok: boolean;
routerHost: string;
rule: RouterFirewallRule;
deletedId: string | null;
fetchedAt: string;
}>("/api/vps/controllers/routers/firewall/rules/update", {
method: "POST",
body: JSON.stringify({
routerHost,
routerPassword,
...rule,
}),
}),
deleteRouterFirewallRule: (
routerHost: string,
routerPassword: string,
id: string,
) =>
apiRequest<{
ok: boolean;
routerHost: string;
rule: null;
deletedId: string;
fetchedAt: string;
}>("/api/vps/controllers/routers/firewall/rules", {
method: "DELETE",
body: JSON.stringify({
routerHost,
routerPassword,
id,
}),
}),
}; };