How can I zero the amount of user usage by "SetUser"?
"Ex.Recv.BroadcastBytes_u64": 617050966,
"Ex.Recv.BroadcastCount_u64": 4269721,
"Ex.Recv.UnicastBytes_u64": 149804008518,
"Ex.Recv.UnicastCount_u64": 129767970,
"Ex.Send.BroadcastBytes_u64": 90559536,
"Ex.Send.BroadcastCount_u64": 284149,
"Ex.Send.UnicastBytes_u64": 10503150177,
"Ex.Send.UnicastCount_u64": 47767761,
How can I zero the amount of user usage by "SetUser"?
-
- Posts: 5
- Joined: Sat Mar 09, 2024 3:35 pm
-
- Posts: 1614
- Joined: Sun Feb 14, 2021 10:31 am
Re: How can I zero the amount of user usage by "SetUser"?
Modify this GetUser code for SetUser.
-
- Posts: 5
- Joined: Sat Mar 09, 2024 3:35 pm
Re: How can I zero the amount of user usage by "SetUser"?
What is the problem with the code below zero?
Http::withBasicAuth('', 'password')->get('localhost/api/SetUser', [
'HubName_str' => 'VPN',
'Name_str' => 'user',
'Note_utf' => '',
'AuthType_u32' => 1,
'Auth_Password_str' => '1234',
'UsePolicy_bool' => 'true',
'policy:Access_bool' => 'true',
'Recv.BroadcastBytes_u64' => 0,
'Recv.BroadcastCount_u64' => 0,
'Recv.UnicastBytes_u64' => 0,
'Recv.UnicastCount_u64' => 0,
'Send.BroadcastBytes_u64' => 0,
'Send.BroadcastCount_u64' => 0,
'Send.UnicastBytes_u64' => 0,
'Send.UnicastCount_u64' => 0,
]);
Http::withBasicAuth('', 'password')->get('localhost/api/SetUser', [
'HubName_str' => 'VPN',
'Name_str' => 'user',
'Note_utf' => '',
'AuthType_u32' => 1,
'Auth_Password_str' => '1234',
'UsePolicy_bool' => 'true',
'policy:Access_bool' => 'true',
'Recv.BroadcastBytes_u64' => 0,
'Recv.BroadcastCount_u64' => 0,
'Recv.UnicastBytes_u64' => 0,
'Recv.UnicastCount_u64' => 0,
'Send.BroadcastBytes_u64' => 0,
'Send.BroadcastCount_u64' => 0,
'Send.UnicastBytes_u64' => 0,
'Send.UnicastCount_u64' => 0,
]);
-
- Posts: 289
- Joined: Wed Dec 28, 2022 9:10 pm
Re: How can I zero the amount of user usage by "SetUser"?
the SetUser RPC API has bugs and this method does not work
you can delete and re-create a user
you can delete and re-create a user