config.pb.go 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. package domainsocket
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. // Reference imports to suppress errors if they are not otherwise used.
  6. var _ = proto.Marshal
  7. var _ = fmt.Errorf
  8. var _ = math.Inf
  9. // This is a compile-time assertion to ensure that this generated file
  10. // is compatible with the proto package it is being compiled against.
  11. // A compilation error at this line likely means your copy of the
  12. // proto package needs to be updated.
  13. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  14. // Flag Array
  15. type DomainSocketSecurityMode int32
  16. const (
  17. DomainSocketSecurityMode_Danger DomainSocketSecurityMode = 0
  18. // Verfify is Dialer have a pid or ppid match pid file
  19. DomainSocketSecurityMode_VerifyPid DomainSocketSecurityMode = 1
  20. // Do not tolerance ppid match
  21. DomainSocketSecurityMode_DisqualifyPPIDMatch DomainSocketSecurityMode = 2
  22. // Enforce Uid Verify On euid
  23. DomainSocketSecurityMode_VerifyEUID DomainSocketSecurityMode = 4
  24. // Enforce Uid Verify On ruid
  25. DomainSocketSecurityMode_VerifyRUID DomainSocketSecurityMode = 8
  26. // Does not allow same user exception
  27. DomainSocketSecurityMode_DisqualifySameUser DomainSocketSecurityMode = 16
  28. // Does not allow root user exception
  29. DomainSocketSecurityMode_DisqualifyRootUser DomainSocketSecurityMode = 32
  30. )
  31. var DomainSocketSecurityMode_name = map[int32]string{
  32. 0: "Danger",
  33. 1: "VerifyPid",
  34. 2: "DisqualifyPPIDMatch",
  35. 4: "VerifyEUID",
  36. 8: "VerifyRUID",
  37. 16: "DisqualifySameUser",
  38. 32: "DisqualifyRootUser",
  39. }
  40. var DomainSocketSecurityMode_value = map[string]int32{
  41. "Danger": 0,
  42. "VerifyPid": 1,
  43. "DisqualifyPPIDMatch": 2,
  44. "VerifyEUID": 4,
  45. "VerifyRUID": 8,
  46. "DisqualifySameUser": 16,
  47. "DisqualifyRootUser": 32,
  48. }
  49. func (x DomainSocketSecurityMode) String() string {
  50. return proto.EnumName(DomainSocketSecurityMode_name, int32(x))
  51. }
  52. func (DomainSocketSecurityMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  53. type DomainSocketSecurity struct {
  54. // Flag Array Type, User can set an integer to define various configure
  55. Mode DomainSocketSecurityMode `protobuf:"varint,1,opt,name=Mode,enum=v2ray.core.internet.domainsocket.DomainSocketSecurityMode" json:"Mode,omitempty"`
  56. // Set pid files to be allowed
  57. AllowedPid []string `protobuf:"bytes,2,rep,name=AllowedPid" json:"AllowedPid,omitempty"`
  58. // Set uids to be allowed, either euid or ruid should match one of following
  59. // uids AllowedUid, or user that v2ray is running or root.
  60. AllowedUid []uint64 `protobuf:"varint,3,rep,packed,name=AllowedUid" json:"AllowedUid,omitempty"`
  61. }
  62. func (m *DomainSocketSecurity) Reset() { *m = DomainSocketSecurity{} }
  63. func (m *DomainSocketSecurity) String() string { return proto.CompactTextString(m) }
  64. func (*DomainSocketSecurity) ProtoMessage() {}
  65. func (*DomainSocketSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  66. func (m *DomainSocketSecurity) GetMode() DomainSocketSecurityMode {
  67. if m != nil {
  68. return m.Mode
  69. }
  70. return DomainSocketSecurityMode_Danger
  71. }
  72. func (m *DomainSocketSecurity) GetAllowedPid() []string {
  73. if m != nil {
  74. return m.AllowedPid
  75. }
  76. return nil
  77. }
  78. func (m *DomainSocketSecurity) GetAllowedUid() []uint64 {
  79. if m != nil {
  80. return m.AllowedUid
  81. }
  82. return nil
  83. }
  84. type DomainSocketSettings struct {
  85. // Path we should listen/dial
  86. Path string `protobuf:"bytes,1,opt,name=Path" json:"Path,omitempty"`
  87. Security *DomainSocketSecurity `protobuf:"bytes,2,opt,name=Security" json:"Security,omitempty"`
  88. }
  89. func (m *DomainSocketSettings) Reset() { *m = DomainSocketSettings{} }
  90. func (m *DomainSocketSettings) String() string { return proto.CompactTextString(m) }
  91. func (*DomainSocketSettings) ProtoMessage() {}
  92. func (*DomainSocketSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  93. func (m *DomainSocketSettings) GetPath() string {
  94. if m != nil {
  95. return m.Path
  96. }
  97. return ""
  98. }
  99. func (m *DomainSocketSettings) GetSecurity() *DomainSocketSecurity {
  100. if m != nil {
  101. return m.Security
  102. }
  103. return nil
  104. }
  105. func init() {
  106. proto.RegisterType((*DomainSocketSecurity)(nil), "v2ray.core.internet.domainsocket.DomainSocketSecurity")
  107. proto.RegisterType((*DomainSocketSettings)(nil), "v2ray.core.internet.domainsocket.DomainSocketSettings")
  108. proto.RegisterEnum("v2ray.core.internet.domainsocket.DomainSocketSecurityMode", DomainSocketSecurityMode_name, DomainSocketSecurityMode_value)
  109. }
  110. func init() {
  111. proto.RegisterFile("v2ray.com/core/transport/internet/domainsocket/config.proto", fileDescriptor0)
  112. }
  113. var fileDescriptor0 = []byte{
  114. // 323 bytes of a gzipped FileDescriptorProto
  115. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x4b, 0xf3, 0x40,
  116. 0x10, 0x86, 0xbf, 0xb4, 0xa1, 0xb4, 0xf3, 0x69, 0x09, 0xab, 0x68, 0x4e, 0x12, 0x7a, 0x0a, 0x1e,
  117. 0x12, 0xa8, 0xe0, 0x41, 0x4f, 0x4a, 0x3c, 0xf4, 0x50, 0x09, 0x5b, 0xea, 0xc1, 0xdb, 0x9a, 0xdd,
  118. 0xb6, 0x8b, 0xed, 0x4e, 0xdd, 0x4c, 0x95, 0x5e, 0xfc, 0x29, 0x1e, 0xfd, 0x9d, 0xd2, 0x95, 0xd8,
  119. 0x28, 0x8a, 0xe0, 0x2d, 0xf3, 0xe4, 0x9d, 0x87, 0x77, 0x60, 0xe1, 0xfc, 0xb1, 0x6f, 0xc5, 0x3a,
  120. 0x29, 0x70, 0x91, 0x16, 0x68, 0x55, 0x4a, 0x56, 0x98, 0x72, 0x89, 0x96, 0x52, 0x6d, 0x48, 0x59,
  121. 0xa3, 0x28, 0x95, 0xb8, 0x10, 0xda, 0x94, 0x58, 0xdc, 0x2b, 0x4a, 0x0b, 0x34, 0x13, 0x3d, 0x4d,
  122. 0x96, 0x16, 0x09, 0x59, 0x54, 0x2d, 0x5b, 0x95, 0x54, 0xf1, 0xa4, 0x1e, 0xef, 0xbd, 0x7a, 0xb0,
  123. 0x9f, 0x39, 0x30, 0x72, 0x60, 0xa4, 0x8a, 0x95, 0xd5, 0xb4, 0x66, 0xd7, 0xe0, 0x0f, 0x51, 0xaa,
  124. 0xd0, 0x8b, 0xbc, 0xb8, 0xdb, 0x3f, 0x4b, 0x7e, 0x33, 0x25, 0xdf, 0x59, 0x36, 0x06, 0xee, 0x3c,
  125. 0xec, 0x08, 0xe0, 0x62, 0x3e, 0xc7, 0x27, 0x25, 0x73, 0x2d, 0xc3, 0x46, 0xd4, 0x8c, 0x3b, 0xbc,
  126. 0x46, 0x6a, 0xff, 0xc7, 0x5a, 0x86, 0xcd, 0xa8, 0x19, 0xfb, 0xbc, 0x46, 0x7a, 0xcf, 0x5f, 0x7b,
  127. 0x12, 0x69, 0x33, 0x2d, 0x19, 0x03, 0x3f, 0x17, 0x34, 0x73, 0x3d, 0x3b, 0xdc, 0x7d, 0x33, 0x0e,
  128. 0xed, 0xaa, 0x41, 0xd8, 0x88, 0xbc, 0xf8, 0x7f, 0xff, 0xf4, 0x6f, 0xfd, 0xf9, 0x87, 0xe7, 0xf8,
  129. 0xc5, 0x83, 0xf0, 0xa7, 0x13, 0x19, 0x40, 0x2b, 0x13, 0x66, 0xaa, 0x6c, 0xf0, 0x8f, 0xed, 0x42,
  130. 0xe7, 0x46, 0x59, 0x3d, 0x59, 0xe7, 0x5a, 0x06, 0x1e, 0x3b, 0x84, 0xbd, 0x4c, 0x97, 0x0f, 0x2b,
  131. 0x31, 0xdf, 0xa0, 0x7c, 0x90, 0x0d, 0x05, 0x15, 0xb3, 0xa0, 0xc1, 0xba, 0x00, 0xef, 0xb9, 0xab,
  132. 0xf1, 0x20, 0x0b, 0xfc, 0xed, 0xcc, 0x37, 0x73, 0x9b, 0x1d, 0x00, 0xdb, 0x2e, 0x8e, 0xc4, 0x42,
  133. 0x8d, 0x4b, 0x65, 0x83, 0xe0, 0x33, 0xe7, 0x88, 0xe4, 0x78, 0x74, 0xd9, 0xbd, 0xdd, 0xa9, 0xdf,
  134. 0x73, 0xd7, 0x72, 0x4f, 0xe0, 0xe4, 0x2d, 0x00, 0x00, 0xff, 0xff, 0x30, 0xd5, 0x61, 0x90, 0x41,
  135. 0x02, 0x00, 0x00,
  136. }