Browse Source

Format proto files using clang-format according to google style (#264)

* Format proto files using clang-format according to google style
* Regenerate pb.go files
Loyalsoldier 5 years ago
parent
commit
bb44d01096
47 changed files with 178 additions and 139 deletions
  1. 2 1
      app/commander/config.pb.go
  2. 2 1
      app/commander/config.proto
  3. 0 1
      app/dispatcher/config.proto
  4. 8 5
      app/dns/config.pb.go
  5. 8 5
      app/dns/config.proto
  6. 2 3
      app/log/command/config.proto
  7. 5 12
      app/proxyman/command/command.proto
  8. 2 6
      app/proxyman/config.proto
  9. 0 1
      app/reverse/config.proto
  10. 18 9
      app/router/command/command.pb.go
  11. 20 10
      app/router/command/command.proto
  12. 8 6
      app/router/config.pb.go
  13. 9 8
      app/router/config.proto
  14. 1 2
      app/stats/command/command.proto
  15. 2 4
      app/stats/config.proto
  16. 2 1
      common/net/address.pb.go
  17. 2 1
      common/net/address.proto
  18. 1 1
      common/net/network.proto
  19. 2 1
      common/protocol/user.pb.go
  20. 2 1
      common/protocol/user.proto
  21. 1 1
      common/serial/typed_message.proto
  22. 14 8
      config.pb.go
  23. 14 8
      config.proto
  24. 2 4
      proxy/blackhole/config.proto
  25. 2 1
      proxy/dns/config.pb.go
  26. 2 1
      proxy/dns/config.proto
  27. 2 1
      proxy/mtproto/config.pb.go
  28. 3 4
      proxy/mtproto/config.proto
  29. 2 1
      proxy/vless/inbound/config.pb.go
  30. 2 1
      proxy/vless/inbound/config.proto
  31. 2 1
      proxy/vmess/account.pb.go
  32. 2 1
      proxy/vmess/account.proto
  33. 2 2
      transport/config.pb.go
  34. 2 2
      transport/config.proto
  35. 2 2
      transport/internet/config.pb.go
  36. 3 3
      transport/internet/config.proto
  37. 6 3
      transport/internet/headers/http/config.pb.go
  38. 6 3
      transport/internet/headers/http/config.proto
  39. 1 1
      transport/internet/headers/noop/config.proto
  40. 1 2
      transport/internet/headers/tls/config.proto
  41. 1 2
      transport/internet/headers/wechat/config.proto
  42. 1 2
      transport/internet/headers/wireguard/config.proto
  43. 2 1
      transport/internet/tls/config.pb.go
  44. 2 1
      transport/internet/tls/config.proto
  45. 1 2
      transport/internet/udp/config.proto
  46. 2 1
      transport/internet/xtls/config.pb.go
  47. 2 1
      transport/internet/xtls/config.proto

+ 2 - 1
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"`
 }
 

+ 2 - 1
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;
 }

+ 0 - 1
app/dispatcher/config.proto

@@ -8,7 +8,6 @@ option java_multiple_files = true;
 
 message SessionConfig {
   reserved 1;
-  
 }
 
 message Config {

+ 8 - 5
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"`
 }
 

+ 8 - 5
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<string, v2ray.core.common.net.IPOrDomain> 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;
   }
 

+ 2 - 3
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) {}

+ 5 - 12
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) {}

+ 2 - 6
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.

+ 0 - 1
app/reverse/config.proto

@@ -19,7 +19,6 @@ message Control {
 message BridgeConfig {
   string tag = 1;
   string domain = 2;
-
 }
 
 message PortalConfig {

+ 18 - 9
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

+ 20 - 10
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) {}
 }
 

+ 8 - 6
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"`

+ 9 - 8
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.

+ 1 - 2
app/stats/command/command.proto

@@ -31,8 +31,7 @@ message QueryStatsResponse {
   repeated Stat stat = 1;
 }
 
-message SysStatsRequest {
-}
+message SysStatsRequest {}
 
 message SysStatsResponse {
   uint32 NumGoroutine = 1;

+ 2 - 4
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;
 }

+ 2 - 1
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

+ 2 - 1
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.

+ 1 - 1
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;
 }

+ 2 - 1
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"`
 }
 

+ 2 - 1
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;
 }

+ 1 - 1
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;
 }

+ 14 - 8
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"`

+ 14 - 8
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;

+ 2 - 4
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;

+ 2 - 1
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"`
 }
 

+ 2 - 1
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;
 }

+ 2 - 1
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"`
 }
 

+ 3 - 4
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 {}

+ 2 - 1
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"`
 }

+ 2 - 1
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;
 }

+ 2 - 1
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"`

+ 2 - 1
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;

+ 2 - 2
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

+ 2 - 2
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;
 }

+ 2 - 2
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"`

+ 3 - 3
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;

+ 6 - 3
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"`
 }
 

+ 6 - 3
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;
 }

+ 1 - 1
transport/internet/headers/noop/config.proto

@@ -8,4 +8,4 @@ option java_multiple_files = true;
 
 message Config {}
 
-message ConnectionConfig{}
+message ConnectionConfig {}

+ 1 - 2
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 {}

+ 1 - 2
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 {}

+ 1 - 2
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 {}

+ 2 - 1
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"`
 }
 

+ 2 - 1
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;
 }

+ 1 - 2
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 {}

+ 2 - 1
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"`
 }
 

+ 2 - 1
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;
 }