-
Notifications
You must be signed in to change notification settings - Fork 3
feat: USP WiFi settings, network diagnostics & codegen updates #689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: NetworkDiagnostics | ||
| description: Network diagnostic operations (Ping, Traceroute) | ||
| type: operate | ||
| category: network | ||
|
|
||
| operations: | ||
| - name: ping | ||
| path: Device.IP.Diagnostics.IPPing() | ||
| description: Run ICMP ping diagnostic | ||
| inputs: | ||
| - path: Host | ||
| field: host | ||
| type: string | ||
| required: true | ||
| - path: NumberOfRepetitions | ||
| field: numberOfRepetitions | ||
| type: string | ||
| required: false | ||
| default: "3" | ||
|
|
||
| - name: traceRoute | ||
| path: Device.IP.Diagnostics.TraceRoute() | ||
| description: Run traceroute diagnostic | ||
| inputs: | ||
| - path: Host | ||
| field: host | ||
| type: string | ||
| required: true | ||
| - path: MaxHopCount | ||
| field: maxHopCount | ||
| type: string | ||
| required: false | ||
| default: "30" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // AUTO-GENERATED CODE - DO NOT EDIT | ||
| // This file was generated by usp-codegen | ||
| // Any modifications will be overwritten on next generation | ||
|
|
||
| import 'package:privacy_gui/usp/services/usp_service.dart'; | ||
|
|
||
| /// Network diagnostic operations (Ping, Traceroute) | ||
| class NetworkDiagnostics { | ||
| /// Run ICMP ping diagnostic | ||
| static Future<Map<String, dynamic>> ping( | ||
| UspService client, { | ||
| required String host, | ||
| String? numberOfRepetitions, | ||
| }) async { | ||
| final inputs = <String, String>{}; | ||
| inputs['Host'] = host; | ||
| if (numberOfRepetitions != null) | ||
| inputs['NumberOfRepetitions'] = numberOfRepetitions; | ||
| return await client.operate('Device.IP.Diagnostics.IPPing()', args: inputs); | ||
| } | ||
|
|
||
| /// Run traceroute diagnostic | ||
| static Future<Map<String, dynamic>> traceRoute( | ||
| UspService client, { | ||
| required String host, | ||
| String? maxHopCount, | ||
| }) async { | ||
| final inputs = <String, String>{}; | ||
| inputs['Host'] = host; | ||
| if (maxHopCount != null) inputs['MaxHopCount'] = maxHopCount; | ||
| return await client.operate('Device.IP.Diagnostics.TraceRoute()', | ||
| args: inputs); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,12 +7,13 @@ import 'package:privacy_gui/usp/services/usp_service.dart'; | |
| /// WAN DHCP lease renewal operations | ||
| class WanOperations { | ||
| /// Renew DHCPv4 WAN lease | ||
| static Future<void> renewDhcpLease(UspService client) async { | ||
| await client.operate('Device.DHCPv4.Client.1.Renew()'); | ||
| static Future<Map<String, dynamic>> renewDhcpLease(UspService client) async { | ||
| return await client.operate('Device.DHCPv4.Client.1.Renew()'); | ||
| } | ||
|
|
||
| /// Renew DHCPv6 WAN lease | ||
| static Future<void> renewDhcpv6Lease(UspService client) async { | ||
| await client.operate('Device.DHCPv6.Client.1.Renew()'); | ||
| static Future<Map<String, dynamic>> renewDhcpv6Lease( | ||
| UspService client) async { | ||
| return await client.operate('Device.DHCPv6.Client.1.Renew()'); | ||
| } | ||
|
Comment on lines
+10
to
18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3. Renew return type mismatch UspInternetSettingsService.renewDhcpLease() / renewDhcpv6Lease() are declared as Future<void> but directly return WanOperations.renewDhcpLease() / renewDhcpv6Lease(), which now return Future<Map<String,dynamic>>. This introduces a Dart static type error and will fail compilation for USP Internet Settings. Agent Prompt
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Missing braces in ping()
📘 Rule violation✓ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools