nebula.proto 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. syntax = "proto3";
  2. package nebula;
  3. option go_package = "github.com/slackhq/nebula";
  4. message NebulaMeta {
  5. enum MessageType {
  6. None = 0;
  7. HostQuery = 1;
  8. HostQueryReply = 2;
  9. HostUpdateNotification = 3;
  10. HostMovedNotification = 4;
  11. HostPunchNotification = 5;
  12. HostWhoami = 6;
  13. HostWhoamiReply = 7;
  14. PathCheck = 8;
  15. PathCheckReply = 9;
  16. HostUpdateNotificationAck = 10;
  17. }
  18. MessageType Type = 1;
  19. NebulaMetaDetails Details = 2;
  20. }
  21. message NebulaMetaDetails {
  22. uint32 VpnIp = 1;
  23. repeated Ip4AndPort Ip4AndPorts = 2;
  24. repeated Ip6AndPort Ip6AndPorts = 4;
  25. repeated uint32 RelayVpnIp = 5;
  26. uint32 counter = 3;
  27. }
  28. message Ip4AndPort {
  29. uint32 Ip = 1;
  30. uint32 Port = 2;
  31. }
  32. message Ip6AndPort {
  33. uint64 Hi = 1;
  34. uint64 Lo = 2;
  35. uint32 Port = 3;
  36. }
  37. message NebulaPing {
  38. enum MessageType {
  39. Ping = 0;
  40. Reply = 1;
  41. }
  42. MessageType Type = 1;
  43. uint64 Time = 2;
  44. }
  45. message NebulaHandshake {
  46. NebulaHandshakeDetails Details = 1;
  47. bytes Hmac = 2;
  48. }
  49. message NebulaHandshakeDetails {
  50. bytes Cert = 1;
  51. uint32 InitiatorIndex = 2;
  52. uint32 ResponderIndex = 3;
  53. uint64 Cookie = 4;
  54. uint64 Time = 5;
  55. // reserved for WIP multiport
  56. reserved 6, 7;
  57. }
  58. message NebulaControl {
  59. enum MessageType {
  60. None = 0;
  61. CreateRelayRequest = 1;
  62. CreateRelayResponse = 2;
  63. }
  64. MessageType Type = 1;
  65. uint32 InitiatorRelayIndex = 2;
  66. uint32 ResponderRelayIndex = 3;
  67. uint32 RelayToIp = 4;
  68. uint32 RelayFromIp = 5;
  69. }