2
0

nebula.proto 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. }
  17. MessageType Type = 1;
  18. NebulaMetaDetails Details = 2;
  19. }
  20. message NebulaMetaDetails {
  21. uint32 VpnIp = 1;
  22. repeated Ip4AndPort Ip4AndPorts = 2;
  23. repeated Ip6AndPort Ip6AndPorts = 4;
  24. repeated uint32 RelayVpnIp = 5;
  25. uint32 counter = 3;
  26. }
  27. message Ip4AndPort {
  28. uint32 Ip = 1;
  29. uint32 Port = 2;
  30. }
  31. message Ip6AndPort {
  32. uint64 Hi = 1;
  33. uint64 Lo = 2;
  34. uint32 Port = 3;
  35. }
  36. message NebulaPing {
  37. enum MessageType {
  38. Ping = 0;
  39. Reply = 1;
  40. }
  41. MessageType Type = 1;
  42. uint64 Time = 2;
  43. }
  44. message NebulaHandshake {
  45. NebulaHandshakeDetails Details = 1;
  46. bytes Hmac = 2;
  47. }
  48. message NebulaHandshakeDetails {
  49. bytes Cert = 1;
  50. uint32 InitiatorIndex = 2;
  51. uint32 ResponderIndex = 3;
  52. uint64 Cookie = 4;
  53. uint64 Time = 5;
  54. // reserved for WIP multiport
  55. reserved 6, 7;
  56. }
  57. message NebulaControl {
  58. enum MessageType {
  59. None = 0;
  60. CreateRelayRequest = 1;
  61. CreateRelayResponse = 2;
  62. }
  63. MessageType Type = 1;
  64. uint32 InitiatorRelayIndex = 2;
  65. uint32 ResponderRelayIndex = 3;
  66. uint32 RelayToIp = 4;
  67. uint32 RelayFromIp = 5;
  68. }