helper.proto 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. syntax = "proto3";
  2. package daemon;
  3. option go_package = "github.com/sagernet/sing-box/daemon";
  4. import "google/protobuf/empty.proto";
  5. message SubscribeHelperRequestRequest {
  6. bool acceptGetWIFIStateRequests = 1;
  7. bool acceptFindConnectionOwnerRequests = 2;
  8. bool acceptSendNotificationRequests = 3;
  9. }
  10. message HelperRequest {
  11. int64 id = 1;
  12. oneof request {
  13. google.protobuf.Empty getWIFIState = 2;
  14. FindConnectionOwnerRequest findConnectionOwner = 3;
  15. Notification sendNotification = 4;
  16. }
  17. }
  18. message FindConnectionOwnerRequest {
  19. int32 ipProtocol = 1;
  20. string sourceAddress = 2;
  21. int32 sourcePort = 3;
  22. string destinationAddress = 4;
  23. int32 destinationPort = 5;
  24. }
  25. message Notification {
  26. string identifier = 1;
  27. string typeName = 2;
  28. int32 typeId = 3;
  29. string title = 4;
  30. string subtitle = 5;
  31. string body = 6;
  32. string openURL = 7;
  33. }
  34. message HelperResponse {
  35. int64 id = 1;
  36. oneof response {
  37. WIFIState wifiState = 2;
  38. string error = 3;
  39. ConnectionOwner connectionOwner = 4;
  40. }
  41. }
  42. message ConnectionOwner {
  43. int32 userId = 1;
  44. string userName = 2;
  45. string processPath = 3;
  46. string androidPackageName = 4;
  47. }
  48. message WIFIState {
  49. string ssid = 1;
  50. string bssid = 2;
  51. }