config.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.28.1
  4. // protoc v3.21.12
  5. // source: proxy/wireguard/config.proto
  6. package wireguard
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. reflect "reflect"
  11. sync "sync"
  12. )
  13. const (
  14. // Verify that this generated code is sufficiently up-to-date.
  15. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  16. // Verify that runtime/protoimpl is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  18. )
  19. type PeerConfig struct {
  20. state protoimpl.MessageState
  21. sizeCache protoimpl.SizeCache
  22. unknownFields protoimpl.UnknownFields
  23. PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
  24. PreSharedKey string `protobuf:"bytes,2,opt,name=pre_shared_key,json=preSharedKey,proto3" json:"pre_shared_key,omitempty"`
  25. Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
  26. KeepAlive int32 `protobuf:"varint,4,opt,name=keep_alive,json=keepAlive,proto3" json:"keep_alive,omitempty"`
  27. AllowedIps []string `protobuf:"bytes,5,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
  28. }
  29. func (x *PeerConfig) Reset() {
  30. *x = PeerConfig{}
  31. if protoimpl.UnsafeEnabled {
  32. mi := &file_proxy_wireguard_config_proto_msgTypes[0]
  33. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  34. ms.StoreMessageInfo(mi)
  35. }
  36. }
  37. func (x *PeerConfig) String() string {
  38. return protoimpl.X.MessageStringOf(x)
  39. }
  40. func (*PeerConfig) ProtoMessage() {}
  41. func (x *PeerConfig) ProtoReflect() protoreflect.Message {
  42. mi := &file_proxy_wireguard_config_proto_msgTypes[0]
  43. if protoimpl.UnsafeEnabled && x != nil {
  44. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  45. if ms.LoadMessageInfo() == nil {
  46. ms.StoreMessageInfo(mi)
  47. }
  48. return ms
  49. }
  50. return mi.MessageOf(x)
  51. }
  52. // Deprecated: Use PeerConfig.ProtoReflect.Descriptor instead.
  53. func (*PeerConfig) Descriptor() ([]byte, []int) {
  54. return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{0}
  55. }
  56. func (x *PeerConfig) GetPublicKey() string {
  57. if x != nil {
  58. return x.PublicKey
  59. }
  60. return ""
  61. }
  62. func (x *PeerConfig) GetPreSharedKey() string {
  63. if x != nil {
  64. return x.PreSharedKey
  65. }
  66. return ""
  67. }
  68. func (x *PeerConfig) GetEndpoint() string {
  69. if x != nil {
  70. return x.Endpoint
  71. }
  72. return ""
  73. }
  74. func (x *PeerConfig) GetKeepAlive() int32 {
  75. if x != nil {
  76. return x.KeepAlive
  77. }
  78. return 0
  79. }
  80. func (x *PeerConfig) GetAllowedIps() []string {
  81. if x != nil {
  82. return x.AllowedIps
  83. }
  84. return nil
  85. }
  86. type DeviceConfig struct {
  87. state protoimpl.MessageState
  88. sizeCache protoimpl.SizeCache
  89. unknownFields protoimpl.UnknownFields
  90. SecretKey string `protobuf:"bytes,1,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
  91. Endpoint []string `protobuf:"bytes,2,rep,name=endpoint,proto3" json:"endpoint,omitempty"`
  92. Peers []*PeerConfig `protobuf:"bytes,3,rep,name=peers,proto3" json:"peers,omitempty"`
  93. Mtu int32 `protobuf:"varint,4,opt,name=mtu,proto3" json:"mtu,omitempty"`
  94. NumWorkers int32 `protobuf:"varint,5,opt,name=num_workers,json=numWorkers,proto3" json:"num_workers,omitempty"`
  95. Reserved []byte `protobuf:"bytes,6,opt,name=reserved,proto3" json:"reserved,omitempty"`
  96. }
  97. func (x *DeviceConfig) Reset() {
  98. *x = DeviceConfig{}
  99. if protoimpl.UnsafeEnabled {
  100. mi := &file_proxy_wireguard_config_proto_msgTypes[1]
  101. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  102. ms.StoreMessageInfo(mi)
  103. }
  104. }
  105. func (x *DeviceConfig) String() string {
  106. return protoimpl.X.MessageStringOf(x)
  107. }
  108. func (*DeviceConfig) ProtoMessage() {}
  109. func (x *DeviceConfig) ProtoReflect() protoreflect.Message {
  110. mi := &file_proxy_wireguard_config_proto_msgTypes[1]
  111. if protoimpl.UnsafeEnabled && x != nil {
  112. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  113. if ms.LoadMessageInfo() == nil {
  114. ms.StoreMessageInfo(mi)
  115. }
  116. return ms
  117. }
  118. return mi.MessageOf(x)
  119. }
  120. // Deprecated: Use DeviceConfig.ProtoReflect.Descriptor instead.
  121. func (*DeviceConfig) Descriptor() ([]byte, []int) {
  122. return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{1}
  123. }
  124. func (x *DeviceConfig) GetSecretKey() string {
  125. if x != nil {
  126. return x.SecretKey
  127. }
  128. return ""
  129. }
  130. func (x *DeviceConfig) GetEndpoint() []string {
  131. if x != nil {
  132. return x.Endpoint
  133. }
  134. return nil
  135. }
  136. func (x *DeviceConfig) GetPeers() []*PeerConfig {
  137. if x != nil {
  138. return x.Peers
  139. }
  140. return nil
  141. }
  142. func (x *DeviceConfig) GetMtu() int32 {
  143. if x != nil {
  144. return x.Mtu
  145. }
  146. return 0
  147. }
  148. func (x *DeviceConfig) GetNumWorkers() int32 {
  149. if x != nil {
  150. return x.NumWorkers
  151. }
  152. return 0
  153. }
  154. func (x *DeviceConfig) GetReserved() []byte {
  155. if x != nil {
  156. return x.Reserved
  157. }
  158. return nil
  159. }
  160. var File_proxy_wireguard_config_proto protoreflect.FileDescriptor
  161. var file_proxy_wireguard_config_proto_rawDesc = []byte{
  162. 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72,
  163. 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14,
  164. 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67,
  165. 0x75, 0x61, 0x72, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x6e,
  166. 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65,
  167. 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b,
  168. 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64,
  169. 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x53,
  170. 0x68, 0x61, 0x72, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70,
  171. 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70,
  172. 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69,
  173. 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x41, 0x6c,
  174. 0x69, 0x76, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69,
  175. 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65,
  176. 0x64, 0x49, 0x70, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43,
  177. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f,
  178. 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65,
  179. 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
  180. 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
  181. 0x12, 0x36, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
  182. 0x20, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69, 0x72,
  183. 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69,
  184. 0x67, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18,
  185. 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75,
  186. 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
  187. 0x0a, 0x6e, 0x75, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72,
  188. 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72,
  189. 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x42, 0x5e, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x78,
  190. 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75,
  191. 0x61, 0x72, 0x64, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
  192. 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65,
  193. 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64,
  194. 0xaa, 0x02, 0x14, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x57, 0x69,
  195. 0x72, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  196. }
  197. var (
  198. file_proxy_wireguard_config_proto_rawDescOnce sync.Once
  199. file_proxy_wireguard_config_proto_rawDescData = file_proxy_wireguard_config_proto_rawDesc
  200. )
  201. func file_proxy_wireguard_config_proto_rawDescGZIP() []byte {
  202. file_proxy_wireguard_config_proto_rawDescOnce.Do(func() {
  203. file_proxy_wireguard_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_wireguard_config_proto_rawDescData)
  204. })
  205. return file_proxy_wireguard_config_proto_rawDescData
  206. }
  207. var file_proxy_wireguard_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  208. var file_proxy_wireguard_config_proto_goTypes = []interface{}{
  209. (*PeerConfig)(nil), // 0: xray.proxy.wireguard.PeerConfig
  210. (*DeviceConfig)(nil), // 1: xray.proxy.wireguard.DeviceConfig
  211. }
  212. var file_proxy_wireguard_config_proto_depIdxs = []int32{
  213. 0, // 0: xray.proxy.wireguard.DeviceConfig.peers:type_name -> xray.proxy.wireguard.PeerConfig
  214. 1, // [1:1] is the sub-list for method output_type
  215. 1, // [1:1] is the sub-list for method input_type
  216. 1, // [1:1] is the sub-list for extension type_name
  217. 1, // [1:1] is the sub-list for extension extendee
  218. 0, // [0:1] is the sub-list for field type_name
  219. }
  220. func init() { file_proxy_wireguard_config_proto_init() }
  221. func file_proxy_wireguard_config_proto_init() {
  222. if File_proxy_wireguard_config_proto != nil {
  223. return
  224. }
  225. if !protoimpl.UnsafeEnabled {
  226. file_proxy_wireguard_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  227. switch v := v.(*PeerConfig); i {
  228. case 0:
  229. return &v.state
  230. case 1:
  231. return &v.sizeCache
  232. case 2:
  233. return &v.unknownFields
  234. default:
  235. return nil
  236. }
  237. }
  238. file_proxy_wireguard_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  239. switch v := v.(*DeviceConfig); i {
  240. case 0:
  241. return &v.state
  242. case 1:
  243. return &v.sizeCache
  244. case 2:
  245. return &v.unknownFields
  246. default:
  247. return nil
  248. }
  249. }
  250. }
  251. type x struct{}
  252. out := protoimpl.TypeBuilder{
  253. File: protoimpl.DescBuilder{
  254. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  255. RawDescriptor: file_proxy_wireguard_config_proto_rawDesc,
  256. NumEnums: 0,
  257. NumMessages: 2,
  258. NumExtensions: 0,
  259. NumServices: 0,
  260. },
  261. GoTypes: file_proxy_wireguard_config_proto_goTypes,
  262. DependencyIndexes: file_proxy_wireguard_config_proto_depIdxs,
  263. MessageInfos: file_proxy_wireguard_config_proto_msgTypes,
  264. }.Build()
  265. File_proxy_wireguard_config_proto = out.File
  266. file_proxy_wireguard_config_proto_rawDesc = nil
  267. file_proxy_wireguard_config_proto_goTypes = nil
  268. file_proxy_wireguard_config_proto_depIdxs = nil
  269. }