diff --git a/app/commander/config.pb.go b/app/commander/config.pb.go index 68bcaa618..04aef5e4e 100644 --- a/app/commander/config.pb.go +++ b/app/commander/config.pb.go @@ -34,7 +34,8 @@ type Config struct { // Tag of the outbound handler that handles grpc connections. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` - // Services that supported by this server. All services must implement Service interface. + // Services that supported by this server. All services must implement Service + // interface. Service []*serial.TypedMessage `protobuf:"bytes,2,rep,name=service,proto3" json:"service,omitempty"` } diff --git a/app/commander/config.proto b/app/commander/config.proto index 732b6857d..44031f708 100644 --- a/app/commander/config.proto +++ b/app/commander/config.proto @@ -12,6 +12,7 @@ import "common/serial/typed_message.proto"; message Config { // Tag of the outbound handler that handles grpc connections. string tag = 1; - // Services that supported by this server. All services must implement Service interface. + // Services that supported by this server. All services must implement Service + // interface. repeated v2ray.core.common.serial.TypedMessage service = 2; } diff --git a/app/dispatcher/config.proto b/app/dispatcher/config.proto index 398b58711..b461589c1 100644 --- a/app/dispatcher/config.proto +++ b/app/dispatcher/config.proto @@ -8,7 +8,6 @@ option java_multiple_files = true; message SessionConfig { reserved 1; - } message Config { diff --git a/app/dns/config.pb.go b/app/dns/config.pb.go index 6a9ebeacf..a39940f2d 100644 --- a/app/dns/config.pb.go +++ b/app/dns/config.pb.go @@ -155,8 +155,9 @@ type Config struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Nameservers used by this DNS. Only traditional UDP servers are support at the moment. - // A special value 'localhost' as a domain address can be set to use DNS on local system. + // Nameservers used by this DNS. Only traditional UDP servers are support at + // the moment. A special value 'localhost' as a domain address can be set to + // use DNS on local system. // // Deprecated: Do not use. NameServers []*net.Endpoint `protobuf:"bytes,1,rep,name=NameServers,proto3" json:"NameServers,omitempty"` @@ -167,7 +168,8 @@ type Config struct { // // Deprecated: Do not use. Hosts map[string]*net.IPOrDomain `protobuf:"bytes,2,rep,name=Hosts,proto3" json:"Hosts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes (IPv6). + // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes + // (IPv6). ClientIp []byte `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"` StaticHosts []*Config_HostMapping `protobuf:"bytes,4,rep,name=static_hosts,json=staticHosts,proto3" json:"static_hosts,omitempty"` // Tag is the inbound tag of DNS client. @@ -368,8 +370,9 @@ type Config_HostMapping struct { Type DomainMatchingType `protobuf:"varint,1,opt,name=type,proto3,enum=v2ray.core.app.dns.DomainMatchingType" json:"type,omitempty"` Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` Ip [][]byte `protobuf:"bytes,3,rep,name=ip,proto3" json:"ip,omitempty"` - // ProxiedDomain indicates the mapped domain has the same IP address on this domain. V2Ray will use this domain for IP queries. - // This field is only effective if ip is empty. + // ProxiedDomain indicates the mapped domain has the same IP address on this + // domain. V2Ray will use this domain for IP queries. This field is only + // effective if ip is empty. ProxiedDomain string `protobuf:"bytes,4,opt,name=proxied_domain,json=proxiedDomain,proto3" json:"proxied_domain,omitempty"` } diff --git a/app/dns/config.proto b/app/dns/config.proto index 9ccf248f4..11990f23c 100644 --- a/app/dns/config.proto +++ b/app/dns/config.proto @@ -36,8 +36,9 @@ enum DomainMatchingType { } message Config { - // Nameservers used by this DNS. Only traditional UDP servers are support at the moment. - // A special value 'localhost' as a domain address can be set to use DNS on local system. + // Nameservers used by this DNS. Only traditional UDP servers are support at + // the moment. A special value 'localhost' as a domain address can be set to + // use DNS on local system. repeated v2ray.core.common.net.Endpoint NameServers = 1 [deprecated = true]; // NameServer list used by this DNS client. @@ -47,7 +48,8 @@ message Config { // Deprecated. Use static_hosts. map Hosts = 2 [deprecated = true]; - // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes (IPv6). + // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes + // (IPv6). bytes client_ip = 3; message HostMapping { @@ -56,8 +58,9 @@ message Config { repeated bytes ip = 3; - // ProxiedDomain indicates the mapped domain has the same IP address on this domain. V2Ray will use this domain for IP queries. - // This field is only effective if ip is empty. + // ProxiedDomain indicates the mapped domain has the same IP address on this + // domain. V2Ray will use this domain for IP queries. This field is only + // effective if ip is empty. string proxied_domain = 4; } diff --git a/app/log/command/config.proto b/app/log/command/config.proto index 870819d65..369923c83 100644 --- a/app/log/command/config.proto +++ b/app/log/command/config.proto @@ -6,12 +6,11 @@ option go_package = "v2ray.com/core/app/log/command"; option java_package = "com.v2ray.core.app.log.command"; option java_multiple_files = true; -message Config { -} +message Config {} message RestartLoggerRequest {} -message RestartLoggerResponse{} +message RestartLoggerResponse {} service LoggerService { rpc RestartLogger(RestartLoggerRequest) returns (RestartLoggerResponse) {} diff --git a/app/proxyman/command/command.proto b/app/proxyman/command/command.proto index 786087d19..71004ad5f 100644 --- a/app/proxyman/command/command.proto +++ b/app/proxyman/command/command.proto @@ -22,9 +22,7 @@ message AddInboundRequest { core.InboundHandlerConfig inbound = 1; } -message AddInboundResponse{ - -} +message AddInboundResponse {} message RemoveInboundRequest { string tag = 1; @@ -37,31 +35,26 @@ message AlterInboundRequest { v2ray.core.common.serial.TypedMessage operation = 2; } -message AlterInboundResponse { -} +message AlterInboundResponse {} message AddOutboundRequest { core.OutboundHandlerConfig outbound = 1; } -message AddOutboundResponse { - -} +message AddOutboundResponse {} message RemoveOutboundRequest { string tag = 1; } -message RemoveOutboundResponse { -} +message RemoveOutboundResponse {} message AlterOutboundRequest { string tag = 1; v2ray.core.common.serial.TypedMessage operation = 2; } -message AlterOutboundResponse { -} +message AlterOutboundResponse {} service HandlerService { rpc AddInbound(AddInboundRequest) returns (AddInboundResponse) {} diff --git a/app/proxyman/config.proto b/app/proxyman/config.proto index 5efda02ac..7f4b7b8d2 100644 --- a/app/proxyman/config.proto +++ b/app/proxyman/config.proto @@ -11,8 +11,7 @@ import "common/net/port.proto"; import "transport/internet/config.proto"; import "common/serial/typed_message.proto"; -message InboundConfig { -} +message InboundConfig {} message AllocationStrategy { enum Type { @@ -36,7 +35,6 @@ message AllocationStrategy { // Default value is 3 if unset. AllocationStrategyConcurrency concurrency = 2; - message AllocationStrategyRefresh { uint32 value = 1; } @@ -81,9 +79,7 @@ message InboundHandlerConfig { v2ray.core.common.serial.TypedMessage proxy_settings = 3; } -message OutboundConfig { - -} +message OutboundConfig {} message SenderConfig { // Send traffic through the given IP. Only IP is allowed. diff --git a/app/reverse/config.proto b/app/reverse/config.proto index 37a79a01c..53c81fbc4 100644 --- a/app/reverse/config.proto +++ b/app/reverse/config.proto @@ -19,7 +19,6 @@ message Control { message BridgeConfig { string tag = 1; string domain = 2; - } message PortalConfig { diff --git a/app/router/command/command.pb.go b/app/router/command/command.pb.go index 2c3691b24..9ea07bfa9 100644 --- a/app/router/command/command.pb.go +++ b/app/router/command/command.pb.go @@ -27,7 +27,8 @@ const ( const _ = proto.ProtoPackageIsVersion4 // RoutingContext is the context with information relative to routing process. -// It conforms to the structure of v2ray.core.features.routing.Context and v2ray.core.features.routing.Route. +// It conforms to the structure of v2ray.core.features.routing.Context and +// v2ray.core.features.routing.Route. type RoutingContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -163,17 +164,22 @@ func (x *RoutingContext) GetOutboundTag() string { return "" } -// SubscribeRoutingStatsRequest subscribes to routing statistics channel if opened by v2ray-core. -// * FieldSelectors selects a subset of fields in routing statistics to return. Valid selectors: +// SubscribeRoutingStatsRequest subscribes to routing statistics channel if +// opened by v2ray-core. +// * FieldSelectors selects a subset of fields in routing statistics to return. +// Valid selectors: // - inbound: Selects connection's inbound tag. // - network: Selects connection's network. -// - ip: Equivalent as "ip_source" and "ip_target", selects both source and target IP. -// - port: Equivalent as "port_source" and "port_target", selects both source and target port. +// - ip: Equivalent as "ip_source" and "ip_target", selects both source and +// target IP. +// - port: Equivalent as "port_source" and "port_target", selects both source +// and target port. // - domain: Selects target domain. // - protocol: Select connection's protocol. // - user: Select connection's inbound user email. // - attributes: Select connection's additional attributes. -// - outbound: Equivalent as "outbound" and "outbound_group", select both outbound tag and outbound group tags. +// - outbound: Equivalent as "outbound" and "outbound_group", select both +// outbound tag and outbound group tags. // * If FieldSelectors is left empty, all fields will be returned. type SubscribeRoutingStatsRequest struct { state protoimpl.MessageState @@ -222,10 +228,13 @@ func (x *SubscribeRoutingStatsRequest) GetFieldSelectors() []string { return nil } -// TestRouteRequest manually tests a routing result according to the routing context message. +// TestRouteRequest manually tests a routing result according to the routing +// context message. // * RoutingContext is the routing message without outbound information. -// * FieldSelectors selects the fields to return in the routing result. All fields are returned if left empty. -// * PublishResult broadcasts the routing result to routing statistics channel if set true. +// * FieldSelectors selects the fields to return in the routing result. All +// fields are returned if left empty. +// * PublishResult broadcasts the routing result to routing statistics channel +// if set true. type TestRouteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/app/router/command/command.proto b/app/router/command/command.proto index 84210a2e2..65e732542 100644 --- a/app/router/command/command.proto +++ b/app/router/command/command.proto @@ -9,7 +9,8 @@ option java_multiple_files = true; import "common/net/network.proto"; // RoutingContext is the context with information relative to routing process. -// It conforms to the structure of v2ray.core.features.routing.Context and v2ray.core.features.routing.Route. +// It conforms to the structure of v2ray.core.features.routing.Context and +// v2ray.core.features.routing.Route. message RoutingContext { string InboundTag = 1; v2ray.core.common.net.Network Network = 2; @@ -25,26 +26,34 @@ message RoutingContext { string OutboundTag = 12; } -// SubscribeRoutingStatsRequest subscribes to routing statistics channel if opened by v2ray-core. -// * FieldSelectors selects a subset of fields in routing statistics to return. Valid selectors: +// SubscribeRoutingStatsRequest subscribes to routing statistics channel if +// opened by v2ray-core. +// * FieldSelectors selects a subset of fields in routing statistics to return. +// Valid selectors: // - inbound: Selects connection's inbound tag. // - network: Selects connection's network. -// - ip: Equivalent as "ip_source" and "ip_target", selects both source and target IP. -// - port: Equivalent as "port_source" and "port_target", selects both source and target port. +// - ip: Equivalent as "ip_source" and "ip_target", selects both source and +// target IP. +// - port: Equivalent as "port_source" and "port_target", selects both source +// and target port. // - domain: Selects target domain. // - protocol: Select connection's protocol. // - user: Select connection's inbound user email. // - attributes: Select connection's additional attributes. -// - outbound: Equivalent as "outbound" and "outbound_group", select both outbound tag and outbound group tags. +// - outbound: Equivalent as "outbound" and "outbound_group", select both +// outbound tag and outbound group tags. // * If FieldSelectors is left empty, all fields will be returned. message SubscribeRoutingStatsRequest { repeated string FieldSelectors = 1; } -// TestRouteRequest manually tests a routing result according to the routing context message. +// TestRouteRequest manually tests a routing result according to the routing +// context message. // * RoutingContext is the routing message without outbound information. -// * FieldSelectors selects the fields to return in the routing result. All fields are returned if left empty. -// * PublishResult broadcasts the routing result to routing statistics channel if set true. +// * FieldSelectors selects the fields to return in the routing result. All +// fields are returned if left empty. +// * PublishResult broadcasts the routing result to routing statistics channel +// if set true. message TestRouteRequest { RoutingContext RoutingContext = 1; repeated string FieldSelectors = 2; @@ -52,7 +61,8 @@ message TestRouteRequest { } service RoutingService { - rpc SubscribeRoutingStats(SubscribeRoutingStatsRequest) returns (stream RoutingContext) {} + rpc SubscribeRoutingStats(SubscribeRoutingStatsRequest) + returns (stream RoutingContext) {} rpc TestRoute(TestRouteRequest) returns (RoutingContext) {} } diff --git a/app/router/config.pb.go b/app/router/config.pb.go index 6d430ceb8..c052f7b49 100644 --- a/app/router/config.pb.go +++ b/app/router/config.pb.go @@ -484,12 +484,13 @@ type RoutingRule struct { // // Deprecated: Do not use. Cidr []*CIDR `protobuf:"bytes,3,rep,name=cidr,proto3" json:"cidr,omitempty"` - // List of GeoIPs for target IP address matching. If this entry exists, the cidr above will have no effect. - // GeoIP fields with the same country code are supposed to contain exactly same content. They will be merged during runtime. - // For customized GeoIPs, please leave country code empty. + // List of GeoIPs for target IP address matching. If this entry exists, the + // cidr above will have no effect. GeoIP fields with the same country code are + // supposed to contain exactly same content. They will be merged during + // runtime. For customized GeoIPs, please leave country code empty. Geoip []*GeoIP `protobuf:"bytes,10,rep,name=geoip,proto3" json:"geoip,omitempty"` - // A range of port [from, to]. If the destination port is in this range, this rule takes effect. - // Deprecated. Use port_list. + // A range of port [from, to]. If the destination port is in this range, this + // rule takes effect. Deprecated. Use port_list. // // Deprecated: Do not use. PortRange *net.PortRange `protobuf:"bytes,4,opt,name=port_range,json=portRange,proto3" json:"port_range,omitempty"` @@ -505,7 +506,8 @@ type RoutingRule struct { // // Deprecated: Do not use. SourceCidr []*CIDR `protobuf:"bytes,6,rep,name=source_cidr,json=sourceCidr,proto3" json:"source_cidr,omitempty"` - // List of GeoIPs for source IP address matching. If this entry exists, the source_cidr above will have no effect. + // List of GeoIPs for source IP address matching. If this entry exists, the + // source_cidr above will have no effect. SourceGeoip []*GeoIP `protobuf:"bytes,11,rep,name=source_geoip,json=sourceGeoip,proto3" json:"source_geoip,omitempty"` // List of ports for source port matching. SourcePortList *net.PortList `protobuf:"bytes,16,opt,name=source_port_list,json=sourcePortList,proto3" json:"source_port_list,omitempty"` diff --git a/app/router/config.proto b/app/router/config.proto index 8c9bf05b7..66f759470 100644 --- a/app/router/config.proto +++ b/app/router/config.proto @@ -65,7 +65,7 @@ message GeoSite { repeated Domain domain = 2; } -message GeoSiteList{ +message GeoSiteList { repeated GeoSite entry = 1; } @@ -78,7 +78,6 @@ message RoutingRule { string balancing_tag = 12; } - // List of domains for target domain matching. repeated Domain domain = 2; @@ -86,13 +85,14 @@ message RoutingRule { // Deprecated. Use geoip below. repeated CIDR cidr = 3 [deprecated = true]; - // List of GeoIPs for target IP address matching. If this entry exists, the cidr above will have no effect. - // GeoIP fields with the same country code are supposed to contain exactly same content. They will be merged during runtime. - // For customized GeoIPs, please leave country code empty. + // List of GeoIPs for target IP address matching. If this entry exists, the + // cidr above will have no effect. GeoIP fields with the same country code are + // supposed to contain exactly same content. They will be merged during + // runtime. For customized GeoIPs, please leave country code empty. repeated GeoIP geoip = 10; - // A range of port [from, to]. If the destination port is in this range, this rule takes effect. - // Deprecated. Use port_list. + // A range of port [from, to]. If the destination port is in this range, this + // rule takes effect. Deprecated. Use port_list. v2ray.core.common.net.PortRange port_range = 4 [deprecated = true]; // List of ports. @@ -107,7 +107,8 @@ message RoutingRule { // List of CIDRs for source IP address matching. repeated CIDR source_cidr = 6 [deprecated = true]; - // List of GeoIPs for source IP address matching. If this entry exists, the source_cidr above will have no effect. + // List of GeoIPs for source IP address matching. If this entry exists, the + // source_cidr above will have no effect. repeated GeoIP source_geoip = 11; // List of ports for source port matching. diff --git a/app/stats/command/command.proto b/app/stats/command/command.proto index 83536dff6..11c4d245e 100644 --- a/app/stats/command/command.proto +++ b/app/stats/command/command.proto @@ -31,8 +31,7 @@ message QueryStatsResponse { repeated Stat stat = 1; } -message SysStatsRequest { -} +message SysStatsRequest {} message SysStatsResponse { uint32 NumGoroutine = 1; diff --git a/app/stats/config.proto b/app/stats/config.proto index f2d0da9c5..db63e9a36 100644 --- a/app/stats/config.proto +++ b/app/stats/config.proto @@ -6,12 +6,10 @@ option go_package = "v2ray.com/core/app/stats"; option java_package = "com.v2ray.core.app.stats"; option java_multiple_files = true; -message Config { - -} +message Config {} message ChannelConfig { - bool Blocking = 1; + bool Blocking = 1; int32 SubscriberLimit = 2; int32 BufferSize = 3; } diff --git a/common/net/address.pb.go b/common/net/address.pb.go index ceeecae9b..b5dc27c42 100644 --- a/common/net/address.pb.go +++ b/common/net/address.pb.go @@ -25,7 +25,8 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 -// Address of a network host. It may be either an IP address or a domain address. +// Address of a network host. It may be either an IP address or a domain +// address. type IPOrDomain struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/common/net/address.proto b/common/net/address.proto index a6309a359..2149030f7 100644 --- a/common/net/address.proto +++ b/common/net/address.proto @@ -6,7 +6,8 @@ option go_package = "v2ray.com/core/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; -// Address of a network host. It may be either an IP address or a domain address. +// Address of a network host. It may be either an IP address or a domain +// address. message IPOrDomain { oneof address { // IP address. Must by either 4 or 16 bytes. diff --git a/common/net/network.proto b/common/net/network.proto index 49ac11adf..adaca5fb1 100644 --- a/common/net/network.proto +++ b/common/net/network.proto @@ -9,7 +9,7 @@ option java_multiple_files = true; enum Network { Unknown = 0; - RawTCP = 1 [deprecated=true]; + RawTCP = 1 [deprecated = true]; TCP = 2; UDP = 3; } diff --git a/common/protocol/user.pb.go b/common/protocol/user.pb.go index cf21d68b8..9e9bf1706 100644 --- a/common/protocol/user.pb.go +++ b/common/protocol/user.pb.go @@ -34,7 +34,8 @@ type User struct { Level uint32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` - // Protocol specific account information. Must be the account proto in one of the proxies. + // Protocol specific account information. Must be the account proto in one of + // the proxies. Account *serial.TypedMessage `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` } diff --git a/common/protocol/user.proto b/common/protocol/user.proto index 0a67488d1..41d1b34ec 100644 --- a/common/protocol/user.proto +++ b/common/protocol/user.proto @@ -13,6 +13,7 @@ message User { uint32 level = 1; string email = 2; - // Protocol specific account information. Must be the account proto in one of the proxies. + // Protocol specific account information. Must be the account proto in one of + // the proxies. v2ray.core.common.serial.TypedMessage account = 3; } diff --git a/common/serial/typed_message.proto b/common/serial/typed_message.proto index 4ce10c607..d32250ed1 100644 --- a/common/serial/typed_message.proto +++ b/common/serial/typed_message.proto @@ -10,6 +10,6 @@ option java_multiple_files = true; message TypedMessage { // The name of the message type, retrieved from protobuf API. string type = 1; - // Serialized proto message. + // Serialized proto message. bytes value = 2; } diff --git a/config.pb.go b/config.pb.go index 9ab5b16e9..9a4056a29 100644 --- a/config.pb.go +++ b/config.pb.go @@ -27,7 +27,8 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 -// Config is the master config of V2Ray. V2Ray takes this config as input and functions accordingly. +// Config is the master config of V2Ray. V2Ray takes this config as input and +// functions accordingly. type Config struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -35,18 +36,22 @@ type Config struct { // Inbound handler configurations. Must have at least one item. Inbound []*InboundHandlerConfig `protobuf:"bytes,1,rep,name=inbound,proto3" json:"inbound,omitempty"` - // Outbound handler configurations. Must have at least one item. The first item is used as default for routing. + // Outbound handler configurations. Must have at least one item. The first + // item is used as default for routing. Outbound []*OutboundHandlerConfig `protobuf:"bytes,2,rep,name=outbound,proto3" json:"outbound,omitempty"` - // App is for configurations of all features in V2Ray. A feature must implement the Feature interface, and its config type must be registered through common.RegisterConfig. + // App is for configurations of all features in V2Ray. A feature must + // implement the Feature interface, and its config type must be registered + // through common.RegisterConfig. App []*serial.TypedMessage `protobuf:"bytes,4,rep,name=app,proto3" json:"app,omitempty"` // Transport settings. - // Deprecated. Each inbound and outbound should choose their own transport config. - // Date to remove: 2020-01-13 + // Deprecated. Each inbound and outbound should choose their own transport + // config. Date to remove: 2020-01-13 // // Deprecated: Do not use. Transport *transport.Config `protobuf:"bytes,5,opt,name=transport,proto3" json:"transport,omitempty"` - // Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray. - // V2Ray will ignore such config during initialization. + // Configuration for extensions. The config may not work if corresponding + // extension is not loaded into V2Ray. V2Ray will ignore such config during + // initialization. Extension []*serial.TypedMessage `protobuf:"bytes,6,rep,name=extension,proto3" json:"extension,omitempty"` } @@ -124,7 +129,8 @@ type InboundHandlerConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Tag of the inbound handler. The tag must be unique among all inbound handlers + // Tag of the inbound handler. The tag must be unique among all inbound + // handlers Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` // Settings for how this inbound proxy is handled. ReceiverSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=receiver_settings,json=receiverSettings,proto3" json:"receiver_settings,omitempty"` diff --git a/config.proto b/config.proto index 90c6434ab..4f97f7359 100644 --- a/config.proto +++ b/config.proto @@ -9,32 +9,38 @@ option java_multiple_files = true; import "common/serial/typed_message.proto"; import "transport/config.proto"; -// Config is the master config of V2Ray. V2Ray takes this config as input and functions accordingly. +// Config is the master config of V2Ray. V2Ray takes this config as input and +// functions accordingly. message Config { // Inbound handler configurations. Must have at least one item. repeated InboundHandlerConfig inbound = 1; - // Outbound handler configurations. Must have at least one item. The first item is used as default for routing. + // Outbound handler configurations. Must have at least one item. The first + // item is used as default for routing. repeated OutboundHandlerConfig outbound = 2; reserved 3; - // App is for configurations of all features in V2Ray. A feature must implement the Feature interface, and its config type must be registered through common.RegisterConfig. + // App is for configurations of all features in V2Ray. A feature must + // implement the Feature interface, and its config type must be registered + // through common.RegisterConfig. repeated v2ray.core.common.serial.TypedMessage app = 4; // Transport settings. - // Deprecated. Each inbound and outbound should choose their own transport config. - // Date to remove: 2020-01-13 + // Deprecated. Each inbound and outbound should choose their own transport + // config. Date to remove: 2020-01-13 v2ray.core.transport.Config transport = 5 [deprecated = true]; - // Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray. - // V2Ray will ignore such config during initialization. + // Configuration for extensions. The config may not work if corresponding + // extension is not loaded into V2Ray. V2Ray will ignore such config during + // initialization. repeated v2ray.core.common.serial.TypedMessage extension = 6; } // InboundHandlerConfig is the configuration for inbound handler. message InboundHandlerConfig { - // Tag of the inbound handler. The tag must be unique among all inbound handlers + // Tag of the inbound handler. The tag must be unique among all inbound + // handlers string tag = 1; // Settings for how this inbound proxy is handled. v2ray.core.common.serial.TypedMessage receiver_settings = 2; diff --git a/proxy/blackhole/config.proto b/proxy/blackhole/config.proto index 26dcfc3a2..aae9869c9 100644 --- a/proxy/blackhole/config.proto +++ b/proxy/blackhole/config.proto @@ -8,11 +8,9 @@ option java_multiple_files = true; import "common/serial/typed_message.proto"; -message NoneResponse { -} +message NoneResponse {} -message HTTPResponse { -} +message HTTPResponse {} message Config { v2ray.core.common.serial.TypedMessage response = 1; diff --git a/proxy/dns/config.pb.go b/proxy/dns/config.pb.go index 2e7052197..823f37187 100644 --- a/proxy/dns/config.pb.go +++ b/proxy/dns/config.pb.go @@ -31,7 +31,8 @@ type Config struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Server is the DNS server address. If specified, this address overrides the original one. + // Server is the DNS server address. If specified, this address overrides the + // original one. Server *net.Endpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` } diff --git a/proxy/dns/config.proto b/proxy/dns/config.proto index 7e2394e3e..e56054082 100644 --- a/proxy/dns/config.proto +++ b/proxy/dns/config.proto @@ -9,6 +9,7 @@ option java_multiple_files = true; import "common/net/destination.proto"; message Config { - // Server is the DNS server address. If specified, this address overrides the original one. + // Server is the DNS server address. If specified, this address overrides the + // original one. v2ray.core.common.net.Endpoint server = 1; } diff --git a/proxy/mtproto/config.pb.go b/proxy/mtproto/config.pb.go index 1eb6081aa..cb397c832 100644 --- a/proxy/mtproto/config.pb.go +++ b/proxy/mtproto/config.pb.go @@ -79,7 +79,8 @@ type ServerConfig struct { unknownFields protoimpl.UnknownFields // User is a list of users that allowed to connect to this inbound. - // Although this is a repeated field, only the first user is effective for now. + // Although this is a repeated field, only the first user is effective for + // now. User []*protocol.User `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"` } diff --git a/proxy/mtproto/config.proto b/proxy/mtproto/config.proto index e239afe17..1eba68708 100644 --- a/proxy/mtproto/config.proto +++ b/proxy/mtproto/config.proto @@ -14,10 +14,9 @@ message Account { message ServerConfig { // User is a list of users that allowed to connect to this inbound. - // Although this is a repeated field, only the first user is effective for now. + // Although this is a repeated field, only the first user is effective for + // now. repeated v2ray.core.common.protocol.User user = 1; } -message ClientConfig { - -} +message ClientConfig {} diff --git a/proxy/vless/inbound/config.pb.go b/proxy/vless/inbound/config.pb.go index f22d2b258..e4b927353 100644 --- a/proxy/vless/inbound/config.pb.go +++ b/proxy/vless/inbound/config.pb.go @@ -111,7 +111,8 @@ type Config struct { unknownFields protoimpl.UnknownFields Clients []*protocol.User `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"` - // Decryption settings. Only applies to server side, and only accepts "none" for now. + // Decryption settings. Only applies to server side, and only accepts "none" + // for now. Decryption string `protobuf:"bytes,2,opt,name=decryption,proto3" json:"decryption,omitempty"` Fallbacks []*Fallback `protobuf:"bytes,3,rep,name=fallbacks,proto3" json:"fallbacks,omitempty"` } diff --git a/proxy/vless/inbound/config.proto b/proxy/vless/inbound/config.proto index 8b6970ff7..21afccc96 100644 --- a/proxy/vless/inbound/config.proto +++ b/proxy/vless/inbound/config.proto @@ -18,7 +18,8 @@ message Fallback { message Config { repeated v2ray.core.common.protocol.User clients = 1; - // Decryption settings. Only applies to server side, and only accepts "none" for now. + // Decryption settings. Only applies to server side, and only accepts "none" + // for now. string decryption = 2; repeated Fallback fallbacks = 3; } diff --git a/proxy/vmess/account.pb.go b/proxy/vmess/account.pb.go index 9d79cca01..f4d5da163 100644 --- a/proxy/vmess/account.pb.go +++ b/proxy/vmess/account.pb.go @@ -31,7 +31,8 @@ type Account struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // ID of the account, in the form of a UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57". + // ID of the account, in the form of a UUID, e.g., + // "66ad4540-b58c-4ad2-9926-ea63445a9b57". Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Number of alternative IDs. Client and server must share the same number. AlterId uint32 `protobuf:"varint,2,opt,name=alter_id,json=alterId,proto3" json:"alter_id,omitempty"` diff --git a/proxy/vmess/account.proto b/proxy/vmess/account.proto index b4e98a9e1..37f7562a2 100644 --- a/proxy/vmess/account.proto +++ b/proxy/vmess/account.proto @@ -9,7 +9,8 @@ option java_multiple_files = true; import "common/protocol/headers.proto"; message Account { - // ID of the account, in the form of a UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57". + // ID of the account, in the form of a UUID, e.g., + // "66ad4540-b58c-4ad2-9926-ea63445a9b57". string id = 1; // Number of alternative IDs. Client and server must share the same number. uint32 alter_id = 2; diff --git a/transport/config.pb.go b/transport/config.pb.go index 1c17d7e73..e75a90709 100644 --- a/transport/config.pb.go +++ b/transport/config.pb.go @@ -26,8 +26,8 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 -// Global transport settings. This affects all type of connections that go through V2Ray. -// Deprecated. Use each settings in StreamConfig. +// Global transport settings. This affects all type of connections that go +// through V2Ray. Deprecated. Use each settings in StreamConfig. type Config struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/transport/config.proto b/transport/config.proto index 2d8a68236..e0c059a92 100644 --- a/transport/config.proto +++ b/transport/config.proto @@ -8,8 +8,8 @@ option java_multiple_files = true; import "transport/internet/config.proto"; -// Global transport settings. This affects all type of connections that go through V2Ray. -// Deprecated. Use each settings in StreamConfig. +// Global transport settings. This affects all type of connections that go +// through V2Ray. Deprecated. Use each settings in StreamConfig. message Config { repeated v2ray.core.transport.internet.TransportConfig transport_settings = 1; } diff --git a/transport/internet/config.pb.go b/transport/internet/config.pb.go index 08b8618e7..362a7364e 100644 --- a/transport/internet/config.pb.go +++ b/transport/internet/config.pb.go @@ -408,8 +408,8 @@ type SocketConfig struct { Tfo SocketConfig_TCPFastOpenState `protobuf:"varint,2,opt,name=tfo,proto3,enum=v2ray.core.transport.internet.SocketConfig_TCPFastOpenState" json:"tfo,omitempty"` // TProxy is for enabling TProxy socket option. Tproxy SocketConfig_TProxyMode `protobuf:"varint,3,opt,name=tproxy,proto3,enum=v2ray.core.transport.internet.SocketConfig_TProxyMode" json:"tproxy,omitempty"` - // ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket option. - // This option is for UDP only. + // ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket + // option. This option is for UDP only. ReceiveOriginalDestAddress bool `protobuf:"varint,4,opt,name=receive_original_dest_address,json=receiveOriginalDestAddress,proto3" json:"receive_original_dest_address,omitempty"` BindAddress []byte `protobuf:"bytes,5,opt,name=bind_address,json=bindAddress,proto3" json:"bind_address,omitempty"` BindPort uint32 `protobuf:"varint,6,opt,name=bind_port,json=bindPort,proto3" json:"bind_port,omitempty"` diff --git a/transport/internet/config.proto b/transport/internet/config.proto index 7faae3f3c..f3b96a94e 100644 --- a/transport/internet/config.proto +++ b/transport/internet/config.proto @@ -40,7 +40,7 @@ message StreamConfig { // Type of security. Must be a message name of the settings proto. string security_type = 3; - + // Settings for transport security. For now the only choice is TLS. repeated v2ray.core.common.serial.TypedMessage security_settings = 4; @@ -80,8 +80,8 @@ message SocketConfig { // TProxy is for enabling TProxy socket option. TProxyMode tproxy = 3; - // ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket option. - // This option is for UDP only. + // ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket + // option. This option is for UDP only. bool receive_original_dest_address = 4; bytes bind_address = 5; diff --git a/transport/internet/headers/http/config.pb.go b/transport/internet/headers/http/config.pb.go index 7e42a3b74..ec998d013 100644 --- a/transport/internet/headers/http/config.pb.go +++ b/transport/internet/headers/http/config.pb.go @@ -32,7 +32,8 @@ type Header struct { // "Accept", "Cookie", etc Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Each entry must be valid in one piece. Random entry will be chosen if multiple entries present. + // Each entry must be valid in one piece. Random entry will be chosen if + // multiple entries present. Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` } @@ -377,9 +378,11 @@ type Config struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Settings for authenticating requests. If not set, client side will not send authenication header, and server side will bypass authentication. + // Settings for authenticating requests. If not set, client side will not send + // authenication header, and server side will bypass authentication. Request *RequestConfig `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - // Settings for authenticating responses. If not set, client side will bypass authentication, and server side will not send authentication header. + // Settings for authenticating responses. If not set, client side will bypass + // authentication, and server side will not send authentication header. Response *ResponseConfig `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` } diff --git a/transport/internet/headers/http/config.proto b/transport/internet/headers/http/config.proto index 59d4f5a09..f9e881e66 100644 --- a/transport/internet/headers/http/config.proto +++ b/transport/internet/headers/http/config.proto @@ -10,7 +10,8 @@ message Header { // "Accept", "Cookie", etc string name = 1; - // Each entry must be valid in one piece. Random entry will be chosen if multiple entries present. + // Each entry must be valid in one piece. Random entry will be chosen if + // multiple entries present. repeated string value = 2; } @@ -54,9 +55,11 @@ message ResponseConfig { } message Config { - // Settings for authenticating requests. If not set, client side will not send authenication header, and server side will bypass authentication. + // Settings for authenticating requests. If not set, client side will not send + // authenication header, and server side will bypass authentication. RequestConfig request = 1; - // Settings for authenticating responses. If not set, client side will bypass authentication, and server side will not send authentication header. + // Settings for authenticating responses. If not set, client side will bypass + // authentication, and server side will not send authentication header. ResponseConfig response = 2; } diff --git a/transport/internet/headers/noop/config.proto b/transport/internet/headers/noop/config.proto index 533d2494f..a5db08dda 100644 --- a/transport/internet/headers/noop/config.proto +++ b/transport/internet/headers/noop/config.proto @@ -8,4 +8,4 @@ option java_multiple_files = true; message Config {} -message ConnectionConfig{} +message ConnectionConfig {} diff --git a/transport/internet/headers/tls/config.proto b/transport/internet/headers/tls/config.proto index 5d32f64e7..415527e88 100644 --- a/transport/internet/headers/tls/config.proto +++ b/transport/internet/headers/tls/config.proto @@ -6,5 +6,4 @@ option go_package = "v2ray.com/core/transport/internet/headers/tls"; option java_package = "com.v2ray.core.transport.internet.headers.tls"; option java_multiple_files = true; -message PacketConfig { -} +message PacketConfig {} diff --git a/transport/internet/headers/wechat/config.proto b/transport/internet/headers/wechat/config.proto index 03774da27..467057a03 100644 --- a/transport/internet/headers/wechat/config.proto +++ b/transport/internet/headers/wechat/config.proto @@ -6,5 +6,4 @@ option go_package = "v2ray.com/core/transport/internet/headers/wechat"; option java_package = "com.v2ray.core.transport.internet.headers.wechat"; option java_multiple_files = true; -message VideoConfig { -} +message VideoConfig {} diff --git a/transport/internet/headers/wireguard/config.proto b/transport/internet/headers/wireguard/config.proto index 111de0ed6..05e8bfe46 100644 --- a/transport/internet/headers/wireguard/config.proto +++ b/transport/internet/headers/wireguard/config.proto @@ -6,5 +6,4 @@ option go_package = "v2ray.com/core/transport/internet/headers/wireguard"; option java_package = "com.v2ray.core.transport.internet.headers.wireguard"; option java_multiple_files = true; -message WireguardConfig { -} +message WireguardConfig {} diff --git a/transport/internet/tls/config.pb.go b/transport/internet/tls/config.pb.go index fd08ed13d..e7b3a6270 100644 --- a/transport/internet/tls/config.pb.go +++ b/transport/internet/tls/config.pb.go @@ -156,7 +156,8 @@ type Config struct { NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol,proto3" json:"next_protocol,omitempty"` // Whether or not to disable session (ticket) resumption. DisableSessionResumption bool `protobuf:"varint,6,opt,name=disable_session_resumption,json=disableSessionResumption,proto3" json:"disable_session_resumption,omitempty"` - // If true, root certificates on the system will not be loaded for verification. + // If true, root certificates on the system will not be loaded for + // verification. DisableSystemRoot bool `protobuf:"varint,7,opt,name=disable_system_root,json=disableSystemRoot,proto3" json:"disable_system_root,omitempty"` } diff --git a/transport/internet/tls/config.proto b/transport/internet/tls/config.proto index 56e887d84..036ce5b83 100644 --- a/transport/internet/tls/config.proto +++ b/transport/internet/tls/config.proto @@ -41,6 +41,7 @@ message Config { // Whether or not to disable session (ticket) resumption. bool disable_session_resumption = 6; - // If true, root certificates on the system will not be loaded for verification. + // If true, root certificates on the system will not be loaded for + // verification. bool disable_system_root = 7; } diff --git a/transport/internet/udp/config.proto b/transport/internet/udp/config.proto index a594888d9..ff4080026 100644 --- a/transport/internet/udp/config.proto +++ b/transport/internet/udp/config.proto @@ -6,5 +6,4 @@ option go_package = "v2ray.com/core/transport/internet/udp"; option java_package = "com.v2ray.core.transport.internet.udp"; option java_multiple_files = true; -message Config { -} +message Config {} diff --git a/transport/internet/xtls/config.pb.go b/transport/internet/xtls/config.pb.go index 6ec1e71ed..862d5f26e 100644 --- a/transport/internet/xtls/config.pb.go +++ b/transport/internet/xtls/config.pb.go @@ -156,7 +156,8 @@ type Config struct { NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol,proto3" json:"next_protocol,omitempty"` // Whether or not to disable session (ticket) resumption. DisableSessionResumption bool `protobuf:"varint,6,opt,name=disable_session_resumption,json=disableSessionResumption,proto3" json:"disable_session_resumption,omitempty"` - // If true, root certificates on the system will not be loaded for verification. + // If true, root certificates on the system will not be loaded for + // verification. DisableSystemRoot bool `protobuf:"varint,7,opt,name=disable_system_root,json=disableSystemRoot,proto3" json:"disable_system_root,omitempty"` } diff --git a/transport/internet/xtls/config.proto b/transport/internet/xtls/config.proto index 9ad77221e..490ae6e95 100644 --- a/transport/internet/xtls/config.proto +++ b/transport/internet/xtls/config.proto @@ -41,6 +41,7 @@ message Config { // Whether or not to disable session (ticket) resumption. bool disable_session_resumption = 6; - // If true, root certificates on the system will not be loaded for verification. + // If true, root certificates on the system will not be loaded for + // verification. bool disable_system_root = 7; }