feat: display network interface

This commit is contained in:
MystiPanda
2024-07-13 14:10:50 +08:00
parent 5a8e0749c2
commit 57fa48aef4
8 changed files with 216 additions and 4 deletions

View File

@@ -241,3 +241,7 @@ export async function downloadIconCache(url: string, name: string) {
export async function getNetworkInterfaces() {
return invoke<string[]>("get_network_interfaces");
}
export async function getNetworkInterfacesInfo() {
return invoke<INetworkInterface[]>("get_network_interfaces_info");
}

View File

@@ -197,6 +197,24 @@ interface IVergeTestItem {
icon?: string;
url: string;
}
interface IAddress {
V4?: {
ip: string;
broadcast?: string;
netmask?: string;
};
V6?: {
ip: string;
broadcast?: string;
netmask?: string;
};
}
interface INetworkInterface {
name: string;
addr: IAddress[];
mac_addr?: string;
index: number;
}
interface ISeqProfileConfig {
prepend: [];