config.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.28.1
  4. // protoc v3.21.9
  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. }
  96. func (x *DeviceConfig) Reset() {
  97. *x = DeviceConfig{}
  98. if protoimpl.UnsafeEnabled {
  99. mi := &file_proxy_wireguard_config_proto_msgTypes[1]
  100. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  101. ms.StoreMessageInfo(mi)
  102. }
  103. }
  104. func (x *DeviceConfig) String() string {
  105. return protoimpl.X.MessageStringOf(x)
  106. }
  107. func (*DeviceConfig) ProtoMessage() {}
  108. func (x *DeviceConfig) ProtoReflect() protoreflect.Message {
  109. mi := &file_proxy_wireguard_config_proto_msgTypes[1]
  110. if protoimpl.UnsafeEnabled && x != nil {
  111. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  112. if ms.LoadMessageInfo() == nil {
  113. ms.StoreMessageInfo(mi)
  114. }
  115. return ms
  116. }
  117. return mi.MessageOf(x)
  118. }
  119. // Deprecated: Use DeviceConfig.ProtoReflect.Descriptor instead.
  120. func (*DeviceConfig) Descriptor() ([]byte, []int) {
  121. return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{1}
  122. }
  123. func (x *DeviceConfig) GetSecretKey() string {
  124. if x != nil {
  125. return x.SecretKey
  126. }
  127. return ""
  128. }
  129. func (x *DeviceConfig) GetEndpoint() []string {
  130. if x != nil {
  131. return x.Endpoint
  132. }
  133. return nil
  134. }
  135. func (x *DeviceConfig) GetPeers() []*PeerConfig {
  136. if x != nil {
  137. return x.Peers
  138. }
  139. return nil
  140. }
  141. func (x *DeviceConfig) GetMtu() int32 {
  142. if x != nil {
  143. return x.Mtu
  144. }
  145. return 0
  146. }
  147. func (x *DeviceConfig) GetNumWorkers() int32 {
  148. if x != nil {
  149. return x.NumWorkers
  150. }
  151. return 0
  152. }
  153. var File_proxy_wireguard_config_proto protoreflect.FileDescriptor
  154. var file_proxy_wireguard_config_proto_rawDesc = []byte{
  155. 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72,
  156. 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14,
  157. 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67,
  158. 0x75, 0x61, 0x72, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x6e,
  159. 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65,
  160. 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b,
  161. 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64,
  162. 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x53,
  163. 0x68, 0x61, 0x72, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70,
  164. 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70,
  165. 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69,
  166. 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x41, 0x6c,
  167. 0x69, 0x76, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69,
  168. 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65,
  169. 0x64, 0x49, 0x70, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43,
  170. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f,
  171. 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65,
  172. 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
  173. 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
  174. 0x12, 0x36, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
  175. 0x20, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69, 0x72,
  176. 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69,
  177. 0x67, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18,
  178. 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75,
  179. 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
  180. 0x0a, 0x6e, 0x75, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x42, 0x5e, 0x0a, 0x18, 0x63,
  181. 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69,
  182. 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75,
  183. 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d,
  184. 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x77, 0x69, 0x72, 0x65, 0x67,
  185. 0x75, 0x61, 0x72, 0x64, 0xaa, 0x02, 0x14, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x78,
  186. 0x79, 0x2e, 0x57, 0x69, 0x72, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f,
  187. 0x74, 0x6f, 0x33,
  188. }
  189. var (
  190. file_proxy_wireguard_config_proto_rawDescOnce sync.Once
  191. file_proxy_wireguard_config_proto_rawDescData = file_proxy_wireguard_config_proto_rawDesc
  192. )
  193. func file_proxy_wireguard_config_proto_rawDescGZIP() []byte {
  194. file_proxy_wireguard_config_proto_rawDescOnce.Do(func() {
  195. file_proxy_wireguard_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_wireguard_config_proto_rawDescData)
  196. })
  197. return file_proxy_wireguard_config_proto_rawDescData
  198. }
  199. var file_proxy_wireguard_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  200. var file_proxy_wireguard_config_proto_goTypes = []interface{}{
  201. (*PeerConfig)(nil), // 0: xray.proxy.wireguard.PeerConfig
  202. (*DeviceConfig)(nil), // 1: xray.proxy.wireguard.DeviceConfig
  203. }
  204. var file_proxy_wireguard_config_proto_depIdxs = []int32{
  205. 0, // 0: xray.proxy.wireguard.DeviceConfig.peers:type_name -> xray.proxy.wireguard.PeerConfig
  206. 1, // [1:1] is the sub-list for method output_type
  207. 1, // [1:1] is the sub-list for method input_type
  208. 1, // [1:1] is the sub-list for extension type_name
  209. 1, // [1:1] is the sub-list for extension extendee
  210. 0, // [0:1] is the sub-list for field type_name
  211. }
  212. func init() { file_proxy_wireguard_config_proto_init() }
  213. func file_proxy_wireguard_config_proto_init() {
  214. if File_proxy_wireguard_config_proto != nil {
  215. return
  216. }
  217. if !protoimpl.UnsafeEnabled {
  218. file_proxy_wireguard_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  219. switch v := v.(*PeerConfig); i {
  220. case 0:
  221. return &v.state
  222. case 1:
  223. return &v.sizeCache
  224. case 2:
  225. return &v.unknownFields
  226. default:
  227. return nil
  228. }
  229. }
  230. file_proxy_wireguard_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  231. switch v := v.(*DeviceConfig); i {
  232. case 0:
  233. return &v.state
  234. case 1:
  235. return &v.sizeCache
  236. case 2:
  237. return &v.unknownFields
  238. default:
  239. return nil
  240. }
  241. }
  242. }
  243. type x struct{}
  244. out := protoimpl.TypeBuilder{
  245. File: protoimpl.DescBuilder{
  246. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  247. RawDescriptor: file_proxy_wireguard_config_proto_rawDesc,
  248. NumEnums: 0,
  249. NumMessages: 2,
  250. NumExtensions: 0,
  251. NumServices: 0,
  252. },
  253. GoTypes: file_proxy_wireguard_config_proto_goTypes,
  254. DependencyIndexes: file_proxy_wireguard_config_proto_depIdxs,
  255. MessageInfos: file_proxy_wireguard_config_proto_msgTypes,
  256. }.Build()
  257. File_proxy_wireguard_config_proto = out.File
  258. file_proxy_wireguard_config_proto_rawDesc = nil
  259. file_proxy_wireguard_config_proto_goTypes = nil
  260. file_proxy_wireguard_config_proto_depIdxs = nil
  261. }