Skip to content

Commit

Permalink
removed unused hy2 config
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaokangwang committed Sep 8, 2024
1 parent a368763 commit 5ad675f
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 268 deletions.
20 changes: 1 addition & 19 deletions infra/conf/v4/hysteria2.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,11 @@ func (c *Hysteria2ClientConfig) Build() (proto.Message, error) {
return config, nil
}

// Hysteria2UserConfig is user configuration
type Hysteria2UserConfig struct {
Level byte `json:"level"`
Email string `json:"email"`
}

// Hysteria2ServerConfig is Inbound configuration
type Hysteria2ServerConfig struct {
Clients []*Hysteria2UserConfig `json:"clients"`
}
type Hysteria2ServerConfig struct{}

// Build implements Buildable
func (c *Hysteria2ServerConfig) Build() (proto.Message, error) {
config := new(hysteria2.ServerConfig)
config.Users = make([]*protocol.User, len(c.Clients))
for idx, rawUser := range c.Clients {
user := new(protocol.User)
account := &hysteria2.Account{}

user.Email = rawUser.Email
user.Level = uint32(rawUser.Level)
user.Account = serial.ToTypedMessage(account)
config.Users[idx] = user
}
return config, nil
}
11 changes: 5 additions & 6 deletions proxy/hysteria2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter
defer conn.Close()

user := server.PickUser()
account, ok := user.Account.(*MemoryAccount)
if !ok {
return newError("user account is not valid")
userLevel := uint32(0)
if user != nil {
userLevel = user.Level
}

sessionPolicy := c.policyManager.ForLevel(user.Level)
sessionPolicy := c.policyManager.ForLevel(userLevel)
ctx, cancel := context.WithCancel(ctx)
timer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle)

Expand All @@ -104,7 +103,7 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter

var bodyWriter buf.Writer
bufferWriter := buf.NewBufferedWriter(buf.NewWriter(conn))
connWriter := &ConnWriter{Writer: bufferWriter, Target: destination, Account: account}
connWriter := &ConnWriter{Writer: bufferWriter, Target: destination}
bodyWriter = connWriter

if network == net.Network_UDP {
Expand Down
187 changes: 44 additions & 143 deletions proxy/hysteria2/config.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,73 +16,16 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type OBFS struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
}

func (x *OBFS) Reset() {
*x = OBFS{}
if protoimpl.UnsafeEnabled {
mi := &file_proxy_hysteria2_config_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *OBFS) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*OBFS) ProtoMessage() {}

func (x *OBFS) ProtoReflect() protoreflect.Message {
mi := &file_proxy_hysteria2_config_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use OBFS.ProtoReflect.Descriptor instead.
func (*OBFS) Descriptor() ([]byte, []int) {
return file_proxy_hysteria2_config_proto_rawDescGZIP(), []int{0}
}

func (x *OBFS) GetType() string {
if x != nil {
return x.Type
}
return ""
}

func (x *OBFS) GetPassword() string {
if x != nil {
return x.Password
}
return ""
}

type Account struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Obfs *OBFS `protobuf:"bytes,1,opt,name=obfs,proto3" json:"obfs,omitempty"`
}

func (x *Account) Reset() {
*x = Account{}
if protoimpl.UnsafeEnabled {
mi := &file_proxy_hysteria2_config_proto_msgTypes[1]
mi := &file_proxy_hysteria2_config_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
Expand All @@ -95,7 +38,7 @@ func (x *Account) String() string {
func (*Account) ProtoMessage() {}

func (x *Account) ProtoReflect() protoreflect.Message {
mi := &file_proxy_hysteria2_config_proto_msgTypes[1]
mi := &file_proxy_hysteria2_config_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
Expand All @@ -108,14 +51,7 @@ func (x *Account) ProtoReflect() protoreflect.Message {

// Deprecated: Use Account.ProtoReflect.Descriptor instead.
func (*Account) Descriptor() ([]byte, []int) {
return file_proxy_hysteria2_config_proto_rawDescGZIP(), []int{1}
}

func (x *Account) GetObfs() *OBFS {
if x != nil {
return x.Obfs
}
return nil
return file_proxy_hysteria2_config_proto_rawDescGZIP(), []int{0}
}

type ClientConfig struct {
Expand All @@ -129,7 +65,7 @@ type ClientConfig struct {
func (x *ClientConfig) Reset() {
*x = ClientConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_proxy_hysteria2_config_proto_msgTypes[2]
mi := &file_proxy_hysteria2_config_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
Expand All @@ -142,7 +78,7 @@ func (x *ClientConfig) String() string {
func (*ClientConfig) ProtoMessage() {}

func (x *ClientConfig) ProtoReflect() protoreflect.Message {
mi := &file_proxy_hysteria2_config_proto_msgTypes[2]
mi := &file_proxy_hysteria2_config_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
Expand All @@ -155,7 +91,7 @@ func (x *ClientConfig) ProtoReflect() protoreflect.Message {

// Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
func (*ClientConfig) Descriptor() ([]byte, []int) {
return file_proxy_hysteria2_config_proto_rawDescGZIP(), []int{2}
return file_proxy_hysteria2_config_proto_rawDescGZIP(), []int{1}
}

func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint {
Expand All @@ -169,14 +105,12 @@ type ServerConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Users []*protocol.User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
}

func (x *ServerConfig) Reset() {
*x = ServerConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_proxy_hysteria2_config_proto_msgTypes[3]
mi := &file_proxy_hysteria2_config_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
Expand All @@ -189,7 +123,7 @@ func (x *ServerConfig) String() string {
func (*ServerConfig) ProtoMessage() {}

func (x *ServerConfig) ProtoReflect() protoreflect.Message {
mi := &file_proxy_hysteria2_config_proto_msgTypes[3]
mi := &file_proxy_hysteria2_config_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
Expand All @@ -202,14 +136,7 @@ func (x *ServerConfig) ProtoReflect() protoreflect.Message {

// Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
func (*ServerConfig) Descriptor() ([]byte, []int) {
return file_proxy_hysteria2_config_proto_rawDescGZIP(), []int{3}
}

func (x *ServerConfig) GetUsers() []*protocol.User {
if x != nil {
return x.Users
}
return nil
return file_proxy_hysteria2_config_proto_rawDescGZIP(), []int{2}
}

var File_proxy_hysteria2_config_proto protoreflect.FileDescriptor
Expand All @@ -224,35 +151,25 @@ var file_proxy_hysteria2_config_proto_rawDesc = []byte{
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73,
0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x78, 0x74, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x36, 0x0a, 0x04, 0x4f,
0x42, 0x46, 0x53, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x22, 0x3f, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34,
0x0a, 0x04, 0x6f, 0x62, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76,
0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e,
0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69, 0x61, 0x32, 0x2e, 0x4f, 0x42, 0x46, 0x53, 0x52, 0x04,
0x6f, 0x62, 0x66, 0x73, 0x22, 0x6d, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x19, 0x82, 0xb5, 0x18, 0x15, 0x0a, 0x08,
0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x09, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72,
0x69, 0x61, 0x32, 0x22, 0x60, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e,
0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, 0x18, 0x82, 0xb5, 0x18,
0x14, 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x09, 0x68, 0x79, 0x73, 0x74,
0x65, 0x72, 0x69, 0x61, 0x32, 0x42, 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72,
0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x79,
0x73, 0x74, 0x65, 0x72, 0x69, 0x61, 0x32, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61,
0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f,
0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69, 0x61, 0x32, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61,
0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48, 0x79, 0x73,
0x74, 0x65, 0x72, 0x69, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x09, 0x0a, 0x07, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6d, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63,
0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x19, 0x82, 0xb5, 0x18, 0x15,
0x0a, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x09, 0x68, 0x79, 0x73, 0x74,
0x65, 0x72, 0x69, 0x61, 0x32, 0x22, 0x28, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x18, 0x82, 0xb5, 0x18, 0x14, 0x0a, 0x07, 0x69, 0x6e, 0x62,
0x6f, 0x75, 0x6e, 0x64, 0x12, 0x09, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69, 0x61, 0x32, 0x42,
0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69, 0x61,
0x32, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65,
0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72,
0x69, 0x61, 0x32, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65,
0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69, 0x61, 0x32,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
Expand All @@ -267,24 +184,20 @@ func file_proxy_hysteria2_config_proto_rawDescGZIP() []byte {
return file_proxy_hysteria2_config_proto_rawDescData
}

var file_proxy_hysteria2_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proxy_hysteria2_config_proto_goTypes = []interface{}{
(*OBFS)(nil), // 0: v2ray.core.proxy.hysteria2.OBFS
(*Account)(nil), // 1: v2ray.core.proxy.hysteria2.Account
(*ClientConfig)(nil), // 2: v2ray.core.proxy.hysteria2.ClientConfig
(*ServerConfig)(nil), // 3: v2ray.core.proxy.hysteria2.ServerConfig
(*protocol.ServerEndpoint)(nil), // 4: v2ray.core.common.protocol.ServerEndpoint
(*protocol.User)(nil), // 5: v2ray.core.common.protocol.User
var file_proxy_hysteria2_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_proxy_hysteria2_config_proto_goTypes = []any{
(*Account)(nil), // 0: v2ray.core.proxy.hysteria2.Account
(*ClientConfig)(nil), // 1: v2ray.core.proxy.hysteria2.ClientConfig
(*ServerConfig)(nil), // 2: v2ray.core.proxy.hysteria2.ServerConfig
(*protocol.ServerEndpoint)(nil), // 3: v2ray.core.common.protocol.ServerEndpoint
}
var file_proxy_hysteria2_config_proto_depIdxs = []int32{
0, // 0: v2ray.core.proxy.hysteria2.Account.obfs:type_name -> v2ray.core.proxy.hysteria2.OBFS
4, // 1: v2ray.core.proxy.hysteria2.ClientConfig.server:type_name -> v2ray.core.common.protocol.ServerEndpoint
5, // 2: v2ray.core.proxy.hysteria2.ServerConfig.users:type_name -> v2ray.core.common.protocol.User
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
3, // 0: v2ray.core.proxy.hysteria2.ClientConfig.server:type_name -> v2ray.core.common.protocol.ServerEndpoint
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}

func init() { file_proxy_hysteria2_config_proto_init() }
Expand All @@ -293,19 +206,7 @@ func file_proxy_hysteria2_config_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_proxy_hysteria2_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBFS); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proxy_hysteria2_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_proxy_hysteria2_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Account); i {
case 0:
return &v.state
Expand All @@ -317,7 +218,7 @@ func file_proxy_hysteria2_config_proto_init() {
return nil
}
}
file_proxy_hysteria2_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_proxy_hysteria2_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*ClientConfig); i {
case 0:
return &v.state
Expand All @@ -329,7 +230,7 @@ func file_proxy_hysteria2_config_proto_init() {
return nil
}
}
file_proxy_hysteria2_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_proxy_hysteria2_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*ServerConfig); i {
case 0:
return &v.state
Expand All @@ -348,7 +249,7 @@ func file_proxy_hysteria2_config_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proxy_hysteria2_config_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
Expand Down
7 changes: 0 additions & 7 deletions proxy/hysteria2/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ import "common/protocol/user.proto";
import "common/protocol/server_spec.proto";
import "common/protoext/extensions.proto";

message OBFS {
string type = 1;
string password = 2;
}

message Account {
OBFS obfs = 1;
}

message ClientConfig {
Expand All @@ -29,6 +24,4 @@ message ClientConfig {
message ServerConfig {
option (v2ray.core.common.protoext.message_opt).type = "inbound";
option (v2ray.core.common.protoext.message_opt).short_name = "hysteria2";

repeated v2ray.core.common.protocol.User users = 1;
}
1 change: 0 additions & 1 deletion proxy/hysteria2/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
type ConnWriter struct {
io.Writer
Target net.Destination
Account *MemoryAccount
TCPHeaderSent bool
}

Expand Down
Loading

0 comments on commit 5ad675f

Please sign in to comment.