diff --git a/Application/Helper.cs b/Application/Helper.cs index 151ec2d..fa608ea 100644 --- a/Application/Helper.cs +++ b/Application/Helper.cs @@ -33,11 +33,6 @@ namespace MTWireGuard.Application return $"/tool fetch mode=http url=\"{apiURL}\" http-method=post check-certificate=no http-data=([/interface/wireguard/peers/print show-ids proplist=rx,tx as-value]);"; } - public static string PeersLastHandshakeScript(string apiURL) - { - return $"/tool fetch mode=http url=\"{apiURL}\" http-method=post check-certificate=no http-data=([/interface/wireguard/peers/print show-ids proplist=last-handshake as-value]);"; - } - public static int ParseEntityID(string entityID) { return Convert.ToInt32(entityID[1..], 16); diff --git a/Application/SetupValidator.cs b/Application/SetupValidator.cs index 314d7f4..9f4441d 100644 --- a/Application/SetupValidator.cs +++ b/Application/SetupValidator.cs @@ -57,7 +57,6 @@ namespace MTWireGuard.Application var scripts = await api.GetScripts(); var schedulers = await api.GetSchedulers(); var trafficScript = scripts.Find(x => x.Name == "SendTrafficUsage"); - var handshakeScript = scripts.Find(x => x.Name == "SendActivityUpdates"); var trafficScheduler = schedulers.Find(x => x.Name == "TrafficUsage"); if (trafficScript == null) @@ -71,17 +70,6 @@ namespace MTWireGuard.Application }); var result = create.Code; } - if (handshakeScript == null) - { - var create = await api.CreateScript(new() - { - Name = "SendActivityUpdates", - Policies = ["write", "read", "test"], - DontRequiredPermissions = false, - Source = Helper.PeersLastHandshakeScript($"http://{ip}/api/activity") - }); - var result = create.Code; - } if (trafficScheduler == null) { var create = await api.CreateScheduler(new()