From 7086d286be67aa61942f08d2c2115655cb9fcfc1 Mon Sep 17 00:00:00 2001 From: Kobe Arthur Scofield <26771058+KobeArthurScofield@users.noreply.github.com> Date: Mon, 23 Sep 2024 23:28:19 +0800 Subject: [PATCH] Remove legacy code (#3838) * Add feature migration notice * Remove legacy code of transport processing * Clear legacy proto field * Fix missing * Unify protocolname * Test remove * Supressor * Weird code * Remove errorgen related comments --- app/commander/commander.go | 2 - app/dispatcher/default.go | 2 - app/dispatcher/dispatcher.go | 2 - app/dns/dns.go | 2 - app/dns/fakedns/fakedns.go | 2 - app/log/command/command.go | 2 - app/log/log.go | 2 - app/observatory/burst/burst.go | 2 - app/observatory/observatory.go | 2 - app/policy/policy.go | 2 - app/proxyman/command/doc.go | 2 - app/proxyman/inbound/inbound.go | 2 - app/proxyman/outbound/outbound.go | 2 - app/reverse/reverse.go | 2 - app/router/command/command.go | 2 - app/router/router.go | 2 - app/stats/command/command.go | 2 - app/stats/stats.go | 2 - common/buf/buf.go | 2 - common/common.go | 2 - common/crypto/crypto.go | 2 - common/drain/drain.go | 2 - common/errors/feature_errors.go | 9 + common/mux/mux.go | 2 - common/net/net.go | 2 - common/net/network.pb.go | 17 +- common/net/network.proto | 1 - common/platform/ctlcmd/ctlcmd.go | 2 - common/protocol/protocol.go | 2 - common/protocol/tls/cert/cert.go | 2 - common/retry/retry.go | 2 - core/core.go | 2 - features/routing/dns/context.go | 2 - features/stats/stats.go | 2 - infra/conf/conf.go | 2 - infra/conf/serial/serial.go | 2 - main/commands/all/commands.go | 2 - main/confloader/external/external.go | 2 - proxy/blackhole/blackhole.go | 2 - proxy/dokodemo/dokodemo.go | 2 - proxy/freedom/freedom.go | 2 - proxy/http/http.go | 2 - proxy/loopback/config.go | 2 - proxy/shadowsocks/shadowsocks.go | 2 - proxy/shadowsocks_2022/shadowsocks_2022.go | 2 - proxy/socks/socks.go | 2 - proxy/trojan/trojan.go | 2 - proxy/vless/encoding/encoding.go | 2 - proxy/vless/inbound/inbound.go | 2 - proxy/vless/outbound/outbound.go | 2 - proxy/vless/vless.go | 2 - proxy/vmess/encoding/encoding.go | 2 - proxy/vmess/inbound/inbound.go | 2 - proxy/vmess/outbound/outbound.go | 2 - proxy/vmess/vmess.go | 2 - proxy/wireguard/wireguard.go | 2 - testing/scenarios/feature_test.go | 6 +- testing/scenarios/tls_test.go | 24 +- testing/scenarios/transport_test.go | 8 +- testing/scenarios/vless_test.go | 24 +- testing/scenarios/vmess_test.go | 16 +- transport/internet/config.go | 33 +- transport/internet/config.pb.go | 393 +++++++----------- transport/internet/config.proto | 17 - transport/internet/grpc/config.go | 2 - transport/internet/grpc/encoding/encoding.go | 2 - transport/internet/grpc/grpc.go | 2 +- transport/internet/headers/http/http.go | 2 - transport/internet/http/config.go | 2 - transport/internet/http/http.go | 2 +- transport/internet/httpupgrade/httpupgrade.go | 15 - transport/internet/internet.go | 2 - transport/internet/kcp/config.go | 2 - transport/internet/kcp/kcp.go | 2 +- transport/internet/reality/reality.go | 2 - transport/internet/splithttp/splithttp.go | 15 - .../internet/tagged/taggedimpl/taggedimpl.go | 2 - transport/internet/tcp/config.go | 2 - transport/internet/tcp/tcp.go | 2 +- transport/internet/tls/tls.go | 2 - transport/internet/udp/udp.go | 2 - transport/internet/websocket/config.go | 2 - transport/internet/websocket/ws.go | 2 +- 83 files changed, 206 insertions(+), 512 deletions(-) diff --git a/app/commander/commander.go b/app/commander/commander.go index c433454a..9ea71e6e 100644 --- a/app/commander/commander.go +++ b/app/commander/commander.go @@ -1,7 +1,5 @@ package commander -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "net" diff --git a/app/dispatcher/default.go b/app/dispatcher/default.go index de8d1913..4eb39d75 100644 --- a/app/dispatcher/default.go +++ b/app/dispatcher/default.go @@ -1,7 +1,5 @@ package dispatcher -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "regexp" diff --git a/app/dispatcher/dispatcher.go b/app/dispatcher/dispatcher.go index 2ae48c85..909218d5 100644 --- a/app/dispatcher/dispatcher.go +++ b/app/dispatcher/dispatcher.go @@ -1,3 +1 @@ package dispatcher - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/app/dns/dns.go b/app/dns/dns.go index 24cbbb11..db59f292 100644 --- a/app/dns/dns.go +++ b/app/dns/dns.go @@ -1,8 +1,6 @@ // Package dns is an implementation of core.DNS feature. package dns -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "fmt" diff --git a/app/dns/fakedns/fakedns.go b/app/dns/fakedns/fakedns.go index 710b8a6f..05da03a5 100644 --- a/app/dns/fakedns/fakedns.go +++ b/app/dns/fakedns/fakedns.go @@ -1,3 +1 @@ package fakedns - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/app/log/command/command.go b/app/log/command/command.go index 74ce2d5b..2df8ce6d 100644 --- a/app/log/command/command.go +++ b/app/log/command/command.go @@ -1,7 +1,5 @@ package command -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" diff --git a/app/log/log.go b/app/log/log.go index 8b3d3367..90de99e2 100644 --- a/app/log/log.go +++ b/app/log/log.go @@ -1,7 +1,5 @@ package log -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "fmt" diff --git a/app/observatory/burst/burst.go b/app/observatory/burst/burst.go index 13eb0fd6..8658086a 100644 --- a/app/observatory/burst/burst.go +++ b/app/observatory/burst/burst.go @@ -5,8 +5,6 @@ import ( "time" ) -//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen - const ( rttFailed = time.Duration(math.MaxInt64 - iota) rttUntested diff --git a/app/observatory/observatory.go b/app/observatory/observatory.go index 64726885..43e79a60 100644 --- a/app/observatory/observatory.go +++ b/app/observatory/observatory.go @@ -1,3 +1 @@ package observatory - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/app/policy/policy.go b/app/policy/policy.go index cbb1d90e..60613a65 100644 --- a/app/policy/policy.go +++ b/app/policy/policy.go @@ -1,4 +1,2 @@ // Package policy is an implementation of policy.Manager feature. package policy - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/app/proxyman/command/doc.go b/app/proxyman/command/doc.go index 2aa6d95f..d47dcf0d 100644 --- a/app/proxyman/command/doc.go +++ b/app/proxyman/command/doc.go @@ -1,3 +1 @@ package command - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/app/proxyman/inbound/inbound.go b/app/proxyman/inbound/inbound.go index 1881283a..fc0c16a4 100644 --- a/app/proxyman/inbound/inbound.go +++ b/app/proxyman/inbound/inbound.go @@ -1,7 +1,5 @@ package inbound -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "sync" diff --git a/app/proxyman/outbound/outbound.go b/app/proxyman/outbound/outbound.go index f697801a..8660e6a5 100644 --- a/app/proxyman/outbound/outbound.go +++ b/app/proxyman/outbound/outbound.go @@ -1,7 +1,5 @@ package outbound -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "sort" diff --git a/app/reverse/reverse.go b/app/reverse/reverse.go index 077a89c1..f550a23f 100644 --- a/app/reverse/reverse.go +++ b/app/reverse/reverse.go @@ -1,7 +1,5 @@ package reverse -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" diff --git a/app/router/command/command.go b/app/router/command/command.go index 515e2614..baf76b8b 100644 --- a/app/router/command/command.go +++ b/app/router/command/command.go @@ -1,7 +1,5 @@ package command -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "time" diff --git a/app/router/router.go b/app/router/router.go index 2a1e2e62..2f35b3e7 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -1,7 +1,5 @@ package router -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" sync "sync" diff --git a/app/stats/command/command.go b/app/stats/command/command.go index 2c603ca2..b2cc196c 100644 --- a/app/stats/command/command.go +++ b/app/stats/command/command.go @@ -1,7 +1,5 @@ package command -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "runtime" diff --git a/app/stats/stats.go b/app/stats/stats.go index 95d5ae9c..5e9d0b59 100644 --- a/app/stats/stats.go +++ b/app/stats/stats.go @@ -1,7 +1,5 @@ package stats -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "sync" diff --git a/common/buf/buf.go b/common/buf/buf.go index dde7e22c..9f5c5cbe 100644 --- a/common/buf/buf.go +++ b/common/buf/buf.go @@ -1,4 +1,2 @@ // Package buf provides a light-weight memory allocation mechanism. package buf // import "github.com/xtls/xray-core/common/buf" - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/common/common.go b/common/common.go index cada9973..c00371be 100644 --- a/common/common.go +++ b/common/common.go @@ -12,8 +12,6 @@ import ( "github.com/xtls/xray-core/common/errors" ) -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - // ErrNoClue is for the situation that existing information is not enough to make a decision. For example, Router may return this error when there is no suitable route. var ErrNoClue = errors.New("not enough information for making a decision") diff --git a/common/crypto/crypto.go b/common/crypto/crypto.go index a7ed1a4a..4ed70634 100644 --- a/common/crypto/crypto.go +++ b/common/crypto/crypto.go @@ -1,4 +1,2 @@ // Package crypto provides common crypto libraries for Xray. package crypto // import "github.com/xtls/xray-core/common/crypto" - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/common/drain/drain.go b/common/drain/drain.go index 5a935789..5a3be246 100644 --- a/common/drain/drain.go +++ b/common/drain/drain.go @@ -2,8 +2,6 @@ package drain import "io" -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - type Drainer interface { AcknowledgeReceive(size int) Drain(reader io.Reader) error diff --git a/common/errors/feature_errors.go b/common/errors/feature_errors.go index ea9b4c03..3cacd2b9 100644 --- a/common/errors/feature_errors.go +++ b/common/errors/feature_errors.go @@ -4,6 +4,15 @@ import ( "context" ) +// PrintMigrateFeatureInfo prints a notice of the upcoming feature migration. +// Place it after the source feature related config file pharser code. +// Important note: Only use this when the target migrating feature is under construction. +// Important note: Even when the target migrating feature has finished its construction, this notice can still be used yet before announcing deprecation of the old feature. +// Do not remove this function even there is no reference to it. +func PrintMigrateFeatureInfo(sourceFeature string, targetFeature string) { + LogInfo(context.Background(), "The feature " + sourceFeature + " will be migrated to " + targetFeature + " in the future.") +} + // PrintDeprecatedFeatureWarning prints a warning for deprecated and going to be removed feature. // Do not remove this function even there is no reference to it. func PrintDeprecatedFeatureWarning(feature string, migrateFeature string) { diff --git a/common/mux/mux.go b/common/mux/mux.go index 0eaebf51..707f4622 100644 --- a/common/mux/mux.go +++ b/common/mux/mux.go @@ -1,3 +1 @@ package mux - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/common/net/net.go b/common/net/net.go index 5027617c..ce321425 100644 --- a/common/net/net.go +++ b/common/net/net.go @@ -1,4 +1,2 @@ // Package net is a drop-in replacement to Golang's net package, with some more functionalities. package net // import "github.com/xtls/xray-core/common/net" - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/common/net/network.pb.go b/common/net/network.pb.go index e2320475..b75d3564 100644 --- a/common/net/network.pb.go +++ b/common/net/network.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.28.0 // source: common/net/network.proto package net @@ -24,25 +24,21 @@ type Network int32 const ( Network_Unknown Network = 0 - // Deprecated: Marked as deprecated in common/net/network.proto. - Network_RawTCP Network = 1 - Network_TCP Network = 2 - Network_UDP Network = 3 - Network_UNIX Network = 4 + Network_TCP Network = 2 + Network_UDP Network = 3 + Network_UNIX Network = 4 ) // Enum value maps for Network. var ( Network_name = map[int32]string{ 0: "Unknown", - 1: "RawTCP", 2: "TCP", 3: "UDP", 4: "UNIX", } Network_value = map[string]int32{ "Unknown": 0, - "RawTCP": 1, "TCP": 2, "UDP": 3, "UNIX": 4, @@ -133,10 +129,9 @@ var file_common_net_network_proto_rawDesc = []byte{ 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2a, 0x42, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2a, 0x32, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x06, 0x52, 0x61, 0x77, 0x54, 0x43, 0x50, - 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, + 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x4e, 0x49, 0x58, 0x10, 0x04, 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74, diff --git a/common/net/network.proto b/common/net/network.proto index f2487fbc..e7579a21 100644 --- a/common/net/network.proto +++ b/common/net/network.proto @@ -9,7 +9,6 @@ option java_multiple_files = true; enum Network { Unknown = 0; - RawTCP = 1 [deprecated = true]; TCP = 2; UDP = 3; UNIX = 4; diff --git a/common/platform/ctlcmd/ctlcmd.go b/common/platform/ctlcmd/ctlcmd.go index a5c21872..bc28ace1 100644 --- a/common/platform/ctlcmd/ctlcmd.go +++ b/common/platform/ctlcmd/ctlcmd.go @@ -12,8 +12,6 @@ import ( "github.com/xtls/xray-core/common/platform" ) -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - func Run(args []string, input io.Reader) (buf.MultiBuffer, error) { xctl := platform.GetToolLocation("xctl") if _, err := os.Stat(xctl); err != nil { diff --git a/common/protocol/protocol.go b/common/protocol/protocol.go index bd49ba69..28b5e51b 100644 --- a/common/protocol/protocol.go +++ b/common/protocol/protocol.go @@ -1,3 +1 @@ package protocol // import "github.com/xtls/xray-core/common/protocol" - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/common/protocol/tls/cert/cert.go b/common/protocol/tls/cert/cert.go index b8f3266e..00498579 100644 --- a/common/protocol/tls/cert/cert.go +++ b/common/protocol/tls/cert/cert.go @@ -16,8 +16,6 @@ import ( "github.com/xtls/xray-core/common/errors" ) -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - type Certificate struct { // certificate in ASN.1 DER format Certificate []byte diff --git a/common/retry/retry.go b/common/retry/retry.go index 346caf0c..02dcbfb9 100644 --- a/common/retry/retry.go +++ b/common/retry/retry.go @@ -1,7 +1,5 @@ package retry // import "github.com/xtls/xray-core/common/retry" -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "time" diff --git a/core/core.go b/core/core.go index bae28973..d0a25478 100644 --- a/core/core.go +++ b/core/core.go @@ -9,8 +9,6 @@ // connections. package core -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "fmt" "runtime" diff --git a/features/routing/dns/context.go b/features/routing/dns/context.go index 4ad7d267..d5b138d7 100644 --- a/features/routing/dns/context.go +++ b/features/routing/dns/context.go @@ -1,7 +1,5 @@ package dns -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" diff --git a/features/stats/stats.go b/features/stats/stats.go index a6c1f6be..010dd767 100644 --- a/features/stats/stats.go +++ b/features/stats/stats.go @@ -1,7 +1,5 @@ package stats -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" diff --git a/infra/conf/conf.go b/infra/conf/conf.go index 9bd3f667..8f52a955 100644 --- a/infra/conf/conf.go +++ b/infra/conf/conf.go @@ -1,3 +1 @@ package conf - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/infra/conf/serial/serial.go b/infra/conf/serial/serial.go index 3e6711ff..86baba80 100644 --- a/infra/conf/serial/serial.go +++ b/infra/conf/serial/serial.go @@ -1,3 +1 @@ package serial - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/main/commands/all/commands.go b/main/commands/all/commands.go index 99f194dc..70457a72 100644 --- a/main/commands/all/commands.go +++ b/main/commands/all/commands.go @@ -7,8 +7,6 @@ import ( "github.com/xtls/xray-core/main/commands/base" ) -// go:generate go run github.com/xtls/xray-core/common/errors/errorgen - func init() { base.RootCommand.Commands = append( base.RootCommand.Commands, diff --git a/main/confloader/external/external.go b/main/confloader/external/external.go index 1e349ebf..f1ad437b 100644 --- a/main/confloader/external/external.go +++ b/main/confloader/external/external.go @@ -1,7 +1,5 @@ package external -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "bytes" "io" diff --git a/proxy/blackhole/blackhole.go b/proxy/blackhole/blackhole.go index 23c9c291..ea3049ad 100644 --- a/proxy/blackhole/blackhole.go +++ b/proxy/blackhole/blackhole.go @@ -1,8 +1,6 @@ // Package blackhole is an outbound handler that blocks all connections. package blackhole -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "time" diff --git a/proxy/dokodemo/dokodemo.go b/proxy/dokodemo/dokodemo.go index 3e6e0b5b..bbeab18f 100644 --- a/proxy/dokodemo/dokodemo.go +++ b/proxy/dokodemo/dokodemo.go @@ -1,7 +1,5 @@ package dokodemo -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "sync/atomic" diff --git a/proxy/freedom/freedom.go b/proxy/freedom/freedom.go index 79074f23..f2d68eea 100644 --- a/proxy/freedom/freedom.go +++ b/proxy/freedom/freedom.go @@ -1,7 +1,5 @@ package freedom -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "crypto/rand" diff --git a/proxy/http/http.go b/proxy/http/http.go index 3c0d015f..d02cfda6 100644 --- a/proxy/http/http.go +++ b/proxy/http/http.go @@ -1,3 +1 @@ package http - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/proxy/loopback/config.go b/proxy/loopback/config.go index 95b1ae94..460b3070 100644 --- a/proxy/loopback/config.go +++ b/proxy/loopback/config.go @@ -1,3 +1 @@ package loopback - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/proxy/shadowsocks/shadowsocks.go b/proxy/shadowsocks/shadowsocks.go index 6d950db2..7bb16943 100644 --- a/proxy/shadowsocks/shadowsocks.go +++ b/proxy/shadowsocks/shadowsocks.go @@ -4,5 +4,3 @@ // // R.I.P Shadowsocks package shadowsocks - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/proxy/shadowsocks_2022/shadowsocks_2022.go b/proxy/shadowsocks_2022/shadowsocks_2022.go index 4f8d88ab..96f62c74 100644 --- a/proxy/shadowsocks_2022/shadowsocks_2022.go +++ b/proxy/shadowsocks_2022/shadowsocks_2022.go @@ -1,3 +1 @@ package shadowsocks_2022 - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/proxy/socks/socks.go b/proxy/socks/socks.go index 557609c7..2f885d39 100644 --- a/proxy/socks/socks.go +++ b/proxy/socks/socks.go @@ -1,4 +1,2 @@ // Package socks provides implements of Socks protocol 4, 4a and 5. package socks - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/proxy/trojan/trojan.go b/proxy/trojan/trojan.go index d0cf5de4..73b3154f 100644 --- a/proxy/trojan/trojan.go +++ b/proxy/trojan/trojan.go @@ -1,3 +1 @@ package trojan - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/proxy/vless/encoding/encoding.go b/proxy/vless/encoding/encoding.go index f0699b96..8b067a96 100644 --- a/proxy/vless/encoding/encoding.go +++ b/proxy/vless/encoding/encoding.go @@ -1,7 +1,5 @@ package encoding -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "bytes" "context" diff --git a/proxy/vless/inbound/inbound.go b/proxy/vless/inbound/inbound.go index bcd8a24b..f443007d 100644 --- a/proxy/vless/inbound/inbound.go +++ b/proxy/vless/inbound/inbound.go @@ -1,7 +1,5 @@ package inbound -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "bytes" "context" diff --git a/proxy/vless/outbound/outbound.go b/proxy/vless/outbound/outbound.go index 027a241f..ed9e07dc 100644 --- a/proxy/vless/outbound/outbound.go +++ b/proxy/vless/outbound/outbound.go @@ -1,7 +1,5 @@ package outbound -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "bytes" "context" diff --git a/proxy/vless/vless.go b/proxy/vless/vless.go index 09827a54..ed63b641 100644 --- a/proxy/vless/vless.go +++ b/proxy/vless/vless.go @@ -5,8 +5,6 @@ // clients with 'socks' for proxying. package vless -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - const ( XRV = "xtls-rprx-vision" ) diff --git a/proxy/vmess/encoding/encoding.go b/proxy/vmess/encoding/encoding.go index 6a93dd12..45c5d207 100644 --- a/proxy/vmess/encoding/encoding.go +++ b/proxy/vmess/encoding/encoding.go @@ -5,8 +5,6 @@ import ( "github.com/xtls/xray-core/common/protocol" ) -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - const ( Version = byte(1) ) diff --git a/proxy/vmess/inbound/inbound.go b/proxy/vmess/inbound/inbound.go index 77db249f..3102414d 100644 --- a/proxy/vmess/inbound/inbound.go +++ b/proxy/vmess/inbound/inbound.go @@ -1,7 +1,5 @@ package inbound -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "io" diff --git a/proxy/vmess/outbound/outbound.go b/proxy/vmess/outbound/outbound.go index 2c339e42..27079e03 100644 --- a/proxy/vmess/outbound/outbound.go +++ b/proxy/vmess/outbound/outbound.go @@ -1,7 +1,5 @@ package outbound -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "context" "crypto/hmac" diff --git a/proxy/vmess/vmess.go b/proxy/vmess/vmess.go index 836b1889..dd86f516 100644 --- a/proxy/vmess/vmess.go +++ b/proxy/vmess/vmess.go @@ -4,5 +4,3 @@ // together with 'freedom' to talk to final destination, while VMess outbound is usually used on // clients with 'socks' for proxying. package vmess - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/proxy/wireguard/wireguard.go b/proxy/wireguard/wireguard.go index 16a73ca2..0d75ee00 100644 --- a/proxy/wireguard/wireguard.go +++ b/proxy/wireguard/wireguard.go @@ -12,8 +12,6 @@ import ( "golang.zx2c4.com/wireguard/device" ) -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - var wgLogger = &device.Logger{ Verbosef: func(format string, args ...any) { log.Record(&log.GeneralMessage{ diff --git a/testing/scenarios/feature_test.go b/testing/scenarios/feature_test.go index a03a64ea..5dd08ec4 100644 --- a/testing/scenarios/feature_test.go +++ b/testing/scenarios/feature_test.go @@ -237,7 +237,7 @@ func TestProxyOverKCP(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", }, }), ProxySettings: serial.ToTypedMessage(&inbound.Config{ @@ -283,7 +283,7 @@ func TestProxyOverKCP(t *testing.T) { ProxySettings: serial.ToTypedMessage(&freedom.Config{}), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", }, }), }, @@ -327,7 +327,7 @@ func TestProxyOverKCP(t *testing.T) { Tag: "proxy", }, StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", }, }), }, diff --git a/testing/scenarios/tls_test.go b/testing/scenarios/tls_test.go index 4acb2d18..f1955877 100644 --- a/testing/scenarios/tls_test.go +++ b/testing/scenarios/tls_test.go @@ -265,7 +265,7 @@ func TestTLSOverKCP(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", SecurityType: serial.GetMessageType(&tls.Config{}), SecuritySettings: []*serial.TypedMessage{ serial.ToTypedMessage(&tls.Config{ @@ -326,7 +326,7 @@ func TestTLSOverKCP(t *testing.T) { }), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", SecurityType: serial.GetMessageType(&tls.Config{}), SecuritySettings: []*serial.TypedMessage{ serial.ToTypedMessage(&tls.Config{ @@ -365,7 +365,7 @@ func TestTLSOverWebSocket(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_WebSocket, + ProtocolName: "websocket", SecurityType: serial.GetMessageType(&tls.Config{}), SecuritySettings: []*serial.TypedMessage{ serial.ToTypedMessage(&tls.Config{ @@ -426,11 +426,11 @@ func TestTLSOverWebSocket(t *testing.T) { }), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_WebSocket, + ProtocolName: "websocket", TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_WebSocket, - Settings: serial.ToTypedMessage(&websocket.Config{}), + ProtocolName: "websocket", + Settings: serial.ToTypedMessage(&websocket.Config{}), }, }, SecurityType: serial.GetMessageType(&tls.Config{}), @@ -475,11 +475,11 @@ func TestHTTP2(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_HTTP, + ProtocolName: "http", TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_HTTP, - Settings: serial.ToTypedMessage(&http.Config{ + ProtocolName: "http", + Settings: serial.ToTypedMessage(&http.Config{ Host: []string{"example.com"}, Path: "/testpath", }), @@ -545,11 +545,11 @@ func TestHTTP2(t *testing.T) { }), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_HTTP, + ProtocolName: "http", TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_HTTP, - Settings: serial.ToTypedMessage(&http.Config{ + ProtocolName: "http", + Settings: serial.ToTypedMessage(&http.Config{ Host: []string{"example.com"}, Path: "/testpath", }), diff --git a/testing/scenarios/transport_test.go b/testing/scenarios/transport_test.go index 15648ed7..e6ece892 100644 --- a/testing/scenarios/transport_test.go +++ b/testing/scenarios/transport_test.go @@ -41,8 +41,8 @@ func TestHTTPConnectionHeader(t *testing.T) { StreamSettings: &internet.StreamConfig{ TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_TCP, - Settings: serial.ToTypedMessage(&tcptransport.Config{ + ProtocolName: "tcp", + Settings: serial.ToTypedMessage(&tcptransport.Config{ HeaderSettings: serial.ToTypedMessage(&http.Config{}), }), }, @@ -103,8 +103,8 @@ func TestHTTPConnectionHeader(t *testing.T) { StreamSettings: &internet.StreamConfig{ TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_TCP, - Settings: serial.ToTypedMessage(&tcptransport.Config{ + ProtocolName: "tcp", + Settings: serial.ToTypedMessage(&tcptransport.Config{ HeaderSettings: serial.ToTypedMessage(&http.Config{}), }), }, diff --git a/testing/scenarios/vless_test.go b/testing/scenarios/vless_test.go index f4cf58f1..87952794 100644 --- a/testing/scenarios/vless_test.go +++ b/testing/scenarios/vless_test.go @@ -148,7 +148,7 @@ func TestVlessTls(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_TCP, + ProtocolName: "tcp", SecurityType: serial.GetMessageType(&tls.Config{}), SecuritySettings: []*serial.TypedMessage{ serial.ToTypedMessage(&tls.Config{ @@ -215,11 +215,11 @@ func TestVlessTls(t *testing.T) { }), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_TCP, + ProtocolName: "tcp", TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_TCP, - Settings: serial.ToTypedMessage(&transtcp.Config{}), + ProtocolName: "tcp", + Settings: serial.ToTypedMessage(&transtcp.Config{}), }, }, SecurityType: serial.GetMessageType(&tls.Config{}), @@ -270,7 +270,7 @@ func TestVlessXtlsVision(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_TCP, + ProtocolName: "tcp", SecurityType: serial.GetMessageType(&tls.Config{}), SecuritySettings: []*serial.TypedMessage{ serial.ToTypedMessage(&tls.Config{ @@ -339,11 +339,11 @@ func TestVlessXtlsVision(t *testing.T) { }), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_TCP, + ProtocolName: "tcp", TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_TCP, - Settings: serial.ToTypedMessage(&transtcp.Config{}), + ProtocolName: "tcp", + Settings: serial.ToTypedMessage(&transtcp.Config{}), }, }, SecurityType: serial.GetMessageType(&tls.Config{}), @@ -399,7 +399,7 @@ func TestVlessXtlsVisionReality(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_TCP, + ProtocolName: "tcp", SecurityType: serial.GetMessageType(&reality.Config{}), SecuritySettings: []*serial.TypedMessage{ serial.ToTypedMessage(&reality.Config{ @@ -473,11 +473,11 @@ func TestVlessXtlsVisionReality(t *testing.T) { }), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_TCP, + ProtocolName: "tcp", TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_TCP, - Settings: serial.ToTypedMessage(&transtcp.Config{}), + ProtocolName: "tcp", + Settings: serial.ToTypedMessage(&transtcp.Config{}), }, }, SecurityType: serial.GetMessageType(&reality.Config{}), diff --git a/testing/scenarios/vmess_test.go b/testing/scenarios/vmess_test.go index 07235b2c..092d25a3 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -695,7 +695,7 @@ func TestVMessKCP(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", }, }), ProxySettings: serial.ToTypedMessage(&inbound.Config{ @@ -759,7 +759,7 @@ func TestVMessKCP(t *testing.T) { }), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", }, }), }, @@ -802,11 +802,11 @@ func TestVMessKCPLarge(t *testing.T) { PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(serverPort)}}, Listen: net.NewIPOrDomain(net.LocalHostIP), StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_MKCP, - Settings: serial.ToTypedMessage(&kcp.Config{ + ProtocolName: "mkcp", + Settings: serial.ToTypedMessage(&kcp.Config{ ReadBuffer: &kcp.ReadBuffer{ Size: 512 * 1024, }, @@ -885,11 +885,11 @@ func TestVMessKCPLarge(t *testing.T) { }), SenderSettings: serial.ToTypedMessage(&proxyman.SenderConfig{ StreamSettings: &internet.StreamConfig{ - Protocol: internet.TransportProtocol_MKCP, + ProtocolName: "mkcp", TransportSettings: []*internet.TransportConfig{ { - Protocol: internet.TransportProtocol_MKCP, - Settings: serial.ToTypedMessage(&kcp.Config{ + ProtocolName: "mkcp", + Settings: serial.ToTypedMessage(&kcp.Config{ ReadBuffer: &kcp.ReadBuffer{ Size: 512 * 1024, }, diff --git a/transport/internet/config.go b/transport/internet/config.go index 96cf53b7..8608b872 100644 --- a/transport/internet/config.go +++ b/transport/internet/config.go @@ -28,25 +28,6 @@ var strategy = [][]byte{ const unknownProtocol = "unknown" -func transportProtocolToString(protocol TransportProtocol) string { - switch protocol { - case TransportProtocol_TCP: - return "tcp" - case TransportProtocol_UDP: - return "udp" - case TransportProtocol_HTTP: - return "http" - case TransportProtocol_MKCP: - return "mkcp" - case TransportProtocol_WebSocket: - return "websocket" - case TransportProtocol_HTTPUpgrade: - return "httpupgrade" - default: - return unknownProtocol - } -} - func RegisterProtocolConfigCreator(name string, creator ConfigCreator) error { if _, found := globalTransportConfigCreatorCache[name]; found { return errors.New("protocol ", name, " is already registered").AtError() @@ -70,23 +51,15 @@ func (c *TransportConfig) GetTypedSettings() (interface{}, error) { } func (c *TransportConfig) GetUnifiedProtocolName() string { - if len(c.ProtocolName) > 0 { - return c.ProtocolName - } - - return transportProtocolToString(c.Protocol) + return c.ProtocolName } func (c *StreamConfig) GetEffectiveProtocol() string { - if c == nil { + if c == nil || len(c.ProtocolName) == 0 { return "tcp" } - if len(c.ProtocolName) > 0 { - return c.ProtocolName - } - - return transportProtocolToString(c.Protocol) + return c.ProtocolName } func (c *StreamConfig) GetEffectiveTransportSettings() (interface{}, error) { diff --git a/transport/internet/config.pb.go b/transport/internet/config.pb.go index 2cbe7fac..c58781fa 100644 --- a/transport/internet/config.pb.go +++ b/transport/internet/config.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.28.0 // source: transport/internet/config.proto package internet @@ -21,67 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type TransportProtocol int32 - -const ( - TransportProtocol_TCP TransportProtocol = 0 - TransportProtocol_UDP TransportProtocol = 1 - TransportProtocol_MKCP TransportProtocol = 2 - TransportProtocol_WebSocket TransportProtocol = 3 - TransportProtocol_HTTP TransportProtocol = 4 - TransportProtocol_HTTPUpgrade TransportProtocol = 6 - TransportProtocol_SplitHTTP TransportProtocol = 7 -) - -// Enum value maps for TransportProtocol. -var ( - TransportProtocol_name = map[int32]string{ - 0: "TCP", - 1: "UDP", - 2: "MKCP", - 3: "WebSocket", - 4: "HTTP", - 6: "HTTPUpgrade", - 7: "SplitHTTP", - } - TransportProtocol_value = map[string]int32{ - "TCP": 0, - "UDP": 1, - "MKCP": 2, - "WebSocket": 3, - "HTTP": 4, - "HTTPUpgrade": 6, - "SplitHTTP": 7, - } -) - -func (x TransportProtocol) Enum() *TransportProtocol { - p := new(TransportProtocol) - *p = x - return p -} - -func (x TransportProtocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TransportProtocol) Descriptor() protoreflect.EnumDescriptor { - return file_transport_internet_config_proto_enumTypes[0].Descriptor() -} - -func (TransportProtocol) Type() protoreflect.EnumType { - return &file_transport_internet_config_proto_enumTypes[0] -} - -func (x TransportProtocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TransportProtocol.Descriptor instead. -func (TransportProtocol) EnumDescriptor() ([]byte, []int) { - return file_transport_internet_config_proto_rawDescGZIP(), []int{0} -} - type DomainStrategy int32 const ( @@ -139,11 +78,11 @@ func (x DomainStrategy) String() string { } func (DomainStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_transport_internet_config_proto_enumTypes[1].Descriptor() + return file_transport_internet_config_proto_enumTypes[0].Descriptor() } func (DomainStrategy) Type() protoreflect.EnumType { - return &file_transport_internet_config_proto_enumTypes[1] + return &file_transport_internet_config_proto_enumTypes[0] } func (x DomainStrategy) Number() protoreflect.EnumNumber { @@ -152,7 +91,7 @@ func (x DomainStrategy) Number() protoreflect.EnumNumber { // Deprecated: Use DomainStrategy.Descriptor instead. func (DomainStrategy) EnumDescriptor() ([]byte, []int) { - return file_transport_internet_config_proto_rawDescGZIP(), []int{1} + return file_transport_internet_config_proto_rawDescGZIP(), []int{0} } type SocketConfig_TProxyMode int32 @@ -191,11 +130,11 @@ func (x SocketConfig_TProxyMode) String() string { } func (SocketConfig_TProxyMode) Descriptor() protoreflect.EnumDescriptor { - return file_transport_internet_config_proto_enumTypes[2].Descriptor() + return file_transport_internet_config_proto_enumTypes[1].Descriptor() } func (SocketConfig_TProxyMode) Type() protoreflect.EnumType { - return &file_transport_internet_config_proto_enumTypes[2] + return &file_transport_internet_config_proto_enumTypes[1] } func (x SocketConfig_TProxyMode) Number() protoreflect.EnumNumber { @@ -212,11 +151,6 @@ type TransportConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Type of network that this settings supports. - // Deprecated. Use the string form below. - // - // Deprecated: Marked as deprecated in transport/internet/config.proto. - Protocol TransportProtocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=xray.transport.internet.TransportProtocol" json:"protocol,omitempty"` // Type of network that this settings supports. ProtocolName string `protobuf:"bytes,3,opt,name=protocol_name,json=protocolName,proto3" json:"protocol_name,omitempty"` // Specific settings. Must be of the transports. @@ -255,14 +189,6 @@ func (*TransportConfig) Descriptor() ([]byte, []int) { return file_transport_internet_config_proto_rawDescGZIP(), []int{0} } -// Deprecated: Marked as deprecated in transport/internet/config.proto. -func (x *TransportConfig) GetProtocol() TransportProtocol { - if x != nil { - return x.Protocol - } - return TransportProtocol_TCP -} - func (x *TransportConfig) GetProtocolName() string { if x != nil { return x.ProtocolName @@ -282,10 +208,6 @@ type StreamConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Effective network. Deprecated. Use the string form below. - // - // Deprecated: Marked as deprecated in transport/internet/config.proto. - Protocol TransportProtocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=xray.transport.internet.TransportProtocol" json:"protocol,omitempty"` // Effective network. ProtocolName string `protobuf:"bytes,5,opt,name=protocol_name,json=protocolName,proto3" json:"protocol_name,omitempty"` TransportSettings []*TransportConfig `protobuf:"bytes,2,rep,name=transport_settings,json=transportSettings,proto3" json:"transport_settings,omitempty"` @@ -328,14 +250,6 @@ func (*StreamConfig) Descriptor() ([]byte, []int) { return file_transport_internet_config_proto_rawDescGZIP(), []int{1} } -// Deprecated: Marked as deprecated in transport/internet/config.proto. -func (x *StreamConfig) GetProtocol() TransportProtocol { - if x != nil { - return x.Protocol - } - return TransportProtocol_TCP -} - func (x *StreamConfig) GetProtocolName() string { if x != nil { return x.ProtocolName @@ -710,139 +624,123 @@ var file_transport_internet_config_proto_rawDesc = []byte{ 0x6f, 0x12, 0x17, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, - 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, - 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x22, 0x9c, 0x03, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, - 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x4d, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x73, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x4e, 0x0a, 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, - 0x51, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, - 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, - 0x12, 0x30, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x22, 0x61, 0x0a, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x6f, 0x63, 0x6b, - 0x6f, 0x70, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x70, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x70, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x9f, 0x07, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x66, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x66, 0x6f, 0x12, 0x48, 0x0a, 0x06, - 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x78, - 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x54, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x06, - 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x65, - 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x69, 0x6e, - 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0b, 0x62, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, - 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x08, 0x62, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x50, 0x0a, - 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, + 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x12, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4e, 0x0a, 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x51, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x22, 0x61, 0x0a, 0x0d, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x6f, 0x70, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, + 0x70, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x9f, 0x07, 0x0a, + 0x0c, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, + 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6d, 0x61, 0x72, + 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x74, 0x66, 0x6f, 0x12, 0x48, 0x0a, 0x06, 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x53, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x41, 0x0a, + 0x1d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, + 0x12, 0x32, 0x0a, 0x15, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x50, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, + 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x72, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, + 0x61, 0x6c, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x35, 0x0a, 0x17, 0x74, 0x63, 0x70, + 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, 0x63, 0x70, 0x4b, + 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x12, 0x2d, 0x0a, 0x13, 0x74, 0x63, 0x70, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69, + 0x76, 0x65, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, + 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x49, 0x64, 0x6c, 0x65, 0x12, + 0x25, 0x0a, 0x0e, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x36, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, 0x36, 0x6f, 0x6e, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x10, + 0x74, 0x63, 0x70, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x63, 0x6c, 0x61, 0x6d, 0x70, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x43, 0x6c, 0x61, 0x6d, 0x70, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0e, 0x74, 0x63, 0x70, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x1e, 0x0a, 0x0b, 0x74, 0x63, 0x70, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x65, 0x67, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x63, 0x70, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x67, + 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x63, 0x70, 0x5f, 0x6e, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x74, 0x63, 0x70, 0x4e, 0x6f, 0x44, 0x65, 0x6c, + 0x61, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x63, 0x70, 0x5f, 0x6d, 0x70, 0x74, 0x63, 0x70, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x63, 0x70, 0x4d, 0x70, 0x74, 0x63, 0x70, 0x12, + 0x4c, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x6f, 0x70, 0x74, + 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, - 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, - 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x12, 0x35, 0x0a, 0x17, 0x74, 0x63, 0x70, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, - 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, - 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x13, 0x74, 0x63, 0x70, - 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x64, 0x6c, 0x65, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x41, - 0x6c, 0x69, 0x76, 0x65, 0x49, 0x64, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x63, 0x70, 0x5f, - 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x74, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x36, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, - 0x36, 0x6f, 0x6e, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x77, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x5f, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0e, 0x74, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x43, 0x6c, 0x61, 0x6d, 0x70, 0x12, - 0x28, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x55, 0x73, - 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x74, 0x63, 0x70, - 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x65, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, - 0x74, 0x63, 0x70, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x67, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x63, 0x70, - 0x5f, 0x6e, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x74, 0x63, 0x70, 0x4e, 0x6f, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x74, - 0x63, 0x70, 0x5f, 0x6d, 0x70, 0x74, 0x63, 0x70, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x74, 0x63, 0x70, 0x4d, 0x70, 0x74, 0x63, 0x70, 0x12, 0x4c, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x6f, 0x70, 0x74, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x53, 0x6f, 0x63, 0x6b, 0x6f, 0x70, 0x74, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, - 0x6f, 0x63, 0x6b, 0x6f, 0x70, 0x74, 0x22, 0x2f, 0x0a, 0x0a, 0x54, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x66, 0x66, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x54, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0x02, 0x2a, 0x68, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x07, 0x0a, 0x03, - 0x54, 0x43, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x01, 0x12, 0x08, - 0x0a, 0x04, 0x4d, 0x4b, 0x43, 0x50, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x65, 0x62, 0x53, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, - 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x54, 0x54, 0x50, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x48, 0x54, 0x54, 0x50, 0x10, - 0x07, 0x2a, 0xa9, 0x01, 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, - 0x74, 0x65, 0x67, 0x79, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x53, 0x5f, 0x49, 0x53, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x53, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, - 0x49, 0x50, 0x36, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x34, - 0x36, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x34, 0x10, - 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x10, 0x06, 0x12, - 0x0d, 0x0a, 0x09, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x10, 0x07, 0x12, 0x0d, - 0x0a, 0x09, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x10, 0x08, 0x12, 0x0e, 0x0a, - 0x0a, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x36, 0x10, 0x09, 0x12, 0x0e, 0x0a, - 0x0a, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x34, 0x10, 0x0a, 0x42, 0x67, 0x0a, - 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x2c, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, - 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x17, 0x58, - 0x72, 0x61, 0x79, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x6f, 0x70, 0x74, 0x52, 0x0d, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x6f, 0x70, 0x74, 0x22, 0x2f, 0x0a, + 0x0a, 0x54, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4f, + 0x66, 0x66, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x10, 0x01, + 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0x02, 0x2a, 0xa9, + 0x01, 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x53, 0x5f, 0x49, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, + 0x49, 0x50, 0x34, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x36, + 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x36, 0x10, 0x04, + 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x34, 0x10, 0x05, 0x12, 0x0c, + 0x0a, 0x08, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, + 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x46, + 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x4f, + 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x36, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x4f, + 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x34, 0x10, 0x0a, 0x42, 0x67, 0x0a, 0x1b, 0x63, 0x6f, + 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, + 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x17, 0x58, 0x72, 0x61, 0x79, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -857,34 +755,31 @@ func file_transport_internet_config_proto_rawDescGZIP() []byte { return file_transport_internet_config_proto_rawDescData } -var file_transport_internet_config_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_transport_internet_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_transport_internet_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_transport_internet_config_proto_goTypes = []any{ - (TransportProtocol)(0), // 0: xray.transport.internet.TransportProtocol - (DomainStrategy)(0), // 1: xray.transport.internet.DomainStrategy - (SocketConfig_TProxyMode)(0), // 2: xray.transport.internet.SocketConfig.TProxyMode - (*TransportConfig)(nil), // 3: xray.transport.internet.TransportConfig - (*StreamConfig)(nil), // 4: xray.transport.internet.StreamConfig - (*ProxyConfig)(nil), // 5: xray.transport.internet.ProxyConfig - (*CustomSockopt)(nil), // 6: xray.transport.internet.CustomSockopt - (*SocketConfig)(nil), // 7: xray.transport.internet.SocketConfig - (*serial.TypedMessage)(nil), // 8: xray.common.serial.TypedMessage + (DomainStrategy)(0), // 0: xray.transport.internet.DomainStrategy + (SocketConfig_TProxyMode)(0), // 1: xray.transport.internet.SocketConfig.TProxyMode + (*TransportConfig)(nil), // 2: xray.transport.internet.TransportConfig + (*StreamConfig)(nil), // 3: xray.transport.internet.StreamConfig + (*ProxyConfig)(nil), // 4: xray.transport.internet.ProxyConfig + (*CustomSockopt)(nil), // 5: xray.transport.internet.CustomSockopt + (*SocketConfig)(nil), // 6: xray.transport.internet.SocketConfig + (*serial.TypedMessage)(nil), // 7: xray.common.serial.TypedMessage } var file_transport_internet_config_proto_depIdxs = []int32{ - 0, // 0: xray.transport.internet.TransportConfig.protocol:type_name -> xray.transport.internet.TransportProtocol - 8, // 1: xray.transport.internet.TransportConfig.settings:type_name -> xray.common.serial.TypedMessage - 0, // 2: xray.transport.internet.StreamConfig.protocol:type_name -> xray.transport.internet.TransportProtocol - 3, // 3: xray.transport.internet.StreamConfig.transport_settings:type_name -> xray.transport.internet.TransportConfig - 8, // 4: xray.transport.internet.StreamConfig.security_settings:type_name -> xray.common.serial.TypedMessage - 7, // 5: xray.transport.internet.StreamConfig.socket_settings:type_name -> xray.transport.internet.SocketConfig - 2, // 6: xray.transport.internet.SocketConfig.tproxy:type_name -> xray.transport.internet.SocketConfig.TProxyMode - 1, // 7: xray.transport.internet.SocketConfig.domain_strategy:type_name -> xray.transport.internet.DomainStrategy - 6, // 8: xray.transport.internet.SocketConfig.customSockopt:type_name -> xray.transport.internet.CustomSockopt - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 7, // 0: xray.transport.internet.TransportConfig.settings:type_name -> xray.common.serial.TypedMessage + 2, // 1: xray.transport.internet.StreamConfig.transport_settings:type_name -> xray.transport.internet.TransportConfig + 7, // 2: xray.transport.internet.StreamConfig.security_settings:type_name -> xray.common.serial.TypedMessage + 6, // 3: xray.transport.internet.StreamConfig.socket_settings:type_name -> xray.transport.internet.SocketConfig + 1, // 4: xray.transport.internet.SocketConfig.tproxy:type_name -> xray.transport.internet.SocketConfig.TProxyMode + 0, // 5: xray.transport.internet.SocketConfig.domain_strategy:type_name -> xray.transport.internet.DomainStrategy + 5, // 6: xray.transport.internet.SocketConfig.customSockopt:type_name -> xray.transport.internet.CustomSockopt + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_transport_internet_config_proto_init() } @@ -959,7 +854,7 @@ func file_transport_internet_config_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_transport_internet_config_proto_rawDesc, - NumEnums: 3, + NumEnums: 2, NumMessages: 5, NumExtensions: 0, NumServices: 0, diff --git a/transport/internet/config.proto b/transport/internet/config.proto index cab6162c..b892deb3 100644 --- a/transport/internet/config.proto +++ b/transport/internet/config.proto @@ -8,16 +8,6 @@ option java_multiple_files = true; import "common/serial/typed_message.proto"; -enum TransportProtocol { - TCP = 0; - UDP = 1; - MKCP = 2; - WebSocket = 3; - HTTP = 4; - HTTPUpgrade = 6; - SplitHTTP = 7; -} - enum DomainStrategy { AS_IS = 0; USE_IP = 1; @@ -33,10 +23,6 @@ enum DomainStrategy { } message TransportConfig { - // Type of network that this settings supports. - // Deprecated. Use the string form below. - TransportProtocol protocol = 1 [ deprecated = true ]; - // Type of network that this settings supports. string protocol_name = 3; @@ -45,9 +31,6 @@ message TransportConfig { } message StreamConfig { - // Effective network. Deprecated. Use the string form below. - TransportProtocol protocol = 1 [ deprecated = true ]; - // Effective network. string protocol_name = 5; diff --git a/transport/internet/grpc/config.go b/transport/internet/grpc/config.go index aab1178e..c9903018 100644 --- a/transport/internet/grpc/config.go +++ b/transport/internet/grpc/config.go @@ -8,8 +8,6 @@ import ( "github.com/xtls/xray-core/transport/internet" ) -const protocolName = "grpc" - func init() { common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} { return new(Config) diff --git a/transport/internet/grpc/encoding/encoding.go b/transport/internet/grpc/encoding/encoding.go index f8e3e368..523b90ce 100644 --- a/transport/internet/grpc/encoding/encoding.go +++ b/transport/internet/grpc/encoding/encoding.go @@ -1,3 +1 @@ package encoding - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/transport/internet/grpc/grpc.go b/transport/internet/grpc/grpc.go index 6caf155b..bcf78b0a 100644 --- a/transport/internet/grpc/grpc.go +++ b/transport/internet/grpc/grpc.go @@ -1,3 +1,3 @@ package grpc -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen +const protocolName = "grpc" diff --git a/transport/internet/headers/http/http.go b/transport/internet/headers/http/http.go index 01168808..3c1ff06c 100644 --- a/transport/internet/headers/http/http.go +++ b/transport/internet/headers/http/http.go @@ -1,7 +1,5 @@ package http -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - import ( "bufio" "bytes" diff --git a/transport/internet/http/config.go b/transport/internet/http/config.go index 2697f989..989ed106 100644 --- a/transport/internet/http/config.go +++ b/transport/internet/http/config.go @@ -6,8 +6,6 @@ import ( "github.com/xtls/xray-core/transport/internet" ) -const protocolName = "http" - func (c *Config) getHosts() []string { if len(c.Host) == 0 { return []string{"www.example.com"} diff --git a/transport/internet/http/http.go b/transport/internet/http/http.go index 3c0d015f..a6343422 100644 --- a/transport/internet/http/http.go +++ b/transport/internet/http/http.go @@ -1,3 +1,3 @@ package http -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen +const protocolName = "http" diff --git a/transport/internet/httpupgrade/httpupgrade.go b/transport/internet/httpupgrade/httpupgrade.go index e949f871..0a902398 100644 --- a/transport/internet/httpupgrade/httpupgrade.go +++ b/transport/internet/httpupgrade/httpupgrade.go @@ -1,18 +1,3 @@ package httpupgrade -import ( - "context" - - "github.com/xtls/xray-core/common" - "github.com/xtls/xray-core/common/errors" -) - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - const protocolName = "httpupgrade" - -func init() { - common.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, config interface{}) (interface{}, error) { - return nil, errors.New("httpupgrade is a transport protocol.") - })) -} diff --git a/transport/internet/internet.go b/transport/internet/internet.go index 70fab761..19529e63 100644 --- a/transport/internet/internet.go +++ b/transport/internet/internet.go @@ -5,8 +5,6 @@ import ( "strings" ) -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - func IsValidHTTPHost(request string, config string) bool { r := strings.ToLower(request) c := strings.ToLower(config) diff --git a/transport/internet/kcp/config.go b/transport/internet/kcp/config.go index 808b1d50..a0dfd51f 100644 --- a/transport/internet/kcp/config.go +++ b/transport/internet/kcp/config.go @@ -7,8 +7,6 @@ import ( "github.com/xtls/xray-core/transport/internet" ) -const protocolName = "mkcp" - // GetMTUValue returns the value of MTU settings. func (c *Config) GetMTUValue() uint32 { if c == nil || c.Mtu == nil { diff --git a/transport/internet/kcp/kcp.go b/transport/internet/kcp/kcp.go index 1a486faa..31c0633c 100644 --- a/transport/internet/kcp/kcp.go +++ b/transport/internet/kcp/kcp.go @@ -6,4 +6,4 @@ // xtaci@github for translating to Golang package kcp -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen +const protocolName = "mkcp" diff --git a/transport/internet/reality/reality.go b/transport/internet/reality/reality.go index 44402f31..c2f7859c 100644 --- a/transport/internet/reality/reality.go +++ b/transport/internet/reality/reality.go @@ -36,8 +36,6 @@ import ( "golang.org/x/net/http2" ) -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - //go:linkname aesgcmPreferred github.com/refraction-networking/utls.aesgcmPreferred func aesgcmPreferred(ciphers []uint16) bool diff --git a/transport/internet/splithttp/splithttp.go b/transport/internet/splithttp/splithttp.go index 6e458616..2076e933 100644 --- a/transport/internet/splithttp/splithttp.go +++ b/transport/internet/splithttp/splithttp.go @@ -1,18 +1,3 @@ package splithttp -import ( - "context" - - "github.com/xtls/xray-core/common" - "github.com/xtls/xray-core/common/errors" -) - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - const protocolName = "splithttp" - -func init() { - common.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, config interface{}) (interface{}, error) { - return nil, errors.New("splithttp is a transport protocol.") - })) -} diff --git a/transport/internet/tagged/taggedimpl/taggedimpl.go b/transport/internet/tagged/taggedimpl/taggedimpl.go index ef2f3c02..3116922e 100644 --- a/transport/internet/tagged/taggedimpl/taggedimpl.go +++ b/transport/internet/tagged/taggedimpl/taggedimpl.go @@ -1,3 +1 @@ package taggedimpl - -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen diff --git a/transport/internet/tcp/config.go b/transport/internet/tcp/config.go index f21b63f6..e8851d0e 100644 --- a/transport/internet/tcp/config.go +++ b/transport/internet/tcp/config.go @@ -5,8 +5,6 @@ import ( "github.com/xtls/xray-core/transport/internet" ) -const protocolName = "tcp" - func init() { common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} { return new(Config) diff --git a/transport/internet/tcp/tcp.go b/transport/internet/tcp/tcp.go index f9e66d84..9a86457a 100644 --- a/transport/internet/tcp/tcp.go +++ b/transport/internet/tcp/tcp.go @@ -1,3 +1,3 @@ package tcp -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen +const protocolName = "tcp" diff --git a/transport/internet/tls/tls.go b/transport/internet/tls/tls.go index 25889cb1..38b603c0 100644 --- a/transport/internet/tls/tls.go +++ b/transport/internet/tls/tls.go @@ -12,8 +12,6 @@ import ( "github.com/xtls/xray-core/common/net" ) -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - type Interface interface { net.Conn HandshakeContext(ctx context.Context) error diff --git a/transport/internet/udp/udp.go b/transport/internet/udp/udp.go index d01148b2..154bcc7e 100644 --- a/transport/internet/udp/udp.go +++ b/transport/internet/udp/udp.go @@ -1,5 +1,3 @@ package udp -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen - const protocolName = "udp" diff --git a/transport/internet/websocket/config.go b/transport/internet/websocket/config.go index 8cb4a855..af66ebbe 100644 --- a/transport/internet/websocket/config.go +++ b/transport/internet/websocket/config.go @@ -7,8 +7,6 @@ import ( "github.com/xtls/xray-core/transport/internet" ) -const protocolName = "websocket" - func (c *Config) GetNormalizedPath() string { path := c.Path if path == "" { diff --git a/transport/internet/websocket/ws.go b/transport/internet/websocket/ws.go index 85c5ffb0..f05ded37 100644 --- a/transport/internet/websocket/ws.go +++ b/transport/internet/websocket/ws.go @@ -5,4 +5,4 @@ WebSocket transport implements an HTTP(S) compliable, surveillance proof transpo */ package websocket -//go:generate go run github.com/xtls/xray-core/common/errors/errorgen +const protocolName = "websocket"