diff --git a/.dev/protoc/linux/protoc b/.dev/protoc/linux/protoc index 1cb992fed3..a4e3bbe0d6 100755 Binary files a/.dev/protoc/linux/protoc and b/.dev/protoc/linux/protoc differ diff --git a/.dev/protoc/macos/protoc b/.dev/protoc/macos/protoc index 178595c170..018077a4d1 100755 Binary files a/.dev/protoc/macos/protoc and b/.dev/protoc/macos/protoc differ diff --git a/.dev/protoc/windows/protoc.exe b/.dev/protoc/windows/protoc.exe index 73a388dde3..b978838fda 100755 Binary files a/.dev/protoc/windows/protoc.exe and b/.dev/protoc/windows/protoc.exe differ diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d921d0ffdb..d85c63734e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + version: 2 updates: -- package-ecosystem: gomod - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 10 + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b3c84f102c..b63d65b67d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -2,30 +2,37 @@ name: Coverage on: push: - branches: [ master ] + branches: [master] + paths: + - "**/*.go" jobs: - - build: - name: Coverage + coverage: runs-on: ubuntu-latest - steps: - - name: Set up Go 1.x uses: actions/setup-go@v2 with: go-version: ^1.14 - id: go - - name: Check out code into the Go module directory + - name: Checkout codebase uses: actions/checkout@v2 + - name: Cache go module + uses: actions/cache@v2 + id: cache-gomodules + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Get dependencies + if: steps.cache-gomodules.outputs.cache-hit != 'true' run: | go get -v -t -d ./... - - name: Run Coverage + - name: Run coverage run: ./testing/coverage/coverall2 - name: Upload coverage to Codecov diff --git a/.github/workflows/dlc.yml b/.github/workflows/dlc.yml deleted file mode 100644 index 0727c0af43..0000000000 --- a/.github/workflows/dlc.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Update dlc - -on: - schedule: - - cron: '0 0 * * FRI' - -jobs: - - build: - name: Update - runs-on: ubuntu-latest - steps: - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Download and Write - run: | - curl -L -o release/config/geoip.dat "https://github.com/v2ray/geoip/raw/release/geoip.dat" - curl -L -o release/config/geosite.dat "https://github.com/v2ray/domain-list-community/raw/release/dlc.dat" - - - name: push - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git commit -am "update geoip, geosite" -a - git push -v --progress - diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 73bacb2626..47326cb2e1 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -9,7 +9,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - name: Set up Checkout + - name: Checkout default branch uses: actions/checkout@v2 - name: Install Buildx and QEMU @@ -21,7 +21,7 @@ jobs: docker run --rm --privileged multiarch/qemu-user-static:latest --reset -p yes --credential yes docker buildx create --use --name build --node build --driver-opt network=host - - name: Log in to Docker Hub + - name: Login to Docker Hub env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 20592df1ab..0204ecfb94 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,24 +1,59 @@ -name: Lint Code Base +name: Lint on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] - types: [assigned, opened, synchronize, reopened] + branches: [master] + types: [opened, synchronize, reopened] jobs: - build: - name: Lint Code Base + lint: runs-on: ubuntu-latest - steps: - - name: Checkout Code + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.14 + + - name: Checkout codebase uses: actions/checkout@v2 - - name: Lint Code Base - uses: github/super-linter@v2.2.0 + - name: Cache go module + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Show if need to format code + if: ${{ always() }} + run: | + filesNeedToFormat=$(go fmt ./...) + if [[ $filesNeedToFormat ]]; then + echo -e "\033[0;36m[Error] The following Go files need to be formatted:\033[0m" + echo -e "\033[0;31m$filesNeedToFormat\033[0m" + exit 1 + fi + + - name: Lint *.go files + if: ${{ always() }} + run: | + go vet $(go list ./... | grep -v /external/) + if [[ $? != 0 ]]; then + exit 1 + fi + + - name: Lint other files + if: ${{ always() }} + uses: github/super-linter@v3.9.2 env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_ALL_CODEBASE: false + VALIDATE_BASH: false + VALIDATE_DOCKERFILE: false + VALIDATE_DOCKERFILE_HADOLINT: false + VALIDATE_GO: false VALIDATE_JSON: false - VALIDATE_ANSIBLE: false + VALIDATE_MD: false + VALIDATE_PROTOBUF: false diff --git a/.github/workflows/sign.yml b/.github/workflows/sign.yml index 24c32d6776..4dcdbfb688 100644 --- a/.github/workflows/sign.yml +++ b/.github/workflows/sign.yml @@ -1,37 +1,24 @@ -# This is a basic workflow to help you get started with Actions - name: Sign -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch on: release: types: [released] -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on + sign: runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Invoke release signing - - name: make it run - run: chmod +x $GITHUB_WORKSPACE/release/requestsign_github.sh + - name: Checkout default branch + uses: actions/checkout@v2 - # Invoke release signing - - name: make it run - run: chmod +x $GITHUB_WORKSPACE/release/requestsign.sh + - name: Grant it execution permission + run: | + chmod +x $GITHUB_WORKSPACE/release/requestsign_github.sh + chmod +x $GITHUB_WORKSPACE/release/requestsign.sh - # Invoke release signing - name: Invoke release signing env: SIGN_SERVICE_PASSWORD: ${{ secrets.SIGN_SERVICE_PASSWORD }} SIGN_SERIVCE_URL: ${{ secrets.SIGN_SERIVCE_URL }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: $GITHUB_WORKSPACE/release/requestsign_github.sh \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: $GITHUB_WORKSPACE/release/requestsign_github.sh diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5863f3dfcb..ef5b0eab18 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,17 +2,16 @@ name: Mark stale issues and pull requests on: schedule: - - cron: "30 1 * * *" + - cron: "30 1 * * *" jobs: stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days' - days-before-stale: 120 - days-before-close: 5 + - uses: actions/stale@v3.0.10 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days" + stale-pr-message: 'It has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days' + days-before-stale: 120 + days-before-close: 5 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fbc4c65684..cc6f06177f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,33 +2,36 @@ name: Test on: push: - branches: [ master ] + branches: [master] + paths: + - "**/*.go" pull_request: - branches: [ master ] + branches: [master] + types: [opened, synchronize, reopened] + paths: + - "**/*.go" jobs: - - build: - name: Test + test: runs-on: ${{ matrix.os }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - steps: - - name: Set up Go 1.x uses: actions/setup-go@v2 with: go-version: ^1.14 - id: go - - name: Check out code into the Go module directory + - name: Checkout codebase uses: actions/checkout@v2 - - name: Get dependencies - run: | - go get -v -t -d ./... + - name: Cache go module + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- - name: Test - run: go test -parallel 1 -timeout 6h -v ./... + run: go test -timeout 1h -v ./... diff --git a/.github/workflows/updateGeofile.yml b/.github/workflows/updateGeofile.yml new file mode 100644 index 0000000000..9ba3a6afd3 --- /dev/null +++ b/.github/workflows/updateGeofile.yml @@ -0,0 +1,24 @@ +name: Update Geofiles + +on: + schedule: + - cron: "0 0 * * FRI" + +jobs: + update: + runs-on: ubuntu-latest + steps: + - name: Checkout codebase + uses: actions/checkout@v2 + + - name: Download + run: | + curl -L -o release/config/geoip.dat "https://github.com/v2fly/geoip/raw/release/geoip.dat" + curl -L -o release/config/geosite.dat "https://github.com/v2fly/domain-list-community/raw/release/dlc.dat" + + - name: push + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -am "update geoip, geosite" + git push -v --progress diff --git a/README.md b/README.md index 5586ae4fb3..01ff9ef65d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ [9]: https://img.shields.io/github/downloads/v2ray/v2ray-core/total.svg "All releases badge" [10]: https://github.com/v2ray/v2ray-core/releases/ "All releases number" -Project V is a set of network tools that help you to build your own computer network. It secures your network connections and thus protects your privacy. See [our website](https://www.v2ray.com/) for more information. +Project V is a set of network tools that help you to build your own computer network. It secures your network connections and thus protects your privacy. See [our website](https://www.v2fly.org/) for more information. ## License diff --git a/app/commander/config.pb.go b/app/commander/config.pb.go index cb67b04423..68bcaa6186 100644 --- a/app/commander/config.pb.go +++ b/app/commander/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/commander/config.proto + package commander import ( @@ -35,7 +41,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_commander_config_proto_msgTypes[0] + mi := &file_app_commander_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +54,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_commander_config_proto_msgTypes[0] + mi := &file_app_commander_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +67,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_commander_config_proto_rawDescGZIP(), []int{0} + return file_app_commander_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetTag() string { @@ -78,48 +84,47 @@ func (x *Config) GetService() []*serial.TypedMessage { return nil } -var File_v2ray_com_core_app_commander_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_commander_config_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x65, 0x72, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 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, 0x5c, 0x0a, 0x06, 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, 0x40, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 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, 0x07, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x46, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x65, 0x72, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, - 0x41, 0x70, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_app_commander_config_proto protoreflect.FileDescriptor + +var file_app_commander_config_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x61, 0x70, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 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, 0x5c, 0x0a, 0x06, 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, 0x40, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 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, 0x07, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x59, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x1c, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_commander_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_commander_config_proto_rawDescData = file_v2ray_com_core_app_commander_config_proto_rawDesc + file_app_commander_config_proto_rawDescOnce sync.Once + file_app_commander_config_proto_rawDescData = file_app_commander_config_proto_rawDesc ) -func file_v2ray_com_core_app_commander_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_commander_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_commander_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_commander_config_proto_rawDescData) +func file_app_commander_config_proto_rawDescGZIP() []byte { + file_app_commander_config_proto_rawDescOnce.Do(func() { + file_app_commander_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_commander_config_proto_rawDescData) }) - return file_v2ray_com_core_app_commander_config_proto_rawDescData + return file_app_commander_config_proto_rawDescData } -var file_v2ray_com_core_app_commander_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_app_commander_config_proto_goTypes = []interface{}{ +var file_app_commander_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_app_commander_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.app.commander.Config (*serial.TypedMessage)(nil), // 1: v2ray.core.common.serial.TypedMessage } -var file_v2ray_com_core_app_commander_config_proto_depIdxs = []int32{ +var file_app_commander_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.app.commander.Config.service:type_name -> v2ray.core.common.serial.TypedMessage 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -128,13 +133,13 @@ var file_v2ray_com_core_app_commander_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_commander_config_proto_init() } -func file_v2ray_com_core_app_commander_config_proto_init() { - if File_v2ray_com_core_app_commander_config_proto != nil { +func init() { file_app_commander_config_proto_init() } +func file_app_commander_config_proto_init() { + if File_app_commander_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_commander_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_commander_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -151,18 +156,18 @@ func file_v2ray_com_core_app_commander_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_commander_config_proto_rawDesc, + RawDescriptor: file_app_commander_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_app_commander_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_commander_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_app_commander_config_proto_msgTypes, + GoTypes: file_app_commander_config_proto_goTypes, + DependencyIndexes: file_app_commander_config_proto_depIdxs, + MessageInfos: file_app_commander_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_commander_config_proto = out.File - file_v2ray_com_core_app_commander_config_proto_rawDesc = nil - file_v2ray_com_core_app_commander_config_proto_goTypes = nil - file_v2ray_com_core_app_commander_config_proto_depIdxs = nil + File_app_commander_config_proto = out.File + file_app_commander_config_proto_rawDesc = nil + file_app_commander_config_proto_goTypes = nil + file_app_commander_config_proto_depIdxs = nil } diff --git a/app/commander/config.proto b/app/commander/config.proto index e6aaa7ec6b..732b6857da 100644 --- a/app/commander/config.proto +++ b/app/commander/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.app.commander; option csharp_namespace = "V2Ray.Core.App.Commander"; -option go_package = "commander"; +option go_package = "v2ray.com/core/app/commander"; option java_package = "com.v2ray.core.app.commander"; option java_multiple_files = true; -import "v2ray.com/core/common/serial/typed_message.proto"; +import "common/serial/typed_message.proto"; // Config is the settings for Commander. message Config { diff --git a/app/dispatcher/config.pb.go b/app/dispatcher/config.pb.go index 43e2b7d72e..dea18e22fa 100644 --- a/app/dispatcher/config.pb.go +++ b/app/dispatcher/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/dispatcher/config.proto + package dispatcher import ( @@ -28,7 +34,7 @@ type SessionConfig struct { func (x *SessionConfig) Reset() { *x = SessionConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_dispatcher_config_proto_msgTypes[0] + mi := &file_app_dispatcher_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -41,7 +47,7 @@ func (x *SessionConfig) String() string { func (*SessionConfig) ProtoMessage() {} func (x *SessionConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_dispatcher_config_proto_msgTypes[0] + mi := &file_app_dispatcher_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,7 +60,7 @@ func (x *SessionConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use SessionConfig.ProtoReflect.Descriptor instead. func (*SessionConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_dispatcher_config_proto_rawDescGZIP(), []int{0} + return file_app_dispatcher_config_proto_rawDescGZIP(), []int{0} } type Config struct { @@ -68,7 +74,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_dispatcher_config_proto_msgTypes[1] + mi := &file_app_dispatcher_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -81,7 +87,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_dispatcher_config_proto_msgTypes[1] + mi := &file_app_dispatcher_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94,7 +100,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_dispatcher_config_proto_rawDescGZIP(), []int{1} + return file_app_dispatcher_config_proto_rawDescGZIP(), []int{1} } func (x *Config) GetSettings() *SessionConfig { @@ -104,46 +110,46 @@ func (x *Config) GetSettings() *SessionConfig { return nil } -var File_v2ray_com_core_app_dispatcher_config_proto protoreflect.FileDescriptor +var File_app_dispatcher_config_proto protoreflect.FileDescriptor -var file_v2ray_com_core_app_dispatcher_config_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x76, 0x32, +var file_app_dispatcher_config_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x22, 0x15, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, + 0x4e, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x08, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x22, 0x15, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x4e, - 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x49, - 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, - 0x01, 0x5a, 0x0a, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xaa, 0x02, 0x19, - 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, + 0x5c, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x50, 0x01, 0x5a, 0x1d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0xaa, 0x02, 0x19, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, + 0x70, 0x70, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_dispatcher_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_dispatcher_config_proto_rawDescData = file_v2ray_com_core_app_dispatcher_config_proto_rawDesc + file_app_dispatcher_config_proto_rawDescOnce sync.Once + file_app_dispatcher_config_proto_rawDescData = file_app_dispatcher_config_proto_rawDesc ) -func file_v2ray_com_core_app_dispatcher_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_dispatcher_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_dispatcher_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_dispatcher_config_proto_rawDescData) +func file_app_dispatcher_config_proto_rawDescGZIP() []byte { + file_app_dispatcher_config_proto_rawDescOnce.Do(func() { + file_app_dispatcher_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_dispatcher_config_proto_rawDescData) }) - return file_v2ray_com_core_app_dispatcher_config_proto_rawDescData + return file_app_dispatcher_config_proto_rawDescData } -var file_v2ray_com_core_app_dispatcher_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_v2ray_com_core_app_dispatcher_config_proto_goTypes = []interface{}{ +var file_app_dispatcher_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_app_dispatcher_config_proto_goTypes = []interface{}{ (*SessionConfig)(nil), // 0: v2ray.core.app.dispatcher.SessionConfig (*Config)(nil), // 1: v2ray.core.app.dispatcher.Config } -var file_v2ray_com_core_app_dispatcher_config_proto_depIdxs = []int32{ +var file_app_dispatcher_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.app.dispatcher.Config.settings:type_name -> v2ray.core.app.dispatcher.SessionConfig 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -152,13 +158,13 @@ var file_v2ray_com_core_app_dispatcher_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_dispatcher_config_proto_init() } -func file_v2ray_com_core_app_dispatcher_config_proto_init() { - if File_v2ray_com_core_app_dispatcher_config_proto != nil { +func init() { file_app_dispatcher_config_proto_init() } +func file_app_dispatcher_config_proto_init() { + if File_app_dispatcher_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_dispatcher_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_dispatcher_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SessionConfig); i { case 0: return &v.state @@ -170,7 +176,7 @@ func file_v2ray_com_core_app_dispatcher_config_proto_init() { return nil } } - file_v2ray_com_core_app_dispatcher_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_dispatcher_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -187,18 +193,18 @@ func file_v2ray_com_core_app_dispatcher_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_dispatcher_config_proto_rawDesc, + RawDescriptor: file_app_dispatcher_config_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_app_dispatcher_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_dispatcher_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_app_dispatcher_config_proto_msgTypes, + GoTypes: file_app_dispatcher_config_proto_goTypes, + DependencyIndexes: file_app_dispatcher_config_proto_depIdxs, + MessageInfos: file_app_dispatcher_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_dispatcher_config_proto = out.File - file_v2ray_com_core_app_dispatcher_config_proto_rawDesc = nil - file_v2ray_com_core_app_dispatcher_config_proto_goTypes = nil - file_v2ray_com_core_app_dispatcher_config_proto_depIdxs = nil + File_app_dispatcher_config_proto = out.File + file_app_dispatcher_config_proto_rawDesc = nil + file_app_dispatcher_config_proto_goTypes = nil + file_app_dispatcher_config_proto_depIdxs = nil } diff --git a/app/dispatcher/config.proto b/app/dispatcher/config.proto index dbb2d5c053..398b587117 100644 --- a/app/dispatcher/config.proto +++ b/app/dispatcher/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.dispatcher; option csharp_namespace = "V2Ray.Core.App.Dispatcher"; -option go_package = "dispatcher"; +option go_package = "v2ray.com/core/app/dispatcher"; option java_package = "com.v2ray.core.app.dispatcher"; option java_multiple_files = true; diff --git a/app/dns/config.pb.go b/app/dns/config.pb.go index ca393d910a..6a9ebeacf1 100644 --- a/app/dns/config.pb.go +++ b/app/dns/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/dns/config.proto + package dns import ( @@ -57,11 +63,11 @@ func (x DomainMatchingType) String() string { } func (DomainMatchingType) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_app_dns_config_proto_enumTypes[0].Descriptor() + return file_app_dns_config_proto_enumTypes[0].Descriptor() } func (DomainMatchingType) Type() protoreflect.EnumType { - return &file_v2ray_com_core_app_dns_config_proto_enumTypes[0] + return &file_app_dns_config_proto_enumTypes[0] } func (x DomainMatchingType) Number() protoreflect.EnumNumber { @@ -70,7 +76,7 @@ func (x DomainMatchingType) Number() protoreflect.EnumNumber { // Deprecated: Use DomainMatchingType.Descriptor instead. func (DomainMatchingType) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{0} + return file_app_dns_config_proto_rawDescGZIP(), []int{0} } type NameServer struct { @@ -81,12 +87,13 @@ type NameServer struct { Address *net.Endpoint `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` PrioritizedDomain []*NameServer_PriorityDomain `protobuf:"bytes,2,rep,name=prioritized_domain,json=prioritizedDomain,proto3" json:"prioritized_domain,omitempty"` Geoip []*router.GeoIP `protobuf:"bytes,3,rep,name=geoip,proto3" json:"geoip,omitempty"` + OriginalRules []*NameServer_OriginalRule `protobuf:"bytes,4,rep,name=original_rules,json=originalRules,proto3" json:"original_rules,omitempty"` } func (x *NameServer) Reset() { *x = NameServer{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[0] + mi := &file_app_dns_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -99,7 +106,7 @@ func (x *NameServer) String() string { func (*NameServer) ProtoMessage() {} func (x *NameServer) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[0] + mi := &file_app_dns_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112,7 +119,7 @@ func (x *NameServer) ProtoReflect() protoreflect.Message { // Deprecated: Use NameServer.ProtoReflect.Descriptor instead. func (*NameServer) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{0} + return file_app_dns_config_proto_rawDescGZIP(), []int{0} } func (x *NameServer) GetAddress() *net.Endpoint { @@ -136,6 +143,13 @@ func (x *NameServer) GetGeoip() []*router.GeoIP { return nil } +func (x *NameServer) GetOriginalRules() []*NameServer_OriginalRule { + if x != nil { + return x.OriginalRules + } + return nil +} + type Config struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -163,7 +177,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[1] + mi := &file_app_dns_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -176,7 +190,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[1] + mi := &file_app_dns_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -189,7 +203,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{1} + return file_app_dns_config_proto_rawDescGZIP(), []int{1} } // Deprecated: Do not use. @@ -248,7 +262,7 @@ type NameServer_PriorityDomain struct { func (x *NameServer_PriorityDomain) Reset() { *x = NameServer_PriorityDomain{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[2] + mi := &file_app_dns_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -261,7 +275,7 @@ func (x *NameServer_PriorityDomain) String() string { func (*NameServer_PriorityDomain) ProtoMessage() {} func (x *NameServer_PriorityDomain) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[2] + mi := &file_app_dns_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -274,7 +288,7 @@ func (x *NameServer_PriorityDomain) ProtoReflect() protoreflect.Message { // Deprecated: Use NameServer_PriorityDomain.ProtoReflect.Descriptor instead. func (*NameServer_PriorityDomain) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{0, 0} + return file_app_dns_config_proto_rawDescGZIP(), []int{0, 0} } func (x *NameServer_PriorityDomain) GetType() DomainMatchingType { @@ -291,6 +305,61 @@ func (x *NameServer_PriorityDomain) GetDomain() string { return "" } +type NameServer_OriginalRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rule string `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"` + Size uint32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *NameServer_OriginalRule) Reset() { + *x = NameServer_OriginalRule{} + if protoimpl.UnsafeEnabled { + mi := &file_app_dns_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NameServer_OriginalRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NameServer_OriginalRule) ProtoMessage() {} + +func (x *NameServer_OriginalRule) ProtoReflect() protoreflect.Message { + mi := &file_app_dns_config_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NameServer_OriginalRule.ProtoReflect.Descriptor instead. +func (*NameServer_OriginalRule) Descriptor() ([]byte, []int) { + return file_app_dns_config_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *NameServer_OriginalRule) GetRule() string { + if x != nil { + return x.Rule + } + return "" +} + +func (x *NameServer_OriginalRule) GetSize() uint32 { + if x != nil { + return x.Size + } + return 0 +} + type Config_HostMapping struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -307,7 +376,7 @@ type Config_HostMapping struct { func (x *Config_HostMapping) Reset() { *x = Config_HostMapping{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[4] + mi := &file_app_dns_config_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -320,7 +389,7 @@ func (x *Config_HostMapping) String() string { func (*Config_HostMapping) ProtoMessage() {} func (x *Config_HostMapping) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[4] + mi := &file_app_dns_config_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -333,7 +402,7 @@ func (x *Config_HostMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use Config_HostMapping.ProtoReflect.Descriptor instead. func (*Config_HostMapping) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{1, 1} + return file_app_dns_config_proto_rawDescGZIP(), []int{1, 1} } func (x *Config_HostMapping) GetType() DomainMatchingType { @@ -364,41 +433,46 @@ func (x *Config_HostMapping) GetProxiedDomain() string { return "" } -var File_v2ray_com_core_app_dns_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_dns_config_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x26, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, 0x02, 0x0a, 0x0a, 0x4e, 0x61, 0x6d, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x5c, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, - 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, - 0x6e, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x50, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x11, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, - 0x32, 0x0a, 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, 0x05, 0x67, 0x65, - 0x6f, 0x69, 0x70, 0x1a, 0x64, 0x0a, 0x0e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x44, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0xc3, 0x04, 0x0a, 0x06, 0x43, 0x6f, +var File_app_dns_config_proto protoreflect.FileDescriptor + +var file_app_dns_config_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, + 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x03, 0x0a, 0x0a, + 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x6e, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5c, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x52, 0x11, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, + 0x52, 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x12, 0x52, 0x0a, 0x0e, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, + 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x64, 0x0a, 0x0e, 0x50, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, + 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x1a, 0x36, 0x0a, 0x0c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x75, 0x6c, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xc3, 0x04, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, @@ -439,63 +513,66 @@ var file_v2ray_com_core_app_dns_config_proto_rawDesc = []byte{ 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, - 0x65, 0x67, 0x65, 0x78, 0x10, 0x03, 0x42, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, + 0x65, 0x67, 0x65, 0x78, 0x10, 0x03, 0x42, 0x47, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, - 0x50, 0x01, 0x5a, 0x03, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, - 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x01, 0x5a, 0x16, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, + 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x44, 0x6e, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_dns_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_dns_config_proto_rawDescData = file_v2ray_com_core_app_dns_config_proto_rawDesc + file_app_dns_config_proto_rawDescOnce sync.Once + file_app_dns_config_proto_rawDescData = file_app_dns_config_proto_rawDesc ) -func file_v2ray_com_core_app_dns_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_dns_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_dns_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_dns_config_proto_rawDescData) +func file_app_dns_config_proto_rawDescGZIP() []byte { + file_app_dns_config_proto_rawDescOnce.Do(func() { + file_app_dns_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_dns_config_proto_rawDescData) }) - return file_v2ray_com_core_app_dns_config_proto_rawDescData + return file_app_dns_config_proto_rawDescData } -var file_v2ray_com_core_app_dns_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_app_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_v2ray_com_core_app_dns_config_proto_goTypes = []interface{}{ +var file_app_dns_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_app_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_app_dns_config_proto_goTypes = []interface{}{ (DomainMatchingType)(0), // 0: v2ray.core.app.dns.DomainMatchingType (*NameServer)(nil), // 1: v2ray.core.app.dns.NameServer (*Config)(nil), // 2: v2ray.core.app.dns.Config (*NameServer_PriorityDomain)(nil), // 3: v2ray.core.app.dns.NameServer.PriorityDomain - nil, // 4: v2ray.core.app.dns.Config.HostsEntry - (*Config_HostMapping)(nil), // 5: v2ray.core.app.dns.Config.HostMapping - (*net.Endpoint)(nil), // 6: v2ray.core.common.net.Endpoint - (*router.GeoIP)(nil), // 7: v2ray.core.app.router.GeoIP - (*net.IPOrDomain)(nil), // 8: v2ray.core.common.net.IPOrDomain -} -var file_v2ray_com_core_app_dns_config_proto_depIdxs = []int32{ - 6, // 0: v2ray.core.app.dns.NameServer.address:type_name -> v2ray.core.common.net.Endpoint + (*NameServer_OriginalRule)(nil), // 4: v2ray.core.app.dns.NameServer.OriginalRule + nil, // 5: v2ray.core.app.dns.Config.HostsEntry + (*Config_HostMapping)(nil), // 6: v2ray.core.app.dns.Config.HostMapping + (*net.Endpoint)(nil), // 7: v2ray.core.common.net.Endpoint + (*router.GeoIP)(nil), // 8: v2ray.core.app.router.GeoIP + (*net.IPOrDomain)(nil), // 9: v2ray.core.common.net.IPOrDomain +} +var file_app_dns_config_proto_depIdxs = []int32{ + 7, // 0: v2ray.core.app.dns.NameServer.address:type_name -> v2ray.core.common.net.Endpoint 3, // 1: v2ray.core.app.dns.NameServer.prioritized_domain:type_name -> v2ray.core.app.dns.NameServer.PriorityDomain - 7, // 2: v2ray.core.app.dns.NameServer.geoip:type_name -> v2ray.core.app.router.GeoIP - 6, // 3: v2ray.core.app.dns.Config.NameServers:type_name -> v2ray.core.common.net.Endpoint - 1, // 4: v2ray.core.app.dns.Config.name_server:type_name -> v2ray.core.app.dns.NameServer - 4, // 5: v2ray.core.app.dns.Config.Hosts:type_name -> v2ray.core.app.dns.Config.HostsEntry - 5, // 6: v2ray.core.app.dns.Config.static_hosts:type_name -> v2ray.core.app.dns.Config.HostMapping - 0, // 7: v2ray.core.app.dns.NameServer.PriorityDomain.type:type_name -> v2ray.core.app.dns.DomainMatchingType - 8, // 8: v2ray.core.app.dns.Config.HostsEntry.value:type_name -> v2ray.core.common.net.IPOrDomain - 0, // 9: v2ray.core.app.dns.Config.HostMapping.type:type_name -> v2ray.core.app.dns.DomainMatchingType - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_v2ray_com_core_app_dns_config_proto_init() } -func file_v2ray_com_core_app_dns_config_proto_init() { - if File_v2ray_com_core_app_dns_config_proto != nil { + 8, // 2: v2ray.core.app.dns.NameServer.geoip:type_name -> v2ray.core.app.router.GeoIP + 4, // 3: v2ray.core.app.dns.NameServer.original_rules:type_name -> v2ray.core.app.dns.NameServer.OriginalRule + 7, // 4: v2ray.core.app.dns.Config.NameServers:type_name -> v2ray.core.common.net.Endpoint + 1, // 5: v2ray.core.app.dns.Config.name_server:type_name -> v2ray.core.app.dns.NameServer + 5, // 6: v2ray.core.app.dns.Config.Hosts:type_name -> v2ray.core.app.dns.Config.HostsEntry + 6, // 7: v2ray.core.app.dns.Config.static_hosts:type_name -> v2ray.core.app.dns.Config.HostMapping + 0, // 8: v2ray.core.app.dns.NameServer.PriorityDomain.type:type_name -> v2ray.core.app.dns.DomainMatchingType + 9, // 9: v2ray.core.app.dns.Config.HostsEntry.value:type_name -> v2ray.core.common.net.IPOrDomain + 0, // 10: v2ray.core.app.dns.Config.HostMapping.type:type_name -> v2ray.core.app.dns.DomainMatchingType + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_app_dns_config_proto_init() } +func file_app_dns_config_proto_init() { + if File_app_dns_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NameServer); i { case 0: return &v.state @@ -507,7 +584,7 @@ func file_v2ray_com_core_app_dns_config_proto_init() { return nil } } - file_v2ray_com_core_app_dns_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -519,7 +596,7 @@ func file_v2ray_com_core_app_dns_config_proto_init() { return nil } } - file_v2ray_com_core_app_dns_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NameServer_PriorityDomain); i { case 0: return &v.state @@ -531,7 +608,19 @@ func file_v2ray_com_core_app_dns_config_proto_init() { return nil } } - file_v2ray_com_core_app_dns_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NameServer_OriginalRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_app_dns_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config_HostMapping); i { case 0: return &v.state @@ -548,19 +637,19 @@ func file_v2ray_com_core_app_dns_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_dns_config_proto_rawDesc, + RawDescriptor: file_app_dns_config_proto_rawDesc, NumEnums: 1, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_app_dns_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_dns_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_app_dns_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_app_dns_config_proto_msgTypes, + GoTypes: file_app_dns_config_proto_goTypes, + DependencyIndexes: file_app_dns_config_proto_depIdxs, + EnumInfos: file_app_dns_config_proto_enumTypes, + MessageInfos: file_app_dns_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_dns_config_proto = out.File - file_v2ray_com_core_app_dns_config_proto_rawDesc = nil - file_v2ray_com_core_app_dns_config_proto_goTypes = nil - file_v2ray_com_core_app_dns_config_proto_depIdxs = nil + File_app_dns_config_proto = out.File + file_app_dns_config_proto_rawDesc = nil + file_app_dns_config_proto_goTypes = nil + file_app_dns_config_proto_depIdxs = nil } diff --git a/app/dns/config.proto b/app/dns/config.proto index 0678b275d8..9ccf248f42 100644 --- a/app/dns/config.proto +++ b/app/dns/config.proto @@ -2,13 +2,13 @@ syntax = "proto3"; package v2ray.core.app.dns; option csharp_namespace = "V2Ray.Core.App.Dns"; -option go_package = "dns"; +option go_package = "v2ray.com/core/app/dns"; option java_package = "com.v2ray.core.app.dns"; option java_multiple_files = true; -import "v2ray.com/core/common/net/address.proto"; -import "v2ray.com/core/common/net/destination.proto"; -import "v2ray.com/core/app/router/config.proto"; +import "common/net/address.proto"; +import "common/net/destination.proto"; +import "app/router/config.proto"; message NameServer { v2ray.core.common.net.Endpoint address = 1; @@ -18,8 +18,14 @@ message NameServer { string domain = 2; } + message OriginalRule { + string rule = 1; + uint32 size = 2; + } + repeated PriorityDomain prioritized_domain = 2; repeated v2ray.core.app.router.GeoIP geoip = 3; + repeated OriginalRule original_rules = 4; } enum DomainMatchingType { diff --git a/app/dns/dnscommon_test.go b/app/dns/dnscommon_test.go index d6f43c65de..7d81190aff 100644 --- a/app/dns/dnscommon_test.go +++ b/app/dns/dnscommon_test.go @@ -12,7 +12,6 @@ import ( "golang.org/x/net/dns/dnsmessage" "v2ray.com/core/common" "v2ray.com/core/common/net" - v2net "v2ray.com/core/common/net" ) func Test_parseResponse(t *testing.T) { @@ -52,7 +51,7 @@ func Test_parseResponse(t *testing.T) { wantErr bool }{ {"empty", - &IPRecord{0, []v2net.Address(nil), time.Time{}, dnsmessage.RCodeSuccess}, + &IPRecord{0, []net.Address(nil), time.Time{}, dnsmessage.RCodeSuccess}, false, }, {"error", @@ -60,12 +59,12 @@ func Test_parseResponse(t *testing.T) { true, }, {"a record", - &IPRecord{1, []v2net.Address{v2net.ParseAddress("8.8.8.8"), v2net.ParseAddress("8.8.4.4")}, + &IPRecord{1, []net.Address{net.ParseAddress("8.8.8.8"), net.ParseAddress("8.8.4.4")}, time.Time{}, dnsmessage.RCodeSuccess}, false, }, {"aaaa record", - &IPRecord{2, []v2net.Address{v2net.ParseAddress("2001::123:8888"), v2net.ParseAddress("2001::123:8844")}, time.Time{}, dnsmessage.RCodeSuccess}, + &IPRecord{2, []net.Address{net.ParseAddress("2001::123:8888"), net.ParseAddress("2001::123:8844")}, time.Time{}, dnsmessage.RCodeSuccess}, false, }, } diff --git a/app/dns/server.go b/app/dns/server.go index 551af9ceb0..2810d28fd7 100644 --- a/app/dns/server.go +++ b/app/dns/server.go @@ -6,6 +6,7 @@ package dns import ( "context" + "fmt" "log" "net/url" "strings" @@ -28,13 +29,20 @@ import ( // Server is a DNS rely server. type Server struct { sync.Mutex - hosts *StaticHosts - clients []Client - clientIP net.IP - domainMatcher strmatcher.IndexMatcher - domainIndexMap map[uint32]uint32 - ipIndexMap map[uint32]*MultiGeoIPMatcher - tag string + hosts *StaticHosts + clientIP net.IP + clients []Client // clientIdx -> Client + ipIndexMap []*MultiGeoIPMatcher // clientIdx -> *MultiGeoIPMatcher + domainRules [][]string // clientIdx -> domainRuleIdx -> DomainRule + domainMatcher strmatcher.IndexMatcher + matcherInfos []DomainMatcherInfo // matcherIdx -> DomainMatcherInfo + tag string +} + +// DomainMatcherInfo contains information attached to index returned by Server.domainMatcher +type DomainMatcherInfo struct { + clientIdx uint16 + domainRuleIdx uint16 } // MultiGeoIPMatcher for match @@ -106,8 +114,7 @@ func New(ctx context.Context, config *Config) (*Server, error) { log.Fatalln(newError("DNS config error").Base(err)) } server.clients = append(server.clients, NewDoHLocalNameServer(u, server.clientIP)) - } else if address.Family().IsDomain() && - strings.HasPrefix(address.Domain(), "https://") { + } else if address.Family().IsDomain() && strings.HasPrefix(address.Domain(), "https://") { // DOH Remote mode u, err := url.Parse(address.Domain()) if err != nil { @@ -139,6 +146,7 @@ func New(ctx context.Context, config *Config) (*Server, error) { })) } } + server.ipIndexMap = append(server.ipIndexMap, nil) return len(server.clients) - 1 } @@ -150,22 +158,54 @@ func New(ctx context.Context, config *Config) (*Server, error) { } if len(config.NameServer) > 0 { - domainMatcher := &strmatcher.MatcherGroup{} - domainIndexMap := make(map[uint32]uint32) - ipIndexMap := make(map[uint32]*MultiGeoIPMatcher) - var geoIPMatcherContainer router.GeoIPMatcherContainer - + clientIndices := []int{} + domainRuleCount := 0 for _, ns := range config.NameServer { idx := addNameServer(ns) + clientIndices = append(clientIndices, idx) + domainRuleCount += len(ns.PrioritizedDomain) + } + domainRules := make([][]string, len(server.clients)) + domainMatcher := &strmatcher.MatcherGroup{} + matcherInfos := make([]DomainMatcherInfo, domainRuleCount+1) // matcher index starts from 1 + var geoIPMatcherContainer router.GeoIPMatcherContainer + for nidx, ns := range config.NameServer { + idx := clientIndices[nidx] + + // Establish domain rule matcher + rules := []string{} + ruleCurr := 0 + ruleIter := 0 for _, domain := range ns.PrioritizedDomain { matcher, err := toStrMatcher(domain.Type, domain.Domain) if err != nil { return nil, newError("failed to create prioritized domain").Base(err).AtWarning() } midx := domainMatcher.Add(matcher) - domainIndexMap[midx] = uint32(idx) + if midx >= uint32(len(matcherInfos)) { // This rarely happens according to current matcher's implementation + newError("expanding domain matcher info array to size ", midx, " when adding ", matcher).AtDebug().WriteToLog() + matcherInfos = append(matcherInfos, make([]DomainMatcherInfo, midx-uint32(len(matcherInfos))+1)...) + } + info := &matcherInfos[midx] + info.clientIdx = uint16(idx) + if ruleCurr < len(ns.OriginalRules) { + info.domainRuleIdx = uint16(ruleCurr) + rule := ns.OriginalRules[ruleCurr] + if ruleCurr >= len(rules) { + rules = append(rules, rule.Rule) + } + ruleIter++ + if ruleIter >= int(rule.Size) { + ruleIter = 0 + ruleCurr++ + } + } else { // No original rule, generate one according to current domain matcher (majorly for compability with tests) + info.domainRuleIdx = uint16(len(rules)) + rules = append(rules, matcher.String()) + } } + domainRules[idx] = rules // only add to ipIndexMap if GeoIP is configured if len(ns.Geoip) > 0 { @@ -178,17 +218,17 @@ func New(ctx context.Context, config *Config) (*Server, error) { matchers = append(matchers, matcher) } matcher := &MultiGeoIPMatcher{matchers: matchers} - ipIndexMap[uint32(idx)] = matcher + server.ipIndexMap[idx] = matcher } } - + server.domainRules = domainRules server.domainMatcher = domainMatcher - server.domainIndexMap = domainIndexMap - server.ipIndexMap = ipIndexMap + server.matcherInfos = matcherInfos } if len(server.clients) == 0 { server.clients = append(server.clients, NewLocalNameServer()) + server.ipIndexMap = append(server.ipIndexMap, nil) } return server, nil @@ -215,9 +255,12 @@ func (s *Server) IsOwnLink(ctx context.Context) bool { } // Match check dns ip match geoip -func (s *Server) Match(idx uint32, client Client, domain string, ips []net.IP) ([]net.IP, error) { - matcher, exist := s.ipIndexMap[idx] - if !exist { +func (s *Server) Match(idx int, client Client, domain string, ips []net.IP) ([]net.IP, error) { + var matcher *MultiGeoIPMatcher + if idx < len(s.ipIndexMap) { + matcher = s.ipIndexMap[idx] + } + if matcher == nil { return ips, nil } @@ -239,7 +282,7 @@ func (s *Server) Match(idx uint32, client Client, domain string, ips []net.IP) ( return newIps, nil } -func (s *Server) queryIPTimeout(idx uint32, client Client, domain string, option IPOption) ([]net.IP, error) { +func (s *Server) queryIPTimeout(idx int, client Client, domain string, option IPOption) ([]net.IP, error) { ctx, cancel := context.WithTimeout(context.Background(), time.Second*4) if len(s.tag) > 0 { ctx = session.ContextWithInbound(ctx, &session.Inbound{ @@ -331,9 +374,24 @@ func (s *Server) lookupIPInternal(domain string, option IPOption) ([]net.IP, err var matchedClient Client if s.domainMatcher != nil { indices := s.domainMatcher.Match(domain) + domainRules := []string{} + matchingDNS := []string{} + for _, idx := range indices { + info := s.matcherInfos[idx] + rule := s.domainRules[info.clientIdx][info.domainRuleIdx] + domainRules = append(domainRules, fmt.Sprintf("%s(DNS idx:%d)", rule, info.clientIdx)) + matchingDNS = append(matchingDNS, s.clients[info.clientIdx].Name()) + } + if len(domainRules) > 0 { + newError("domain ", domain, " matches following rules: ", domainRules).AtDebug().WriteToLog() + } + if len(matchingDNS) > 0 { + newError("domain ", domain, " uses following DNS first: ", matchingDNS).AtDebug().WriteToLog() + } for _, idx := range indices { - matchedClient = s.clients[s.domainIndexMap[idx]] - ips, err := s.queryIPTimeout(s.domainIndexMap[idx], matchedClient, domain, option) + clientIdx := int(s.matcherInfos[idx].clientIdx) + matchedClient = s.clients[clientIdx] + ips, err := s.queryIPTimeout(clientIdx, matchedClient, domain, option) if len(ips) > 0 { return ips, nil } @@ -353,7 +411,7 @@ func (s *Server) lookupIPInternal(domain string, option IPOption) ([]net.IP, err continue } - ips, err := s.queryIPTimeout(uint32(idx), client, domain, option) + ips, err := s.queryIPTimeout(idx, client, domain, option) if len(ips) > 0 { return ips, nil } diff --git a/app/log/command/command.go b/app/log/command/command.go index 5d3ef6c459..f17119884d 100644 --- a/app/log/command/command.go +++ b/app/log/command/command.go @@ -33,6 +33,8 @@ func (s *LoggerServer) RestartLogger(ctx context.Context, request *RestartLogger return &RestartLoggerResponse{}, nil } +func (s *LoggerServer) mustEmbedUnimplementedLoggerServiceServer() {} + type service struct { v *core.Instance } diff --git a/app/log/command/config.pb.go b/app/log/command/config.pb.go index 8a1bef3efc..0f1b9416df 100644 --- a/app/log/command/config.pb.go +++ b/app/log/command/config.pb.go @@ -1,11 +1,13 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/log/command/config.proto + package command import ( - context "context" proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -32,7 +34,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_log_command_config_proto_msgTypes[0] + mi := &file_app_log_command_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +47,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_log_command_config_proto_msgTypes[0] + mi := &file_app_log_command_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +60,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_log_command_config_proto_rawDescGZIP(), []int{0} + return file_app_log_command_config_proto_rawDescGZIP(), []int{0} } type RestartLoggerRequest struct { @@ -70,7 +72,7 @@ type RestartLoggerRequest struct { func (x *RestartLoggerRequest) Reset() { *x = RestartLoggerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_log_command_config_proto_msgTypes[1] + mi := &file_app_log_command_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -83,7 +85,7 @@ func (x *RestartLoggerRequest) String() string { func (*RestartLoggerRequest) ProtoMessage() {} func (x *RestartLoggerRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_log_command_config_proto_msgTypes[1] + mi := &file_app_log_command_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -96,7 +98,7 @@ func (x *RestartLoggerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RestartLoggerRequest.ProtoReflect.Descriptor instead. func (*RestartLoggerRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_log_command_config_proto_rawDescGZIP(), []int{1} + return file_app_log_command_config_proto_rawDescGZIP(), []int{1} } type RestartLoggerResponse struct { @@ -108,7 +110,7 @@ type RestartLoggerResponse struct { func (x *RestartLoggerResponse) Reset() { *x = RestartLoggerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_log_command_config_proto_msgTypes[2] + mi := &file_app_log_command_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -121,7 +123,7 @@ func (x *RestartLoggerResponse) String() string { func (*RestartLoggerResponse) ProtoMessage() {} func (x *RestartLoggerResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_log_command_config_proto_msgTypes[2] + mi := &file_app_log_command_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -134,55 +136,56 @@ func (x *RestartLoggerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RestartLoggerResponse.ProtoReflect.Descriptor instead. func (*RestartLoggerResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_log_command_config_proto_rawDescGZIP(), []int{2} + return file_app_log_command_config_proto_rawDescGZIP(), []int{2} } -var File_v2ray_com_core_app_log_command_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_log_command_config_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, - 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x6f, - 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x52, - 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x87, 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x67, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x6f, - 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x48, - 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x50, 0x01, 0x5a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x1a, 0x56, 0x32, - 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x4c, 0x6f, 0x67, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_app_log_command_config_proto protoreflect.FileDescriptor + +var file_app_log_command_config_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, + 0x6f, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, + 0x6f, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, + 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x87, 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, + 0x6f, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0x5f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x50, 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, + 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x4c, 0x6f, 0x67, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_log_command_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_log_command_config_proto_rawDescData = file_v2ray_com_core_app_log_command_config_proto_rawDesc + file_app_log_command_config_proto_rawDescOnce sync.Once + file_app_log_command_config_proto_rawDescData = file_app_log_command_config_proto_rawDesc ) -func file_v2ray_com_core_app_log_command_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_log_command_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_log_command_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_log_command_config_proto_rawDescData) +func file_app_log_command_config_proto_rawDescGZIP() []byte { + file_app_log_command_config_proto_rawDescOnce.Do(func() { + file_app_log_command_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_log_command_config_proto_rawDescData) }) - return file_v2ray_com_core_app_log_command_config_proto_rawDescData + return file_app_log_command_config_proto_rawDescData } -var file_v2ray_com_core_app_log_command_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_v2ray_com_core_app_log_command_config_proto_goTypes = []interface{}{ +var file_app_log_command_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_app_log_command_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.app.log.command.Config (*RestartLoggerRequest)(nil), // 1: v2ray.core.app.log.command.RestartLoggerRequest (*RestartLoggerResponse)(nil), // 2: v2ray.core.app.log.command.RestartLoggerResponse } -var file_v2ray_com_core_app_log_command_config_proto_depIdxs = []int32{ +var file_app_log_command_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.app.log.command.LoggerService.RestartLogger:input_type -> v2ray.core.app.log.command.RestartLoggerRequest 2, // 1: v2ray.core.app.log.command.LoggerService.RestartLogger:output_type -> v2ray.core.app.log.command.RestartLoggerResponse 1, // [1:2] is the sub-list for method output_type @@ -192,13 +195,13 @@ var file_v2ray_com_core_app_log_command_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_log_command_config_proto_init() } -func file_v2ray_com_core_app_log_command_config_proto_init() { - if File_v2ray_com_core_app_log_command_config_proto != nil { +func init() { file_app_log_command_config_proto_init() } +func file_app_log_command_config_proto_init() { + if File_app_log_command_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_log_command_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_log_command_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -210,7 +213,7 @@ func file_v2ray_com_core_app_log_command_config_proto_init() { return nil } } - file_v2ray_com_core_app_log_command_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_log_command_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RestartLoggerRequest); i { case 0: return &v.state @@ -222,7 +225,7 @@ func file_v2ray_com_core_app_log_command_config_proto_init() { return nil } } - file_v2ray_com_core_app_log_command_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_log_command_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RestartLoggerResponse); i { case 0: return &v.state @@ -239,98 +242,18 @@ func file_v2ray_com_core_app_log_command_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_log_command_config_proto_rawDesc, + RawDescriptor: file_app_log_command_config_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_v2ray_com_core_app_log_command_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_log_command_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_app_log_command_config_proto_msgTypes, + GoTypes: file_app_log_command_config_proto_goTypes, + DependencyIndexes: file_app_log_command_config_proto_depIdxs, + MessageInfos: file_app_log_command_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_log_command_config_proto = out.File - file_v2ray_com_core_app_log_command_config_proto_rawDesc = nil - file_v2ray_com_core_app_log_command_config_proto_goTypes = nil - file_v2ray_com_core_app_log_command_config_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// LoggerServiceClient is the client API for LoggerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LoggerServiceClient interface { - RestartLogger(ctx context.Context, in *RestartLoggerRequest, opts ...grpc.CallOption) (*RestartLoggerResponse, error) -} - -type loggerServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewLoggerServiceClient(cc grpc.ClientConnInterface) LoggerServiceClient { - return &loggerServiceClient{cc} -} - -func (c *loggerServiceClient) RestartLogger(ctx context.Context, in *RestartLoggerRequest, opts ...grpc.CallOption) (*RestartLoggerResponse, error) { - out := new(RestartLoggerResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.log.command.LoggerService/RestartLogger", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LoggerServiceServer is the server API for LoggerService service. -type LoggerServiceServer interface { - RestartLogger(context.Context, *RestartLoggerRequest) (*RestartLoggerResponse, error) -} - -// UnimplementedLoggerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedLoggerServiceServer struct { -} - -func (*UnimplementedLoggerServiceServer) RestartLogger(context.Context, *RestartLoggerRequest) (*RestartLoggerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RestartLogger not implemented") -} - -func RegisterLoggerServiceServer(s *grpc.Server, srv LoggerServiceServer) { - s.RegisterService(&_LoggerService_serviceDesc, srv) -} - -func _LoggerService_RestartLogger_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RestartLoggerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggerServiceServer).RestartLogger(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.log.command.LoggerService/RestartLogger", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggerServiceServer).RestartLogger(ctx, req.(*RestartLoggerRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _LoggerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v2ray.core.app.log.command.LoggerService", - HandlerType: (*LoggerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RestartLogger", - Handler: _LoggerService_RestartLogger_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "v2ray.com/core/app/log/command/config.proto", + File_app_log_command_config_proto = out.File + file_app_log_command_config_proto_rawDesc = nil + file_app_log_command_config_proto_goTypes = nil + file_app_log_command_config_proto_depIdxs = nil } diff --git a/app/log/command/config.proto b/app/log/command/config.proto index 39e2f33f3b..870819d655 100644 --- a/app/log/command/config.proto +++ b/app/log/command/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.log.command; option csharp_namespace = "V2Ray.Core.App.Log.Command"; -option go_package = "command"; +option go_package = "v2ray.com/core/app/log/command"; option java_package = "com.v2ray.core.app.log.command"; option java_multiple_files = true; @@ -15,4 +15,4 @@ message RestartLoggerResponse{} service LoggerService { rpc RestartLogger(RestartLoggerRequest) returns (RestartLoggerResponse) {} -} \ No newline at end of file +} diff --git a/app/log/command/config_grpc.pb.go b/app/log/command/config_grpc.pb.go new file mode 100644 index 0000000000..2b5f4b85d6 --- /dev/null +++ b/app/log/command/config_grpc.pb.go @@ -0,0 +1,90 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package command + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// LoggerServiceClient is the client API for LoggerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type LoggerServiceClient interface { + RestartLogger(ctx context.Context, in *RestartLoggerRequest, opts ...grpc.CallOption) (*RestartLoggerResponse, error) +} + +type loggerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewLoggerServiceClient(cc grpc.ClientConnInterface) LoggerServiceClient { + return &loggerServiceClient{cc} +} + +func (c *loggerServiceClient) RestartLogger(ctx context.Context, in *RestartLoggerRequest, opts ...grpc.CallOption) (*RestartLoggerResponse, error) { + out := new(RestartLoggerResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.log.command.LoggerService/RestartLogger", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// LoggerServiceServer is the server API for LoggerService service. +// All implementations must embed UnimplementedLoggerServiceServer +// for forward compatibility +type LoggerServiceServer interface { + RestartLogger(context.Context, *RestartLoggerRequest) (*RestartLoggerResponse, error) + mustEmbedUnimplementedLoggerServiceServer() +} + +// UnimplementedLoggerServiceServer must be embedded to have forward compatible implementations. +type UnimplementedLoggerServiceServer struct { +} + +func (*UnimplementedLoggerServiceServer) RestartLogger(context.Context, *RestartLoggerRequest) (*RestartLoggerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestartLogger not implemented") +} +func (*UnimplementedLoggerServiceServer) mustEmbedUnimplementedLoggerServiceServer() {} + +func RegisterLoggerServiceServer(s *grpc.Server, srv LoggerServiceServer) { + s.RegisterService(&_LoggerService_serviceDesc, srv) +} + +func _LoggerService_RestartLogger_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestartLoggerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LoggerServiceServer).RestartLogger(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.log.command.LoggerService/RestartLogger", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LoggerServiceServer).RestartLogger(ctx, req.(*RestartLoggerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _LoggerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v2ray.core.app.log.command.LoggerService", + HandlerType: (*LoggerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RestartLogger", + Handler: _LoggerService_RestartLogger_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "app/log/command/config.proto", +} diff --git a/app/log/config.pb.go b/app/log/config.pb.go index 43f35a04a2..8e1c647680 100644 --- a/app/log/config.pb.go +++ b/app/log/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/log/config.proto + package log import ( @@ -56,11 +62,11 @@ func (x LogType) String() string { } func (LogType) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_app_log_config_proto_enumTypes[0].Descriptor() + return file_app_log_config_proto_enumTypes[0].Descriptor() } func (LogType) Type() protoreflect.EnumType { - return &file_v2ray_com_core_app_log_config_proto_enumTypes[0] + return &file_app_log_config_proto_enumTypes[0] } func (x LogType) Number() protoreflect.EnumNumber { @@ -69,7 +75,7 @@ func (x LogType) Number() protoreflect.EnumNumber { // Deprecated: Use LogType.Descriptor instead. func (LogType) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_app_log_config_proto_rawDescGZIP(), []int{0} + return file_app_log_config_proto_rawDescGZIP(), []int{0} } type Config struct { @@ -87,7 +93,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_log_config_proto_msgTypes[0] + mi := &file_app_log_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -100,7 +106,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_log_config_proto_msgTypes[0] + mi := &file_app_log_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113,7 +119,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_log_config_proto_rawDescGZIP(), []int{0} + return file_app_log_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetErrorLogType() LogType { @@ -151,63 +157,63 @@ func (x *Config) GetAccessLogPath() string { return "" } -var File_v2ray_com_core_app_log_config_proto protoreflect.FileDescriptor +var File_app_log_config_proto protoreflect.FileDescriptor -var file_v2ray_com_core_app_log_config_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x1a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, - 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0e, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, - 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x47, 0x0a, 0x0f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x65, - 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c, - 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x0f, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x2a, 0x35, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x69, - 0x6c, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, 0x03, 0x42, - 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x50, 0x01, 0x5a, 0x03, 0x6c, 0x6f, 0x67, - 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, - 0x70, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_app_log_config_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x1a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xa7, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x47, + 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, + 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, + 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, + 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x2a, 0x35, 0x0a, 0x07, 0x4c, 0x6f, + 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, + 0x46, 0x69, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, + 0x03, 0x42, 0x47, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x50, 0x01, 0x5a, 0x16, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, + 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, + 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_v2ray_com_core_app_log_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_log_config_proto_rawDescData = file_v2ray_com_core_app_log_config_proto_rawDesc + file_app_log_config_proto_rawDescOnce sync.Once + file_app_log_config_proto_rawDescData = file_app_log_config_proto_rawDesc ) -func file_v2ray_com_core_app_log_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_log_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_log_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_log_config_proto_rawDescData) +func file_app_log_config_proto_rawDescGZIP() []byte { + file_app_log_config_proto_rawDescOnce.Do(func() { + file_app_log_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_log_config_proto_rawDescData) }) - return file_v2ray_com_core_app_log_config_proto_rawDescData + return file_app_log_config_proto_rawDescData } -var file_v2ray_com_core_app_log_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_app_log_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_app_log_config_proto_goTypes = []interface{}{ +var file_app_log_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_app_log_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_app_log_config_proto_goTypes = []interface{}{ (LogType)(0), // 0: v2ray.core.app.log.LogType (*Config)(nil), // 1: v2ray.core.app.log.Config (log.Severity)(0), // 2: v2ray.core.common.log.Severity } -var file_v2ray_com_core_app_log_config_proto_depIdxs = []int32{ +var file_app_log_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.app.log.Config.error_log_type:type_name -> v2ray.core.app.log.LogType 2, // 1: v2ray.core.app.log.Config.error_log_level:type_name -> v2ray.core.common.log.Severity 0, // 2: v2ray.core.app.log.Config.access_log_type:type_name -> v2ray.core.app.log.LogType @@ -218,13 +224,13 @@ var file_v2ray_com_core_app_log_config_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_log_config_proto_init() } -func file_v2ray_com_core_app_log_config_proto_init() { - if File_v2ray_com_core_app_log_config_proto != nil { +func init() { file_app_log_config_proto_init() } +func file_app_log_config_proto_init() { + if File_app_log_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_log_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_log_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -241,19 +247,19 @@ func file_v2ray_com_core_app_log_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_log_config_proto_rawDesc, + RawDescriptor: file_app_log_config_proto_rawDesc, NumEnums: 1, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_app_log_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_log_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_app_log_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_app_log_config_proto_msgTypes, + GoTypes: file_app_log_config_proto_goTypes, + DependencyIndexes: file_app_log_config_proto_depIdxs, + EnumInfos: file_app_log_config_proto_enumTypes, + MessageInfos: file_app_log_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_log_config_proto = out.File - file_v2ray_com_core_app_log_config_proto_rawDesc = nil - file_v2ray_com_core_app_log_config_proto_goTypes = nil - file_v2ray_com_core_app_log_config_proto_depIdxs = nil + File_app_log_config_proto = out.File + file_app_log_config_proto_rawDesc = nil + file_app_log_config_proto_goTypes = nil + file_app_log_config_proto_depIdxs = nil } diff --git a/app/log/config.proto b/app/log/config.proto index 16bb0c93ed..2931b713f2 100644 --- a/app/log/config.proto +++ b/app/log/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.app.log; option csharp_namespace = "V2Ray.Core.App.Log"; -option go_package = "log"; +option go_package = "v2ray.com/core/app/log"; option java_package = "com.v2ray.core.app.log"; option java_multiple_files = true; -import "v2ray.com/core/common/log/log.proto"; +import "common/log/log.proto"; enum LogType { None = 0; @@ -22,4 +22,4 @@ message Config { LogType access_log_type = 4; string access_log_path = 5; -} \ No newline at end of file +} diff --git a/app/policy/config.go b/app/policy/config.go index 4856e94db7..adf09448a1 100644 --- a/app/policy/config.go +++ b/app/policy/config.go @@ -50,8 +50,8 @@ func (p *Policy) overrideWith(another *Policy) { p.Timeout.overrideWith(another.Timeout) } if another.Stats != nil && p.Stats == nil { - p.Stats = new(Policy_Stats) - *p.Stats = *another.Stats + p.Stats = &Policy_Stats{} + p.Stats = another.Stats } if another.Buffer != nil { p.Buffer = &Policy_Buffer{ diff --git a/app/policy/config.pb.go b/app/policy/config.pb.go index 3a2ea555fe..bfb5693c54 100644 --- a/app/policy/config.pb.go +++ b/app/policy/config.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.24.0 -// protoc (unknown) -// source: config.proto +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/policy/config.proto package policy @@ -36,7 +36,7 @@ type Second struct { func (x *Second) Reset() { *x = Second{} if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[0] + mi := &file_app_policy_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +49,7 @@ func (x *Second) String() string { func (*Second) ProtoMessage() {} func (x *Second) ProtoReflect() protoreflect.Message { - mi := &file_config_proto_msgTypes[0] + mi := &file_app_policy_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +62,7 @@ func (x *Second) ProtoReflect() protoreflect.Message { // Deprecated: Use Second.ProtoReflect.Descriptor instead. func (*Second) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{0} + return file_app_policy_config_proto_rawDescGZIP(), []int{0} } func (x *Second) GetValue() uint32 { @@ -85,7 +85,7 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[1] + mi := &file_app_policy_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -98,7 +98,7 @@ func (x *Policy) String() string { func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { - mi := &file_config_proto_msgTypes[1] + mi := &file_app_policy_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111,7 +111,7 @@ func (x *Policy) ProtoReflect() protoreflect.Message { // Deprecated: Use Policy.ProtoReflect.Descriptor instead. func (*Policy) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{1} + return file_app_policy_config_proto_rawDescGZIP(), []int{1} } func (x *Policy) GetTimeout() *Policy_Timeout { @@ -146,7 +146,7 @@ type SystemPolicy struct { func (x *SystemPolicy) Reset() { *x = SystemPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[2] + mi := &file_app_policy_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -159,7 +159,7 @@ func (x *SystemPolicy) String() string { func (*SystemPolicy) ProtoMessage() {} func (x *SystemPolicy) ProtoReflect() protoreflect.Message { - mi := &file_config_proto_msgTypes[2] + mi := &file_app_policy_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -172,7 +172,7 @@ func (x *SystemPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemPolicy.ProtoReflect.Descriptor instead. func (*SystemPolicy) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{2} + return file_app_policy_config_proto_rawDescGZIP(), []int{2} } func (x *SystemPolicy) GetStats() *SystemPolicy_Stats { @@ -194,7 +194,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[3] + mi := &file_app_policy_config_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -207,7 +207,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_config_proto_msgTypes[3] + mi := &file_app_policy_config_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -220,7 +220,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{3} + return file_app_policy_config_proto_rawDescGZIP(), []int{3} } func (x *Config) GetLevel() map[uint32]*Policy { @@ -252,7 +252,7 @@ type Policy_Timeout struct { func (x *Policy_Timeout) Reset() { *x = Policy_Timeout{} if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[4] + mi := &file_app_policy_config_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -265,7 +265,7 @@ func (x *Policy_Timeout) String() string { func (*Policy_Timeout) ProtoMessage() {} func (x *Policy_Timeout) ProtoReflect() protoreflect.Message { - mi := &file_config_proto_msgTypes[4] + mi := &file_app_policy_config_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -278,7 +278,7 @@ func (x *Policy_Timeout) ProtoReflect() protoreflect.Message { // Deprecated: Use Policy_Timeout.ProtoReflect.Descriptor instead. func (*Policy_Timeout) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{1, 0} + return file_app_policy_config_proto_rawDescGZIP(), []int{1, 0} } func (x *Policy_Timeout) GetHandshake() *Second { @@ -321,7 +321,7 @@ type Policy_Stats struct { func (x *Policy_Stats) Reset() { *x = Policy_Stats{} if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[5] + mi := &file_app_policy_config_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -334,7 +334,7 @@ func (x *Policy_Stats) String() string { func (*Policy_Stats) ProtoMessage() {} func (x *Policy_Stats) ProtoReflect() protoreflect.Message { - mi := &file_config_proto_msgTypes[5] + mi := &file_app_policy_config_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -347,7 +347,7 @@ func (x *Policy_Stats) ProtoReflect() protoreflect.Message { // Deprecated: Use Policy_Stats.ProtoReflect.Descriptor instead. func (*Policy_Stats) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{1, 1} + return file_app_policy_config_proto_rawDescGZIP(), []int{1, 1} } func (x *Policy_Stats) GetUserUplink() bool { @@ -376,7 +376,7 @@ type Policy_Buffer struct { func (x *Policy_Buffer) Reset() { *x = Policy_Buffer{} if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[6] + mi := &file_app_policy_config_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -389,7 +389,7 @@ func (x *Policy_Buffer) String() string { func (*Policy_Buffer) ProtoMessage() {} func (x *Policy_Buffer) ProtoReflect() protoreflect.Message { - mi := &file_config_proto_msgTypes[6] + mi := &file_app_policy_config_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -402,7 +402,7 @@ func (x *Policy_Buffer) ProtoReflect() protoreflect.Message { // Deprecated: Use Policy_Buffer.ProtoReflect.Descriptor instead. func (*Policy_Buffer) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{1, 2} + return file_app_policy_config_proto_rawDescGZIP(), []int{1, 2} } func (x *Policy_Buffer) GetConnection() int32 { @@ -426,7 +426,7 @@ type SystemPolicy_Stats struct { func (x *SystemPolicy_Stats) Reset() { *x = SystemPolicy_Stats{} if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[7] + mi := &file_app_policy_config_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -439,7 +439,7 @@ func (x *SystemPolicy_Stats) String() string { func (*SystemPolicy_Stats) ProtoMessage() {} func (x *SystemPolicy_Stats) ProtoReflect() protoreflect.Message { - mi := &file_config_proto_msgTypes[7] + mi := &file_app_policy_config_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -452,7 +452,7 @@ func (x *SystemPolicy_Stats) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemPolicy_Stats.ProtoReflect.Descriptor instead. func (*SystemPolicy_Stats) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{2, 0} + return file_app_policy_config_proto_rawDescGZIP(), []int{2, 0} } func (x *SystemPolicy_Stats) GetInboundUplink() bool { @@ -483,102 +483,104 @@ func (x *SystemPolicy_Stats) GetOutboundDownlink() bool { return false } -var File_config_proto protoreflect.FileDescriptor +var File_app_policy_config_proto protoreflect.FileDescriptor -var file_config_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x1e, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd0, 0x04, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x3f, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, - 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, - 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x06, - 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x42, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x52, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x1a, 0x92, 0x02, 0x0a, 0x07, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3b, 0x0a, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, - 0x61, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x52, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, - 0x61, 0x6b, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x52, 0x0e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x75, - 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, - 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x52, - 0x0a, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x42, 0x0a, 0x0d, 0x64, - 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, - 0x4d, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, - 0x73, 0x65, 0x72, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x1a, 0x28, - 0x0a, 0x06, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, +var file_app_policy_config_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0xaf, 0x01, 0x0a, 0x05, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x69, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x5f, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x12, - 0x2b, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, - 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0xde, 0x01, 0x0a, - 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3e, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x22, 0x1e, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0xd0, 0x04, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3f, 0x0a, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x39, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x1a, 0x57, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x3d, 0x0a, - 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x01, 0x5a, 0x06, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, - 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x52, 0x06, 0x62, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x1a, 0x92, 0x02, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x3b, 0x0a, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x52, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x12, 0x46, + 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, + 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x69, + 0x6e, 0x6b, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x42, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, + 0x6e, 0x6b, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x52, 0x0c, 0x64, 0x6f, + 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0x4d, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x6c, 0x69, + 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x55, 0x70, + 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x77, + 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65, + 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x1a, 0x28, 0x0a, 0x06, 0x42, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0xaf, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x75, 0x70, 0x6c, 0x69, 0x6e, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x75, 0x70, + 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0xde, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x3e, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x1a, + 0x57, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, + 0x41, 0x70, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_config_proto_rawDescOnce sync.Once - file_config_proto_rawDescData = file_config_proto_rawDesc + file_app_policy_config_proto_rawDescOnce sync.Once + file_app_policy_config_proto_rawDescData = file_app_policy_config_proto_rawDesc ) -func file_config_proto_rawDescGZIP() []byte { - file_config_proto_rawDescOnce.Do(func() { - file_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_config_proto_rawDescData) +func file_app_policy_config_proto_rawDescGZIP() []byte { + file_app_policy_config_proto_rawDescOnce.Do(func() { + file_app_policy_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_policy_config_proto_rawDescData) }) - return file_config_proto_rawDescData + return file_app_policy_config_proto_rawDescData } -var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_config_proto_goTypes = []interface{}{ +var file_app_policy_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_app_policy_config_proto_goTypes = []interface{}{ (*Second)(nil), // 0: v2ray.core.app.policy.Second (*Policy)(nil), // 1: v2ray.core.app.policy.Policy (*SystemPolicy)(nil), // 2: v2ray.core.app.policy.SystemPolicy @@ -589,7 +591,7 @@ var file_config_proto_goTypes = []interface{}{ (*SystemPolicy_Stats)(nil), // 7: v2ray.core.app.policy.SystemPolicy.Stats nil, // 8: v2ray.core.app.policy.Config.LevelEntry } -var file_config_proto_depIdxs = []int32{ +var file_app_policy_config_proto_depIdxs = []int32{ 4, // 0: v2ray.core.app.policy.Policy.timeout:type_name -> v2ray.core.app.policy.Policy.Timeout 5, // 1: v2ray.core.app.policy.Policy.stats:type_name -> v2ray.core.app.policy.Policy.Stats 6, // 2: v2ray.core.app.policy.Policy.buffer:type_name -> v2ray.core.app.policy.Policy.Buffer @@ -608,13 +610,13 @@ var file_config_proto_depIdxs = []int32{ 0, // [0:11] is the sub-list for field type_name } -func init() { file_config_proto_init() } -func file_config_proto_init() { - if File_config_proto != nil { +func init() { file_app_policy_config_proto_init() } +func file_app_policy_config_proto_init() { + if File_app_policy_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Second); i { case 0: return &v.state @@ -626,7 +628,7 @@ func file_config_proto_init() { return nil } } - file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy); i { case 0: return &v.state @@ -638,7 +640,7 @@ func file_config_proto_init() { return nil } } - file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SystemPolicy); i { case 0: return &v.state @@ -650,7 +652,7 @@ func file_config_proto_init() { return nil } } - file_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -662,7 +664,7 @@ func file_config_proto_init() { return nil } } - file_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_Timeout); i { case 0: return &v.state @@ -674,7 +676,7 @@ func file_config_proto_init() { return nil } } - file_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_Stats); i { case 0: return &v.state @@ -686,7 +688,7 @@ func file_config_proto_init() { return nil } } - file_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_Buffer); i { case 0: return &v.state @@ -698,7 +700,7 @@ func file_config_proto_init() { return nil } } - file_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SystemPolicy_Stats); i { case 0: return &v.state @@ -715,18 +717,18 @@ func file_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_config_proto_rawDesc, + RawDescriptor: file_app_policy_config_proto_rawDesc, NumEnums: 0, NumMessages: 9, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_config_proto_goTypes, - DependencyIndexes: file_config_proto_depIdxs, - MessageInfos: file_config_proto_msgTypes, + GoTypes: file_app_policy_config_proto_goTypes, + DependencyIndexes: file_app_policy_config_proto_depIdxs, + MessageInfos: file_app_policy_config_proto_msgTypes, }.Build() - File_config_proto = out.File - file_config_proto_rawDesc = nil - file_config_proto_goTypes = nil - file_config_proto_depIdxs = nil + File_app_policy_config_proto = out.File + file_app_policy_config_proto_rawDesc = nil + file_app_policy_config_proto_goTypes = nil + file_app_policy_config_proto_depIdxs = nil } diff --git a/app/policy/config.proto b/app/policy/config.proto index 30cd2be5ae..cc07fa3f86 100644 --- a/app/policy/config.proto +++ b/app/policy/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.policy; option csharp_namespace = "V2Ray.Core.App.Policy"; -option go_package = "policy"; +option go_package = "v2ray.com/core/app/policy"; option java_package = "com.v2ray.core.app.policy"; option java_multiple_files = true; diff --git a/app/proxyman/command/command.go b/app/proxyman/command/command.go index 64b4a2e691..6586bf0c12 100644 --- a/app/proxyman/command/command.go +++ b/app/proxyman/command/command.go @@ -125,6 +125,8 @@ func (s *handlerServer) AlterOutbound(ctx context.Context, request *AlterOutboun return &AlterOutboundResponse{}, operation.ApplyOutbound(ctx, handler) } +func (s *handlerServer) mustEmbedUnimplementedHandlerServiceServer() {} + type service struct { v *core.Instance } diff --git a/app/proxyman/command/command.pb.go b/app/proxyman/command/command.pb.go index a23ae4b98d..d6170718be 100644 --- a/app/proxyman/command/command.pb.go +++ b/app/proxyman/command/command.pb.go @@ -1,11 +1,13 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/proxyman/command/command.proto + package command import ( - context "context" proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -37,7 +39,7 @@ type AddUserOperation struct { func (x *AddUserOperation) Reset() { *x = AddUserOperation{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[0] + mi := &file_app_proxyman_command_command_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +52,7 @@ func (x *AddUserOperation) String() string { func (*AddUserOperation) ProtoMessage() {} func (x *AddUserOperation) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[0] + mi := &file_app_proxyman_command_command_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +65,7 @@ func (x *AddUserOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use AddUserOperation.ProtoReflect.Descriptor instead. func (*AddUserOperation) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{0} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{0} } func (x *AddUserOperation) GetUser() *protocol.User { @@ -84,7 +86,7 @@ type RemoveUserOperation struct { func (x *RemoveUserOperation) Reset() { *x = RemoveUserOperation{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[1] + mi := &file_app_proxyman_command_command_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -97,7 +99,7 @@ func (x *RemoveUserOperation) String() string { func (*RemoveUserOperation) ProtoMessage() {} func (x *RemoveUserOperation) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[1] + mi := &file_app_proxyman_command_command_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110,7 +112,7 @@ func (x *RemoveUserOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveUserOperation.ProtoReflect.Descriptor instead. func (*RemoveUserOperation) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{1} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{1} } func (x *RemoveUserOperation) GetEmail() string { @@ -131,7 +133,7 @@ type AddInboundRequest struct { func (x *AddInboundRequest) Reset() { *x = AddInboundRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[2] + mi := &file_app_proxyman_command_command_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -144,7 +146,7 @@ func (x *AddInboundRequest) String() string { func (*AddInboundRequest) ProtoMessage() {} func (x *AddInboundRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[2] + mi := &file_app_proxyman_command_command_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -157,7 +159,7 @@ func (x *AddInboundRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddInboundRequest.ProtoReflect.Descriptor instead. func (*AddInboundRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{2} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{2} } func (x *AddInboundRequest) GetInbound() *core.InboundHandlerConfig { @@ -176,7 +178,7 @@ type AddInboundResponse struct { func (x *AddInboundResponse) Reset() { *x = AddInboundResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[3] + mi := &file_app_proxyman_command_command_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -189,7 +191,7 @@ func (x *AddInboundResponse) String() string { func (*AddInboundResponse) ProtoMessage() {} func (x *AddInboundResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[3] + mi := &file_app_proxyman_command_command_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -202,7 +204,7 @@ func (x *AddInboundResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddInboundResponse.ProtoReflect.Descriptor instead. func (*AddInboundResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{3} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{3} } type RemoveInboundRequest struct { @@ -216,7 +218,7 @@ type RemoveInboundRequest struct { func (x *RemoveInboundRequest) Reset() { *x = RemoveInboundRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[4] + mi := &file_app_proxyman_command_command_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -229,7 +231,7 @@ func (x *RemoveInboundRequest) String() string { func (*RemoveInboundRequest) ProtoMessage() {} func (x *RemoveInboundRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[4] + mi := &file_app_proxyman_command_command_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -242,7 +244,7 @@ func (x *RemoveInboundRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveInboundRequest.ProtoReflect.Descriptor instead. func (*RemoveInboundRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{4} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{4} } func (x *RemoveInboundRequest) GetTag() string { @@ -261,7 +263,7 @@ type RemoveInboundResponse struct { func (x *RemoveInboundResponse) Reset() { *x = RemoveInboundResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[5] + mi := &file_app_proxyman_command_command_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -274,7 +276,7 @@ func (x *RemoveInboundResponse) String() string { func (*RemoveInboundResponse) ProtoMessage() {} func (x *RemoveInboundResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[5] + mi := &file_app_proxyman_command_command_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -287,7 +289,7 @@ func (x *RemoveInboundResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveInboundResponse.ProtoReflect.Descriptor instead. func (*RemoveInboundResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{5} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{5} } type AlterInboundRequest struct { @@ -302,7 +304,7 @@ type AlterInboundRequest struct { func (x *AlterInboundRequest) Reset() { *x = AlterInboundRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[6] + mi := &file_app_proxyman_command_command_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -315,7 +317,7 @@ func (x *AlterInboundRequest) String() string { func (*AlterInboundRequest) ProtoMessage() {} func (x *AlterInboundRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[6] + mi := &file_app_proxyman_command_command_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -328,7 +330,7 @@ func (x *AlterInboundRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AlterInboundRequest.ProtoReflect.Descriptor instead. func (*AlterInboundRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{6} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{6} } func (x *AlterInboundRequest) GetTag() string { @@ -354,7 +356,7 @@ type AlterInboundResponse struct { func (x *AlterInboundResponse) Reset() { *x = AlterInboundResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[7] + mi := &file_app_proxyman_command_command_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -367,7 +369,7 @@ func (x *AlterInboundResponse) String() string { func (*AlterInboundResponse) ProtoMessage() {} func (x *AlterInboundResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[7] + mi := &file_app_proxyman_command_command_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -380,7 +382,7 @@ func (x *AlterInboundResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AlterInboundResponse.ProtoReflect.Descriptor instead. func (*AlterInboundResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{7} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{7} } type AddOutboundRequest struct { @@ -394,7 +396,7 @@ type AddOutboundRequest struct { func (x *AddOutboundRequest) Reset() { *x = AddOutboundRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[8] + mi := &file_app_proxyman_command_command_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -407,7 +409,7 @@ func (x *AddOutboundRequest) String() string { func (*AddOutboundRequest) ProtoMessage() {} func (x *AddOutboundRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[8] + mi := &file_app_proxyman_command_command_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -420,7 +422,7 @@ func (x *AddOutboundRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddOutboundRequest.ProtoReflect.Descriptor instead. func (*AddOutboundRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{8} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{8} } func (x *AddOutboundRequest) GetOutbound() *core.OutboundHandlerConfig { @@ -439,7 +441,7 @@ type AddOutboundResponse struct { func (x *AddOutboundResponse) Reset() { *x = AddOutboundResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[9] + mi := &file_app_proxyman_command_command_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -452,7 +454,7 @@ func (x *AddOutboundResponse) String() string { func (*AddOutboundResponse) ProtoMessage() {} func (x *AddOutboundResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[9] + mi := &file_app_proxyman_command_command_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -465,7 +467,7 @@ func (x *AddOutboundResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddOutboundResponse.ProtoReflect.Descriptor instead. func (*AddOutboundResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{9} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{9} } type RemoveOutboundRequest struct { @@ -479,7 +481,7 @@ type RemoveOutboundRequest struct { func (x *RemoveOutboundRequest) Reset() { *x = RemoveOutboundRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[10] + mi := &file_app_proxyman_command_command_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -492,7 +494,7 @@ func (x *RemoveOutboundRequest) String() string { func (*RemoveOutboundRequest) ProtoMessage() {} func (x *RemoveOutboundRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[10] + mi := &file_app_proxyman_command_command_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -505,7 +507,7 @@ func (x *RemoveOutboundRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveOutboundRequest.ProtoReflect.Descriptor instead. func (*RemoveOutboundRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{10} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{10} } func (x *RemoveOutboundRequest) GetTag() string { @@ -524,7 +526,7 @@ type RemoveOutboundResponse struct { func (x *RemoveOutboundResponse) Reset() { *x = RemoveOutboundResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[11] + mi := &file_app_proxyman_command_command_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -537,7 +539,7 @@ func (x *RemoveOutboundResponse) String() string { func (*RemoveOutboundResponse) ProtoMessage() {} func (x *RemoveOutboundResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[11] + mi := &file_app_proxyman_command_command_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -550,7 +552,7 @@ func (x *RemoveOutboundResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveOutboundResponse.ProtoReflect.Descriptor instead. func (*RemoveOutboundResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{11} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{11} } type AlterOutboundRequest struct { @@ -565,7 +567,7 @@ type AlterOutboundRequest struct { func (x *AlterOutboundRequest) Reset() { *x = AlterOutboundRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[12] + mi := &file_app_proxyman_command_command_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -578,7 +580,7 @@ func (x *AlterOutboundRequest) String() string { func (*AlterOutboundRequest) ProtoMessage() {} func (x *AlterOutboundRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[12] + mi := &file_app_proxyman_command_command_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -591,7 +593,7 @@ func (x *AlterOutboundRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AlterOutboundRequest.ProtoReflect.Descriptor instead. func (*AlterOutboundRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{12} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{12} } func (x *AlterOutboundRequest) GetTag() string { @@ -617,7 +619,7 @@ type AlterOutboundResponse struct { func (x *AlterOutboundResponse) Reset() { *x = AlterOutboundResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[13] + mi := &file_app_proxyman_command_command_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -630,7 +632,7 @@ func (x *AlterOutboundResponse) String() string { func (*AlterOutboundResponse) ProtoMessage() {} func (x *AlterOutboundResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[13] + mi := &file_app_proxyman_command_command_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -643,7 +645,7 @@ func (x *AlterOutboundResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AlterOutboundResponse.ProtoReflect.Descriptor instead. func (*AlterOutboundResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{13} + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{13} } type Config struct { @@ -655,7 +657,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[14] + mi := &file_app_proxyman_command_command_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -668,7 +670,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[14] + mi := &file_app_proxyman_command_command_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -681,143 +683,141 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP(), []int{14} -} - -var File_v2ray_com_core_app_proxyman_command_command_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_proxyman_command_command_proto_rawDesc = []byte{ - 0x0a, 0x31, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x1a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 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, 0x1a, 0x1b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, - 0x0a, 0x10, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2b, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x4f, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x07, 0x69, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x69, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x14, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x6d, 0x0a, 0x13, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x44, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, - 0x0a, 0x14, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x4f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x08, - 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x62, + return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{14} +} + +var File_app_proxyman_command_command_proto protoreflect.FileDescriptor + +var file_app_proxyman_command_command_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 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, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2b, 0x0a, 0x13, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x4f, 0x0a, 0x11, 0x41, 0x64, 0x64, + 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, + 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x41, - 0x64, 0x64, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, - 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x18, 0x0a, - 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6e, 0x0a, 0x14, 0x41, 0x6c, 0x74, 0x65, 0x72, + 0x67, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x41, 0x64, + 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x28, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x13, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x44, 0x0a, 0x09, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x41, 0x64, + 0x64, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3d, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, + 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, - 0x67, 0x12, 0x44, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 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, 0x09, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x41, 0x6c, 0x74, 0x65, 0x72, - 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x90, 0x06, 0x0a, 0x0e, 0x48, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, - 0x0a, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x32, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x64, - 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x35, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, - 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x36, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x0c, 0x41, 0x6c, 0x74, - 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x34, 0x2e, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x6c, 0x74, 0x65, - 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x35, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, - 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x4f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, - 0x64, 0x64, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x83, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x36, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, - 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x37, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, + 0x67, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6e, 0x0a, 0x14, 0x41, + 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x44, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x41, + 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x90, + 0x06, 0x0a, 0x0e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x77, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, + 0x32, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x0d, 0x41, - 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x35, 0x2e, 0x76, + 0x64, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x0d, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x35, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, - 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x52, 0x0a, - 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, + 0x0c, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x34, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, + 0x41, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x0b, + 0x41, 0x64, 0x64, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x33, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x64, + 0x64, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x34, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x83, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x36, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, + 0x01, 0x0a, 0x0d, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x12, 0x35, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, + 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x4f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0x6e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x23, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x1f, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_proxyman_command_command_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_proxyman_command_command_proto_rawDescData = file_v2ray_com_core_app_proxyman_command_command_proto_rawDesc + file_app_proxyman_command_command_proto_rawDescOnce sync.Once + file_app_proxyman_command_command_proto_rawDescData = file_app_proxyman_command_command_proto_rawDesc ) -func file_v2ray_com_core_app_proxyman_command_command_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_proxyman_command_command_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_proxyman_command_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_proxyman_command_command_proto_rawDescData) +func file_app_proxyman_command_command_proto_rawDescGZIP() []byte { + file_app_proxyman_command_command_proto_rawDescOnce.Do(func() { + file_app_proxyman_command_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_proxyman_command_command_proto_rawDescData) }) - return file_v2ray_com_core_app_proxyman_command_command_proto_rawDescData + return file_app_proxyman_command_command_proto_rawDescData } -var file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_v2ray_com_core_app_proxyman_command_command_proto_goTypes = []interface{}{ +var file_app_proxyman_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_app_proxyman_command_command_proto_goTypes = []interface{}{ (*AddUserOperation)(nil), // 0: v2ray.core.app.proxyman.command.AddUserOperation (*RemoveUserOperation)(nil), // 1: v2ray.core.app.proxyman.command.RemoveUserOperation (*AddInboundRequest)(nil), // 2: v2ray.core.app.proxyman.command.AddInboundRequest @@ -838,7 +838,7 @@ var file_v2ray_com_core_app_proxyman_command_command_proto_goTypes = []interface (*serial.TypedMessage)(nil), // 17: v2ray.core.common.serial.TypedMessage (*core.OutboundHandlerConfig)(nil), // 18: v2ray.core.OutboundHandlerConfig } -var file_v2ray_com_core_app_proxyman_command_command_proto_depIdxs = []int32{ +var file_app_proxyman_command_command_proto_depIdxs = []int32{ 15, // 0: v2ray.core.app.proxyman.command.AddUserOperation.user:type_name -> v2ray.core.common.protocol.User 16, // 1: v2ray.core.app.proxyman.command.AddInboundRequest.inbound:type_name -> v2ray.core.InboundHandlerConfig 17, // 2: v2ray.core.app.proxyman.command.AlterInboundRequest.operation:type_name -> v2ray.core.common.serial.TypedMessage @@ -863,13 +863,13 @@ var file_v2ray_com_core_app_proxyman_command_command_proto_depIdxs = []int32{ 0, // [0:5] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_proxyman_command_command_proto_init() } -func file_v2ray_com_core_app_proxyman_command_command_proto_init() { - if File_v2ray_com_core_app_proxyman_command_command_proto != nil { +func init() { file_app_proxyman_command_command_proto_init() } +func file_app_proxyman_command_command_proto_init() { + if File_app_proxyman_command_command_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddUserOperation); i { case 0: return &v.state @@ -881,7 +881,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveUserOperation); i { case 0: return &v.state @@ -893,7 +893,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddInboundRequest); i { case 0: return &v.state @@ -905,7 +905,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddInboundResponse); i { case 0: return &v.state @@ -917,7 +917,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveInboundRequest); i { case 0: return &v.state @@ -929,7 +929,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveInboundResponse); i { case 0: return &v.state @@ -941,7 +941,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AlterInboundRequest); i { case 0: return &v.state @@ -953,7 +953,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AlterInboundResponse); i { case 0: return &v.state @@ -965,7 +965,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddOutboundRequest); i { case 0: return &v.state @@ -977,7 +977,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddOutboundResponse); i { case 0: return &v.state @@ -989,7 +989,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveOutboundRequest); i { case 0: return &v.state @@ -1001,7 +1001,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveOutboundResponse); i { case 0: return &v.state @@ -1013,7 +1013,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AlterOutboundRequest); i { case 0: return &v.state @@ -1025,7 +1025,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AlterOutboundResponse); i { case 0: return &v.state @@ -1037,7 +1037,7 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_command_command_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -1054,278 +1054,18 @@ func file_v2ray_com_core_app_proxyman_command_command_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_proxyman_command_command_proto_rawDesc, + RawDescriptor: file_app_proxyman_command_command_proto_rawDesc, NumEnums: 0, NumMessages: 15, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_v2ray_com_core_app_proxyman_command_command_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_proxyman_command_command_proto_depIdxs, - MessageInfos: file_v2ray_com_core_app_proxyman_command_command_proto_msgTypes, + GoTypes: file_app_proxyman_command_command_proto_goTypes, + DependencyIndexes: file_app_proxyman_command_command_proto_depIdxs, + MessageInfos: file_app_proxyman_command_command_proto_msgTypes, }.Build() - File_v2ray_com_core_app_proxyman_command_command_proto = out.File - file_v2ray_com_core_app_proxyman_command_command_proto_rawDesc = nil - file_v2ray_com_core_app_proxyman_command_command_proto_goTypes = nil - file_v2ray_com_core_app_proxyman_command_command_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// HandlerServiceClient is the client API for HandlerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HandlerServiceClient interface { - AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error) - RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error) - AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error) - AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error) - RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error) - AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error) -} - -type handlerServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewHandlerServiceClient(cc grpc.ClientConnInterface) HandlerServiceClient { - return &handlerServiceClient{cc} -} - -func (c *handlerServiceClient) AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error) { - out := new(AddInboundResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/AddInbound", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *handlerServiceClient) RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error) { - out := new(RemoveInboundResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/RemoveInbound", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *handlerServiceClient) AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error) { - out := new(AlterInboundResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/AlterInbound", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *handlerServiceClient) AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error) { - out := new(AddOutboundResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/AddOutbound", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *handlerServiceClient) RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error) { - out := new(RemoveOutboundResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/RemoveOutbound", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *handlerServiceClient) AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error) { - out := new(AlterOutboundResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/AlterOutbound", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HandlerServiceServer is the server API for HandlerService service. -type HandlerServiceServer interface { - AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error) - RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error) - AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) - AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) - RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error) - AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error) -} - -// UnimplementedHandlerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedHandlerServiceServer struct { -} - -func (*UnimplementedHandlerServiceServer) AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddInbound not implemented") -} -func (*UnimplementedHandlerServiceServer) RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveInbound not implemented") -} -func (*UnimplementedHandlerServiceServer) AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AlterInbound not implemented") -} -func (*UnimplementedHandlerServiceServer) AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddOutbound not implemented") -} -func (*UnimplementedHandlerServiceServer) RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveOutbound not implemented") -} -func (*UnimplementedHandlerServiceServer) AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AlterOutbound not implemented") -} - -func RegisterHandlerServiceServer(s *grpc.Server, srv HandlerServiceServer) { - s.RegisterService(&_HandlerService_serviceDesc, srv) -} - -func _HandlerService_AddInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddInboundRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HandlerServiceServer).AddInbound(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/AddInbound", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HandlerServiceServer).AddInbound(ctx, req.(*AddInboundRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HandlerService_RemoveInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveInboundRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HandlerServiceServer).RemoveInbound(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/RemoveInbound", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HandlerServiceServer).RemoveInbound(ctx, req.(*RemoveInboundRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HandlerService_AlterInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AlterInboundRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HandlerServiceServer).AlterInbound(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/AlterInbound", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HandlerServiceServer).AlterInbound(ctx, req.(*AlterInboundRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HandlerService_AddOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddOutboundRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HandlerServiceServer).AddOutbound(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/AddOutbound", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HandlerServiceServer).AddOutbound(ctx, req.(*AddOutboundRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HandlerService_RemoveOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveOutboundRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HandlerServiceServer).RemoveOutbound(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/RemoveOutbound", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HandlerServiceServer).RemoveOutbound(ctx, req.(*RemoveOutboundRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HandlerService_AlterOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AlterOutboundRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HandlerServiceServer).AlterOutbound(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/AlterOutbound", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HandlerServiceServer).AlterOutbound(ctx, req.(*AlterOutboundRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _HandlerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v2ray.core.app.proxyman.command.HandlerService", - HandlerType: (*HandlerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AddInbound", - Handler: _HandlerService_AddInbound_Handler, - }, - { - MethodName: "RemoveInbound", - Handler: _HandlerService_RemoveInbound_Handler, - }, - { - MethodName: "AlterInbound", - Handler: _HandlerService_AlterInbound_Handler, - }, - { - MethodName: "AddOutbound", - Handler: _HandlerService_AddOutbound_Handler, - }, - { - MethodName: "RemoveOutbound", - Handler: _HandlerService_RemoveOutbound_Handler, - }, - { - MethodName: "AlterOutbound", - Handler: _HandlerService_AlterOutbound_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "v2ray.com/core/app/proxyman/command/command.proto", + File_app_proxyman_command_command_proto = out.File + file_app_proxyman_command_command_proto_rawDesc = nil + file_app_proxyman_command_command_proto_goTypes = nil + file_app_proxyman_command_command_proto_depIdxs = nil } diff --git a/app/proxyman/command/command.proto b/app/proxyman/command/command.proto index c40c8ec254..786087d193 100644 --- a/app/proxyman/command/command.proto +++ b/app/proxyman/command/command.proto @@ -2,13 +2,13 @@ syntax = "proto3"; package v2ray.core.app.proxyman.command; option csharp_namespace = "V2Ray.Core.App.Proxyman.Command"; -option go_package = "command"; +option go_package = "v2ray.com/core/app/proxyman/command"; option java_package = "com.v2ray.core.app.proxyman.command"; option java_multiple_files = true; -import "v2ray.com/core/common/protocol/user.proto"; -import "v2ray.com/core/common/serial/typed_message.proto"; -import "v2ray.com/core/config.proto"; +import "common/protocol/user.proto"; +import "common/serial/typed_message.proto"; +import "config.proto"; message AddUserOperation { v2ray.core.common.protocol.User user = 1; @@ -77,4 +77,4 @@ service HandlerService { rpc AlterOutbound(AlterOutboundRequest) returns (AlterOutboundResponse) {} } -message Config {} \ No newline at end of file +message Config {} diff --git a/app/proxyman/command/command_grpc.pb.go b/app/proxyman/command/command_grpc.pb.go new file mode 100644 index 0000000000..2146f2b27e --- /dev/null +++ b/app/proxyman/command/command_grpc.pb.go @@ -0,0 +1,270 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package command + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// HandlerServiceClient is the client API for HandlerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HandlerServiceClient interface { + AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error) + RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error) + AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error) + AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error) + RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error) + AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error) +} + +type handlerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHandlerServiceClient(cc grpc.ClientConnInterface) HandlerServiceClient { + return &handlerServiceClient{cc} +} + +func (c *handlerServiceClient) AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error) { + out := new(AddInboundResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/AddInbound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *handlerServiceClient) RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error) { + out := new(RemoveInboundResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/RemoveInbound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *handlerServiceClient) AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error) { + out := new(AlterInboundResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/AlterInbound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *handlerServiceClient) AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error) { + out := new(AddOutboundResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/AddOutbound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *handlerServiceClient) RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error) { + out := new(RemoveOutboundResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/RemoveOutbound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *handlerServiceClient) AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error) { + out := new(AlterOutboundResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.proxyman.command.HandlerService/AlterOutbound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HandlerServiceServer is the server API for HandlerService service. +// All implementations must embed UnimplementedHandlerServiceServer +// for forward compatibility +type HandlerServiceServer interface { + AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error) + RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error) + AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) + AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) + RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error) + AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error) + mustEmbedUnimplementedHandlerServiceServer() +} + +// UnimplementedHandlerServiceServer must be embedded to have forward compatible implementations. +type UnimplementedHandlerServiceServer struct { +} + +func (*UnimplementedHandlerServiceServer) AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddInbound not implemented") +} +func (*UnimplementedHandlerServiceServer) RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveInbound not implemented") +} +func (*UnimplementedHandlerServiceServer) AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AlterInbound not implemented") +} +func (*UnimplementedHandlerServiceServer) AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddOutbound not implemented") +} +func (*UnimplementedHandlerServiceServer) RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveOutbound not implemented") +} +func (*UnimplementedHandlerServiceServer) AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AlterOutbound not implemented") +} +func (*UnimplementedHandlerServiceServer) mustEmbedUnimplementedHandlerServiceServer() {} + +func RegisterHandlerServiceServer(s *grpc.Server, srv HandlerServiceServer) { + s.RegisterService(&_HandlerService_serviceDesc, srv) +} + +func _HandlerService_AddInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddInboundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandlerServiceServer).AddInbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/AddInbound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandlerServiceServer).AddInbound(ctx, req.(*AddInboundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HandlerService_RemoveInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveInboundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandlerServiceServer).RemoveInbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/RemoveInbound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandlerServiceServer).RemoveInbound(ctx, req.(*RemoveInboundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HandlerService_AlterInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AlterInboundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandlerServiceServer).AlterInbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/AlterInbound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandlerServiceServer).AlterInbound(ctx, req.(*AlterInboundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HandlerService_AddOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddOutboundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandlerServiceServer).AddOutbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/AddOutbound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandlerServiceServer).AddOutbound(ctx, req.(*AddOutboundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HandlerService_RemoveOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveOutboundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandlerServiceServer).RemoveOutbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/RemoveOutbound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandlerServiceServer).RemoveOutbound(ctx, req.(*RemoveOutboundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HandlerService_AlterOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AlterOutboundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandlerServiceServer).AlterOutbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.proxyman.command.HandlerService/AlterOutbound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandlerServiceServer).AlterOutbound(ctx, req.(*AlterOutboundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandlerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v2ray.core.app.proxyman.command.HandlerService", + HandlerType: (*HandlerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AddInbound", + Handler: _HandlerService_AddInbound_Handler, + }, + { + MethodName: "RemoveInbound", + Handler: _HandlerService_RemoveInbound_Handler, + }, + { + MethodName: "AlterInbound", + Handler: _HandlerService_AlterInbound_Handler, + }, + { + MethodName: "AddOutbound", + Handler: _HandlerService_AddOutbound_Handler, + }, + { + MethodName: "RemoveOutbound", + Handler: _HandlerService_RemoveOutbound_Handler, + }, + { + MethodName: "AlterOutbound", + Handler: _HandlerService_AlterOutbound_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "app/proxyman/command/command.proto", +} diff --git a/app/proxyman/config.pb.go b/app/proxyman/config.pb.go index 3ce9f4ad86..ce670a283d 100644 --- a/app/proxyman/config.pb.go +++ b/app/proxyman/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/proxyman/config.proto + package proxyman import ( @@ -52,11 +58,11 @@ func (x KnownProtocols) String() string { } func (KnownProtocols) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_app_proxyman_config_proto_enumTypes[0].Descriptor() + return file_app_proxyman_config_proto_enumTypes[0].Descriptor() } func (KnownProtocols) Type() protoreflect.EnumType { - return &file_v2ray_com_core_app_proxyman_config_proto_enumTypes[0] + return &file_app_proxyman_config_proto_enumTypes[0] } func (x KnownProtocols) Number() protoreflect.EnumNumber { @@ -65,7 +71,7 @@ func (x KnownProtocols) Number() protoreflect.EnumNumber { // Deprecated: Use KnownProtocols.Descriptor instead. func (KnownProtocols) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{0} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{0} } type AllocationStrategy_Type int32 @@ -104,11 +110,11 @@ func (x AllocationStrategy_Type) String() string { } func (AllocationStrategy_Type) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_app_proxyman_config_proto_enumTypes[1].Descriptor() + return file_app_proxyman_config_proto_enumTypes[1].Descriptor() } func (AllocationStrategy_Type) Type() protoreflect.EnumType { - return &file_v2ray_com_core_app_proxyman_config_proto_enumTypes[1] + return &file_app_proxyman_config_proto_enumTypes[1] } func (x AllocationStrategy_Type) Number() protoreflect.EnumNumber { @@ -117,7 +123,7 @@ func (x AllocationStrategy_Type) Number() protoreflect.EnumNumber { // Deprecated: Use AllocationStrategy_Type.Descriptor instead. func (AllocationStrategy_Type) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{1, 0} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{1, 0} } type InboundConfig struct { @@ -129,7 +135,7 @@ type InboundConfig struct { func (x *InboundConfig) Reset() { *x = InboundConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[0] + mi := &file_app_proxyman_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -142,7 +148,7 @@ func (x *InboundConfig) String() string { func (*InboundConfig) ProtoMessage() {} func (x *InboundConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[0] + mi := &file_app_proxyman_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -155,7 +161,7 @@ func (x *InboundConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use InboundConfig.ProtoReflect.Descriptor instead. func (*InboundConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{0} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{0} } type AllocationStrategy struct { @@ -175,7 +181,7 @@ type AllocationStrategy struct { func (x *AllocationStrategy) Reset() { *x = AllocationStrategy{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[1] + mi := &file_app_proxyman_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -188,7 +194,7 @@ func (x *AllocationStrategy) String() string { func (*AllocationStrategy) ProtoMessage() {} func (x *AllocationStrategy) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[1] + mi := &file_app_proxyman_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -201,7 +207,7 @@ func (x *AllocationStrategy) ProtoReflect() protoreflect.Message { // Deprecated: Use AllocationStrategy.ProtoReflect.Descriptor instead. func (*AllocationStrategy) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{1} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{1} } func (x *AllocationStrategy) GetType() AllocationStrategy_Type { @@ -240,7 +246,7 @@ type SniffingConfig struct { func (x *SniffingConfig) Reset() { *x = SniffingConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[2] + mi := &file_app_proxyman_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -253,7 +259,7 @@ func (x *SniffingConfig) String() string { func (*SniffingConfig) ProtoMessage() {} func (x *SniffingConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[2] + mi := &file_app_proxyman_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -266,7 +272,7 @@ func (x *SniffingConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use SniffingConfig.ProtoReflect.Descriptor instead. func (*SniffingConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{2} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{2} } func (x *SniffingConfig) GetEnabled() bool { @@ -306,7 +312,7 @@ type ReceiverConfig struct { func (x *ReceiverConfig) Reset() { *x = ReceiverConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[3] + mi := &file_app_proxyman_config_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -319,7 +325,7 @@ func (x *ReceiverConfig) String() string { func (*ReceiverConfig) ProtoMessage() {} func (x *ReceiverConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[3] + mi := &file_app_proxyman_config_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -332,7 +338,7 @@ func (x *ReceiverConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ReceiverConfig.ProtoReflect.Descriptor instead. func (*ReceiverConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{3} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{3} } func (x *ReceiverConfig) GetPortRange() *net.PortRange { @@ -398,7 +404,7 @@ type InboundHandlerConfig struct { func (x *InboundHandlerConfig) Reset() { *x = InboundHandlerConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[4] + mi := &file_app_proxyman_config_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -411,7 +417,7 @@ func (x *InboundHandlerConfig) String() string { func (*InboundHandlerConfig) ProtoMessage() {} func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[4] + mi := &file_app_proxyman_config_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -424,7 +430,7 @@ func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use InboundHandlerConfig.ProtoReflect.Descriptor instead. func (*InboundHandlerConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{4} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{4} } func (x *InboundHandlerConfig) GetTag() string { @@ -457,7 +463,7 @@ type OutboundConfig struct { func (x *OutboundConfig) Reset() { *x = OutboundConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[5] + mi := &file_app_proxyman_config_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -470,7 +476,7 @@ func (x *OutboundConfig) String() string { func (*OutboundConfig) ProtoMessage() {} func (x *OutboundConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[5] + mi := &file_app_proxyman_config_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -483,7 +489,7 @@ func (x *OutboundConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use OutboundConfig.ProtoReflect.Descriptor instead. func (*OutboundConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{5} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{5} } type SenderConfig struct { @@ -501,7 +507,7 @@ type SenderConfig struct { func (x *SenderConfig) Reset() { *x = SenderConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[6] + mi := &file_app_proxyman_config_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -514,7 +520,7 @@ func (x *SenderConfig) String() string { func (*SenderConfig) ProtoMessage() {} func (x *SenderConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[6] + mi := &file_app_proxyman_config_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -527,7 +533,7 @@ func (x *SenderConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use SenderConfig.ProtoReflect.Descriptor instead. func (*SenderConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{6} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{6} } func (x *SenderConfig) GetVia() *net.IPOrDomain { @@ -572,7 +578,7 @@ type MultiplexingConfig struct { func (x *MultiplexingConfig) Reset() { *x = MultiplexingConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[7] + mi := &file_app_proxyman_config_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -585,7 +591,7 @@ func (x *MultiplexingConfig) String() string { func (*MultiplexingConfig) ProtoMessage() {} func (x *MultiplexingConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[7] + mi := &file_app_proxyman_config_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -598,7 +604,7 @@ func (x *MultiplexingConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use MultiplexingConfig.ProtoReflect.Descriptor instead. func (*MultiplexingConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{7} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{7} } func (x *MultiplexingConfig) GetEnabled() bool { @@ -626,7 +632,7 @@ type AllocationStrategy_AllocationStrategyConcurrency struct { func (x *AllocationStrategy_AllocationStrategyConcurrency) Reset() { *x = AllocationStrategy_AllocationStrategyConcurrency{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[8] + mi := &file_app_proxyman_config_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -639,7 +645,7 @@ func (x *AllocationStrategy_AllocationStrategyConcurrency) String() string { func (*AllocationStrategy_AllocationStrategyConcurrency) ProtoMessage() {} func (x *AllocationStrategy_AllocationStrategyConcurrency) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[8] + mi := &file_app_proxyman_config_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -652,7 +658,7 @@ func (x *AllocationStrategy_AllocationStrategyConcurrency) ProtoReflect() protor // Deprecated: Use AllocationStrategy_AllocationStrategyConcurrency.ProtoReflect.Descriptor instead. func (*AllocationStrategy_AllocationStrategyConcurrency) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{1, 0} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{1, 0} } func (x *AllocationStrategy_AllocationStrategyConcurrency) GetValue() uint32 { @@ -673,7 +679,7 @@ type AllocationStrategy_AllocationStrategyRefresh struct { func (x *AllocationStrategy_AllocationStrategyRefresh) Reset() { *x = AllocationStrategy_AllocationStrategyRefresh{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[9] + mi := &file_app_proxyman_config_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -686,7 +692,7 @@ func (x *AllocationStrategy_AllocationStrategyRefresh) String() string { func (*AllocationStrategy_AllocationStrategyRefresh) ProtoMessage() {} func (x *AllocationStrategy_AllocationStrategyRefresh) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_proxyman_config_proto_msgTypes[9] + mi := &file_app_proxyman_config_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -699,7 +705,7 @@ func (x *AllocationStrategy_AllocationStrategyRefresh) ProtoReflect() protorefle // Deprecated: Use AllocationStrategy_AllocationStrategyRefresh.ProtoReflect.Descriptor instead. func (*AllocationStrategy_AllocationStrategyRefresh) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP(), []int{1, 1} + return file_app_proxyman_config_proto_rawDescGZIP(), []int{1, 1} } func (x *AllocationStrategy_AllocationStrategyRefresh) GetValue() uint32 { @@ -709,159 +715,156 @@ func (x *AllocationStrategy_AllocationStrategyRefresh) GetValue() uint32 { return 0 } -var File_v2ray_com_core_app_proxyman_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_proxyman_config_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x6d, 0x61, 0x6e, 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 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, 0x0f, 0x0a, 0x0d, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc0, 0x03, 0x0a, 0x12, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x44, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x76, 0x32, 0x72, +var File_app_proxyman_config_proto protoreflect.FileDescriptor + +var file_app_proxyman_config_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x6d, 0x61, 0x6e, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, + 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x0f, 0x0a, 0x0d, 0x49, 0x6e, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc0, 0x03, 0x0a, 0x12, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x44, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x30, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x6b, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x43, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x12, 0x5f, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x07, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x1a, 0x35, 0x0a, 0x1d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x43, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x31, 0x0a, 0x19, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x6c, 0x77, 0x61, 0x79, + 0x73, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x02, 0x22, 0x5d, 0x0a, + 0x0e, 0x53, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0xb4, 0x04, 0x0a, + 0x0e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x3f, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x39, 0x0a, 0x06, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x52, 0x06, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x12, 0x5c, 0x0a, 0x13, 0x61, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, + 0x61, 0x6e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x40, 0x0a, 0x1c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 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, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x54, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x6b, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, - 0x6e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, - 0x74, 0x65, 0x67, 0x79, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, - 0x5f, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x45, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x41, 0x6c, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x07, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, - 0x1a, 0x35, 0x0a, 0x1d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x31, 0x0a, 0x19, 0x41, 0x6c, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x10, 0x00, 0x12, 0x0a, - 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x02, 0x22, 0x5d, 0x0a, 0x0e, 0x53, 0x6e, 0x69, 0x66, - 0x66, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0xb4, 0x04, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0a, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, + 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x54, 0x0a, 0x11, 0x73, 0x6e, 0x69, 0x66, 0x66, + 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x6e, 0x69, + 0x66, 0x66, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x73, 0x6e, 0x69, + 0x66, 0x66, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x4a, 0x04, 0x08, + 0x06, 0x10, 0x07, 0x22, 0xcc, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 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, 0x53, + 0x0a, 0x11, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x4d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x06, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x12, 0x5c, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc8, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x03, 0x76, 0x69, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, 0x76, 0x69, 0x61, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x6c, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, - 0x74, 0x65, 0x67, 0x79, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x40, 0x0a, 0x1c, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 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, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x0f, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, - 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x12, 0x54, 0x0a, 0x11, 0x73, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, 0x5f, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x73, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0xcc, - 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 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, 0x53, 0x0a, 0x11, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 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, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4d, - 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 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, 0x0d, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x10, 0x0a, - 0x0e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0xc8, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x33, 0x0a, 0x03, 0x76, 0x69, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x52, 0x03, 0x76, 0x69, 0x61, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x0d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5a, - 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x5f, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x65, 0x78, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x50, 0x0a, 0x12, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2a, 0x23, 0x0a, 0x0e, - 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x08, - 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x10, - 0x01, 0x42, 0x43, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, - 0x50, 0x01, 0x5a, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0xaa, 0x02, 0x17, 0x56, - 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x65, 0x74, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x51, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x5a, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, + 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, + 0x6c, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, + 0x50, 0x0a, 0x12, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x2a, 0x23, 0x0a, 0x0e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, + 0x03, 0x54, 0x4c, 0x53, 0x10, 0x01, 0x42, 0x56, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x50, 0x01, 0x5a, 0x1b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x6d, 0x61, 0x6e, 0xaa, 0x02, 0x17, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, + 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_proxyman_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_proxyman_config_proto_rawDescData = file_v2ray_com_core_app_proxyman_config_proto_rawDesc + file_app_proxyman_config_proto_rawDescOnce sync.Once + file_app_proxyman_config_proto_rawDescData = file_app_proxyman_config_proto_rawDesc ) -func file_v2ray_com_core_app_proxyman_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_proxyman_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_proxyman_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_proxyman_config_proto_rawDescData) +func file_app_proxyman_config_proto_rawDescGZIP() []byte { + file_app_proxyman_config_proto_rawDescOnce.Do(func() { + file_app_proxyman_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_proxyman_config_proto_rawDescData) }) - return file_v2ray_com_core_app_proxyman_config_proto_rawDescData + return file_app_proxyman_config_proto_rawDescData } -var file_v2ray_com_core_app_proxyman_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_v2ray_com_core_app_proxyman_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_v2ray_com_core_app_proxyman_config_proto_goTypes = []interface{}{ +var file_app_proxyman_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_app_proxyman_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_app_proxyman_config_proto_goTypes = []interface{}{ (KnownProtocols)(0), // 0: v2ray.core.app.proxyman.KnownProtocols (AllocationStrategy_Type)(0), // 1: v2ray.core.app.proxyman.AllocationStrategy.Type (*InboundConfig)(nil), // 2: v2ray.core.app.proxyman.InboundConfig @@ -880,7 +883,7 @@ var file_v2ray_com_core_app_proxyman_config_proto_goTypes = []interface{}{ (*serial.TypedMessage)(nil), // 15: v2ray.core.common.serial.TypedMessage (*internet.ProxyConfig)(nil), // 16: v2ray.core.transport.internet.ProxyConfig } -var file_v2ray_com_core_app_proxyman_config_proto_depIdxs = []int32{ +var file_app_proxyman_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.app.proxyman.AllocationStrategy.type:type_name -> v2ray.core.app.proxyman.AllocationStrategy.Type 10, // 1: v2ray.core.app.proxyman.AllocationStrategy.concurrency:type_name -> v2ray.core.app.proxyman.AllocationStrategy.AllocationStrategyConcurrency 11, // 2: v2ray.core.app.proxyman.AllocationStrategy.refresh:type_name -> v2ray.core.app.proxyman.AllocationStrategy.AllocationStrategyRefresh @@ -903,13 +906,13 @@ var file_v2ray_com_core_app_proxyman_config_proto_depIdxs = []int32{ 0, // [0:15] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_proxyman_config_proto_init() } -func file_v2ray_com_core_app_proxyman_config_proto_init() { - if File_v2ray_com_core_app_proxyman_config_proto != nil { +func init() { file_app_proxyman_config_proto_init() } +func file_app_proxyman_config_proto_init() { + if File_app_proxyman_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InboundConfig); i { case 0: return &v.state @@ -921,7 +924,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllocationStrategy); i { case 0: return &v.state @@ -933,7 +936,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SniffingConfig); i { case 0: return &v.state @@ -945,7 +948,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReceiverConfig); i { case 0: return &v.state @@ -957,7 +960,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InboundHandlerConfig); i { case 0: return &v.state @@ -969,7 +972,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OutboundConfig); i { case 0: return &v.state @@ -981,7 +984,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SenderConfig); i { case 0: return &v.state @@ -993,7 +996,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MultiplexingConfig); i { case 0: return &v.state @@ -1005,7 +1008,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllocationStrategy_AllocationStrategyConcurrency); i { case 0: return &v.state @@ -1017,7 +1020,7 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { return nil } } - file_v2ray_com_core_app_proxyman_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_app_proxyman_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllocationStrategy_AllocationStrategyRefresh); i { case 0: return &v.state @@ -1034,19 +1037,19 @@ func file_v2ray_com_core_app_proxyman_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_proxyman_config_proto_rawDesc, + RawDescriptor: file_app_proxyman_config_proto_rawDesc, NumEnums: 2, NumMessages: 10, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_app_proxyman_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_proxyman_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_app_proxyman_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_app_proxyman_config_proto_msgTypes, + GoTypes: file_app_proxyman_config_proto_goTypes, + DependencyIndexes: file_app_proxyman_config_proto_depIdxs, + EnumInfos: file_app_proxyman_config_proto_enumTypes, + MessageInfos: file_app_proxyman_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_proxyman_config_proto = out.File - file_v2ray_com_core_app_proxyman_config_proto_rawDesc = nil - file_v2ray_com_core_app_proxyman_config_proto_goTypes = nil - file_v2ray_com_core_app_proxyman_config_proto_depIdxs = nil + File_app_proxyman_config_proto = out.File + file_app_proxyman_config_proto_rawDesc = nil + file_app_proxyman_config_proto_goTypes = nil + file_app_proxyman_config_proto_depIdxs = nil } diff --git a/app/proxyman/config.proto b/app/proxyman/config.proto index ed5e0151a2..5efda02ac5 100644 --- a/app/proxyman/config.proto +++ b/app/proxyman/config.proto @@ -2,14 +2,14 @@ syntax = "proto3"; package v2ray.core.app.proxyman; option csharp_namespace = "V2Ray.Core.App.Proxyman"; -option go_package = "proxyman"; +option go_package = "v2ray.com/core/app/proxyman"; option java_package = "com.v2ray.core.app.proxyman"; option java_multiple_files = true; -import "v2ray.com/core/common/net/address.proto"; -import "v2ray.com/core/common/net/port.proto"; -import "v2ray.com/core/transport/internet/config.proto"; -import "v2ray.com/core/common/serial/typed_message.proto"; +import "common/net/address.proto"; +import "common/net/port.proto"; +import "transport/internet/config.proto"; +import "common/serial/typed_message.proto"; message InboundConfig { } diff --git a/app/proxyman/outbound/handler.go b/app/proxyman/outbound/handler.go index 3ffe9ae2d6..f899e6b8de 100644 --- a/app/proxyman/outbound/handler.go +++ b/app/proxyman/outbound/handler.go @@ -200,7 +200,7 @@ func (h *Handler) Dial(ctx context.Context, dest net.Destination) (internet.Conn return h.getStatCouterConnection(conn), err } -func (h *Handler) getStatCouterConnection(conn internet.Connection) (internet.Connection) { +func (h *Handler) getStatCouterConnection(conn internet.Connection) internet.Connection { if h.uplinkCounter != nil || h.downlinkCounter != nil { return &internet.StatCouterConnection{ Connection: conn, diff --git a/app/proxyman/outbound/handler_test.go b/app/proxyman/outbound/handler_test.go index c05183784c..b3b6e0545a 100644 --- a/app/proxyman/outbound/handler_test.go +++ b/app/proxyman/outbound/handler_test.go @@ -57,7 +57,7 @@ func TestOutboundWithStatCounter(t *testing.T) { serial.ToTypedMessage(&policy.Config{ System: &policy.SystemPolicy{ Stats: &policy.SystemPolicy_Stats{ - OutboundUplink: true, + OutboundUplink: true, OutboundDownlink: true, }, }, diff --git a/app/reverse/config.pb.go b/app/reverse/config.pb.go index 3ad4a6ec04..558417a6ef 100644 --- a/app/reverse/config.pb.go +++ b/app/reverse/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/reverse/config.proto + package reverse import ( @@ -49,11 +55,11 @@ func (x Control_State) String() string { } func (Control_State) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_app_reverse_config_proto_enumTypes[0].Descriptor() + return file_app_reverse_config_proto_enumTypes[0].Descriptor() } func (Control_State) Type() protoreflect.EnumType { - return &file_v2ray_com_core_app_reverse_config_proto_enumTypes[0] + return &file_app_reverse_config_proto_enumTypes[0] } func (x Control_State) Number() protoreflect.EnumNumber { @@ -62,7 +68,7 @@ func (x Control_State) Number() protoreflect.EnumNumber { // Deprecated: Use Control_State.Descriptor instead. func (Control_State) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_app_reverse_config_proto_rawDescGZIP(), []int{0, 0} + return file_app_reverse_config_proto_rawDescGZIP(), []int{0, 0} } type Control struct { @@ -77,7 +83,7 @@ type Control struct { func (x *Control) Reset() { *x = Control{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_reverse_config_proto_msgTypes[0] + mi := &file_app_reverse_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -90,7 +96,7 @@ func (x *Control) String() string { func (*Control) ProtoMessage() {} func (x *Control) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_reverse_config_proto_msgTypes[0] + mi := &file_app_reverse_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103,7 +109,7 @@ func (x *Control) ProtoReflect() protoreflect.Message { // Deprecated: Use Control.ProtoReflect.Descriptor instead. func (*Control) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_reverse_config_proto_rawDescGZIP(), []int{0} + return file_app_reverse_config_proto_rawDescGZIP(), []int{0} } func (x *Control) GetState() Control_State { @@ -132,7 +138,7 @@ type BridgeConfig struct { func (x *BridgeConfig) Reset() { *x = BridgeConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_reverse_config_proto_msgTypes[1] + mi := &file_app_reverse_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -145,7 +151,7 @@ func (x *BridgeConfig) String() string { func (*BridgeConfig) ProtoMessage() {} func (x *BridgeConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_reverse_config_proto_msgTypes[1] + mi := &file_app_reverse_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -158,7 +164,7 @@ func (x *BridgeConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use BridgeConfig.ProtoReflect.Descriptor instead. func (*BridgeConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_reverse_config_proto_rawDescGZIP(), []int{1} + return file_app_reverse_config_proto_rawDescGZIP(), []int{1} } func (x *BridgeConfig) GetTag() string { @@ -187,7 +193,7 @@ type PortalConfig struct { func (x *PortalConfig) Reset() { *x = PortalConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_reverse_config_proto_msgTypes[2] + mi := &file_app_reverse_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -200,7 +206,7 @@ func (x *PortalConfig) String() string { func (*PortalConfig) ProtoMessage() {} func (x *PortalConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_reverse_config_proto_msgTypes[2] + mi := &file_app_reverse_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -213,7 +219,7 @@ func (x *PortalConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use PortalConfig.ProtoReflect.Descriptor instead. func (*PortalConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_reverse_config_proto_rawDescGZIP(), []int{2} + return file_app_reverse_config_proto_rawDescGZIP(), []int{2} } func (x *PortalConfig) GetTag() string { @@ -242,7 +248,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_reverse_config_proto_msgTypes[3] + mi := &file_app_reverse_config_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -255,7 +261,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_reverse_config_proto_msgTypes[3] + mi := &file_app_reverse_config_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -268,7 +274,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_reverse_config_proto_rawDescGZIP(), []int{3} + return file_app_reverse_config_proto_rawDescGZIP(), []int{3} } func (x *Config) GetBridgeConfig() []*BridgeConfig { @@ -285,68 +291,68 @@ func (x *Config) GetPortalConfig() []*PortalConfig { return nil } -var File_v2ray_com_core_app_reverse_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_reverse_config_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x76, 0x32, 0x72, 0x61, 0x79, +var File_app_reverse_config_proto protoreflect.FileDescriptor + +var file_app_reverse_config_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x22, 0x7e, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x3b, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, + 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, + 0x6f, 0x6d, 0x22, 0x1e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x41, + 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x52, 0x41, 0x49, 0x4e, + 0x10, 0x01, 0x22, 0x38, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 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, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x38, 0x0a, 0x0c, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 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, 0x16, + 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x49, 0x0a, 0x0d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, - 0x65, 0x22, 0x7e, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x3b, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x6e, - 0x64, 0x6f, 0x6d, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, - 0x6d, 0x22, 0x1e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, - 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x10, - 0x01, 0x22, 0x38, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 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, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x38, 0x0a, 0x0c, 0x50, - 0x6f, 0x72, 0x74, 0x61, 0x6c, 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, 0x16, 0x0a, - 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x49, 0x0a, 0x0d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, - 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0d, 0x70, - 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x2e, 0x50, 0x6f, 0x72, 0x74, - 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x44, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x72, - 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x01, 0x5a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, - 0x65, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0d, + 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x2e, 0x50, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x61, + 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x57, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x01, 0x5a, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, + 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_reverse_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_reverse_config_proto_rawDescData = file_v2ray_com_core_app_reverse_config_proto_rawDesc + file_app_reverse_config_proto_rawDescOnce sync.Once + file_app_reverse_config_proto_rawDescData = file_app_reverse_config_proto_rawDesc ) -func file_v2ray_com_core_app_reverse_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_reverse_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_reverse_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_reverse_config_proto_rawDescData) +func file_app_reverse_config_proto_rawDescGZIP() []byte { + file_app_reverse_config_proto_rawDescOnce.Do(func() { + file_app_reverse_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_reverse_config_proto_rawDescData) }) - return file_v2ray_com_core_app_reverse_config_proto_rawDescData + return file_app_reverse_config_proto_rawDescData } -var file_v2ray_com_core_app_reverse_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_app_reverse_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_v2ray_com_core_app_reverse_config_proto_goTypes = []interface{}{ +var file_app_reverse_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_app_reverse_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_app_reverse_config_proto_goTypes = []interface{}{ (Control_State)(0), // 0: v2ray.core.app.reverse.Control.State (*Control)(nil), // 1: v2ray.core.app.reverse.Control (*BridgeConfig)(nil), // 2: v2ray.core.app.reverse.BridgeConfig (*PortalConfig)(nil), // 3: v2ray.core.app.reverse.PortalConfig (*Config)(nil), // 4: v2ray.core.app.reverse.Config } -var file_v2ray_com_core_app_reverse_config_proto_depIdxs = []int32{ +var file_app_reverse_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.app.reverse.Control.state:type_name -> v2ray.core.app.reverse.Control.State 2, // 1: v2ray.core.app.reverse.Config.bridge_config:type_name -> v2ray.core.app.reverse.BridgeConfig 3, // 2: v2ray.core.app.reverse.Config.portal_config:type_name -> v2ray.core.app.reverse.PortalConfig @@ -357,13 +363,13 @@ var file_v2ray_com_core_app_reverse_config_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_reverse_config_proto_init() } -func file_v2ray_com_core_app_reverse_config_proto_init() { - if File_v2ray_com_core_app_reverse_config_proto != nil { +func init() { file_app_reverse_config_proto_init() } +func file_app_reverse_config_proto_init() { + if File_app_reverse_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_reverse_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_reverse_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Control); i { case 0: return &v.state @@ -375,7 +381,7 @@ func file_v2ray_com_core_app_reverse_config_proto_init() { return nil } } - file_v2ray_com_core_app_reverse_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_reverse_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BridgeConfig); i { case 0: return &v.state @@ -387,7 +393,7 @@ func file_v2ray_com_core_app_reverse_config_proto_init() { return nil } } - file_v2ray_com_core_app_reverse_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_reverse_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PortalConfig); i { case 0: return &v.state @@ -399,7 +405,7 @@ func file_v2ray_com_core_app_reverse_config_proto_init() { return nil } } - file_v2ray_com_core_app_reverse_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_reverse_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -416,19 +422,19 @@ func file_v2ray_com_core_app_reverse_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_reverse_config_proto_rawDesc, + RawDescriptor: file_app_reverse_config_proto_rawDesc, NumEnums: 1, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_app_reverse_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_reverse_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_app_reverse_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_app_reverse_config_proto_msgTypes, + GoTypes: file_app_reverse_config_proto_goTypes, + DependencyIndexes: file_app_reverse_config_proto_depIdxs, + EnumInfos: file_app_reverse_config_proto_enumTypes, + MessageInfos: file_app_reverse_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_reverse_config_proto = out.File - file_v2ray_com_core_app_reverse_config_proto_rawDesc = nil - file_v2ray_com_core_app_reverse_config_proto_goTypes = nil - file_v2ray_com_core_app_reverse_config_proto_depIdxs = nil + File_app_reverse_config_proto = out.File + file_app_reverse_config_proto_rawDesc = nil + file_app_reverse_config_proto_goTypes = nil + file_app_reverse_config_proto_depIdxs = nil } diff --git a/app/reverse/config.proto b/app/reverse/config.proto index 9cf649d896..37a79a01c7 100644 --- a/app/reverse/config.proto +++ b/app/reverse/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.reverse; option csharp_namespace = "V2Ray.Core.Proxy.Reverse"; -option go_package = "reverse"; +option go_package = "v2ray.com/core/app/reverse"; option java_package = "com.v2ray.core.proxy.reverse"; option java_multiple_files = true; diff --git a/app/router/config.pb.go b/app/router/config.pb.go index 44bd8eda33..6d430ceb89 100644 --- a/app/router/config.pb.go +++ b/app/router/config.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc (unknown) -// source: v2ray.com/core/app/router/config.proto +// protoc v3.13.0 +// source: app/router/config.proto package router @@ -67,11 +67,11 @@ func (x Domain_Type) String() string { } func (Domain_Type) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_app_router_config_proto_enumTypes[0].Descriptor() + return file_app_router_config_proto_enumTypes[0].Descriptor() } func (Domain_Type) Type() protoreflect.EnumType { - return &file_v2ray_com_core_app_router_config_proto_enumTypes[0] + return &file_app_router_config_proto_enumTypes[0] } func (x Domain_Type) Number() protoreflect.EnumNumber { @@ -80,7 +80,7 @@ func (x Domain_Type) Number() protoreflect.EnumNumber { // Deprecated: Use Domain_Type.Descriptor instead. func (Domain_Type) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{0, 0} + return file_app_router_config_proto_rawDescGZIP(), []int{0, 0} } type Config_DomainStrategy int32 @@ -123,11 +123,11 @@ func (x Config_DomainStrategy) String() string { } func (Config_DomainStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_app_router_config_proto_enumTypes[1].Descriptor() + return file_app_router_config_proto_enumTypes[1].Descriptor() } func (Config_DomainStrategy) Type() protoreflect.EnumType { - return &file_v2ray_com_core_app_router_config_proto_enumTypes[1] + return &file_app_router_config_proto_enumTypes[1] } func (x Config_DomainStrategy) Number() protoreflect.EnumNumber { @@ -136,7 +136,7 @@ func (x Config_DomainStrategy) Number() protoreflect.EnumNumber { // Deprecated: Use Config_DomainStrategy.Descriptor instead. func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{8, 0} + return file_app_router_config_proto_rawDescGZIP(), []int{8, 0} } // Domain for routing decision. @@ -156,7 +156,7 @@ type Domain struct { func (x *Domain) Reset() { *x = Domain{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[0] + mi := &file_app_router_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -169,7 +169,7 @@ func (x *Domain) String() string { func (*Domain) ProtoMessage() {} func (x *Domain) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[0] + mi := &file_app_router_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -182,7 +182,7 @@ func (x *Domain) ProtoReflect() protoreflect.Message { // Deprecated: Use Domain.ProtoReflect.Descriptor instead. func (*Domain) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{0} + return file_app_router_config_proto_rawDescGZIP(), []int{0} } func (x *Domain) GetType() Domain_Type { @@ -221,7 +221,7 @@ type CIDR struct { func (x *CIDR) Reset() { *x = CIDR{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[1] + mi := &file_app_router_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -234,7 +234,7 @@ func (x *CIDR) String() string { func (*CIDR) ProtoMessage() {} func (x *CIDR) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[1] + mi := &file_app_router_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -247,7 +247,7 @@ func (x *CIDR) ProtoReflect() protoreflect.Message { // Deprecated: Use CIDR.ProtoReflect.Descriptor instead. func (*CIDR) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{1} + return file_app_router_config_proto_rawDescGZIP(), []int{1} } func (x *CIDR) GetIp() []byte { @@ -276,7 +276,7 @@ type GeoIP struct { func (x *GeoIP) Reset() { *x = GeoIP{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[2] + mi := &file_app_router_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -289,7 +289,7 @@ func (x *GeoIP) String() string { func (*GeoIP) ProtoMessage() {} func (x *GeoIP) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[2] + mi := &file_app_router_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -302,7 +302,7 @@ func (x *GeoIP) ProtoReflect() protoreflect.Message { // Deprecated: Use GeoIP.ProtoReflect.Descriptor instead. func (*GeoIP) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{2} + return file_app_router_config_proto_rawDescGZIP(), []int{2} } func (x *GeoIP) GetCountryCode() string { @@ -330,7 +330,7 @@ type GeoIPList struct { func (x *GeoIPList) Reset() { *x = GeoIPList{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[3] + mi := &file_app_router_config_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -343,7 +343,7 @@ func (x *GeoIPList) String() string { func (*GeoIPList) ProtoMessage() {} func (x *GeoIPList) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[3] + mi := &file_app_router_config_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -356,7 +356,7 @@ func (x *GeoIPList) ProtoReflect() protoreflect.Message { // Deprecated: Use GeoIPList.ProtoReflect.Descriptor instead. func (*GeoIPList) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{3} + return file_app_router_config_proto_rawDescGZIP(), []int{3} } func (x *GeoIPList) GetEntry() []*GeoIP { @@ -378,7 +378,7 @@ type GeoSite struct { func (x *GeoSite) Reset() { *x = GeoSite{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[4] + mi := &file_app_router_config_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -391,7 +391,7 @@ func (x *GeoSite) String() string { func (*GeoSite) ProtoMessage() {} func (x *GeoSite) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[4] + mi := &file_app_router_config_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -404,7 +404,7 @@ func (x *GeoSite) ProtoReflect() protoreflect.Message { // Deprecated: Use GeoSite.ProtoReflect.Descriptor instead. func (*GeoSite) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{4} + return file_app_router_config_proto_rawDescGZIP(), []int{4} } func (x *GeoSite) GetCountryCode() string { @@ -432,7 +432,7 @@ type GeoSiteList struct { func (x *GeoSiteList) Reset() { *x = GeoSiteList{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[5] + mi := &file_app_router_config_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -445,7 +445,7 @@ func (x *GeoSiteList) String() string { func (*GeoSiteList) ProtoMessage() {} func (x *GeoSiteList) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[5] + mi := &file_app_router_config_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -458,7 +458,7 @@ func (x *GeoSiteList) ProtoReflect() protoreflect.Message { // Deprecated: Use GeoSiteList.ProtoReflect.Descriptor instead. func (*GeoSiteList) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{5} + return file_app_router_config_proto_rawDescGZIP(), []int{5} } func (x *GeoSiteList) GetEntry() []*GeoSite { @@ -518,7 +518,7 @@ type RoutingRule struct { func (x *RoutingRule) Reset() { *x = RoutingRule{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[6] + mi := &file_app_router_config_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -531,7 +531,7 @@ func (x *RoutingRule) String() string { func (*RoutingRule) ProtoMessage() {} func (x *RoutingRule) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[6] + mi := &file_app_router_config_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -544,7 +544,7 @@ func (x *RoutingRule) ProtoReflect() protoreflect.Message { // Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead. func (*RoutingRule) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{6} + return file_app_router_config_proto_rawDescGZIP(), []int{6} } func (m *RoutingRule) GetTargetTag() isRoutingRule_TargetTag { @@ -700,7 +700,7 @@ type BalancingRule struct { func (x *BalancingRule) Reset() { *x = BalancingRule{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[7] + mi := &file_app_router_config_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -713,7 +713,7 @@ func (x *BalancingRule) String() string { func (*BalancingRule) ProtoMessage() {} func (x *BalancingRule) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[7] + mi := &file_app_router_config_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -726,7 +726,7 @@ func (x *BalancingRule) ProtoReflect() protoreflect.Message { // Deprecated: Use BalancingRule.ProtoReflect.Descriptor instead. func (*BalancingRule) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{7} + return file_app_router_config_proto_rawDescGZIP(), []int{7} } func (x *BalancingRule) GetTag() string { @@ -756,7 +756,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[8] + mi := &file_app_router_config_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -769,7 +769,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[8] + mi := &file_app_router_config_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -782,7 +782,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{8} + return file_app_router_config_proto_rawDescGZIP(), []int{8} } func (x *Config) GetDomainStrategy() Config_DomainStrategy { @@ -821,7 +821,7 @@ type Domain_Attribute struct { func (x *Domain_Attribute) Reset() { *x = Domain_Attribute{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[9] + mi := &file_app_router_config_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -834,7 +834,7 @@ func (x *Domain_Attribute) String() string { func (*Domain_Attribute) ProtoMessage() {} func (x *Domain_Attribute) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_router_config_proto_msgTypes[9] + mi := &file_app_router_config_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -847,7 +847,7 @@ func (x *Domain_Attribute) ProtoReflect() protoreflect.Message { // Deprecated: Use Domain_Attribute.ProtoReflect.Descriptor instead. func (*Domain_Attribute) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_router_config_proto_rawDescGZIP(), []int{0, 0} + return file_app_router_config_proto_rawDescGZIP(), []int{0, 0} } func (x *Domain_Attribute) GetKey() string { @@ -894,160 +894,159 @@ func (*Domain_Attribute_BoolValue) isDomain_Attribute_TypedValue() {} func (*Domain_Attribute_IntValue) isDomain_Attribute_TypedValue() {} -var File_v2ray_com_core_app_router_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_router_config_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x1a, - 0x24, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, - 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, - 0x02, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, - 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x1a, 0x6c, - 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, - 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, - 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0d, 0x0a, - 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x32, 0x0a, 0x04, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x52, 0x65, 0x67, 0x65, 0x78, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x03, - 0x22, 0x2e, 0x0a, 0x04, 0x43, 0x49, 0x44, 0x52, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x22, 0x5b, 0x0a, 0x05, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2f, 0x0a, 0x04, - 0x63, 0x69, 0x64, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, +var File_app_router_config_proto protoreflect.FileDescriptor + +var file_app_router_config_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x1a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xbf, 0x02, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x36, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x22, 0x3f, 0x0a, - 0x09, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x63, - 0x0a, 0x07, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x06, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, + 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x1a, 0x6c, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x32, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x6c, 0x61, 0x69, 0x6e, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x65, 0x67, 0x65, 0x78, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x75, 0x6c, + 0x6c, 0x10, 0x03, 0x22, 0x2e, 0x0a, 0x04, 0x43, 0x49, 0x44, 0x52, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x22, 0x5b, 0x0a, 0x05, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x12, 0x21, 0x0a, 0x0c, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x2f, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, + 0x22, 0x3f, 0x0a, 0x09, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x32, 0x0a, + 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x64, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x22, 0x43, 0x0a, 0x0b, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x34, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, - 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, - 0x65, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0xca, 0x06, 0x0a, 0x0b, 0x52, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x25, 0x0a, 0x0d, - 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, - 0x54, 0x61, 0x67, 0x12, 0x35, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x33, 0x0a, 0x04, 0x63, 0x69, - 0x64, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x2e, 0x43, 0x49, 0x44, 0x52, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, - 0x32, 0x0a, 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, 0x05, 0x67, 0x65, - 0x6f, 0x69, 0x70, 0x12, 0x43, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, - 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x08, 0x70, 0x6f, - 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0x40, 0x0a, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x69, 0x64, 0x72, 0x12, - 0x3f, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, - 0x6f, 0x49, 0x50, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6f, 0x69, 0x70, - 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, + 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x22, 0x63, 0x0a, 0x07, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x35, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x06, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x43, 0x0a, 0x0b, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, + 0x53, 0x69, 0x74, 0x65, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0xca, 0x06, 0x0a, 0x0b, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x74, + 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, + 0x25, 0x0a, 0x0d, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x12, 0x35, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x44, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x33, 0x0a, + 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x63, 0x69, + 0x64, 0x72, 0x12, 0x32, 0x0a, 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, + 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x12, 0x43, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, - 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x5f, 0x74, 0x61, 0x67, 0x22, 0x4e, 0x0a, 0x0d, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, - 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xad, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x55, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x36, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, - 0x4b, 0x0a, 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, - 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x47, 0x0a, 0x0e, - 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x08, - 0x0a, 0x04, 0x41, 0x73, 0x49, 0x73, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x49, - 0x70, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x70, 0x49, 0x66, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x70, 0x4f, 0x6e, 0x44, 0x65, 0x6d, - 0x61, 0x6e, 0x64, 0x10, 0x03, 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, + 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x08, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x12, 0x40, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x49, + 0x44, 0x52, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x69, + 0x64, 0x72, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6f, + 0x69, 0x70, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, + 0x6f, 0x69, 0x70, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1f, 0x0a, + 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x61, 0x67, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x22, 0x4e, 0x0a, 0x0d, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x6f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xad, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x36, 0x0a, 0x04, 0x72, 0x75, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, + 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x50, 0x01, 0x5a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0xaa, 0x02, 0x15, 0x56, - 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x0d, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x22, + 0x47, 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x73, 0x49, 0x73, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, + 0x73, 0x65, 0x49, 0x70, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x70, 0x49, 0x66, 0x4e, 0x6f, + 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x70, 0x4f, 0x6e, + 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x10, 0x03, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, + 0x41, 0x70, 0x70, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_v2ray_com_core_app_router_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_router_config_proto_rawDescData = file_v2ray_com_core_app_router_config_proto_rawDesc + file_app_router_config_proto_rawDescOnce sync.Once + file_app_router_config_proto_rawDescData = file_app_router_config_proto_rawDesc ) -func file_v2ray_com_core_app_router_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_router_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_router_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_router_config_proto_rawDescData) +func file_app_router_config_proto_rawDescGZIP() []byte { + file_app_router_config_proto_rawDescOnce.Do(func() { + file_app_router_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_router_config_proto_rawDescData) }) - return file_v2ray_com_core_app_router_config_proto_rawDescData + return file_app_router_config_proto_rawDescData } -var file_v2ray_com_core_app_router_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_v2ray_com_core_app_router_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_v2ray_com_core_app_router_config_proto_goTypes = []interface{}{ +var file_app_router_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_app_router_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_app_router_config_proto_goTypes = []interface{}{ (Domain_Type)(0), // 0: v2ray.core.app.router.Domain.Type (Config_DomainStrategy)(0), // 1: v2ray.core.app.router.Config.DomainStrategy (*Domain)(nil), // 2: v2ray.core.app.router.Domain @@ -1065,7 +1064,7 @@ var file_v2ray_com_core_app_router_config_proto_goTypes = []interface{}{ (*net.NetworkList)(nil), // 14: v2ray.core.common.net.NetworkList (net.Network)(0), // 15: v2ray.core.common.net.Network } -var file_v2ray_com_core_app_router_config_proto_depIdxs = []int32{ +var file_app_router_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.app.router.Domain.type:type_name -> v2ray.core.app.router.Domain.Type 11, // 1: v2ray.core.app.router.Domain.attribute:type_name -> v2ray.core.app.router.Domain.Attribute 3, // 2: v2ray.core.app.router.GeoIP.cidr:type_name -> v2ray.core.app.router.CIDR @@ -1092,13 +1091,13 @@ var file_v2ray_com_core_app_router_config_proto_depIdxs = []int32{ 0, // [0:19] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_router_config_proto_init() } -func file_v2ray_com_core_app_router_config_proto_init() { - if File_v2ray_com_core_app_router_config_proto != nil { +func init() { file_app_router_config_proto_init() } +func file_app_router_config_proto_init() { + if File_app_router_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_router_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Domain); i { case 0: return &v.state @@ -1110,7 +1109,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CIDR); i { case 0: return &v.state @@ -1122,7 +1121,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GeoIP); i { case 0: return &v.state @@ -1134,7 +1133,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GeoIPList); i { case 0: return &v.state @@ -1146,7 +1145,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GeoSite); i { case 0: return &v.state @@ -1158,7 +1157,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GeoSiteList); i { case 0: return &v.state @@ -1170,7 +1169,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoutingRule); i { case 0: return &v.state @@ -1182,7 +1181,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BalancingRule); i { case 0: return &v.state @@ -1194,7 +1193,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -1206,7 +1205,7 @@ func file_v2ray_com_core_app_router_config_proto_init() { return nil } } - file_v2ray_com_core_app_router_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Domain_Attribute); i { case 0: return &v.state @@ -1219,11 +1218,11 @@ func file_v2ray_com_core_app_router_config_proto_init() { } } } - file_v2ray_com_core_app_router_config_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_app_router_config_proto_msgTypes[6].OneofWrappers = []interface{}{ (*RoutingRule_Tag)(nil), (*RoutingRule_BalancingTag)(nil), } - file_v2ray_com_core_app_router_config_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_app_router_config_proto_msgTypes[9].OneofWrappers = []interface{}{ (*Domain_Attribute_BoolValue)(nil), (*Domain_Attribute_IntValue)(nil), } @@ -1231,19 +1230,19 @@ func file_v2ray_com_core_app_router_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_router_config_proto_rawDesc, + RawDescriptor: file_app_router_config_proto_rawDesc, NumEnums: 2, NumMessages: 10, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_app_router_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_router_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_app_router_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_app_router_config_proto_msgTypes, + GoTypes: file_app_router_config_proto_goTypes, + DependencyIndexes: file_app_router_config_proto_depIdxs, + EnumInfos: file_app_router_config_proto_enumTypes, + MessageInfos: file_app_router_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_router_config_proto = out.File - file_v2ray_com_core_app_router_config_proto_rawDesc = nil - file_v2ray_com_core_app_router_config_proto_goTypes = nil - file_v2ray_com_core_app_router_config_proto_depIdxs = nil + File_app_router_config_proto = out.File + file_app_router_config_proto_rawDesc = nil + file_app_router_config_proto_goTypes = nil + file_app_router_config_proto_depIdxs = nil } diff --git a/app/router/config.proto b/app/router/config.proto index 1c4ff98242..8c9bf05b7f 100644 --- a/app/router/config.proto +++ b/app/router/config.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core.app.router; option csharp_namespace = "V2Ray.Core.App.Router"; -option go_package = "router"; +option go_package = "v2ray.com/core/app/router"; option java_package = "com.v2ray.core.app.router"; option java_multiple_files = true; -import "v2ray.com/core/common/net/port.proto"; -import "v2ray.com/core/common/net/network.proto"; +import "common/net/port.proto"; +import "common/net/network.proto"; // Domain for routing decision. message Domain { diff --git a/app/stats/command/command.go b/app/stats/command/command.go index 68bc8e462b..0423e5330b 100644 --- a/app/stats/command/command.go +++ b/app/stats/command/command.go @@ -104,6 +104,8 @@ func (s *statsServer) GetSysStats(ctx context.Context, request *SysStatsRequest) return response, nil } +func (s *statsServer) mustEmbedUnimplementedStatsServiceServer() {} + type service struct { statsManager feature_stats.Manager } diff --git a/app/stats/command/command.pb.go b/app/stats/command/command.pb.go index cfd66f62ea..7124df06c1 100644 --- a/app/stats/command/command.pb.go +++ b/app/stats/command/command.pb.go @@ -1,11 +1,13 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/stats/command/command.proto + package command import ( - context "context" proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -37,7 +39,7 @@ type GetStatsRequest struct { func (x *GetStatsRequest) Reset() { *x = GetStatsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[0] + mi := &file_app_stats_command_command_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +52,7 @@ func (x *GetStatsRequest) String() string { func (*GetStatsRequest) ProtoMessage() {} func (x *GetStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[0] + mi := &file_app_stats_command_command_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +65,7 @@ func (x *GetStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStatsRequest.ProtoReflect.Descriptor instead. func (*GetStatsRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP(), []int{0} + return file_app_stats_command_command_proto_rawDescGZIP(), []int{0} } func (x *GetStatsRequest) GetName() string { @@ -92,7 +94,7 @@ type Stat struct { func (x *Stat) Reset() { *x = Stat{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[1] + mi := &file_app_stats_command_command_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -105,7 +107,7 @@ func (x *Stat) String() string { func (*Stat) ProtoMessage() {} func (x *Stat) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[1] + mi := &file_app_stats_command_command_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -118,7 +120,7 @@ func (x *Stat) ProtoReflect() protoreflect.Message { // Deprecated: Use Stat.ProtoReflect.Descriptor instead. func (*Stat) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP(), []int{1} + return file_app_stats_command_command_proto_rawDescGZIP(), []int{1} } func (x *Stat) GetName() string { @@ -146,7 +148,7 @@ type GetStatsResponse struct { func (x *GetStatsResponse) Reset() { *x = GetStatsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[2] + mi := &file_app_stats_command_command_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -159,7 +161,7 @@ func (x *GetStatsResponse) String() string { func (*GetStatsResponse) ProtoMessage() {} func (x *GetStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[2] + mi := &file_app_stats_command_command_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -172,7 +174,7 @@ func (x *GetStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStatsResponse.ProtoReflect.Descriptor instead. func (*GetStatsResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP(), []int{2} + return file_app_stats_command_command_proto_rawDescGZIP(), []int{2} } func (x *GetStatsResponse) GetStat() *Stat { @@ -194,7 +196,7 @@ type QueryStatsRequest struct { func (x *QueryStatsRequest) Reset() { *x = QueryStatsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[3] + mi := &file_app_stats_command_command_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -207,7 +209,7 @@ func (x *QueryStatsRequest) String() string { func (*QueryStatsRequest) ProtoMessage() {} func (x *QueryStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[3] + mi := &file_app_stats_command_command_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -220,7 +222,7 @@ func (x *QueryStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryStatsRequest.ProtoReflect.Descriptor instead. func (*QueryStatsRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP(), []int{3} + return file_app_stats_command_command_proto_rawDescGZIP(), []int{3} } func (x *QueryStatsRequest) GetPattern() string { @@ -248,7 +250,7 @@ type QueryStatsResponse struct { func (x *QueryStatsResponse) Reset() { *x = QueryStatsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[4] + mi := &file_app_stats_command_command_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -261,7 +263,7 @@ func (x *QueryStatsResponse) String() string { func (*QueryStatsResponse) ProtoMessage() {} func (x *QueryStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[4] + mi := &file_app_stats_command_command_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -274,7 +276,7 @@ func (x *QueryStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryStatsResponse.ProtoReflect.Descriptor instead. func (*QueryStatsResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP(), []int{4} + return file_app_stats_command_command_proto_rawDescGZIP(), []int{4} } func (x *QueryStatsResponse) GetStat() []*Stat { @@ -293,7 +295,7 @@ type SysStatsRequest struct { func (x *SysStatsRequest) Reset() { *x = SysStatsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[5] + mi := &file_app_stats_command_command_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -306,7 +308,7 @@ func (x *SysStatsRequest) String() string { func (*SysStatsRequest) ProtoMessage() {} func (x *SysStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[5] + mi := &file_app_stats_command_command_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -319,7 +321,7 @@ func (x *SysStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SysStatsRequest.ProtoReflect.Descriptor instead. func (*SysStatsRequest) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP(), []int{5} + return file_app_stats_command_command_proto_rawDescGZIP(), []int{5} } type SysStatsResponse struct { @@ -342,7 +344,7 @@ type SysStatsResponse struct { func (x *SysStatsResponse) Reset() { *x = SysStatsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[6] + mi := &file_app_stats_command_command_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -355,7 +357,7 @@ func (x *SysStatsResponse) String() string { func (*SysStatsResponse) ProtoMessage() {} func (x *SysStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[6] + mi := &file_app_stats_command_command_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -368,7 +370,7 @@ func (x *SysStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SysStatsResponse.ProtoReflect.Descriptor instead. func (*SysStatsResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP(), []int{6} + return file_app_stats_command_command_proto_rawDescGZIP(), []int{6} } func (x *SysStatsResponse) GetNumGoroutine() uint32 { @@ -450,7 +452,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[7] + mi := &file_app_stats_command_command_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -463,7 +465,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_command_command_proto_msgTypes[7] + mi := &file_app_stats_command_command_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -476,102 +478,102 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP(), []int{7} -} - -var File_v2ray_com_core_app_stats_command_command_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_stats_command_command_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x3b, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x22, 0x30, 0x0a, 0x04, 0x53, - 0x74, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4a, 0x0a, - 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x52, 0x04, 0x73, 0x74, 0x61, 0x74, 0x22, 0x43, 0x0a, 0x11, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x22, 0x4c, - 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x74, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x04, 0x73, 0x74, 0x61, 0x74, 0x22, 0x11, 0x0a, 0x0f, - 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0xa2, 0x02, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x4e, 0x75, 0x6d, 0x47, 0x6f, 0x72, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x4e, 0x75, 0x6d, 0x47, - 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x75, 0x6d, 0x47, - 0x43, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x4e, 0x75, 0x6d, 0x47, 0x43, 0x12, 0x14, - 0x0a, 0x05, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x41, - 0x6c, 0x6c, 0x6f, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6c, 0x6c, - 0x6f, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, - 0x6c, 0x6c, 0x6f, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x79, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x03, 0x53, 0x79, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x4d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x46, 0x72, 0x65, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x46, 0x72, 0x65, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x4c, 0x69, 0x76, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x4c, 0x69, 0x76, - 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x55, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0xde, - 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x76, 0x32, + return file_app_stats_command_command_proto_rawDescGZIP(), []int{7} +} + +var File_app_stats_command_command_proto protoreflect.FileDescriptor + +var file_app_stats_command_command_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x1c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, + 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, + 0x3b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x22, 0x30, 0x0a, 0x04, + 0x53, 0x74, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4a, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, + 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x52, 0x04, 0x73, 0x74, 0x61, 0x74, 0x22, 0x43, 0x0a, 0x11, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x22, + 0x4c, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x04, 0x73, 0x74, 0x61, 0x74, 0x22, 0x11, 0x0a, + 0x0f, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x4e, 0x75, 0x6d, 0x47, 0x6f, 0x72, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x4e, 0x75, 0x6d, + 0x47, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x75, 0x6d, + 0x47, 0x43, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x4e, 0x75, 0x6d, 0x47, 0x43, 0x12, + 0x14, 0x0a, 0x05, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x79, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x03, 0x53, 0x79, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x61, 0x6c, 0x6c, 0x6f, + 0x63, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x4d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x46, 0x72, 0x65, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x46, 0x72, 0x65, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x4c, 0x69, 0x76, 0x65, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x4c, 0x69, + 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0c, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x55, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, + 0xde, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x76, 0x32, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x6e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2d, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53, + 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53, 0x79, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53, 0x79, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0x4c, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, - 0x1c, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x65, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x20, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x1c, 0x56, 0x32, 0x52, 0x61, 0x79, + 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_stats_command_command_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_stats_command_command_proto_rawDescData = file_v2ray_com_core_app_stats_command_command_proto_rawDesc + file_app_stats_command_command_proto_rawDescOnce sync.Once + file_app_stats_command_command_proto_rawDescData = file_app_stats_command_command_proto_rawDesc ) -func file_v2ray_com_core_app_stats_command_command_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_stats_command_command_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_stats_command_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_stats_command_command_proto_rawDescData) +func file_app_stats_command_command_proto_rawDescGZIP() []byte { + file_app_stats_command_command_proto_rawDescOnce.Do(func() { + file_app_stats_command_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_stats_command_command_proto_rawDescData) }) - return file_v2ray_com_core_app_stats_command_command_proto_rawDescData + return file_app_stats_command_command_proto_rawDescData } -var file_v2ray_com_core_app_stats_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_v2ray_com_core_app_stats_command_command_proto_goTypes = []interface{}{ +var file_app_stats_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_app_stats_command_command_proto_goTypes = []interface{}{ (*GetStatsRequest)(nil), // 0: v2ray.core.app.stats.command.GetStatsRequest (*Stat)(nil), // 1: v2ray.core.app.stats.command.Stat (*GetStatsResponse)(nil), // 2: v2ray.core.app.stats.command.GetStatsResponse @@ -581,7 +583,7 @@ var file_v2ray_com_core_app_stats_command_command_proto_goTypes = []interface{}{ (*SysStatsResponse)(nil), // 6: v2ray.core.app.stats.command.SysStatsResponse (*Config)(nil), // 7: v2ray.core.app.stats.command.Config } -var file_v2ray_com_core_app_stats_command_command_proto_depIdxs = []int32{ +var file_app_stats_command_command_proto_depIdxs = []int32{ 1, // 0: v2ray.core.app.stats.command.GetStatsResponse.stat:type_name -> v2ray.core.app.stats.command.Stat 1, // 1: v2ray.core.app.stats.command.QueryStatsResponse.stat:type_name -> v2ray.core.app.stats.command.Stat 0, // 2: v2ray.core.app.stats.command.StatsService.GetStats:input_type -> v2ray.core.app.stats.command.GetStatsRequest @@ -597,13 +599,13 @@ var file_v2ray_com_core_app_stats_command_command_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_stats_command_command_proto_init() } -func file_v2ray_com_core_app_stats_command_command_proto_init() { - if File_v2ray_com_core_app_stats_command_command_proto != nil { +func init() { file_app_stats_command_command_proto_init() } +func file_app_stats_command_command_proto_init() { + if File_app_stats_command_command_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_stats_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetStatsRequest); i { case 0: return &v.state @@ -615,7 +617,7 @@ func file_v2ray_com_core_app_stats_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_stats_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Stat); i { case 0: return &v.state @@ -627,7 +629,7 @@ func file_v2ray_com_core_app_stats_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_stats_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetStatsResponse); i { case 0: return &v.state @@ -639,7 +641,7 @@ func file_v2ray_com_core_app_stats_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_stats_command_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_command_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryStatsRequest); i { case 0: return &v.state @@ -651,7 +653,7 @@ func file_v2ray_com_core_app_stats_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_stats_command_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_command_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryStatsResponse); i { case 0: return &v.state @@ -663,7 +665,7 @@ func file_v2ray_com_core_app_stats_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_stats_command_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_command_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SysStatsRequest); i { case 0: return &v.state @@ -675,7 +677,7 @@ func file_v2ray_com_core_app_stats_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_stats_command_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_command_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SysStatsResponse); i { case 0: return &v.state @@ -687,7 +689,7 @@ func file_v2ray_com_core_app_stats_command_command_proto_init() { return nil } } - file_v2ray_com_core_app_stats_command_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_command_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -704,170 +706,18 @@ func file_v2ray_com_core_app_stats_command_command_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_stats_command_command_proto_rawDesc, + RawDescriptor: file_app_stats_command_command_proto_rawDesc, NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_v2ray_com_core_app_stats_command_command_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_stats_command_command_proto_depIdxs, - MessageInfos: file_v2ray_com_core_app_stats_command_command_proto_msgTypes, + GoTypes: file_app_stats_command_command_proto_goTypes, + DependencyIndexes: file_app_stats_command_command_proto_depIdxs, + MessageInfos: file_app_stats_command_command_proto_msgTypes, }.Build() - File_v2ray_com_core_app_stats_command_command_proto = out.File - file_v2ray_com_core_app_stats_command_command_proto_rawDesc = nil - file_v2ray_com_core_app_stats_command_command_proto_goTypes = nil - file_v2ray_com_core_app_stats_command_command_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// StatsServiceClient is the client API for StatsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type StatsServiceClient interface { - GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) - QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) - GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error) -} - -type statsServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient { - return &statsServiceClient{cc} -} - -func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) { - out := new(GetStatsResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetStats", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) { - out := new(QueryStatsResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/QueryStats", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error) { - out := new(SysStatsResponse) - err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetSysStats", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StatsServiceServer is the server API for StatsService service. -type StatsServiceServer interface { - GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) - QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) - GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error) -} - -// UnimplementedStatsServiceServer can be embedded to have forward compatible implementations. -type UnimplementedStatsServiceServer struct { -} - -func (*UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") -} -func (*UnimplementedStatsServiceServer) QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented") -} -func (*UnimplementedStatsServiceServer) GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSysStats not implemented") -} - -func RegisterStatsServiceServer(s *grpc.Server, srv StatsServiceServer) { - s.RegisterService(&_StatsService_serviceDesc, srv) -} - -func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetStatsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatsServiceServer).GetStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.stats.command.StatsService/GetStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatsServiceServer).GetStats(ctx, req.(*GetStatsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatsService_QueryStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryStatsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatsServiceServer).QueryStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.stats.command.StatsService/QueryStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatsServiceServer).QueryStats(ctx, req.(*QueryStatsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatsService_GetSysStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SysStatsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatsServiceServer).GetSysStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v2ray.core.app.stats.command.StatsService/GetSysStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatsServiceServer).GetSysStats(ctx, req.(*SysStatsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _StatsService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v2ray.core.app.stats.command.StatsService", - HandlerType: (*StatsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetStats", - Handler: _StatsService_GetStats_Handler, - }, - { - MethodName: "QueryStats", - Handler: _StatsService_QueryStats_Handler, - }, - { - MethodName: "GetSysStats", - Handler: _StatsService_GetSysStats_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "v2ray.com/core/app/stats/command/command.proto", + File_app_stats_command_command_proto = out.File + file_app_stats_command_command_proto_rawDesc = nil + file_app_stats_command_command_proto_goTypes = nil + file_app_stats_command_command_proto_depIdxs = nil } diff --git a/app/stats/command/command.proto b/app/stats/command/command.proto index 2bd9cdecac..83536dff66 100644 --- a/app/stats/command/command.proto +++ b/app/stats/command/command.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.stats.command; option csharp_namespace = "V2Ray.Core.App.Stats.Command"; -option go_package = "command"; +option go_package = "v2ray.com/core/app/stats/command"; option java_package = "com.v2ray.core.app.stats.command"; option java_multiple_files = true; diff --git a/app/stats/command/command_grpc.pb.go b/app/stats/command/command_grpc.pb.go new file mode 100644 index 0000000000..dac6466cad --- /dev/null +++ b/app/stats/command/command_grpc.pb.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package command + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// StatsServiceClient is the client API for StatsService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type StatsServiceClient interface { + GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) + QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) + GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error) +} + +type statsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient { + return &statsServiceClient{cc} +} + +func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) { + out := new(GetStatsResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) { + out := new(QueryStatsResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/QueryStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error) { + out := new(SysStatsResponse) + err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetSysStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StatsServiceServer is the server API for StatsService service. +// All implementations must embed UnimplementedStatsServiceServer +// for forward compatibility +type StatsServiceServer interface { + GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) + QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) + GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error) + mustEmbedUnimplementedStatsServiceServer() +} + +// UnimplementedStatsServiceServer must be embedded to have forward compatible implementations. +type UnimplementedStatsServiceServer struct { +} + +func (*UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") +} +func (*UnimplementedStatsServiceServer) QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented") +} +func (*UnimplementedStatsServiceServer) GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSysStats not implemented") +} +func (*UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {} + +func RegisterStatsServiceServer(s *grpc.Server, srv StatsServiceServer) { + s.RegisterService(&_StatsService_serviceDesc, srv) +} + +func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatsServiceServer).GetStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.stats.command.StatsService/GetStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatsServiceServer).GetStats(ctx, req.(*GetStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatsService_QueryStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatsServiceServer).QueryStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.stats.command.StatsService/QueryStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatsServiceServer).QueryStats(ctx, req.(*QueryStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatsService_GetSysStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SysStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatsServiceServer).GetSysStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v2ray.core.app.stats.command.StatsService/GetSysStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatsServiceServer).GetSysStats(ctx, req.(*SysStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _StatsService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v2ray.core.app.stats.command.StatsService", + HandlerType: (*StatsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetStats", + Handler: _StatsService_GetStats_Handler, + }, + { + MethodName: "QueryStats", + Handler: _StatsService_QueryStats_Handler, + }, + { + MethodName: "GetSysStats", + Handler: _StatsService_GetSysStats_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "app/stats/command/command.proto", +} diff --git a/app/stats/config.pb.go b/app/stats/config.pb.go index 628de21bc1..f430b64105 100644 --- a/app/stats/config.pb.go +++ b/app/stats/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: app/stats/config.proto + package stats import ( @@ -28,7 +34,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_app_stats_config_proto_msgTypes[0] + mi := &file_app_stats_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -41,7 +47,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_app_stats_config_proto_msgTypes[0] + mi := &file_app_stats_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,40 +60,40 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_app_stats_config_proto_rawDescGZIP(), []int{0} + return file_app_stats_config_proto_rawDescGZIP(), []int{0} } -var File_v2ray_com_core_app_stats_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_app_stats_config_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x08, 0x0a, - 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x3a, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x50, 0x01, 0x5a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0xaa, 0x02, 0x14, 0x56, - 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_app_stats_config_proto protoreflect.FileDescriptor + +var file_app_stats_config_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x08, + 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x50, 0x01, 0x5a, 0x18, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, + 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_app_stats_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_app_stats_config_proto_rawDescData = file_v2ray_com_core_app_stats_config_proto_rawDesc + file_app_stats_config_proto_rawDescOnce sync.Once + file_app_stats_config_proto_rawDescData = file_app_stats_config_proto_rawDesc ) -func file_v2ray_com_core_app_stats_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_app_stats_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_app_stats_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_stats_config_proto_rawDescData) +func file_app_stats_config_proto_rawDescGZIP() []byte { + file_app_stats_config_proto_rawDescOnce.Do(func() { + file_app_stats_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_stats_config_proto_rawDescData) }) - return file_v2ray_com_core_app_stats_config_proto_rawDescData + return file_app_stats_config_proto_rawDescData } -var file_v2ray_com_core_app_stats_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_app_stats_config_proto_goTypes = []interface{}{ +var file_app_stats_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_app_stats_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.app.stats.Config } -var file_v2ray_com_core_app_stats_config_proto_depIdxs = []int32{ +var file_app_stats_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -95,13 +101,13 @@ var file_v2ray_com_core_app_stats_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_app_stats_config_proto_init() } -func file_v2ray_com_core_app_stats_config_proto_init() { - if File_v2ray_com_core_app_stats_config_proto != nil { +func init() { file_app_stats_config_proto_init() } +func file_app_stats_config_proto_init() { + if File_app_stats_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_app_stats_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_stats_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -118,18 +124,18 @@ func file_v2ray_com_core_app_stats_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_app_stats_config_proto_rawDesc, + RawDescriptor: file_app_stats_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_app_stats_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_app_stats_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_app_stats_config_proto_msgTypes, + GoTypes: file_app_stats_config_proto_goTypes, + DependencyIndexes: file_app_stats_config_proto_depIdxs, + MessageInfos: file_app_stats_config_proto_msgTypes, }.Build() - File_v2ray_com_core_app_stats_config_proto = out.File - file_v2ray_com_core_app_stats_config_proto_rawDesc = nil - file_v2ray_com_core_app_stats_config_proto_goTypes = nil - file_v2ray_com_core_app_stats_config_proto_depIdxs = nil + File_app_stats_config_proto = out.File + file_app_stats_config_proto_rawDesc = nil + file_app_stats_config_proto_goTypes = nil + file_app_stats_config_proto_depIdxs = nil } diff --git a/app/stats/config.proto b/app/stats/config.proto index 9407fd391b..bcbf847fd3 100644 --- a/app/stats/config.proto +++ b/app/stats/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.stats; option csharp_namespace = "V2Ray.Core.App.Stats"; -option go_package = "stats"; +option go_package = "v2ray.com/core/app/stats"; option java_package = "com.v2ray.core.app.stats"; option java_multiple_files = true; diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e232c57d3e..8fb288735b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,7 +55,6 @@ steps: displayName: 'Install Bazel' - script: | cd ./src/v2ray.com/core - ./release/updatedat.sh $HOME/bin/bazel build --action_env=GOPATH=$GOPATH --action_env=PATH=$PATH --action_env=GPG_PASS=${SIGN_KEY_PASS} --action_env=SPWD=$PWD --action_env=GOCACHE=$(go env GOCACHE) --spawn_strategy local //release:all workingDirectory: '$(GOPATH)' displayName: 'Build Binaries' diff --git a/common/common.go b/common/common.go index b67f187095..be06b3a390 100644 --- a/common/common.go +++ b/common/common.go @@ -2,7 +2,16 @@ // See each sub-package for detail. package common -import "v2ray.com/core/common/errors" +import ( + "fmt" + "go/build" + "io/ioutil" + "os" + "path/filepath" + "strings" + + "v2ray.com/core/common/errors" +) //go:generate errorgen @@ -28,3 +37,114 @@ func Must2(v interface{}, err error) interface{} { func Error2(v interface{}, err error) error { return err } + +// envFile returns the name of the Go environment configuration file. +// Copy from https://github.com/golang/go/blob/c4f2a9788a7be04daf931ac54382fbe2cb754938/src/cmd/go/internal/cfg/cfg.go#L150-L166 +func envFile() (string, error) { + if file := os.Getenv("GOENV"); file != "" { + if file == "off" { + return "", fmt.Errorf("GOENV=off") + } + return file, nil + } + dir, err := os.UserConfigDir() + if err != nil { + return "", err + } + if dir == "" { + return "", fmt.Errorf("missing user-config dir") + } + return filepath.Join(dir, "go", "env"), nil +} + +// GetRuntimeEnv returns the value of runtime environment variable, +// that is set by running following command: `go env -w key=value`. +func GetRuntimeEnv(key string) (string, error) { + file, err := envFile() + if err != nil { + return "", err + } + if file == "" { + return "", fmt.Errorf("missing runtime env file") + } + var data []byte + var runtimeEnv string + data, readErr := ioutil.ReadFile(file) + if readErr != nil { + return "", readErr + } + envStrings := strings.Split(string(data), "\n") + for _, envItem := range envStrings { + envItem = strings.TrimSuffix(envItem, "\r") + envKeyValue := strings.Split(envItem, "=") + if strings.EqualFold(strings.TrimSpace(envKeyValue[0]), key) { + runtimeEnv = strings.TrimSpace(envKeyValue[1]) + } + } + return runtimeEnv, nil +} + +// GetGOBIN returns GOBIN environment variable as a string. It will NOT be empty. +func GetGOBIN() string { + // The one set by user explicitly by `export GOBIN=/path` or `env GOBIN=/path command` + GOBIN := os.Getenv("GOBIN") + if GOBIN == "" { + var err error + // The one set by user by running `go env -w GOBIN=/path` + GOBIN, err = GetRuntimeEnv("GOBIN") + if err != nil { + // The default one that Golang uses + return filepath.Join(build.Default.GOPATH, "bin") + } + if GOBIN == "" { + return filepath.Join(build.Default.GOPATH, "bin") + } + return GOBIN + } + return GOBIN +} + +// GetGOPATH returns GOPATH environment variable as a string. It will NOT be empty. +func GetGOPATH() string { + // The one set by user explicitly by `export GOPATH=/path` or `env GOPATH=/path command` + GOPATH := os.Getenv("GOPATH") + if GOPATH == "" { + var err error + // The one set by user by running `go env -w GOPATH=/path` + GOPATH, err = GetRuntimeEnv("GOPATH") + if err != nil { + // The default one that Golang uses + return build.Default.GOPATH + } + if GOPATH == "" { + return build.Default.GOPATH + } + return GOPATH + } + return GOPATH +} + +// GetModuleName returns the value of module in `go.mod` file. +func GetModuleName(path string) (string, error) { + gomodPath := filepath.Join(path, "go.mod") + gomodBytes, err := ioutil.ReadFile(gomodPath) + if err != nil { + return "", err + } + gomodContent := string(gomodBytes) + moduleIdx := strings.Index(gomodContent, "module") + 6 + newLineIdx := strings.Index(gomodContent, "\n") + + var moduleName string + if moduleIdx >= 0 { + if newLineIdx >= 0 { + moduleName = strings.TrimSpace(gomodContent[moduleIdx:newLineIdx]) + moduleName = strings.TrimSuffix(moduleName, "\r") + } else { + moduleName = strings.TrimSpace(gomodContent[moduleIdx:]) + } + } else { + return "", fmt.Errorf("can not get the value of `module` in path `%s`", gomodPath) + } + return moduleName, nil +} diff --git a/common/log/log.pb.go b/common/log/log.pb.go index 0d6daa1b95..553aece12a 100644 --- a/common/log/log.pb.go +++ b/common/log/log.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/log/log.proto + package log import ( @@ -58,11 +64,11 @@ func (x Severity) String() string { } func (Severity) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_common_log_log_proto_enumTypes[0].Descriptor() + return file_common_log_log_proto_enumTypes[0].Descriptor() } func (Severity) Type() protoreflect.EnumType { - return &file_v2ray_com_core_common_log_log_proto_enumTypes[0] + return &file_common_log_log_proto_enumTypes[0] } func (x Severity) Number() protoreflect.EnumNumber { @@ -71,44 +77,44 @@ func (x Severity) Number() protoreflect.EnumNumber { // Deprecated: Use Severity.Descriptor instead. func (Severity) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_common_log_log_proto_rawDescGZIP(), []int{0} + return file_common_log_log_proto_rawDescGZIP(), []int{0} } -var File_v2ray_com_core_common_log_log_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_common_log_log_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x6c, 0x6f, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2a, 0x44, 0x0a, 0x08, - 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x08, 0x0a, - 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x10, 0x04, 0x42, 0x3a, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x50, - 0x01, 0x5a, 0x03, 0x6c, 0x6f, 0x67, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, - 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_common_log_log_proto protoreflect.FileDescriptor + +var file_common_log_log_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x6c, 0x6f, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2a, 0x44, 0x0a, + 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, + 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x08, + 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x10, 0x04, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, + 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0xaa, 0x02, 0x15, + 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_log_log_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_log_log_proto_rawDescData = file_v2ray_com_core_common_log_log_proto_rawDesc + file_common_log_log_proto_rawDescOnce sync.Once + file_common_log_log_proto_rawDescData = file_common_log_log_proto_rawDesc ) -func file_v2ray_com_core_common_log_log_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_log_log_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_log_log_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_log_log_proto_rawDescData) +func file_common_log_log_proto_rawDescGZIP() []byte { + file_common_log_log_proto_rawDescOnce.Do(func() { + file_common_log_log_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_log_log_proto_rawDescData) }) - return file_v2ray_com_core_common_log_log_proto_rawDescData + return file_common_log_log_proto_rawDescData } -var file_v2ray_com_core_common_log_log_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_common_log_log_proto_goTypes = []interface{}{ +var file_common_log_log_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_common_log_log_proto_goTypes = []interface{}{ (Severity)(0), // 0: v2ray.core.common.log.Severity } -var file_v2ray_com_core_common_log_log_proto_depIdxs = []int32{ +var file_common_log_log_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -116,27 +122,27 @@ var file_v2ray_com_core_common_log_log_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_log_log_proto_init() } -func file_v2ray_com_core_common_log_log_proto_init() { - if File_v2ray_com_core_common_log_log_proto != nil { +func init() { file_common_log_log_proto_init() } +func file_common_log_log_proto_init() { + if File_common_log_log_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_log_log_proto_rawDesc, + RawDescriptor: file_common_log_log_proto_rawDesc, NumEnums: 1, NumMessages: 0, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_log_log_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_log_log_proto_depIdxs, - EnumInfos: file_v2ray_com_core_common_log_log_proto_enumTypes, + GoTypes: file_common_log_log_proto_goTypes, + DependencyIndexes: file_common_log_log_proto_depIdxs, + EnumInfos: file_common_log_log_proto_enumTypes, }.Build() - File_v2ray_com_core_common_log_log_proto = out.File - file_v2ray_com_core_common_log_log_proto_rawDesc = nil - file_v2ray_com_core_common_log_log_proto_goTypes = nil - file_v2ray_com_core_common_log_log_proto_depIdxs = nil + File_common_log_log_proto = out.File + file_common_log_log_proto_rawDesc = nil + file_common_log_log_proto_goTypes = nil + file_common_log_log_proto_depIdxs = nil } diff --git a/common/log/log.proto b/common/log/log.proto index 7e1d4de599..59c893447e 100644 --- a/common/log/log.proto +++ b/common/log/log.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.log; option csharp_namespace = "V2Ray.Core.Common.Log"; -option go_package = "log"; +option go_package = "v2ray.com/core/common/log"; option java_package = "com.v2ray.core.common.log"; option java_multiple_files = true; @@ -13,4 +13,3 @@ enum Severity { Info = 3; Debug = 4; } - diff --git a/common/mux/client.go b/common/mux/client.go index ae9fe1b56d..9e651bbe5f 100644 --- a/common/mux/client.go +++ b/common/mux/client.go @@ -83,7 +83,7 @@ func (p *IncrementalWorkerPicker) findAvailable() int { return -1 } -func (p *IncrementalWorkerPicker) pickInternal() (*ClientWorker, error, bool) { +func (p *IncrementalWorkerPicker) pickInternal() (*ClientWorker, bool, error) { p.access.Lock() defer p.access.Unlock() @@ -93,14 +93,14 @@ func (p *IncrementalWorkerPicker) pickInternal() (*ClientWorker, error, bool) { if n > 1 && idx != n-1 { p.workers[n-1], p.workers[idx] = p.workers[idx], p.workers[n-1] } - return p.workers[idx], nil, false + return p.workers[idx], false, nil } p.cleanup() worker, err := p.Factory.Create() if err != nil { - return nil, err, false + return nil, false, err } p.workers = append(p.workers, worker) @@ -111,11 +111,11 @@ func (p *IncrementalWorkerPicker) pickInternal() (*ClientWorker, error, bool) { } } - return worker, nil, true + return worker, true, nil } func (p *IncrementalWorkerPicker) PickAvailable() (*ClientWorker, error) { - worker, err, start := p.pickInternal() + worker, start, err := p.pickInternal() if start { common.Must(p.cleanupTask.Start()) } diff --git a/common/net/address.pb.go b/common/net/address.pb.go index e15433c3c2..ceeecae9b5 100644 --- a/common/net/address.pb.go +++ b/common/net/address.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/net/address.proto + package net import ( @@ -34,7 +40,7 @@ type IPOrDomain struct { func (x *IPOrDomain) Reset() { *x = IPOrDomain{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_net_address_proto_msgTypes[0] + mi := &file_common_net_address_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +53,7 @@ func (x *IPOrDomain) String() string { func (*IPOrDomain) ProtoMessage() {} func (x *IPOrDomain) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_net_address_proto_msgTypes[0] + mi := &file_common_net_address_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +66,7 @@ func (x *IPOrDomain) ProtoReflect() protoreflect.Message { // Deprecated: Use IPOrDomain.ProtoReflect.Descriptor instead. func (*IPOrDomain) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_net_address_proto_rawDescGZIP(), []int{0} + return file_common_net_address_proto_rawDescGZIP(), []int{0} } func (m *IPOrDomain) GetAddress() isIPOrDomain_Address { @@ -102,41 +108,41 @@ func (*IPOrDomain_Ip) isIPOrDomain_Address() {} func (*IPOrDomain_Domain) isIPOrDomain_Address() {} -var File_v2ray_com_core_common_net_address_proto protoreflect.FileDescriptor +var File_common_net_address_proto protoreflect.FileDescriptor -var file_v2ray_com_core_common_net_address_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, - 0x22, 0x43, 0x0a, 0x0a, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x10, - 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, - 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x3a, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, - 0x65, 0x74, 0x50, 0x01, 0x5a, 0x03, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, - 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, - 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_common_net_address_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, + 0x74, 0x22, 0x43, 0x0a, 0x0a, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, + 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69, + 0x70, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, + 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_net_address_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_net_address_proto_rawDescData = file_v2ray_com_core_common_net_address_proto_rawDesc + file_common_net_address_proto_rawDescOnce sync.Once + file_common_net_address_proto_rawDescData = file_common_net_address_proto_rawDesc ) -func file_v2ray_com_core_common_net_address_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_net_address_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_net_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_net_address_proto_rawDescData) +func file_common_net_address_proto_rawDescGZIP() []byte { + file_common_net_address_proto_rawDescOnce.Do(func() { + file_common_net_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_net_address_proto_rawDescData) }) - return file_v2ray_com_core_common_net_address_proto_rawDescData + return file_common_net_address_proto_rawDescData } -var file_v2ray_com_core_common_net_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_common_net_address_proto_goTypes = []interface{}{ +var file_common_net_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_net_address_proto_goTypes = []interface{}{ (*IPOrDomain)(nil), // 0: v2ray.core.common.net.IPOrDomain } -var file_v2ray_com_core_common_net_address_proto_depIdxs = []int32{ +var file_common_net_address_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -144,13 +150,13 @@ var file_v2ray_com_core_common_net_address_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_net_address_proto_init() } -func file_v2ray_com_core_common_net_address_proto_init() { - if File_v2ray_com_core_common_net_address_proto != nil { +func init() { file_common_net_address_proto_init() } +func file_common_net_address_proto_init() { + if File_common_net_address_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_common_net_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_net_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IPOrDomain); i { case 0: return &v.state @@ -163,7 +169,7 @@ func file_v2ray_com_core_common_net_address_proto_init() { } } } - file_v2ray_com_core_common_net_address_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_common_net_address_proto_msgTypes[0].OneofWrappers = []interface{}{ (*IPOrDomain_Ip)(nil), (*IPOrDomain_Domain)(nil), } @@ -171,18 +177,18 @@ func file_v2ray_com_core_common_net_address_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_net_address_proto_rawDesc, + RawDescriptor: file_common_net_address_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_net_address_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_net_address_proto_depIdxs, - MessageInfos: file_v2ray_com_core_common_net_address_proto_msgTypes, + GoTypes: file_common_net_address_proto_goTypes, + DependencyIndexes: file_common_net_address_proto_depIdxs, + MessageInfos: file_common_net_address_proto_msgTypes, }.Build() - File_v2ray_com_core_common_net_address_proto = out.File - file_v2ray_com_core_common_net_address_proto_rawDesc = nil - file_v2ray_com_core_common_net_address_proto_goTypes = nil - file_v2ray_com_core_common_net_address_proto_depIdxs = nil + File_common_net_address_proto = out.File + file_common_net_address_proto_rawDesc = nil + file_common_net_address_proto_goTypes = nil + file_common_net_address_proto_depIdxs = nil } diff --git a/common/net/address.proto b/common/net/address.proto index 07f106d0aa..a6309a359f 100644 --- a/common/net/address.proto +++ b/common/net/address.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.net; option csharp_namespace = "V2Ray.Core.Common.Net"; -option go_package = "net"; +option go_package = "v2ray.com/core/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; diff --git a/common/net/destination.pb.go b/common/net/destination.pb.go index 5d6435cd90..c648bf0b18 100644 --- a/common/net/destination.pb.go +++ b/common/net/destination.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/net/destination.proto + package net import ( @@ -33,7 +39,7 @@ type Endpoint struct { func (x *Endpoint) Reset() { *x = Endpoint{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_net_destination_proto_msgTypes[0] + mi := &file_common_net_destination_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +52,7 @@ func (x *Endpoint) String() string { func (*Endpoint) ProtoMessage() {} func (x *Endpoint) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_net_destination_proto_msgTypes[0] + mi := &file_common_net_destination_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +65,7 @@ func (x *Endpoint) ProtoReflect() protoreflect.Message { // Deprecated: Use Endpoint.ProtoReflect.Descriptor instead. func (*Endpoint) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_net_destination_proto_rawDescGZIP(), []int{0} + return file_common_net_destination_proto_rawDescGZIP(), []int{0} } func (x *Endpoint) GetNetwork() Network { @@ -83,54 +89,52 @@ func (x *Endpoint) GetPort() uint32 { return 0 } -var File_v2ray_com_core_common_net_destination_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_common_net_destination_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x6e, 0x65, 0x74, 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 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, 0x12, 0x3b, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x3a, - 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x03, 0x6e, - 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, +var File_common_net_destination_proto protoreflect.FileDescriptor + +var file_common_net_destination_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, + 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x08, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 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, + 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, + 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, + 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_net_destination_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_net_destination_proto_rawDescData = file_v2ray_com_core_common_net_destination_proto_rawDesc + file_common_net_destination_proto_rawDescOnce sync.Once + file_common_net_destination_proto_rawDescData = file_common_net_destination_proto_rawDesc ) -func file_v2ray_com_core_common_net_destination_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_net_destination_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_net_destination_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_net_destination_proto_rawDescData) +func file_common_net_destination_proto_rawDescGZIP() []byte { + file_common_net_destination_proto_rawDescOnce.Do(func() { + file_common_net_destination_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_net_destination_proto_rawDescData) }) - return file_v2ray_com_core_common_net_destination_proto_rawDescData + return file_common_net_destination_proto_rawDescData } -var file_v2ray_com_core_common_net_destination_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_common_net_destination_proto_goTypes = []interface{}{ +var file_common_net_destination_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_net_destination_proto_goTypes = []interface{}{ (*Endpoint)(nil), // 0: v2ray.core.common.net.Endpoint (Network)(0), // 1: v2ray.core.common.net.Network (*IPOrDomain)(nil), // 2: v2ray.core.common.net.IPOrDomain } -var file_v2ray_com_core_common_net_destination_proto_depIdxs = []int32{ +var file_common_net_destination_proto_depIdxs = []int32{ 1, // 0: v2ray.core.common.net.Endpoint.network:type_name -> v2ray.core.common.net.Network 2, // 1: v2ray.core.common.net.Endpoint.address:type_name -> v2ray.core.common.net.IPOrDomain 2, // [2:2] is the sub-list for method output_type @@ -140,15 +144,15 @@ var file_v2ray_com_core_common_net_destination_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_net_destination_proto_init() } -func file_v2ray_com_core_common_net_destination_proto_init() { - if File_v2ray_com_core_common_net_destination_proto != nil { +func init() { file_common_net_destination_proto_init() } +func file_common_net_destination_proto_init() { + if File_common_net_destination_proto != nil { return } - file_v2ray_com_core_common_net_network_proto_init() - file_v2ray_com_core_common_net_address_proto_init() + file_common_net_network_proto_init() + file_common_net_address_proto_init() if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_common_net_destination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_net_destination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Endpoint); i { case 0: return &v.state @@ -165,18 +169,18 @@ func file_v2ray_com_core_common_net_destination_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_net_destination_proto_rawDesc, + RawDescriptor: file_common_net_destination_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_net_destination_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_net_destination_proto_depIdxs, - MessageInfos: file_v2ray_com_core_common_net_destination_proto_msgTypes, + GoTypes: file_common_net_destination_proto_goTypes, + DependencyIndexes: file_common_net_destination_proto_depIdxs, + MessageInfos: file_common_net_destination_proto_msgTypes, }.Build() - File_v2ray_com_core_common_net_destination_proto = out.File - file_v2ray_com_core_common_net_destination_proto_rawDesc = nil - file_v2ray_com_core_common_net_destination_proto_goTypes = nil - file_v2ray_com_core_common_net_destination_proto_depIdxs = nil + File_common_net_destination_proto = out.File + file_common_net_destination_proto_rawDesc = nil + file_common_net_destination_proto_goTypes = nil + file_common_net_destination_proto_depIdxs = nil } diff --git a/common/net/destination.proto b/common/net/destination.proto index c9a0b2afd7..11f66960c0 100644 --- a/common/net/destination.proto +++ b/common/net/destination.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core.common.net; option csharp_namespace = "V2Ray.Core.Common.Net"; -option go_package = "net"; +option go_package = "v2ray.com/core/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; -import "v2ray.com/core/common/net/network.proto"; -import "v2ray.com/core/common/net/address.proto"; +import "common/net/network.proto"; +import "common/net/address.proto"; // Endpoint of a network connection. message Endpoint { diff --git a/common/net/network.pb.go b/common/net/network.pb.go index a3d0fb498e..28ab9ba667 100644 --- a/common/net/network.pb.go +++ b/common/net/network.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/net/network.proto + package net import ( @@ -56,11 +62,11 @@ func (x Network) String() string { } func (Network) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_common_net_network_proto_enumTypes[0].Descriptor() + return file_common_net_network_proto_enumTypes[0].Descriptor() } func (Network) Type() protoreflect.EnumType { - return &file_v2ray_com_core_common_net_network_proto_enumTypes[0] + return &file_common_net_network_proto_enumTypes[0] } func (x Network) Number() protoreflect.EnumNumber { @@ -69,7 +75,7 @@ func (x Network) Number() protoreflect.EnumNumber { // Deprecated: Use Network.Descriptor instead. func (Network) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_common_net_network_proto_rawDescGZIP(), []int{0} + return file_common_net_network_proto_rawDescGZIP(), []int{0} } // NetworkList is a list of Networks. @@ -84,7 +90,7 @@ type NetworkList struct { func (x *NetworkList) Reset() { *x = NetworkList{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_net_network_proto_msgTypes[0] + mi := &file_common_net_network_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -97,7 +103,7 @@ func (x *NetworkList) String() string { func (*NetworkList) ProtoMessage() {} func (x *NetworkList) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_net_network_proto_msgTypes[0] + mi := &file_common_net_network_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110,7 +116,7 @@ func (x *NetworkList) ProtoReflect() protoreflect.Message { // Deprecated: Use NetworkList.ProtoReflect.Descriptor instead. func (*NetworkList) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_net_network_proto_rawDescGZIP(), []int{0} + return file_common_net_network_proto_rawDescGZIP(), []int{0} } func (x *NetworkList) GetNetwork() []Network { @@ -120,47 +126,47 @@ func (x *NetworkList) GetNetwork() []Network { return nil } -var File_v2ray_com_core_common_net_network_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_common_net_network_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, - 0x22, 0x47, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x38, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x38, 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, 0x07, 0x0a, 0x03, 0x55, 0x44, - 0x50, 0x10, 0x03, 0x42, 0x3a, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, - 0x50, 0x01, 0x5a, 0x03, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, - 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_common_net_network_proto protoreflect.FileDescriptor + +var file_common_net_network_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, + 0x74, 0x22, 0x47, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x38, 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, 0x07, 0x0a, 0x03, 0x55, + 0x44, 0x50, 0x10, 0x03, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, + 0x74, 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 0x02, + 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_net_network_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_net_network_proto_rawDescData = file_v2ray_com_core_common_net_network_proto_rawDesc + file_common_net_network_proto_rawDescOnce sync.Once + file_common_net_network_proto_rawDescData = file_common_net_network_proto_rawDesc ) -func file_v2ray_com_core_common_net_network_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_net_network_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_net_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_net_network_proto_rawDescData) +func file_common_net_network_proto_rawDescGZIP() []byte { + file_common_net_network_proto_rawDescOnce.Do(func() { + file_common_net_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_net_network_proto_rawDescData) }) - return file_v2ray_com_core_common_net_network_proto_rawDescData + return file_common_net_network_proto_rawDescData } -var file_v2ray_com_core_common_net_network_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_common_net_network_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_common_net_network_proto_goTypes = []interface{}{ +var file_common_net_network_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_common_net_network_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_net_network_proto_goTypes = []interface{}{ (Network)(0), // 0: v2ray.core.common.net.Network (*NetworkList)(nil), // 1: v2ray.core.common.net.NetworkList } -var file_v2ray_com_core_common_net_network_proto_depIdxs = []int32{ +var file_common_net_network_proto_depIdxs = []int32{ 0, // 0: v2ray.core.common.net.NetworkList.network:type_name -> v2ray.core.common.net.Network 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -169,13 +175,13 @@ var file_v2ray_com_core_common_net_network_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_net_network_proto_init() } -func file_v2ray_com_core_common_net_network_proto_init() { - if File_v2ray_com_core_common_net_network_proto != nil { +func init() { file_common_net_network_proto_init() } +func file_common_net_network_proto_init() { + if File_common_net_network_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_common_net_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_net_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NetworkList); i { case 0: return &v.state @@ -192,19 +198,19 @@ func file_v2ray_com_core_common_net_network_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_net_network_proto_rawDesc, + RawDescriptor: file_common_net_network_proto_rawDesc, NumEnums: 1, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_net_network_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_net_network_proto_depIdxs, - EnumInfos: file_v2ray_com_core_common_net_network_proto_enumTypes, - MessageInfos: file_v2ray_com_core_common_net_network_proto_msgTypes, + GoTypes: file_common_net_network_proto_goTypes, + DependencyIndexes: file_common_net_network_proto_depIdxs, + EnumInfos: file_common_net_network_proto_enumTypes, + MessageInfos: file_common_net_network_proto_msgTypes, }.Build() - File_v2ray_com_core_common_net_network_proto = out.File - file_v2ray_com_core_common_net_network_proto_rawDesc = nil - file_v2ray_com_core_common_net_network_proto_goTypes = nil - file_v2ray_com_core_common_net_network_proto_depIdxs = nil + File_common_net_network_proto = out.File + file_common_net_network_proto_rawDesc = nil + file_common_net_network_proto_goTypes = nil + file_common_net_network_proto_depIdxs = nil } diff --git a/common/net/network.proto b/common/net/network.proto index 3915091c0d..49ac11adff 100644 --- a/common/net/network.proto +++ b/common/net/network.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.net; option csharp_namespace = "V2Ray.Core.Common.Net"; -option go_package = "net"; +option go_package = "v2ray.com/core/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; diff --git a/common/net/port.go b/common/net/port.go index e5f5cd349f..2a0bf63705 100644 --- a/common/net/port.go +++ b/common/net/port.go @@ -44,17 +44,17 @@ func (p Port) String() string { } // FromPort returns the beginning port of this PortRange. -func (p PortRange) FromPort() Port { +func (p *PortRange) FromPort() Port { return Port(p.From) } // ToPort returns the end port of this PortRange. -func (p PortRange) ToPort() Port { +func (p *PortRange) ToPort() Port { return Port(p.To) } // Contains returns true if the given port is within the range of a PortRange. -func (p PortRange) Contains(port Port) bool { +func (p *PortRange) Contains(port Port) bool { return p.FromPort() <= port && port <= p.ToPort() } diff --git a/common/net/port.pb.go b/common/net/port.pb.go index 92eecb7367..61f933aed9 100644 --- a/common/net/port.pb.go +++ b/common/net/port.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/net/port.proto + package net import ( @@ -34,7 +40,7 @@ type PortRange struct { func (x *PortRange) Reset() { *x = PortRange{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_net_port_proto_msgTypes[0] + mi := &file_common_net_port_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +53,7 @@ func (x *PortRange) String() string { func (*PortRange) ProtoMessage() {} func (x *PortRange) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_net_port_proto_msgTypes[0] + mi := &file_common_net_port_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +66,7 @@ func (x *PortRange) ProtoReflect() protoreflect.Message { // Deprecated: Use PortRange.ProtoReflect.Descriptor instead. func (*PortRange) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_net_port_proto_rawDescGZIP(), []int{0} + return file_common_net_port_proto_rawDescGZIP(), []int{0} } func (x *PortRange) GetFrom() uint32 { @@ -89,7 +95,7 @@ type PortList struct { func (x *PortList) Reset() { *x = PortList{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_net_port_proto_msgTypes[1] + mi := &file_common_net_port_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -102,7 +108,7 @@ func (x *PortList) String() string { func (*PortList) ProtoMessage() {} func (x *PortList) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_net_port_proto_msgTypes[1] + mi := &file_common_net_port_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115,7 +121,7 @@ func (x *PortList) ProtoReflect() protoreflect.Message { // Deprecated: Use PortList.ProtoReflect.Descriptor instead. func (*PortList) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_net_port_proto_rawDescGZIP(), []int{1} + return file_common_net_port_proto_rawDescGZIP(), []int{1} } func (x *PortList) GetRange() []*PortRange { @@ -125,45 +131,45 @@ func (x *PortList) GetRange() []*PortRange { return nil } -var File_v2ray_com_core_common_net_port_proto protoreflect.FileDescriptor +var File_common_net_port_proto protoreflect.FileDescriptor -var file_v2ray_com_core_common_net_port_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6f, 0x72, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x22, 0x2f, 0x0a, - 0x09, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x46, 0x72, - 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x0e, - 0x0a, 0x02, 0x54, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x54, 0x6f, 0x22, 0x42, - 0x0a, 0x08, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, - 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x42, 0x3a, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, - 0x01, 0x5a, 0x03, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, - 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_common_net_port_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x22, 0x2f, + 0x0a, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x46, + 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x46, 0x72, 0x6f, 0x6d, 0x12, + 0x0e, 0x0a, 0x02, 0x54, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x54, 0x6f, 0x22, + 0x42, 0x0a, 0x08, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x05, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, + 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, + 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, + 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_net_port_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_net_port_proto_rawDescData = file_v2ray_com_core_common_net_port_proto_rawDesc + file_common_net_port_proto_rawDescOnce sync.Once + file_common_net_port_proto_rawDescData = file_common_net_port_proto_rawDesc ) -func file_v2ray_com_core_common_net_port_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_net_port_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_net_port_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_net_port_proto_rawDescData) +func file_common_net_port_proto_rawDescGZIP() []byte { + file_common_net_port_proto_rawDescOnce.Do(func() { + file_common_net_port_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_net_port_proto_rawDescData) }) - return file_v2ray_com_core_common_net_port_proto_rawDescData + return file_common_net_port_proto_rawDescData } -var file_v2ray_com_core_common_net_port_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_v2ray_com_core_common_net_port_proto_goTypes = []interface{}{ +var file_common_net_port_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_common_net_port_proto_goTypes = []interface{}{ (*PortRange)(nil), // 0: v2ray.core.common.net.PortRange (*PortList)(nil), // 1: v2ray.core.common.net.PortList } -var file_v2ray_com_core_common_net_port_proto_depIdxs = []int32{ +var file_common_net_port_proto_depIdxs = []int32{ 0, // 0: v2ray.core.common.net.PortList.range:type_name -> v2ray.core.common.net.PortRange 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -172,13 +178,13 @@ var file_v2ray_com_core_common_net_port_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_net_port_proto_init() } -func file_v2ray_com_core_common_net_port_proto_init() { - if File_v2ray_com_core_common_net_port_proto != nil { +func init() { file_common_net_port_proto_init() } +func file_common_net_port_proto_init() { + if File_common_net_port_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_common_net_port_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_net_port_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PortRange); i { case 0: return &v.state @@ -190,7 +196,7 @@ func file_v2ray_com_core_common_net_port_proto_init() { return nil } } - file_v2ray_com_core_common_net_port_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_common_net_port_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PortList); i { case 0: return &v.state @@ -207,18 +213,18 @@ func file_v2ray_com_core_common_net_port_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_net_port_proto_rawDesc, + RawDescriptor: file_common_net_port_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_net_port_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_net_port_proto_depIdxs, - MessageInfos: file_v2ray_com_core_common_net_port_proto_msgTypes, + GoTypes: file_common_net_port_proto_goTypes, + DependencyIndexes: file_common_net_port_proto_depIdxs, + MessageInfos: file_common_net_port_proto_msgTypes, }.Build() - File_v2ray_com_core_common_net_port_proto = out.File - file_v2ray_com_core_common_net_port_proto_rawDesc = nil - file_v2ray_com_core_common_net_port_proto_goTypes = nil - file_v2ray_com_core_common_net_port_proto_depIdxs = nil + File_common_net_port_proto = out.File + file_common_net_port_proto_rawDesc = nil + file_common_net_port_proto_goTypes = nil + file_common_net_port_proto_depIdxs = nil } diff --git a/common/net/port.proto b/common/net/port.proto index eeffa02e3e..bed263eb8d 100644 --- a/common/net/port.proto +++ b/common/net/port.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.net; option csharp_namespace = "V2Ray.Core.Common.Net"; -option go_package = "net"; +option go_package = "v2ray.com/core/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; diff --git a/common/platform/others.go b/common/platform/others.go index e93f5af6b9..e526f498d0 100644 --- a/common/platform/others.go +++ b/common/platform/others.go @@ -20,3 +20,25 @@ func GetToolLocation(file string) string { toolPath := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecutableDir) return filepath.Join(toolPath, file) } + +// GetAssetLocation search for `file` in certain locations +func GetAssetLocation(file string) string { + const name = "v2ray.location.asset" + assetPath := NewEnvFlag(name).GetValue(getExecutableDir) + defPath := filepath.Join(assetPath, file) + for _, p := range []string{ + defPath, + filepath.Join("/usr/local/share/v2ray/", file), + filepath.Join("/usr/share/v2ray/", file), + } { + if _, err := os.Stat(p); os.IsNotExist(err) { + continue + } + + // asset found + return p + } + + // asset not found, let the caller throw out the error + return defPath +} diff --git a/common/platform/platform.go b/common/platform/platform.go index b57a98fd7f..c0bf8c20b6 100644 --- a/common/platform/platform.go +++ b/common/platform/platform.go @@ -66,12 +66,6 @@ func getExecutableSubDir(dir string) func() string { } } -func GetAssetLocation(file string) string { - const name = "v2ray.location.asset" - assetPath := NewEnvFlag(name).GetValue(getExecutableDir) - return filepath.Join(assetPath, file) -} - func GetPluginDirectory() string { const name = "v2ray.location.plugin" pluginDir := NewEnvFlag(name).GetValue(getExecutableSubDir("plugins")) diff --git a/common/platform/windows.go b/common/platform/windows.go index c311ef5c0b..454a24063f 100644 --- a/common/platform/windows.go +++ b/common/platform/windows.go @@ -18,3 +18,10 @@ func GetToolLocation(file string) string { toolPath := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecutableDir) return filepath.Join(toolPath, file+".exe") } + +// GetAssetLocation search for `file` in the excutable dir +func GetAssetLocation(file string) string { + const name = "v2ray.location.asset" + assetPath := NewEnvFlag(name).GetValue(getExecutableDir) + return filepath.Join(assetPath, file) +} diff --git a/common/protocol/headers.pb.go b/common/protocol/headers.pb.go index cabdb0bcc1..88ab46a425 100644 --- a/common/protocol/headers.pb.go +++ b/common/protocol/headers.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/protocol/headers.proto + package protocol import ( @@ -61,11 +67,11 @@ func (x SecurityType) String() string { } func (SecurityType) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_common_protocol_headers_proto_enumTypes[0].Descriptor() + return file_common_protocol_headers_proto_enumTypes[0].Descriptor() } func (SecurityType) Type() protoreflect.EnumType { - return &file_v2ray_com_core_common_protocol_headers_proto_enumTypes[0] + return &file_common_protocol_headers_proto_enumTypes[0] } func (x SecurityType) Number() protoreflect.EnumNumber { @@ -74,7 +80,7 @@ func (x SecurityType) Number() protoreflect.EnumNumber { // Deprecated: Use SecurityType.Descriptor instead. func (SecurityType) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_common_protocol_headers_proto_rawDescGZIP(), []int{0} + return file_common_protocol_headers_proto_rawDescGZIP(), []int{0} } type SecurityConfig struct { @@ -88,7 +94,7 @@ type SecurityConfig struct { func (x *SecurityConfig) Reset() { *x = SecurityConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_protocol_headers_proto_msgTypes[0] + mi := &file_common_protocol_headers_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -101,7 +107,7 @@ func (x *SecurityConfig) String() string { func (*SecurityConfig) ProtoMessage() {} func (x *SecurityConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_protocol_headers_proto_msgTypes[0] + mi := &file_common_protocol_headers_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114,7 +120,7 @@ func (x *SecurityConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use SecurityConfig.ProtoReflect.Descriptor instead. func (*SecurityConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_protocol_headers_proto_rawDescGZIP(), []int{0} + return file_common_protocol_headers_proto_rawDescGZIP(), []int{0} } func (x *SecurityConfig) GetType() SecurityType { @@ -124,52 +130,52 @@ func (x *SecurityConfig) GetType() SecurityType { return SecurityType_UNKNOWN } -var File_v2ray_com_core_common_protocol_headers_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_common_protocol_headers_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x4e, 0x0a, 0x0e, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x62, 0x0a, 0x0c, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, 0x43, - 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a, - 0x0a, 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x03, 0x12, 0x15, 0x0a, - 0x11, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, - 0x30, 0x35, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x05, 0x42, 0x49, - 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x50, 0x01, 0x5a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56, - 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, +var File_common_protocol_headers_proto protoreflect.FileDescriptor + +var file_common_protocol_headers_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x4e, 0x0a, 0x0e, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x62, 0x0a, 0x0c, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, + 0x43, 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x0e, + 0x0a, 0x0a, 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x03, 0x12, 0x15, + 0x0a, 0x11, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, + 0x33, 0x30, 0x35, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x05, 0x42, + 0x5f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x50, 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_protocol_headers_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_protocol_headers_proto_rawDescData = file_v2ray_com_core_common_protocol_headers_proto_rawDesc + file_common_protocol_headers_proto_rawDescOnce sync.Once + file_common_protocol_headers_proto_rawDescData = file_common_protocol_headers_proto_rawDesc ) -func file_v2ray_com_core_common_protocol_headers_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_protocol_headers_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_protocol_headers_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_protocol_headers_proto_rawDescData) +func file_common_protocol_headers_proto_rawDescGZIP() []byte { + file_common_protocol_headers_proto_rawDescOnce.Do(func() { + file_common_protocol_headers_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_protocol_headers_proto_rawDescData) }) - return file_v2ray_com_core_common_protocol_headers_proto_rawDescData + return file_common_protocol_headers_proto_rawDescData } -var file_v2ray_com_core_common_protocol_headers_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_common_protocol_headers_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_common_protocol_headers_proto_goTypes = []interface{}{ +var file_common_protocol_headers_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_common_protocol_headers_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_protocol_headers_proto_goTypes = []interface{}{ (SecurityType)(0), // 0: v2ray.core.common.protocol.SecurityType (*SecurityConfig)(nil), // 1: v2ray.core.common.protocol.SecurityConfig } -var file_v2ray_com_core_common_protocol_headers_proto_depIdxs = []int32{ +var file_common_protocol_headers_proto_depIdxs = []int32{ 0, // 0: v2ray.core.common.protocol.SecurityConfig.type:type_name -> v2ray.core.common.protocol.SecurityType 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -178,13 +184,13 @@ var file_v2ray_com_core_common_protocol_headers_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_protocol_headers_proto_init() } -func file_v2ray_com_core_common_protocol_headers_proto_init() { - if File_v2ray_com_core_common_protocol_headers_proto != nil { +func init() { file_common_protocol_headers_proto_init() } +func file_common_protocol_headers_proto_init() { + if File_common_protocol_headers_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_common_protocol_headers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_protocol_headers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SecurityConfig); i { case 0: return &v.state @@ -201,19 +207,19 @@ func file_v2ray_com_core_common_protocol_headers_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_protocol_headers_proto_rawDesc, + RawDescriptor: file_common_protocol_headers_proto_rawDesc, NumEnums: 1, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_protocol_headers_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_protocol_headers_proto_depIdxs, - EnumInfos: file_v2ray_com_core_common_protocol_headers_proto_enumTypes, - MessageInfos: file_v2ray_com_core_common_protocol_headers_proto_msgTypes, + GoTypes: file_common_protocol_headers_proto_goTypes, + DependencyIndexes: file_common_protocol_headers_proto_depIdxs, + EnumInfos: file_common_protocol_headers_proto_enumTypes, + MessageInfos: file_common_protocol_headers_proto_msgTypes, }.Build() - File_v2ray_com_core_common_protocol_headers_proto = out.File - file_v2ray_com_core_common_protocol_headers_proto_rawDesc = nil - file_v2ray_com_core_common_protocol_headers_proto_goTypes = nil - file_v2ray_com_core_common_protocol_headers_proto_depIdxs = nil + File_common_protocol_headers_proto = out.File + file_common_protocol_headers_proto_rawDesc = nil + file_common_protocol_headers_proto_goTypes = nil + file_common_protocol_headers_proto_depIdxs = nil } diff --git a/common/protocol/headers.proto b/common/protocol/headers.proto index ea37d48c4e..907947d3f7 100644 --- a/common/protocol/headers.proto +++ b/common/protocol/headers.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.protocol; option csharp_namespace = "V2Ray.Core.Common.Protocol"; -option go_package = "protocol"; +option go_package = "v2ray.com/core/common/protocol"; option java_package = "com.v2ray.core.common.protocol"; option java_multiple_files = true; diff --git a/common/protocol/server_spec.go b/common/protocol/server_spec.go index bcf05d6913..d462b4406e 100644 --- a/common/protocol/server_spec.go +++ b/common/protocol/server_spec.go @@ -58,7 +58,7 @@ func NewServerSpec(dest net.Destination, valid ValidationStrategy, users ...*Mem } } -func NewServerSpecFromPB(spec ServerEndpoint) (*ServerSpec, error) { +func NewServerSpecFromPB(spec *ServerEndpoint) (*ServerSpec, error) { dest := net.TCPDestination(spec.Address.AsAddress(), net.Port(spec.Port)) mUsers := make([]*MemoryUser, len(spec.User)) for idx, u := range spec.User { diff --git a/common/protocol/server_spec.pb.go b/common/protocol/server_spec.pb.go index 9d00d4d2e4..c7c24ab773 100644 --- a/common/protocol/server_spec.pb.go +++ b/common/protocol/server_spec.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/protocol/server_spec.proto + package protocol import ( @@ -33,7 +39,7 @@ type ServerEndpoint struct { func (x *ServerEndpoint) Reset() { *x = ServerEndpoint{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_protocol_server_spec_proto_msgTypes[0] + mi := &file_common_protocol_server_spec_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +52,7 @@ func (x *ServerEndpoint) String() string { func (*ServerEndpoint) ProtoMessage() {} func (x *ServerEndpoint) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_protocol_server_spec_proto_msgTypes[0] + mi := &file_common_protocol_server_spec_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +65,7 @@ func (x *ServerEndpoint) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerEndpoint.ProtoReflect.Descriptor instead. func (*ServerEndpoint) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_protocol_server_spec_proto_rawDescGZIP(), []int{0} + return file_common_protocol_server_spec_proto_rawDescGZIP(), []int{0} } func (x *ServerEndpoint) GetAddress() *net.IPOrDomain { @@ -83,55 +89,54 @@ func (x *ServerEndpoint) GetUser() []*User { return nil } -var File_v2ray_com_core_common_protocol_server_spec_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_common_protocol_server_spec_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x27, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, - 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, +var File_common_protocol_server_spec_proto protoreflect.FileDescriptor + +var file_common_protocol_server_spec_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, + 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, + 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, + 0x5f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x49, 0x0a, 0x1e, - 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x01, - 0x5a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, - 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x50, 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_protocol_server_spec_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_protocol_server_spec_proto_rawDescData = file_v2ray_com_core_common_protocol_server_spec_proto_rawDesc + file_common_protocol_server_spec_proto_rawDescOnce sync.Once + file_common_protocol_server_spec_proto_rawDescData = file_common_protocol_server_spec_proto_rawDesc ) -func file_v2ray_com_core_common_protocol_server_spec_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_protocol_server_spec_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_protocol_server_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_protocol_server_spec_proto_rawDescData) +func file_common_protocol_server_spec_proto_rawDescGZIP() []byte { + file_common_protocol_server_spec_proto_rawDescOnce.Do(func() { + file_common_protocol_server_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_protocol_server_spec_proto_rawDescData) }) - return file_v2ray_com_core_common_protocol_server_spec_proto_rawDescData + return file_common_protocol_server_spec_proto_rawDescData } -var file_v2ray_com_core_common_protocol_server_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_common_protocol_server_spec_proto_goTypes = []interface{}{ +var file_common_protocol_server_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_protocol_server_spec_proto_goTypes = []interface{}{ (*ServerEndpoint)(nil), // 0: v2ray.core.common.protocol.ServerEndpoint (*net.IPOrDomain)(nil), // 1: v2ray.core.common.net.IPOrDomain (*User)(nil), // 2: v2ray.core.common.protocol.User } -var file_v2ray_com_core_common_protocol_server_spec_proto_depIdxs = []int32{ +var file_common_protocol_server_spec_proto_depIdxs = []int32{ 1, // 0: v2ray.core.common.protocol.ServerEndpoint.address:type_name -> v2ray.core.common.net.IPOrDomain 2, // 1: v2ray.core.common.protocol.ServerEndpoint.user:type_name -> v2ray.core.common.protocol.User 2, // [2:2] is the sub-list for method output_type @@ -141,14 +146,14 @@ var file_v2ray_com_core_common_protocol_server_spec_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_protocol_server_spec_proto_init() } -func file_v2ray_com_core_common_protocol_server_spec_proto_init() { - if File_v2ray_com_core_common_protocol_server_spec_proto != nil { +func init() { file_common_protocol_server_spec_proto_init() } +func file_common_protocol_server_spec_proto_init() { + if File_common_protocol_server_spec_proto != nil { return } - file_v2ray_com_core_common_protocol_user_proto_init() + file_common_protocol_user_proto_init() if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_common_protocol_server_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_protocol_server_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerEndpoint); i { case 0: return &v.state @@ -165,18 +170,18 @@ func file_v2ray_com_core_common_protocol_server_spec_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_protocol_server_spec_proto_rawDesc, + RawDescriptor: file_common_protocol_server_spec_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_protocol_server_spec_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_protocol_server_spec_proto_depIdxs, - MessageInfos: file_v2ray_com_core_common_protocol_server_spec_proto_msgTypes, + GoTypes: file_common_protocol_server_spec_proto_goTypes, + DependencyIndexes: file_common_protocol_server_spec_proto_depIdxs, + MessageInfos: file_common_protocol_server_spec_proto_msgTypes, }.Build() - File_v2ray_com_core_common_protocol_server_spec_proto = out.File - file_v2ray_com_core_common_protocol_server_spec_proto_rawDesc = nil - file_v2ray_com_core_common_protocol_server_spec_proto_goTypes = nil - file_v2ray_com_core_common_protocol_server_spec_proto_depIdxs = nil + File_common_protocol_server_spec_proto = out.File + file_common_protocol_server_spec_proto_rawDesc = nil + file_common_protocol_server_spec_proto_goTypes = nil + file_common_protocol_server_spec_proto_depIdxs = nil } diff --git a/common/protocol/server_spec.proto b/common/protocol/server_spec.proto index 9361401056..7cd6cb7839 100644 --- a/common/protocol/server_spec.proto +++ b/common/protocol/server_spec.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core.common.protocol; option csharp_namespace = "V2Ray.Core.Common.Protocol"; -option go_package = "protocol"; +option go_package = "v2ray.com/core/common/protocol"; option java_package = "com.v2ray.core.common.protocol"; option java_multiple_files = true; -import "v2ray.com/core/common/net/address.proto"; -import "v2ray.com/core/common/protocol/user.proto"; +import "common/net/address.proto"; +import "common/protocol/user.proto"; message ServerEndpoint { v2ray.core.common.net.IPOrDomain address = 1; diff --git a/common/protocol/user.pb.go b/common/protocol/user.pb.go index e9c12bad0f..cf21d68b8e 100644 --- a/common/protocol/user.pb.go +++ b/common/protocol/user.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/protocol/user.proto + package protocol import ( @@ -35,7 +41,7 @@ type User struct { func (x *User) Reset() { *x = User{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_protocol_user_proto_msgTypes[0] + mi := &file_common_protocol_user_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +54,7 @@ func (x *User) String() string { func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_protocol_user_proto_msgTypes[0] + mi := &file_common_protocol_user_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +67,7 @@ func (x *User) ProtoReflect() protoreflect.Message { // Deprecated: Use User.ProtoReflect.Descriptor instead. func (*User) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_protocol_user_proto_rawDescGZIP(), []int{0} + return file_common_protocol_user_proto_rawDescGZIP(), []int{0} } func (x *User) GetLevel() uint32 { @@ -85,50 +91,49 @@ func (x *User) GetAccount() *serial.TypedMessage { return nil } -var File_v2ray_com_core_common_protocol_user_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_common_protocol_user_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 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, 0x74, 0x0a, 0x04, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x40, 0x0a, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x49, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x50, 0x01, 0x5a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, - 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, +var File_common_protocol_user_proto protoreflect.FileDescriptor + +var file_common_protocol_user_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 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, 0x74, 0x0a, 0x04, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0x40, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x5f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x50, 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, + 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_protocol_user_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_protocol_user_proto_rawDescData = file_v2ray_com_core_common_protocol_user_proto_rawDesc + file_common_protocol_user_proto_rawDescOnce sync.Once + file_common_protocol_user_proto_rawDescData = file_common_protocol_user_proto_rawDesc ) -func file_v2ray_com_core_common_protocol_user_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_protocol_user_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_protocol_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_protocol_user_proto_rawDescData) +func file_common_protocol_user_proto_rawDescGZIP() []byte { + file_common_protocol_user_proto_rawDescOnce.Do(func() { + file_common_protocol_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_protocol_user_proto_rawDescData) }) - return file_v2ray_com_core_common_protocol_user_proto_rawDescData + return file_common_protocol_user_proto_rawDescData } -var file_v2ray_com_core_common_protocol_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_common_protocol_user_proto_goTypes = []interface{}{ +var file_common_protocol_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_protocol_user_proto_goTypes = []interface{}{ (*User)(nil), // 0: v2ray.core.common.protocol.User (*serial.TypedMessage)(nil), // 1: v2ray.core.common.serial.TypedMessage } -var file_v2ray_com_core_common_protocol_user_proto_depIdxs = []int32{ +var file_common_protocol_user_proto_depIdxs = []int32{ 1, // 0: v2ray.core.common.protocol.User.account:type_name -> v2ray.core.common.serial.TypedMessage 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -137,13 +142,13 @@ var file_v2ray_com_core_common_protocol_user_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_protocol_user_proto_init() } -func file_v2ray_com_core_common_protocol_user_proto_init() { - if File_v2ray_com_core_common_protocol_user_proto != nil { +func init() { file_common_protocol_user_proto_init() } +func file_common_protocol_user_proto_init() { + if File_common_protocol_user_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_common_protocol_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_protocol_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*User); i { case 0: return &v.state @@ -160,18 +165,18 @@ func file_v2ray_com_core_common_protocol_user_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_protocol_user_proto_rawDesc, + RawDescriptor: file_common_protocol_user_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_protocol_user_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_protocol_user_proto_depIdxs, - MessageInfos: file_v2ray_com_core_common_protocol_user_proto_msgTypes, + GoTypes: file_common_protocol_user_proto_goTypes, + DependencyIndexes: file_common_protocol_user_proto_depIdxs, + MessageInfos: file_common_protocol_user_proto_msgTypes, }.Build() - File_v2ray_com_core_common_protocol_user_proto = out.File - file_v2ray_com_core_common_protocol_user_proto_rawDesc = nil - file_v2ray_com_core_common_protocol_user_proto_goTypes = nil - file_v2ray_com_core_common_protocol_user_proto_depIdxs = nil + File_common_protocol_user_proto = out.File + file_common_protocol_user_proto_rawDesc = nil + file_common_protocol_user_proto_goTypes = nil + file_common_protocol_user_proto_depIdxs = nil } diff --git a/common/protocol/user.proto b/common/protocol/user.proto index 56e5d0249c..0a67488d12 100644 --- a/common/protocol/user.proto +++ b/common/protocol/user.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.common.protocol; option csharp_namespace = "V2Ray.Core.Common.Protocol"; -option go_package = "protocol"; +option go_package = "v2ray.com/core/common/protocol"; option java_package = "com.v2ray.core.common.protocol"; option java_multiple_files = true; -import "v2ray.com/core/common/serial/typed_message.proto"; +import "common/serial/typed_message.proto"; // User is a generic user for all procotols. message User { @@ -15,4 +15,4 @@ message User { // Protocol specific account information. Must be the account proto in one of the proxies. v2ray.core.common.serial.TypedMessage account = 3; -} \ No newline at end of file +} diff --git a/common/serial/typed_message.pb.go b/common/serial/typed_message.pb.go index 0a1fe69182..b16ae77fd4 100644 --- a/common/serial/typed_message.pb.go +++ b/common/serial/typed_message.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: common/serial/typed_message.proto + package serial import ( @@ -34,7 +40,7 @@ type TypedMessage struct { func (x *TypedMessage) Reset() { *x = TypedMessage{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_common_serial_typed_message_proto_msgTypes[0] + mi := &file_common_serial_typed_message_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +53,7 @@ func (x *TypedMessage) String() string { func (*TypedMessage) ProtoMessage() {} func (x *TypedMessage) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_common_serial_typed_message_proto_msgTypes[0] + mi := &file_common_serial_typed_message_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +66,7 @@ func (x *TypedMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use TypedMessage.ProtoReflect.Descriptor instead. func (*TypedMessage) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_common_serial_typed_message_proto_rawDescGZIP(), []int{0} + return file_common_serial_typed_message_proto_rawDescGZIP(), []int{0} } func (x *TypedMessage) GetType() string { @@ -77,42 +83,42 @@ func (x *TypedMessage) GetValue() []byte { return nil } -var File_v2ray_com_core_common_serial_typed_message_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_common_serial_typed_message_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 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, 0x12, 0x18, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x38, 0x0a, 0x0c, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x01, 0x5a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, +var File_common_serial_typed_message_proto protoreflect.FileDescriptor + +var file_common_serial_typed_message_proto_rawDesc = []byte{ + 0x0a, 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, 0x12, 0x18, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x38, 0x0a, + 0x0c, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x59, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x01, 0x5a, 0x1c, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_common_serial_typed_message_proto_rawDescOnce sync.Once - file_v2ray_com_core_common_serial_typed_message_proto_rawDescData = file_v2ray_com_core_common_serial_typed_message_proto_rawDesc + file_common_serial_typed_message_proto_rawDescOnce sync.Once + file_common_serial_typed_message_proto_rawDescData = file_common_serial_typed_message_proto_rawDesc ) -func file_v2ray_com_core_common_serial_typed_message_proto_rawDescGZIP() []byte { - file_v2ray_com_core_common_serial_typed_message_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_common_serial_typed_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_serial_typed_message_proto_rawDescData) +func file_common_serial_typed_message_proto_rawDescGZIP() []byte { + file_common_serial_typed_message_proto_rawDescOnce.Do(func() { + file_common_serial_typed_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_serial_typed_message_proto_rawDescData) }) - return file_v2ray_com_core_common_serial_typed_message_proto_rawDescData + return file_common_serial_typed_message_proto_rawDescData } -var file_v2ray_com_core_common_serial_typed_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_common_serial_typed_message_proto_goTypes = []interface{}{ +var file_common_serial_typed_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_serial_typed_message_proto_goTypes = []interface{}{ (*TypedMessage)(nil), // 0: v2ray.core.common.serial.TypedMessage } -var file_v2ray_com_core_common_serial_typed_message_proto_depIdxs = []int32{ +var file_common_serial_typed_message_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -120,13 +126,13 @@ var file_v2ray_com_core_common_serial_typed_message_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_common_serial_typed_message_proto_init() } -func file_v2ray_com_core_common_serial_typed_message_proto_init() { - if File_v2ray_com_core_common_serial_typed_message_proto != nil { +func init() { file_common_serial_typed_message_proto_init() } +func file_common_serial_typed_message_proto_init() { + if File_common_serial_typed_message_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_common_serial_typed_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_serial_typed_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TypedMessage); i { case 0: return &v.state @@ -143,18 +149,18 @@ func file_v2ray_com_core_common_serial_typed_message_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_common_serial_typed_message_proto_rawDesc, + RawDescriptor: file_common_serial_typed_message_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_common_serial_typed_message_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_common_serial_typed_message_proto_depIdxs, - MessageInfos: file_v2ray_com_core_common_serial_typed_message_proto_msgTypes, + GoTypes: file_common_serial_typed_message_proto_goTypes, + DependencyIndexes: file_common_serial_typed_message_proto_depIdxs, + MessageInfos: file_common_serial_typed_message_proto_msgTypes, }.Build() - File_v2ray_com_core_common_serial_typed_message_proto = out.File - file_v2ray_com_core_common_serial_typed_message_proto_rawDesc = nil - file_v2ray_com_core_common_serial_typed_message_proto_goTypes = nil - file_v2ray_com_core_common_serial_typed_message_proto_depIdxs = nil + File_common_serial_typed_message_proto = out.File + file_common_serial_typed_message_proto_rawDesc = nil + file_common_serial_typed_message_proto_goTypes = nil + file_common_serial_typed_message_proto_depIdxs = nil } diff --git a/common/serial/typed_message.proto b/common/serial/typed_message.proto index 41ee5a3dfd..4ce10c607f 100644 --- a/common/serial/typed_message.proto +++ b/common/serial/typed_message.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.serial; option csharp_namespace = "V2Ray.Core.Common.Serial"; -option go_package = "serial"; +option go_package = "v2ray.com/core/common/serial"; option java_package = "com.v2ray.core.common.serial"; option java_multiple_files = true; diff --git a/common/stack/bytes.go b/common/stack/bytes.go index 0ea5631b42..1e4719eee4 100644 --- a/common/stack/bytes.go +++ b/common/stack/bytes.go @@ -1,6 +1,6 @@ package stack -// TwoBytes is a [8]byte which is always allocated on stack. +// TwoBytes is a [2]byte which is always allocated on stack. // //go:notinheap type TwoBytes [2]byte diff --git a/common/strmatcher/matchers.go b/common/strmatcher/matchers.go index 73d9e7b833..b5ab09c4cb 100644 --- a/common/strmatcher/matchers.go +++ b/common/strmatcher/matchers.go @@ -11,12 +11,20 @@ func (m fullMatcher) Match(s string) bool { return string(m) == s } +func (m fullMatcher) String() string { + return "full:" + string(m) +} + type substrMatcher string func (m substrMatcher) Match(s string) bool { return strings.Contains(s, string(m)) } +func (m substrMatcher) String() string { + return "keyword:" + string(m) +} + type domainMatcher string func (m domainMatcher) Match(s string) bool { @@ -27,6 +35,10 @@ func (m domainMatcher) Match(s string) bool { return len(s) == len(pattern) || s[len(s)-len(pattern)-1] == '.' } +func (m domainMatcher) String() string { + return "domain:" + string(m) +} + type regexMatcher struct { pattern *regexp.Regexp } @@ -34,3 +46,7 @@ type regexMatcher struct { func (m *regexMatcher) Match(s string) bool { return m.pattern.MatchString(s) } + +func (m *regexMatcher) String() string { + return "regexp:" + m.pattern.String() +} diff --git a/common/strmatcher/strmatcher.go b/common/strmatcher/strmatcher.go index 6486d83698..9728047d56 100644 --- a/common/strmatcher/strmatcher.go +++ b/common/strmatcher/strmatcher.go @@ -8,6 +8,7 @@ import ( type Matcher interface { // Match returns true if the given string matches a predefined pattern. Match(string) bool + String() string } // Type is the type of the matcher. @@ -48,7 +49,7 @@ func (t Type) New(pattern string) (Matcher, error) { // IndexMatcher is the interface for matching with a group of matchers. type IndexMatcher interface { - // Match returns the the index of a matcher that matches the input. It returns 0 if no such matcher exists. + // Match returns the index of a matcher that matches the input. It returns empty array if no such matcher exists. Match(input string) []uint32 } diff --git a/config.pb.go b/config.pb.go index 15e30e6fff..9ab5b16e9e 100644 --- a/config.pb.go +++ b/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: config.proto + package core import ( @@ -47,7 +53,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_config_proto_msgTypes[0] + mi := &file_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -60,7 +66,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_config_proto_msgTypes[0] + mi := &file_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73,7 +79,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_config_proto_rawDescGZIP(), []int{0} + return file_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetInbound() []*InboundHandlerConfig { @@ -129,7 +135,7 @@ type InboundHandlerConfig struct { func (x *InboundHandlerConfig) Reset() { *x = InboundHandlerConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_config_proto_msgTypes[1] + mi := &file_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -142,7 +148,7 @@ func (x *InboundHandlerConfig) String() string { func (*InboundHandlerConfig) ProtoMessage() {} func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_config_proto_msgTypes[1] + mi := &file_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -155,7 +161,7 @@ func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use InboundHandlerConfig.ProtoReflect.Descriptor instead. func (*InboundHandlerConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_config_proto_rawDescGZIP(), []int{1} + return file_config_proto_rawDescGZIP(), []int{1} } func (x *InboundHandlerConfig) GetTag() string { @@ -200,7 +206,7 @@ type OutboundHandlerConfig struct { func (x *OutboundHandlerConfig) Reset() { *x = OutboundHandlerConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_config_proto_msgTypes[2] + mi := &file_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -213,7 +219,7 @@ func (x *OutboundHandlerConfig) String() string { func (*OutboundHandlerConfig) ProtoMessage() {} func (x *OutboundHandlerConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_config_proto_msgTypes[2] + mi := &file_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -226,7 +232,7 @@ func (x *OutboundHandlerConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use OutboundHandlerConfig.ProtoReflect.Descriptor instead. func (*OutboundHandlerConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_config_proto_rawDescGZIP(), []int{2} + return file_config_proto_rawDescGZIP(), []int{2} } func (x *OutboundHandlerConfig) GetTag() string { @@ -264,93 +270,91 @@ func (x *OutboundHandlerConfig) GetComment() string { return "" } -var File_v2ray_com_core_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_config_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 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, 0x1a, 0x25, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xc9, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, - 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x3d, 0x0a, 0x08, 0x6f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, - 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, +var File_config_proto protoreflect.FileDescriptor + +var file_config_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x1a, 0x16, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x3a, 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x49, + 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x3d, 0x0a, 0x08, + 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x03, 0x61, + 0x70, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x03, 0x61, 0x70, 0x70, 0x12, 0x3e, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x03, 0x10, + 0x04, 0x22, 0xcc, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 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, 0x53, 0x0a, 0x11, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 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, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x4d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x0d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x22, 0xfb, 0x01, 0x0a, 0x15, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 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, 0x4f, 0x0a, 0x0f, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x03, 0x61, - 0x70, 0x70, 0x12, 0x3e, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0e, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4d, 0x0a, + 0x0e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x09, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xcc, - 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 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, 0x53, 0x0a, 0x11, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 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, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4d, - 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 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, 0x0d, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xfb, 0x01, - 0x0a, 0x15, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 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, 0x4f, 0x0a, 0x0f, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x0e, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4d, 0x0a, 0x0e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x0d, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x25, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x50, 0x01, 0x5a, - 0x04, 0x63, 0x6f, 0x72, 0x65, 0xaa, 0x02, 0x0a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, - 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0d, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x2f, + 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x50, 0x01, 0x5a, 0x0e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0xaa, 0x02, 0x0a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_config_proto_rawDescData = file_v2ray_com_core_config_proto_rawDesc + file_config_proto_rawDescOnce sync.Once + file_config_proto_rawDescData = file_config_proto_rawDesc ) -func file_v2ray_com_core_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_config_proto_rawDescData) +func file_config_proto_rawDescGZIP() []byte { + file_config_proto_rawDescOnce.Do(func() { + file_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_config_proto_rawDescData) }) - return file_v2ray_com_core_config_proto_rawDescData + return file_config_proto_rawDescData } -var file_v2ray_com_core_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_v2ray_com_core_config_proto_goTypes = []interface{}{ +var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.Config (*InboundHandlerConfig)(nil), // 1: v2ray.core.InboundHandlerConfig (*OutboundHandlerConfig)(nil), // 2: v2ray.core.OutboundHandlerConfig (*serial.TypedMessage)(nil), // 3: v2ray.core.common.serial.TypedMessage (*transport.Config)(nil), // 4: v2ray.core.transport.Config } -var file_v2ray_com_core_config_proto_depIdxs = []int32{ +var file_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.Config.inbound:type_name -> v2ray.core.InboundHandlerConfig 2, // 1: v2ray.core.Config.outbound:type_name -> v2ray.core.OutboundHandlerConfig 3, // 2: v2ray.core.Config.app:type_name -> v2ray.core.common.serial.TypedMessage @@ -367,13 +371,13 @@ var file_v2ray_com_core_config_proto_depIdxs = []int32{ 0, // [0:9] is the sub-list for field type_name } -func init() { file_v2ray_com_core_config_proto_init() } -func file_v2ray_com_core_config_proto_init() { - if File_v2ray_com_core_config_proto != nil { +func init() { file_config_proto_init() } +func file_config_proto_init() { + if File_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -385,7 +389,7 @@ func file_v2ray_com_core_config_proto_init() { return nil } } - file_v2ray_com_core_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InboundHandlerConfig); i { case 0: return &v.state @@ -397,7 +401,7 @@ func file_v2ray_com_core_config_proto_init() { return nil } } - file_v2ray_com_core_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OutboundHandlerConfig); i { case 0: return &v.state @@ -414,18 +418,18 @@ func file_v2ray_com_core_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_config_proto_rawDesc, + RawDescriptor: file_config_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_config_proto_msgTypes, + GoTypes: file_config_proto_goTypes, + DependencyIndexes: file_config_proto_depIdxs, + MessageInfos: file_config_proto_msgTypes, }.Build() - File_v2ray_com_core_config_proto = out.File - file_v2ray_com_core_config_proto_rawDesc = nil - file_v2ray_com_core_config_proto_goTypes = nil - file_v2ray_com_core_config_proto_depIdxs = nil + File_config_proto = out.File + file_config_proto_rawDesc = nil + file_config_proto_goTypes = nil + file_config_proto_depIdxs = nil } diff --git a/config.proto b/config.proto index e2302158a9..90c6434ab4 100644 --- a/config.proto +++ b/config.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core; option csharp_namespace = "V2Ray.Core"; -option go_package = "core"; +option go_package = "v2ray.com/core"; option java_package = "com.v2ray.core"; option java_multiple_files = true; -import "v2ray.com/core/common/serial/typed_message.proto"; -import "v2ray.com/core/transport/config.proto"; +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. message Config { diff --git a/core.go b/core.go index 58d8723b6d..1f25e0536d 100644 --- a/core.go +++ b/core.go @@ -19,7 +19,7 @@ import ( ) var ( - version = "4.27.0" + version = "4.27.5" build = "Custom" codename = "V2Fly, a community-driven edition of V2Ray." intro = "A unified platform for anti-censorship." diff --git a/external/github.com/cloudflare/sidh/sidh/api.go b/external/github.com/cloudflare/sidh/sidh/api.go index 50dd137124..500dc5bfa2 100644 --- a/external/github.com/cloudflare/sidh/sidh/api.go +++ b/external/github.com/cloudflare/sidh/sidh/api.go @@ -2,8 +2,8 @@ package sidh import ( "errors" - . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" "io" + . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny" ) // I keep it bool in order to be able to apply logical NOT diff --git a/external/github.com/lucas-clemente/quic-go/buffer_pool.go b/external/github.com/lucas-clemente/quic-go/buffer_pool.go index 2966dbd70d..e196fae046 100644 --- a/external/github.com/lucas-clemente/quic-go/buffer_pool.go +++ b/external/github.com/lucas-clemente/quic-go/buffer_pool.go @@ -3,8 +3,8 @@ package quic import ( "sync" - "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" "v2ray.com/core/common/bytespool" + "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol" ) type packetBuffer struct { diff --git a/external/github.com/marten-seemann/qtls/13.go b/external/github.com/marten-seemann/qtls/13.go index 715dc6157a..8a98e2de13 100644 --- a/external/github.com/marten-seemann/qtls/13.go +++ b/external/github.com/marten-seemann/qtls/13.go @@ -22,8 +22,8 @@ import ( "sync/atomic" "time" - "v2ray.com/core/external/github.com/cloudflare/sidh/sidh" "golang.org/x/crypto/curve25519" + "v2ray.com/core/external/github.com/cloudflare/sidh/sidh" ) // numSessionTickets is the number of different session tickets the diff --git a/go.mod b/go.mod index 40335fe805..c03d40649f 100644 --- a/go.mod +++ b/go.mod @@ -4,18 +4,19 @@ require ( github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc // indirect github.com/golang/mock v1.4.4 github.com/golang/protobuf v1.4.2 - github.com/google/go-cmp v0.5.1 + github.com/google/go-cmp v0.5.2 github.com/gorilla/websocket v1.4.2 github.com/miekg/dns v1.1.31 + github.com/pires/go-proxyproto v0.1.3 github.com/seiflotfy/cuckoofilter v0.0.0-20200511222245-56093a4d3841 github.com/stretchr/testify v1.6.1 - github.com/xiaokangwang/VSign v0.0.0-20200704130305-63f4b4d7a751 + github.com/xiaokangwang/VSign v0.0.0-20200828155424-dc1c86b73fbf go.starlark.net v0.0.0-20190919145610-979af19b165c golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 golang.org/x/net v0.0.0-20200602114024-627f9648deb9 golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd - google.golang.org/grpc v1.31.0 + google.golang.org/grpc v1.31.1 google.golang.org/protobuf v1.25.0 h12.io/socks v1.0.1 ) diff --git a/go.sum b/go.sum index dcf98418ac..eb8f1678fd 100644 --- a/go.sum +++ b/go.sum @@ -13,15 +13,11 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -32,28 +28,23 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/h12w/go-socks5 v0.0.0-20200522160539-76189e178364 h1:5XxdakFhqd9dnXoAZy1Mb2R/DZ6D1e+0bGC/JhucGYI= github.com/h12w/go-socks5 v0.0.0-20200522160539-76189e178364/go.mod h1:eDJQioIyy4Yn3MVivT7rv/39gAJTrA7lgmYr8EW950c= -github.com/miekg/dns v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg= -github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.30 h1:Qww6FseFn8PRfw07jueqIXqodm0JKiiKuK0DeXSqfyo= -github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.31 h1:sJFOl9BgwbYAWOGEwr61FU28pqsBNdpRBnhGXtO06Oo= github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= +github.com/pires/go-proxyproto v0.1.3 h1:2XEuhsQluSNA5QIQkiUv8PfgZ51sNYIQkq/yFquiSQM= +github.com/pires/go-proxyproto v0.1.3/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -62,17 +53,12 @@ github.com/seiflotfy/cuckoofilter v0.0.0-20200511222245-56093a4d3841/go.mod h1:E github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/xiaokangwang/VSign v0.0.0-20200704121915-cb2e1f64f24c h1:ZhNj6V5QpDFbJZQR1FYywUTwRgr1HmlsvuExY/U0vJI= -github.com/xiaokangwang/VSign v0.0.0-20200704121915-cb2e1f64f24c/go.mod h1:jTwBnzBuqZP3VX/Z65ErYb9zd4anQprSC7N38TmAp1E= -github.com/xiaokangwang/VSign v0.0.0-20200704130305-63f4b4d7a751 h1:vpFL+XrF7TFUuoV3PX/CJebjK77XA0yc9NnCs5AaxUY= -github.com/xiaokangwang/VSign v0.0.0-20200704130305-63f4b4d7a751/go.mod h1:jTwBnzBuqZP3VX/Z65ErYb9zd4anQprSC7N38TmAp1E= +github.com/xiaokangwang/VSign v0.0.0-20200828155424-dc1c86b73fbf h1:d4keT3SwLbrgnEe2zbtijPLgKE15n0ZbvJZzRH/a9GM= +github.com/xiaokangwang/VSign v0.0.0-20200828155424-dc1c86b73fbf/go.mod h1:jTwBnzBuqZP3VX/Z65ErYb9zd4anQprSC7N38TmAp1E= go.starlark.net v0.0.0-20190919145610-979af19b165c h1:WR7X1xgXJlXhQBdorVc9Db3RhwG+J/kp6bLuMyJjfVw= go.starlark.net v0.0.0-20190919145610-979af19b165c/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -83,9 +69,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -94,19 +78,15 @@ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -120,7 +100,6 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= @@ -128,19 +107,15 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1 h1:SfXqXS5hkufcdZ/mHtYCh53P2b+92WQq/DZcKLgsFRs= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= @@ -153,7 +128,3 @@ h12.io/socks v1.0.1 h1:bXESSI/+hbdrp+22vcc7/JiXjmLH4UWktKdYgGr3ShA= h12.io/socks v1.0.1/go.mod h1:AIhxy1jOId/XCz9BO+EIgNL2rQiPTBNnOfnVnQ+3Eck= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/infra/conf/dns.go b/infra/conf/dns.go index 0a9eb50a84..e9222a4c07 100644 --- a/infra/conf/dns.go +++ b/infra/conf/dns.go @@ -62,11 +62,12 @@ func (c *NameServerConfig) Build() (*dns.NameServer, error) { } var domains []*dns.NameServer_PriorityDomain + var originalRules []*dns.NameServer_OriginalRule - for _, d := range c.Domains { - parsedDomain, err := parseDomainRule(d) + for _, rule := range c.Domains { + parsedDomain, err := parseDomainRule(rule) if err != nil { - return nil, newError("invalid domain rule: ", d).Base(err) + return nil, newError("invalid domain rule: ", rule).Base(err) } for _, pd := range parsedDomain { @@ -75,6 +76,10 @@ func (c *NameServerConfig) Build() (*dns.NameServer, error) { Domain: pd.Value, }) } + originalRules = append(originalRules, &dns.NameServer_OriginalRule{ + Rule: rule, + Size: uint32(len(parsedDomain)), + }) } geoipList, err := toCidrList(c.ExpectIPs) @@ -90,6 +95,7 @@ func (c *NameServerConfig) Build() (*dns.NameServer, error) { }, PrioritizedDomain: domains, Geoip: geoipList, + OriginalRules: originalRules, }, nil } @@ -185,6 +191,19 @@ func (c *DnsConfig) Build() (*dns.Config, error) { mapping.Type = dns.DomainMatchingType_Full mapping.Domain = domain[5:] + mappings = append(mappings, mapping) + } else if strings.HasPrefix(domain, "dotless:") { + mapping := getHostMapping(addr) + mapping.Type = dns.DomainMatchingType_Regex + switch substr := domain[8:]; { + case substr == "": + mapping.Domain = "^[^.]*$" + case !strings.Contains(substr, "."): + mapping.Domain = "^[^.]*" + substr + "[^.]*$" + default: + return nil, newError("substr in dotless rule should not contain a dot: ", substr) + } + mappings = append(mappings, mapping) } else if strings.HasPrefix(domain, "ext:") { kv := strings.Split(domain[4:], ":") diff --git a/infra/conf/dns_test.go b/infra/conf/dns_test.go index fc3a4ba139..1725af7c59 100644 --- a/infra/conf/dns_test.go +++ b/infra/conf/dns_test.go @@ -94,6 +94,12 @@ func TestDnsConfigParsing(t *testing.T) { Domain: "v2ray.com", }, }, + OriginalRules: []*dns.NameServer_OriginalRule{ + { + Rule: "domain:v2ray.com", + Size: 1, + }, + }, }, }, StaticHosts: []*dns.Config_HostMapping{ diff --git a/infra/conf/router.go b/infra/conf/router.go index 77549481ef..e25077855d 100644 --- a/infra/conf/router.go +++ b/infra/conf/router.go @@ -307,7 +307,7 @@ func parseDomainRule(domain string) ([]*router.Domain, error) { case !strings.Contains(substr, "."): domainRule.Value = "^[^.]*" + substr + "[^.]*$" default: - return nil, newError("Substr in dotless rule should not contain a dot: ", substr) + return nil, newError("substr in dotless rule should not contain a dot: ", substr) } default: domainRule.Type = router.Domain_Plain diff --git a/infra/conf/transport_internet.go b/infra/conf/transport_internet.go index 4cd604e709..34f9aac7db 100644 --- a/infra/conf/transport_internet.go +++ b/infra/conf/transport_internet.go @@ -109,7 +109,8 @@ func (c *KCPConfig) Build() (proto.Message, error) { } type TCPConfig struct { - HeaderConfig json.RawMessage `json:"header"` + HeaderConfig json.RawMessage `json:"header"` + AcceptProxyProtocol bool `json:"acceptProxyProtocol"` } // Build implements Buildable. @@ -126,14 +127,17 @@ func (c *TCPConfig) Build() (proto.Message, error) { } config.HeaderSettings = serial.ToTypedMessage(ts) } - + if c.AcceptProxyProtocol { + config.AcceptProxyProtocol = c.AcceptProxyProtocol + } return config, nil } type WebSocketConfig struct { - Path string `json:"path"` - Path2 string `json:"Path"` // The key was misspelled. For backward compatibility, we have to keep track the old key. - Headers map[string]string `json:"headers"` + Path string `json:"path"` + Path2 string `json:"Path"` // The key was misspelled. For backward compatibility, we have to keep track the old key. + Headers map[string]string `json:"headers"` + AcceptProxyProtocol bool `json:"acceptProxyProtocol"` } // Build implements Buildable. @@ -149,11 +153,13 @@ func (c *WebSocketConfig) Build() (proto.Message, error) { Value: value, }) } - config := &websocket.Config{ Path: path, Header: header, } + if c.AcceptProxyProtocol { + config.AcceptProxyProtocol = c.AcceptProxyProtocol + } return config, nil } diff --git a/infra/conf/vless.go b/infra/conf/vless.go index b13537054c..64d9e9af42 100644 --- a/infra/conf/vless.go +++ b/infra/conf/vless.go @@ -2,6 +2,7 @@ package conf import ( "encoding/json" + "strconv" "github.com/golang/protobuf/proto" @@ -14,17 +15,18 @@ import ( ) type VLessInboundFallback struct { - Addr *Address `json:"addr"` - Port uint16 `json:"port"` - Unix string `json:"unix"` - Xver uint16 `json:"xver"` + Alpn string `json:"alpn"` + Path string `json:"path"` + Type string `json:"type"` + Dest json.RawMessage `json:"dest"` + Xver uint64 `json:"xver"` } type VLessInboundConfig struct { - Users []json.RawMessage `json:"clients"` - Decryption string `json:"decryption"` - Fallback *VLessInboundFallback `json:"fallback"` - Fallback_h2 *VLessInboundFallback `json:"fallback_h2"` + Clients []json.RawMessage `json:"clients"` + Decryption string `json:"decryption"` + Fallback json.RawMessage `json:"fallback"` + Fallbacks []*VLessInboundFallback `json:"fallbacks"` } // Build implements Buildable @@ -32,99 +34,103 @@ func (c *VLessInboundConfig) Build() (proto.Message, error) { config := new(inbound.Config) - if c.Decryption != "none" { - return nil, newError(`please add/set "decryption":"none" directly to every VLESS "settings"`) + if len(c.Clients) == 0 { + return nil, newError(`VLESS settings: "clients" is empty`) } - config.Decryption = c.Decryption - - if c.Fallback != nil { - if c.Fallback.Xver > 2 { - return nil, newError(`VLESS "fallback": invalid PROXY protocol version, "xver" only accepts 0, 1, 2`) + config.Clients = make([]*protocol.User, len(c.Clients)) + for idx, rawUser := range c.Clients { + user := new(protocol.User) + if err := json.Unmarshal(rawUser, user); err != nil { + return nil, newError(`VLESS clients: invalid user`).Base(err) } - if c.Fallback.Unix != "" { - if c.Fallback.Unix[0] == '@' { - c.Fallback.Unix = "\x00" + c.Fallback.Unix[1:] - } - } else { - if c.Fallback.Port == 0 { - return nil, newError(`please fill in a valid value for "port" in VLESS "fallback"`) - } + account := new(vless.Account) + if err := json.Unmarshal(rawUser, account); err != nil { + return nil, newError(`VLESS clients: invalid user`).Base(err) } - if c.Fallback.Addr == nil { - c.Fallback.Addr = &Address{ - Address: net.ParseAddress("127.0.0.1"), - } + + if account.Schedulers != "" { + return nil, newError(`VLESS clients: "schedulers" is not available in this version`) } - config.Fallback = &inbound.Fallback{ - Addr: c.Fallback.Addr.Build(), - Port: uint32(c.Fallback.Port), - Unix: c.Fallback.Unix, - Xver: uint32(c.Fallback.Xver), + if account.Encryption != "" { + return nil, newError(`VLESS clients: "encryption" should not in inbound settings`) } + + user.Account = serial.ToTypedMessage(account) + config.Clients[idx] = user } - if c.Fallback_h2 != nil { - if config.Fallback == nil { - return nil, newError(`VLESS "fallback_h2" can't exist alone without "fallback"`) - } - if c.Fallback_h2.Xver > 2 { - return nil, newError(`VLESS "fallback_h2": invalid PROXY protocol version, "xver" only accepts 0, 1, 2`) - } - if c.Fallback_h2.Unix != "" { - if c.Fallback_h2.Unix[0] == '@' { - c.Fallback_h2.Unix = "\x00" + c.Fallback_h2.Unix[1:] - } + if c.Decryption != "none" { + return nil, newError(`VLESS settings: please add/set "decryption":"none" to every settings`) + } + config.Decryption = c.Decryption + + if c.Fallback != nil { + return nil, newError(`VLESS settings: please use "fallbacks":[{}] instead of "fallback":{}`) + } + for _, fb := range c.Fallbacks { + var i uint16 + var s string + if err := json.Unmarshal(fb.Dest, &i); err == nil { + s = strconv.Itoa(int(i)) } else { - if c.Fallback_h2.Port == 0 { - return nil, newError(`please fill in a valid value for "port" in VLESS "fallback_h2"`) + _ = json.Unmarshal(fb.Dest, &s) + } + config.Fallbacks = append(config.Fallbacks, &inbound.Fallback{ + Alpn: fb.Alpn, + Path: fb.Path, + Type: fb.Type, + Dest: s, + Xver: fb.Xver, + }) + } + for _, fb := range config.Fallbacks { + /* + if fb.Alpn == "h2" && fb.Path != "" { + return nil, newError(`VLESS fallbacks: "alpn":"h2" doesn't support "path"`) } - } - if c.Fallback_h2.Addr == nil { - c.Fallback_h2.Addr = &Address{ - Address: net.ParseAddress("127.0.0.1"), + */ + if fb.Path != "" && fb.Path[0] != '/' { + return nil, newError(`VLESS fallbacks: "path" must be empty or start with "/"`) + } + if fb.Type == "" && fb.Dest != "" { + if fb.Dest == "serve-ws-none" { + fb.Type = "serve" + } else { + switch fb.Dest[0] { + case '@': + fb.Dest = "\x00" + fb.Dest[1:] + fallthrough + case '/': + fb.Type = "unix" + default: + if _, err := strconv.Atoi(fb.Dest); err == nil { + fb.Dest = "127.0.0.1:" + fb.Dest + } + if _, _, err := net.SplitHostPort(fb.Dest); err == nil { + fb.Type = "tcp" + } + } } } - config.FallbackH2 = &inbound.FallbackH2{ - Addr: c.Fallback_h2.Addr.Build(), - Port: uint32(c.Fallback_h2.Port), - Unix: c.Fallback_h2.Unix, - Xver: uint32(c.Fallback_h2.Xver), + if fb.Type == "" { + return nil, newError(`VLESS fallbacks: please fill in a valid value for every "dest"`) } - } - - config.User = make([]*protocol.User, len(c.Users)) - for idx, rawData := range c.Users { - user := new(protocol.User) - if err := json.Unmarshal(rawData, user); err != nil { - return nil, newError("invalid VLESS user").Base(err) + if fb.Xver > 2 { + return nil, newError(`VLESS fallbacks: invalid PROXY protocol version, "xver" only accepts 0, 1, 2`) } - account := new(vless.Account) - if err := json.Unmarshal(rawData, account); err != nil { - return nil, newError("invalid VLESS user").Base(err) - } - - if account.Schedulers != "" { - return nil, newError(`VLESS attr "schedulers" is not available in this version`) - } - if account.Encryption != "" { - return nil, newError(`VLESS attr "encryption" should not in inbound settings`) - } - - user.Account = serial.ToTypedMessage(account) - config.User[idx] = user } return config, nil } -type VLessOutboundTarget struct { +type VLessOutboundVnext struct { Address *Address `json:"address"` Port uint16 `json:"port"` Users []json.RawMessage `json:"users"` } type VLessOutboundConfig struct { - Receivers []*VLessOutboundTarget `json:"vnext"` + Vnext []*VLessOutboundVnext `json:"vnext"` } // Build implements Buildable @@ -132,44 +138,44 @@ func (c *VLessOutboundConfig) Build() (proto.Message, error) { config := new(outbound.Config) - if len(c.Receivers) == 0 { - return nil, newError("0 VLESS receiver configured") + if len(c.Vnext) == 0 { + return nil, newError(`VLESS settings: "vnext" is empty`) } - serverSpecs := make([]*protocol.ServerEndpoint, len(c.Receivers)) - for idx, rec := range c.Receivers { - if len(rec.Users) == 0 { - return nil, newError("0 user configured for VLESS outbound") - } + config.Vnext = make([]*protocol.ServerEndpoint, len(c.Vnext)) + for idx, rec := range c.Vnext { if rec.Address == nil { - return nil, newError("address is not set in VLESS outbound config") + return nil, newError(`VLESS vnext: "address" is not set`) + } + if len(rec.Users) == 0 { + return nil, newError(`VLESS vnext: "users" is empty`) } spec := &protocol.ServerEndpoint{ Address: rec.Address.Build(), Port: uint32(rec.Port), + User: make([]*protocol.User, len(rec.Users)), } - for _, rawUser := range rec.Users { + for idx, rawUser := range rec.Users { user := new(protocol.User) if err := json.Unmarshal(rawUser, user); err != nil { - return nil, newError("invalid VLESS user").Base(err) + return nil, newError(`VLESS users: invalid user`).Base(err) } account := new(vless.Account) if err := json.Unmarshal(rawUser, account); err != nil { - return nil, newError("invalid VLESS user").Base(err) + return nil, newError(`VLESS users: invalid user`).Base(err) } if account.Schedulers != "" { - return nil, newError(`VLESS attr "schedulers" is not available in this version`) + return nil, newError(`VLESS users: "schedulers" is not available in this version`) } if account.Encryption != "none" { - return nil, newError(`please add/set "encryption":"none" for every VLESS user in "users"`) + return nil, newError(`VLESS users: please add/set "encryption":"none" for every user`) } user.Account = serial.ToTypedMessage(account) - spec.User = append(spec.User, user) + spec.User[idx] = user } - serverSpecs[idx] = spec + config.Vnext[idx] = spec } - config.Receiver = serverSpecs return config, nil } diff --git a/infra/conf/vless_test.go b/infra/conf/vless_test.go index 813ef80f13..ac7124c3bd 100644 --- a/infra/conf/vless_test.go +++ b/infra/conf/vless_test.go @@ -26,7 +26,6 @@ func TestVLessOutbound(t *testing.T) { "users": [ { "id": "27848739-7e62-4138-9fd3-098a63964b6b", - "schedulers": "", "encryption": "none", "level": 0 } @@ -35,7 +34,7 @@ func TestVLessOutbound(t *testing.T) { }`, Parser: loadJSON(creator), Output: &outbound.Config{ - Receiver: []*protocol.ServerEndpoint{ + Vnext: []*protocol.ServerEndpoint{ { Address: &net.IPOrDomain{ Address: &net.IPOrDomain_Domain{ @@ -47,7 +46,6 @@ func TestVLessOutbound(t *testing.T) { { Account: serial.ToTypedMessage(&vless.Account{ Id: "27848739-7e62-4138-9fd3-098a63964b6b", - Schedulers: "", Encryption: "none", }), Level: 0, @@ -71,49 +69,60 @@ func TestVLessInbound(t *testing.T) { "clients": [ { "id": "27848739-7e62-4138-9fd3-098a63964b6b", - "schedulers": "", "level": 0, "email": "love@v2fly.org" } ], "decryption": "none", - "fallback": { - "port": 80 - }, - "fallback_h2": { - "unix": "@/dev/shm/domain.socket", - "xver": 2 - } + "fallbacks": [ + { + "dest": 80 + }, + { + "alpn": "h2", + "dest": "@/dev/shm/domain.socket", + "xver": 2 + }, + { + "path": "/innerws", + "dest": "serve-ws-none" + } + ] }`, Parser: loadJSON(creator), Output: &inbound.Config{ - User: []*protocol.User{ + Clients: []*protocol.User{ { Account: serial.ToTypedMessage(&vless.Account{ - Id: "27848739-7e62-4138-9fd3-098a63964b6b", - Schedulers: "", + Id: "27848739-7e62-4138-9fd3-098a63964b6b", }), Level: 0, Email: "love@v2fly.org", }, }, Decryption: "none", - Fallback: &inbound.Fallback{ - Addr: &net.IPOrDomain{ - Address: &net.IPOrDomain_Ip{ - Ip: []byte{127, 0, 0, 1}, - }, + Fallbacks: []*inbound.Fallback{ + { + Alpn: "", + Path: "", + Type: "tcp", + Dest: "127.0.0.1:80", + Xver: 0, }, - Port: 80, - }, - FallbackH2: &inbound.FallbackH2{ - Addr: &net.IPOrDomain{ - Address: &net.IPOrDomain_Ip{ - Ip: []byte{127, 0, 0, 1}, - }, + { + Alpn: "h2", + Path: "", + Type: "unix", + Dest: "\x00/dev/shm/domain.socket", + Xver: 2, + }, + { + Alpn: "", + Path: "/innerws", + Type: "serve", + Dest: "serve-ws-none", + Xver: 0, }, - Unix: "\x00/dev/shm/domain.socket", - Xver: 2, }, }, }, diff --git a/infra/vprotogen/main.go b/infra/vprotogen/main.go index 403b61e915..dea42500fc 100644 --- a/infra/vprotogen/main.go +++ b/infra/vprotogen/main.go @@ -1,10 +1,7 @@ package main import ( - "bytes" - "flag" "fmt" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -14,25 +11,26 @@ import ( "v2ray.com/core/common" ) +var protoFilesUsingProtocGenGoFast = map[string]bool{"proxy/vless/encoding/addons.proto": true} + var protocMap = map[string]string{ - "windows": filepath.Join(os.Getenv("GOPATH"), "src", "v2ray.com", "core", ".dev", "protoc", "windows", "protoc.exe"), - "darwin": filepath.Join(os.Getenv("GOPATH"), "src", "v2ray.com", "core", ".dev", "protoc", "macos", "protoc"), - "linux": filepath.Join(os.Getenv("GOPATH"), "src", "v2ray.com", "core", ".dev", "protoc", "linux", "protoc"), + "windows": filepath.Join(".dev", "protoc", "windows", "protoc.exe"), + "darwin": filepath.Join(".dev", "protoc", "macos", "protoc"), + "linux": filepath.Join(".dev", "protoc", "linux", "protoc"), } -var ( - repo = flag.String("repo", "", "Repo for protobuf generation, such as v2ray.com/core") -) - func main() { - flag.Parse() + pwd, wdErr := os.Getwd() + if wdErr != nil { + fmt.Println("Can not get current working directory.") + os.Exit(1) + } - protofiles := make(map[string][]string) + GOBIN := common.GetGOBIN() protoc := protocMap[runtime.GOOS] - gosrc := filepath.Join(os.Getenv("GOPATH"), "src") - reporoot := filepath.Join(os.Getenv("GOPATH"), "src", *repo) - filepath.Walk(reporoot, func(path string, info os.FileInfo, err error) error { + protoFilesMap := make(map[string][]string) + walkErr := filepath.Walk("./", func(path string, info os.FileInfo, err error) error { if err != nil { fmt.Println(err) return err @@ -45,27 +43,48 @@ func main() { dir := filepath.Dir(path) filename := filepath.Base(path) if strings.HasSuffix(filename, ".proto") { - protofiles[dir] = append(protofiles[dir], path) + protoFilesMap[dir] = append(protoFilesMap[dir], path) } return nil }) + if walkErr != nil { + fmt.Println(walkErr) + os.Exit(1) + } - for _, files := range protofiles { - args := []string{"--proto_path", gosrc, "--go_out", "plugins=grpc:" + gosrc} - args = append(args, files...) - cmd := exec.Command(protoc, args...) - cmd.Env = append(cmd.Env, os.Environ()...) - output, err := cmd.CombinedOutput() - if len(output) > 0 { - fmt.Println(string(output)) - } - if err != nil { - fmt.Println(err) + for _, files := range protoFilesMap { + for _, relProtoFile := range files { + var args []string + if protoFilesUsingProtocGenGoFast[relProtoFile] { + args = []string{"--gofast_out", pwd, "--plugin", "protoc-gen-gofast=" + GOBIN + "/protoc-gen-gofast"} + } else { + args = []string{"--go_out", pwd, "--go-grpc_out", pwd, "--plugin", "protoc-gen-go=" + GOBIN + "/protoc-gen-go", "--plugin", "protoc-gen-go-grpc=" + GOBIN + "/protoc-gen-go-grpc"} + } + args = append(args, relProtoFile) + cmd := exec.Command(protoc, args...) + cmd.Env = append(cmd.Env, os.Environ()...) + cmd.Env = append(cmd.Env, "GOBIN="+GOBIN) + output, cmdErr := cmd.CombinedOutput() + if len(output) > 0 { + fmt.Println(string(output)) + } + if cmdErr != nil { + fmt.Println(cmdErr) + os.Exit(1) + } } } - common.Must(filepath.Walk(reporoot, func(path string, info os.FileInfo, err error) error { + moduleName, gmnErr := common.GetModuleName(pwd) + if gmnErr != nil { + fmt.Println(gmnErr) + os.Exit(1) + } + modulePath := filepath.Join(strings.Split(moduleName, "/")...) + + pbGoFilesMap := make(map[string][]string) + walkErr2 := filepath.Walk(modulePath, func(path string, info os.FileInfo, err error) error { if err != nil { fmt.Println(err) return err @@ -75,21 +94,63 @@ func main() { return nil } - if !strings.HasSuffix(info.Name(), ".pb.go") { - return nil + dir := filepath.Dir(path) + filename := filepath.Base(path) + if strings.HasSuffix(filename, ".pb.go") { + pbGoFilesMap[dir] = append(pbGoFilesMap[dir], path) } - content, err := ioutil.ReadFile(path) - if err != nil { - return err - } - content = bytes.Replace(content, []byte("\"golang.org/x/net/context\""), []byte("\"context\""), 1) + return nil + }) + if walkErr2 != nil { + fmt.Println(walkErr2) + os.Exit(1) + } - pos := bytes.Index(content, []byte("\npackage")) - if pos > 0 { - content = content[pos+1:] + var err error + for _, srcPbGoFiles := range pbGoFilesMap { + for _, srcPbGoFile := range srcPbGoFiles { + var dstPbGoFile string + dstPbGoFile, err = filepath.Rel(modulePath, srcPbGoFile) + if err != nil { + fmt.Println(err) + continue + } + err = os.Link(srcPbGoFile, dstPbGoFile) + if err != nil { + if os.IsNotExist(err) { + fmt.Printf("'%s' does not exist\n", srcPbGoFile) + continue + } + if os.IsPermission(err) { + fmt.Println(err) + continue + } + if os.IsExist(err) { + err = os.Remove(dstPbGoFile) + if err != nil { + fmt.Printf("Failed to delete file '%s'\n", dstPbGoFile) + continue + } + err = os.Rename(srcPbGoFile, dstPbGoFile) + if err != nil { + fmt.Printf("Can not move '%s' to '%s'\n", srcPbGoFile, dstPbGoFile) + } + continue + } + } + err = os.Rename(srcPbGoFile, dstPbGoFile) + if err != nil { + fmt.Printf("Can not move '%s' to '%s'\n", srcPbGoFile, dstPbGoFile) + } + continue } + } - return ioutil.WriteFile(path, content, info.Mode()) - })) + if err == nil { + err = os.RemoveAll(strings.Split(modulePath, "/")[0]) + if err != nil { + fmt.Println(err) + } + } } diff --git a/mocks.go b/mocks.go index c50c6f5122..3b1cc89425 100644 --- a/mocks.go +++ b/mocks.go @@ -1,11 +1,8 @@ package core -//go:generate go get -u github.com/golang/mock/gomock -//go:generate go install github.com/golang/mock/mockgen - -//go:generate mockgen -package mocks -destination testing/mocks/io.go -mock_names Reader=Reader,Writer=Writer io Reader,Writer -//go:generate mockgen -package mocks -destination testing/mocks/log.go -mock_names Handler=LogHandler v2ray.com/core/common/log Handler -//go:generate mockgen -package mocks -destination testing/mocks/mux.go -mock_names ClientWorkerFactory=MuxClientWorkerFactory v2ray.com/core/common/mux ClientWorkerFactory -//go:generate mockgen -package mocks -destination testing/mocks/dns.go -mock_names Client=DNSClient v2ray.com/core/features/dns Client -//go:generate mockgen -package mocks -destination testing/mocks/outbound.go -mock_names Manager=OutboundManager,HandlerSelector=OutboundHandlerSelector v2ray.com/core/features/outbound Manager,HandlerSelector -//go:generate mockgen -package mocks -destination testing/mocks/proxy.go -mock_names Inbound=ProxyInbound,Outbound=ProxyOutbound v2ray.com/core/proxy Inbound,Outbound +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/io.go -mock_names Reader=Reader,Writer=Writer io Reader,Writer +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/log.go -mock_names Handler=LogHandler v2ray.com/core/common/log Handler +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/mux.go -mock_names ClientWorkerFactory=MuxClientWorkerFactory v2ray.com/core/common/mux ClientWorkerFactory +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/dns.go -mock_names Client=DNSClient v2ray.com/core/features/dns Client +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/outbound.go -mock_names Manager=OutboundManager,HandlerSelector=OutboundHandlerSelector v2ray.com/core/features/outbound Manager,HandlerSelector +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/proxy.go -mock_names Inbound=ProxyInbound,Outbound=ProxyOutbound v2ray.com/core/proxy Inbound,Outbound diff --git a/proto.go b/proto.go index 779cdf8dcc..6788886ddf 100644 --- a/proto.go +++ b/proto.go @@ -1,6 +1,7 @@ package core -//go:generate go get -u "github.com/golang/protobuf/protoc-gen-go" -//go:generate go get -u "github.com/golang/protobuf/proto" -//go:generate go install "v2ray.com/core/infra/vprotogen" -//go:generate vprotogen -repo v2ray.com/core +//go:generate go install google.golang.org/protobuf/proto +//go:generate go install google.golang.org/protobuf/cmd/protoc-gen-go +//go:generate go get -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@v0.0.0-20200825170228-39ef2aaf62df +//go:generate go install github.com/gogo/protobuf/protoc-gen-gofast +//go:generate go run v2ray.com/core/infra/vprotogen diff --git a/proxy/blackhole/config.pb.go b/proxy/blackhole/config.pb.go index d3c4893869..45d1146c7e 100644 --- a/proxy/blackhole/config.pb.go +++ b/proxy/blackhole/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/blackhole/config.proto + package blackhole import ( @@ -29,7 +35,7 @@ type NoneResponse struct { func (x *NoneResponse) Reset() { *x = NoneResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[0] + mi := &file_proxy_blackhole_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -42,7 +48,7 @@ func (x *NoneResponse) String() string { func (*NoneResponse) ProtoMessage() {} func (x *NoneResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[0] + mi := &file_proxy_blackhole_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,7 +61,7 @@ func (x *NoneResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use NoneResponse.ProtoReflect.Descriptor instead. func (*NoneResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_blackhole_config_proto_rawDescGZIP(), []int{0} + return file_proxy_blackhole_config_proto_rawDescGZIP(), []int{0} } type HTTPResponse struct { @@ -67,7 +73,7 @@ type HTTPResponse struct { func (x *HTTPResponse) Reset() { *x = HTTPResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[1] + mi := &file_proxy_blackhole_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -80,7 +86,7 @@ func (x *HTTPResponse) String() string { func (*HTTPResponse) ProtoMessage() {} func (x *HTTPResponse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[1] + mi := &file_proxy_blackhole_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93,7 +99,7 @@ func (x *HTTPResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPResponse.ProtoReflect.Descriptor instead. func (*HTTPResponse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_blackhole_config_proto_rawDescGZIP(), []int{1} + return file_proxy_blackhole_config_proto_rawDescGZIP(), []int{1} } type Config struct { @@ -107,7 +113,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[2] + mi := &file_proxy_blackhole_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -120,7 +126,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[2] + mi := &file_proxy_blackhole_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -133,7 +139,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_blackhole_config_proto_rawDescGZIP(), []int{2} + return file_proxy_blackhole_config_proto_rawDescGZIP(), []int{2} } func (x *Config) GetResponse() *serial.TypedMessage { @@ -143,51 +149,51 @@ func (x *Config) GetResponse() *serial.TypedMessage { return nil } -var File_v2ray_com_core_proxy_blackhole_config_proto protoreflect.FileDescriptor +var File_proxy_blackhole_config_proto protoreflect.FileDescriptor -var file_v2ray_com_core_proxy_blackhole_config_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 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, 0x0e, 0x0a, 0x0c, 0x4e, - 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x48, - 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x06, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 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, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4a, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0x50, 0x01, 0x5a, 0x09, 0x62, - 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, - 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x42, 0x6c, 0x61, 0x63, - 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_proxy_blackhole_config_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, + 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 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, 0x0e, 0x0a, + 0x0c, 0x4e, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x0a, + 0x0c, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, + 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x5f, 0x0a, 0x1e, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0x50, 0x01, 0x5a, + 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0xaa, + 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_blackhole_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_blackhole_config_proto_rawDescData = file_v2ray_com_core_proxy_blackhole_config_proto_rawDesc + file_proxy_blackhole_config_proto_rawDescOnce sync.Once + file_proxy_blackhole_config_proto_rawDescData = file_proxy_blackhole_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_blackhole_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_blackhole_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_blackhole_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_blackhole_config_proto_rawDescData) +func file_proxy_blackhole_config_proto_rawDescGZIP() []byte { + file_proxy_blackhole_config_proto_rawDescOnce.Do(func() { + file_proxy_blackhole_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_blackhole_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_blackhole_config_proto_rawDescData + return file_proxy_blackhole_config_proto_rawDescData } -var file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_v2ray_com_core_proxy_blackhole_config_proto_goTypes = []interface{}{ +var file_proxy_blackhole_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proxy_blackhole_config_proto_goTypes = []interface{}{ (*NoneResponse)(nil), // 0: v2ray.core.proxy.blackhole.NoneResponse (*HTTPResponse)(nil), // 1: v2ray.core.proxy.blackhole.HTTPResponse (*Config)(nil), // 2: v2ray.core.proxy.blackhole.Config (*serial.TypedMessage)(nil), // 3: v2ray.core.common.serial.TypedMessage } -var file_v2ray_com_core_proxy_blackhole_config_proto_depIdxs = []int32{ +var file_proxy_blackhole_config_proto_depIdxs = []int32{ 3, // 0: v2ray.core.proxy.blackhole.Config.response:type_name -> v2ray.core.common.serial.TypedMessage 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -196,13 +202,13 @@ var file_v2ray_com_core_proxy_blackhole_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_blackhole_config_proto_init() } -func file_v2ray_com_core_proxy_blackhole_config_proto_init() { - if File_v2ray_com_core_proxy_blackhole_config_proto != nil { +func init() { file_proxy_blackhole_config_proto_init() } +func file_proxy_blackhole_config_proto_init() { + if File_proxy_blackhole_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_blackhole_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NoneResponse); i { case 0: return &v.state @@ -214,7 +220,7 @@ func file_v2ray_com_core_proxy_blackhole_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_blackhole_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPResponse); i { case 0: return &v.state @@ -226,7 +232,7 @@ func file_v2ray_com_core_proxy_blackhole_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_blackhole_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -243,18 +249,18 @@ func file_v2ray_com_core_proxy_blackhole_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_blackhole_config_proto_rawDesc, + RawDescriptor: file_proxy_blackhole_config_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_blackhole_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_blackhole_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_blackhole_config_proto_msgTypes, + GoTypes: file_proxy_blackhole_config_proto_goTypes, + DependencyIndexes: file_proxy_blackhole_config_proto_depIdxs, + MessageInfos: file_proxy_blackhole_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_blackhole_config_proto = out.File - file_v2ray_com_core_proxy_blackhole_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_blackhole_config_proto_goTypes = nil - file_v2ray_com_core_proxy_blackhole_config_proto_depIdxs = nil + File_proxy_blackhole_config_proto = out.File + file_proxy_blackhole_config_proto_rawDesc = nil + file_proxy_blackhole_config_proto_goTypes = nil + file_proxy_blackhole_config_proto_depIdxs = nil } diff --git a/proxy/blackhole/config.proto b/proxy/blackhole/config.proto index f9733329de..26dcfc3a2a 100644 --- a/proxy/blackhole/config.proto +++ b/proxy/blackhole/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.proxy.blackhole; option csharp_namespace = "V2Ray.Core.Proxy.Blackhole"; -option go_package = "blackhole"; +option go_package = "v2ray.com/core/proxy/blackhole"; option java_package = "com.v2ray.core.proxy.blackhole"; option java_multiple_files = true; -import "v2ray.com/core/common/serial/typed_message.proto"; +import "common/serial/typed_message.proto"; message NoneResponse { } diff --git a/proxy/dns/config.pb.go b/proxy/dns/config.pb.go index eafa7e8e46..2e7052197f 100644 --- a/proxy/dns/config.pb.go +++ b/proxy/dns/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/dns/config.proto + package dns import ( @@ -32,7 +38,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_dns_config_proto_msgTypes[0] + mi := &file_proxy_dns_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +51,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_dns_config_proto_msgTypes[0] + mi := &file_proxy_dns_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +64,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_dns_config_proto_rawDescGZIP(), []int{0} + return file_proxy_dns_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetServer() *net.Endpoint { @@ -68,44 +74,44 @@ func (x *Config) GetServer() *net.Endpoint { return nil } -var File_v2ray_com_core_proxy_dns_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_dns_config_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x1a, 0x2b, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x06, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x38, 0x0a, - 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x03, 0x64, 0x6e, 0x73, - 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_dns_config_proto protoreflect.FileDescriptor + +var file_proxy_dns_config_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x1a, 0x1c, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x06, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, + 0x4d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x18, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_dns_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_dns_config_proto_rawDescData = file_v2ray_com_core_proxy_dns_config_proto_rawDesc + file_proxy_dns_config_proto_rawDescOnce sync.Once + file_proxy_dns_config_proto_rawDescData = file_proxy_dns_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_dns_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_dns_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_dns_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_dns_config_proto_rawDescData) +func file_proxy_dns_config_proto_rawDescGZIP() []byte { + file_proxy_dns_config_proto_rawDescOnce.Do(func() { + file_proxy_dns_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_dns_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_dns_config_proto_rawDescData + return file_proxy_dns_config_proto_rawDescData } -var file_v2ray_com_core_proxy_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_proxy_dns_config_proto_goTypes = []interface{}{ +var file_proxy_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proxy_dns_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.proxy.dns.Config (*net.Endpoint)(nil), // 1: v2ray.core.common.net.Endpoint } -var file_v2ray_com_core_proxy_dns_config_proto_depIdxs = []int32{ +var file_proxy_dns_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.proxy.dns.Config.server:type_name -> v2ray.core.common.net.Endpoint 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -114,13 +120,13 @@ var file_v2ray_com_core_proxy_dns_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_dns_config_proto_init() } -func file_v2ray_com_core_proxy_dns_config_proto_init() { - if File_v2ray_com_core_proxy_dns_config_proto != nil { +func init() { file_proxy_dns_config_proto_init() } +func file_proxy_dns_config_proto_init() { + if File_proxy_dns_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -137,18 +143,18 @@ func file_v2ray_com_core_proxy_dns_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_dns_config_proto_rawDesc, + RawDescriptor: file_proxy_dns_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_dns_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_dns_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_dns_config_proto_msgTypes, + GoTypes: file_proxy_dns_config_proto_goTypes, + DependencyIndexes: file_proxy_dns_config_proto_depIdxs, + MessageInfos: file_proxy_dns_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_dns_config_proto = out.File - file_v2ray_com_core_proxy_dns_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_dns_config_proto_goTypes = nil - file_v2ray_com_core_proxy_dns_config_proto_depIdxs = nil + File_proxy_dns_config_proto = out.File + file_proxy_dns_config_proto_rawDesc = nil + file_proxy_dns_config_proto_goTypes = nil + file_proxy_dns_config_proto_depIdxs = nil } diff --git a/proxy/dns/config.proto b/proxy/dns/config.proto index c9a35e373d..7e2394e3e8 100644 --- a/proxy/dns/config.proto +++ b/proxy/dns/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.proxy.dns; option csharp_namespace = "V2Ray.Core.Proxy.Dns"; -option go_package = "dns"; +option go_package = "v2ray.com/core/proxy/dns"; option java_package = "com.v2ray.core.proxy.dns"; option java_multiple_files = true; -import "v2ray.com/core/common/net/destination.proto"; +import "common/net/destination.proto"; message Config { // Server is the DNS server address. If specified, this address overrides the original one. diff --git a/proxy/dns/dns_test.go b/proxy/dns/dns_test.go index 4419794338..7ac7d520d3 100644 --- a/proxy/dns/dns_test.go +++ b/proxy/dns/dns_test.go @@ -135,7 +135,7 @@ func TestUDPDNSTunnel(t *testing.T) { m1.Id = dns.Id() m1.RecursionDesired = true m1.Question = make([]dns.Question, 1) - m1.Question[0] = dns.Question{"google.com.", dns.TypeA, dns.ClassINET} + m1.Question[0] = dns.Question{Name: "google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET} c := new(dns.Client) in, _, err := c.Exchange(m1, "127.0.0.1:"+strconv.Itoa(int(serverPort))) @@ -159,7 +159,7 @@ func TestUDPDNSTunnel(t *testing.T) { m1.Id = dns.Id() m1.RecursionDesired = true m1.Question = make([]dns.Question, 1) - m1.Question[0] = dns.Question{"ipv4only.google.com.", dns.TypeAAAA, dns.ClassINET} + m1.Question[0] = dns.Question{Name: "ipv4only.google.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET} c := new(dns.Client) c.Timeout = 10 * time.Second @@ -176,7 +176,7 @@ func TestUDPDNSTunnel(t *testing.T) { m1.Id = dns.Id() m1.RecursionDesired = true m1.Question = make([]dns.Question, 1) - m1.Question[0] = dns.Question{"notexist.google.com.", dns.TypeAAAA, dns.ClassINET} + m1.Question[0] = dns.Question{Name: "notexist.google.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET} c := new(dns.Client) in, _, err := c.Exchange(m1, "127.0.0.1:"+strconv.Itoa(int(serverPort))) @@ -253,7 +253,7 @@ func TestTCPDNSTunnel(t *testing.T) { m1.Id = dns.Id() m1.RecursionDesired = true m1.Question = make([]dns.Question, 1) - m1.Question[0] = dns.Question{"google.com.", dns.TypeA, dns.ClassINET} + m1.Question[0] = dns.Question{Name: "google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET} c := &dns.Client{ Net: "tcp", @@ -343,7 +343,7 @@ func TestUDP2TCPDNSTunnel(t *testing.T) { m1.Id = dns.Id() m1.RecursionDesired = true m1.Question = make([]dns.Question, 1) - m1.Question[0] = dns.Question{"google.com.", dns.TypeA, dns.ClassINET} + m1.Question[0] = dns.Question{Name: "google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET} c := &dns.Client{ Net: "tcp", diff --git a/proxy/dokodemo/config.pb.go b/proxy/dokodemo/config.pb.go index bd3848a357..66054cbda4 100644 --- a/proxy/dokodemo/config.pb.go +++ b/proxy/dokodemo/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/dokodemo/config.proto + package dokodemo import ( @@ -43,7 +49,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_dokodemo_config_proto_msgTypes[0] + mi := &file_proxy_dokodemo_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -56,7 +62,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_dokodemo_config_proto_msgTypes[0] + mi := &file_proxy_dokodemo_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69,7 +75,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_dokodemo_config_proto_rawDescGZIP(), []int{0} + return file_proxy_dokodemo_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetAddress() *net.IPOrDomain { @@ -123,67 +129,65 @@ func (x *Config) GetUserLevel() uint32 { return 0 } -var File_v2ray_com_core_proxy_dokodemo_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_dokodemo_config_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, - 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, - 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x02, 0x0a, 0x06, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, - 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x3a, 0x0a, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0x1c, 0x0a, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, - 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x6f, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x42, 0x47, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6f, 0x6b, 0x6f, 0x64, - 0x65, 0x6d, 0x6f, 0x50, 0x01, 0x5a, 0x08, 0x64, 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0xaa, - 0x02, 0x19, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x44, 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, +var File_proxy_dokodemo_config_proto protoreflect.FileDescriptor + +var file_proxy_dokodemo_config_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x64, 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x02, 0x0a, + 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, + 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, + 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x27, 0x0a, + 0x0f, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x5c, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6f, + 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, + 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0xaa, 0x02, 0x19, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x6f, 0x6b, 0x6f, 0x64, + 0x65, 0x6d, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_dokodemo_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_dokodemo_config_proto_rawDescData = file_v2ray_com_core_proxy_dokodemo_config_proto_rawDesc + file_proxy_dokodemo_config_proto_rawDescOnce sync.Once + file_proxy_dokodemo_config_proto_rawDescData = file_proxy_dokodemo_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_dokodemo_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_dokodemo_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_dokodemo_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_dokodemo_config_proto_rawDescData) +func file_proxy_dokodemo_config_proto_rawDescGZIP() []byte { + file_proxy_dokodemo_config_proto_rawDescOnce.Do(func() { + file_proxy_dokodemo_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_dokodemo_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_dokodemo_config_proto_rawDescData + return file_proxy_dokodemo_config_proto_rawDescData } -var file_v2ray_com_core_proxy_dokodemo_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_proxy_dokodemo_config_proto_goTypes = []interface{}{ +var file_proxy_dokodemo_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proxy_dokodemo_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.proxy.dokodemo.Config (*net.IPOrDomain)(nil), // 1: v2ray.core.common.net.IPOrDomain (*net.NetworkList)(nil), // 2: v2ray.core.common.net.NetworkList (net.Network)(0), // 3: v2ray.core.common.net.Network } -var file_v2ray_com_core_proxy_dokodemo_config_proto_depIdxs = []int32{ +var file_proxy_dokodemo_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.proxy.dokodemo.Config.address:type_name -> v2ray.core.common.net.IPOrDomain 2, // 1: v2ray.core.proxy.dokodemo.Config.network_list:type_name -> v2ray.core.common.net.NetworkList 3, // 2: v2ray.core.proxy.dokodemo.Config.networks:type_name -> v2ray.core.common.net.Network @@ -194,13 +198,13 @@ var file_v2ray_com_core_proxy_dokodemo_config_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_dokodemo_config_proto_init() } -func file_v2ray_com_core_proxy_dokodemo_config_proto_init() { - if File_v2ray_com_core_proxy_dokodemo_config_proto != nil { +func init() { file_proxy_dokodemo_config_proto_init() } +func file_proxy_dokodemo_config_proto_init() { + if File_proxy_dokodemo_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_dokodemo_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_dokodemo_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -217,18 +221,18 @@ func file_v2ray_com_core_proxy_dokodemo_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_dokodemo_config_proto_rawDesc, + RawDescriptor: file_proxy_dokodemo_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_dokodemo_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_dokodemo_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_dokodemo_config_proto_msgTypes, + GoTypes: file_proxy_dokodemo_config_proto_goTypes, + DependencyIndexes: file_proxy_dokodemo_config_proto_depIdxs, + MessageInfos: file_proxy_dokodemo_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_dokodemo_config_proto = out.File - file_v2ray_com_core_proxy_dokodemo_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_dokodemo_config_proto_goTypes = nil - file_v2ray_com_core_proxy_dokodemo_config_proto_depIdxs = nil + File_proxy_dokodemo_config_proto = out.File + file_proxy_dokodemo_config_proto_rawDesc = nil + file_proxy_dokodemo_config_proto_goTypes = nil + file_proxy_dokodemo_config_proto_depIdxs = nil } diff --git a/proxy/dokodemo/config.proto b/proxy/dokodemo/config.proto index ce1563a76e..43d6992dbd 100644 --- a/proxy/dokodemo/config.proto +++ b/proxy/dokodemo/config.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core.proxy.dokodemo; option csharp_namespace = "V2Ray.Core.Proxy.Dokodemo"; -option go_package = "dokodemo"; +option go_package = "v2ray.com/core/proxy/dokodemo"; option java_package = "com.v2ray.core.proxy.dokodemo"; option java_multiple_files = true; -import "v2ray.com/core/common/net/address.proto"; -import "v2ray.com/core/common/net/network.proto"; +import "common/net/address.proto"; +import "common/net/network.proto"; message Config { v2ray.core.common.net.IPOrDomain address = 1; @@ -22,4 +22,4 @@ message Config { uint32 timeout = 4 [deprecated = true]; bool follow_redirect = 5; uint32 user_level = 6; -} \ No newline at end of file +} diff --git a/proxy/freedom/config.pb.go b/proxy/freedom/config.pb.go index 38b6102878..bff5453017 100644 --- a/proxy/freedom/config.pb.go +++ b/proxy/freedom/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/freedom/config.proto + package freedom import ( @@ -56,11 +62,11 @@ func (x Config_DomainStrategy) String() string { } func (Config_DomainStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_proxy_freedom_config_proto_enumTypes[0].Descriptor() + return file_proxy_freedom_config_proto_enumTypes[0].Descriptor() } func (Config_DomainStrategy) Type() protoreflect.EnumType { - return &file_v2ray_com_core_proxy_freedom_config_proto_enumTypes[0] + return &file_proxy_freedom_config_proto_enumTypes[0] } func (x Config_DomainStrategy) Number() protoreflect.EnumNumber { @@ -69,7 +75,7 @@ func (x Config_DomainStrategy) Number() protoreflect.EnumNumber { // Deprecated: Use Config_DomainStrategy.Descriptor instead. func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_freedom_config_proto_rawDescGZIP(), []int{1, 0} + return file_proxy_freedom_config_proto_rawDescGZIP(), []int{1, 0} } type DestinationOverride struct { @@ -83,7 +89,7 @@ type DestinationOverride struct { func (x *DestinationOverride) Reset() { *x = DestinationOverride{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[0] + mi := &file_proxy_freedom_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -96,7 +102,7 @@ func (x *DestinationOverride) String() string { func (*DestinationOverride) ProtoMessage() {} func (x *DestinationOverride) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[0] + mi := &file_proxy_freedom_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109,7 +115,7 @@ func (x *DestinationOverride) ProtoReflect() protoreflect.Message { // Deprecated: Use DestinationOverride.ProtoReflect.Descriptor instead. func (*DestinationOverride) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_freedom_config_proto_rawDescGZIP(), []int{0} + return file_proxy_freedom_config_proto_rawDescGZIP(), []int{0} } func (x *DestinationOverride) GetServer() *protocol.ServerEndpoint { @@ -134,7 +140,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[1] + mi := &file_proxy_freedom_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -147,7 +153,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[1] + mi := &file_proxy_freedom_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -160,7 +166,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_freedom_config_proto_rawDescGZIP(), []int{1} + return file_proxy_freedom_config_proto_rawDescGZIP(), []int{1} } func (x *Config) GetDomainStrategy() Config_DomainStrategy { @@ -192,71 +198,70 @@ func (x *Config) GetUserLevel() uint32 { return 0 } -var File_v2ray_com_core_proxy_freedom_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_freedom_config_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, - 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x13, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x42, - 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x22, 0xc4, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, - 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, - 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x60, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2e, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, - 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x41, 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, 0x42, 0x44, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x50, 0x01, 0x5a, 0x07, 0x66, 0x72, 0x65, - 0x65, 0x64, 0x6f, 0x6d, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, - 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x46, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_freedom_config_proto protoreflect.FileDescriptor + +var file_proxy_freedom_config_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, + 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x13, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x22, 0xc4, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x58, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, + 0x64, 0x6f, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x60, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, + 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, + 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x41, 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, 0x42, 0x59, 0x0a, 0x1c, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x50, 0x01, 0x5a, 0x1c, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0xaa, 0x02, 0x18, 0x56, 0x32, + 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x46, + 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_freedom_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_freedom_config_proto_rawDescData = file_v2ray_com_core_proxy_freedom_config_proto_rawDesc + file_proxy_freedom_config_proto_rawDescOnce sync.Once + file_proxy_freedom_config_proto_rawDescData = file_proxy_freedom_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_freedom_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_freedom_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_freedom_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_freedom_config_proto_rawDescData) +func file_proxy_freedom_config_proto_rawDescGZIP() []byte { + file_proxy_freedom_config_proto_rawDescOnce.Do(func() { + file_proxy_freedom_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_freedom_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_freedom_config_proto_rawDescData + return file_proxy_freedom_config_proto_rawDescData } -var file_v2ray_com_core_proxy_freedom_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_proxy_freedom_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_v2ray_com_core_proxy_freedom_config_proto_goTypes = []interface{}{ +var file_proxy_freedom_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_proxy_freedom_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_proxy_freedom_config_proto_goTypes = []interface{}{ (Config_DomainStrategy)(0), // 0: v2ray.core.proxy.freedom.Config.DomainStrategy (*DestinationOverride)(nil), // 1: v2ray.core.proxy.freedom.DestinationOverride (*Config)(nil), // 2: v2ray.core.proxy.freedom.Config (*protocol.ServerEndpoint)(nil), // 3: v2ray.core.common.protocol.ServerEndpoint } -var file_v2ray_com_core_proxy_freedom_config_proto_depIdxs = []int32{ +var file_proxy_freedom_config_proto_depIdxs = []int32{ 3, // 0: v2ray.core.proxy.freedom.DestinationOverride.server:type_name -> v2ray.core.common.protocol.ServerEndpoint 0, // 1: v2ray.core.proxy.freedom.Config.domain_strategy:type_name -> v2ray.core.proxy.freedom.Config.DomainStrategy 1, // 2: v2ray.core.proxy.freedom.Config.destination_override:type_name -> v2ray.core.proxy.freedom.DestinationOverride @@ -267,13 +272,13 @@ var file_v2ray_com_core_proxy_freedom_config_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_freedom_config_proto_init() } -func file_v2ray_com_core_proxy_freedom_config_proto_init() { - if File_v2ray_com_core_proxy_freedom_config_proto != nil { +func init() { file_proxy_freedom_config_proto_init() } +func file_proxy_freedom_config_proto_init() { + if File_proxy_freedom_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_freedom_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DestinationOverride); i { case 0: return &v.state @@ -285,7 +290,7 @@ func file_v2ray_com_core_proxy_freedom_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_freedom_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -302,19 +307,19 @@ func file_v2ray_com_core_proxy_freedom_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_freedom_config_proto_rawDesc, + RawDescriptor: file_proxy_freedom_config_proto_rawDesc, NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_freedom_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_freedom_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_proxy_freedom_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_proxy_freedom_config_proto_msgTypes, + GoTypes: file_proxy_freedom_config_proto_goTypes, + DependencyIndexes: file_proxy_freedom_config_proto_depIdxs, + EnumInfos: file_proxy_freedom_config_proto_enumTypes, + MessageInfos: file_proxy_freedom_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_freedom_config_proto = out.File - file_v2ray_com_core_proxy_freedom_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_freedom_config_proto_goTypes = nil - file_v2ray_com_core_proxy_freedom_config_proto_depIdxs = nil + File_proxy_freedom_config_proto = out.File + file_proxy_freedom_config_proto_rawDesc = nil + file_proxy_freedom_config_proto_goTypes = nil + file_proxy_freedom_config_proto_depIdxs = nil } diff --git a/proxy/freedom/config.proto b/proxy/freedom/config.proto index 3b8f426d25..1fcc80c4ee 100644 --- a/proxy/freedom/config.proto +++ b/proxy/freedom/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.proxy.freedom; option csharp_namespace = "V2Ray.Core.Proxy.Freedom"; -option go_package = "freedom"; +option go_package = "v2ray.com/core/proxy/freedom"; option java_package = "com.v2ray.core.proxy.freedom"; option java_multiple_files = true; -import "v2ray.com/core/common/protocol/server_spec.proto"; +import "common/protocol/server_spec.proto"; message DestinationOverride { v2ray.core.common.protocol.ServerEndpoint server = 1; diff --git a/proxy/freedom/freedom.go b/proxy/freedom/freedom.go index b968a036fc..d26ffe6178 100644 --- a/proxy/freedom/freedom.go +++ b/proxy/freedom/freedom.go @@ -39,12 +39,12 @@ func init() { type Handler struct { policyManager policy.Manager dns dns.Client - config Config + config *Config } // Init initializes the Handler with necessary parameters. func (h *Handler) Init(config *Config, pm policy.Manager, d dns.Client) error { - h.config = *config + h.config = config h.policyManager = pm h.dns = d diff --git a/proxy/http/client.go b/proxy/http/client.go index 120a529952..dd30ff360e 100644 --- a/proxy/http/client.go +++ b/proxy/http/client.go @@ -16,6 +16,7 @@ import ( "v2ray.com/core" "v2ray.com/core/common" "v2ray.com/core/common/buf" + "v2ray.com/core/common/bytespool" "v2ray.com/core/common/net" "v2ray.com/core/common/protocol" "v2ray.com/core/common/retry" @@ -47,7 +48,7 @@ var ( func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) { serverList := protocol.NewServerList() for _, rec := range config.Server { - s, err := protocol.NewServerSpecFromPB(*rec) + s, err := protocol.NewServerSpecFromPB(rec) if err != nil { return nil, newError("failed to get server spec").Base(err) } @@ -80,12 +81,21 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter var user *protocol.MemoryUser var conn internet.Connection + mbuf, _ := link.Reader.ReadMultiBuffer() + len := mbuf.Len() + firstPayload := bytespool.Alloc(len) + mbuf, _ = buf.SplitBytes(mbuf, firstPayload) + firstPayload = firstPayload[:len] + + buf.ReleaseMulti(mbuf) + defer bytespool.Free(firstPayload) + if err := retry.ExponentialBackoff(5, 100).On(func() error { server := c.serverPicker.PickServer() dest := server.Destination() user = server.PickUser() - netConn, err := setUpHTTPTunnel(ctx, dest, targetAddr, user, dialer) + netConn, err := setUpHTTPTunnel(ctx, dest, targetAddr, user, dialer, firstPayload) if netConn != nil { conn = internet.Connection(netConn) } @@ -126,11 +136,11 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter } // setUpHTTPTunnel will create a socket tunnel via HTTP CONNECT method -func setUpHTTPTunnel(ctx context.Context, dest net.Destination, target string, user *protocol.MemoryUser, dialer internet.Dialer) (net.Conn, error) { +func setUpHTTPTunnel(ctx context.Context, dest net.Destination, target string, user *protocol.MemoryUser, dialer internet.Dialer, firstPayload []byte) (net.Conn, error) { req := &http.Request{ Method: http.MethodConnect, URL: &url.URL{Host: target}, - Header: http.Header{"Proxy-Connection": []string{"Keep-Alive"}}, + Header: make(http.Header), Host: target, } @@ -141,12 +151,19 @@ func setUpHTTPTunnel(ctx context.Context, dest net.Destination, target string, u } connectHTTP1 := func(rawConn net.Conn) (net.Conn, error) { + req.Header.Set("Proxy-Connection", "Keep-Alive") + err := req.Write(rawConn) if err != nil { rawConn.Close() return nil, err } + if _, err := rawConn.Write(firstPayload); err != nil { + rawConn.Close() + return nil, err + } + resp, err := http.ReadResponse(bufio.NewReader(rawConn), req) if err != nil { rawConn.Close() @@ -164,12 +181,27 @@ func setUpHTTPTunnel(ctx context.Context, dest net.Destination, target string, u pr, pw := io.Pipe() req.Body = pr + var pErr error + var wg sync.WaitGroup + wg.Add(1) + + go func() { + _, pErr = pw.Write(firstPayload) + wg.Done() + }() + resp, err := h2clientConn.RoundTrip(req) if err != nil { rawConn.Close() return nil, err } + wg.Wait() + if pErr != nil { + rawConn.Close() + return nil, pErr + } + if resp.StatusCode != http.StatusOK { rawConn.Close() return nil, newError("Proxy responded with non 200 code: " + resp.Status) diff --git a/proxy/http/config.pb.go b/proxy/http/config.pb.go index 562baedb88..7a6c2c7de4 100644 --- a/proxy/http/config.pb.go +++ b/proxy/http/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/http/config.proto + package http import ( @@ -32,7 +38,7 @@ type Account struct { func (x *Account) Reset() { *x = Account{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_http_config_proto_msgTypes[0] + mi := &file_proxy_http_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +51,7 @@ func (x *Account) String() string { func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_http_config_proto_msgTypes[0] + mi := &file_proxy_http_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +64,7 @@ func (x *Account) ProtoReflect() protoreflect.Message { // Deprecated: Use Account.ProtoReflect.Descriptor instead. func (*Account) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_http_config_proto_rawDescGZIP(), []int{0} + return file_proxy_http_config_proto_rawDescGZIP(), []int{0} } func (x *Account) GetUsername() string { @@ -91,7 +97,7 @@ type ServerConfig struct { func (x *ServerConfig) Reset() { *x = ServerConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_http_config_proto_msgTypes[1] + mi := &file_proxy_http_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -104,7 +110,7 @@ func (x *ServerConfig) String() string { func (*ServerConfig) ProtoMessage() {} func (x *ServerConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_http_config_proto_msgTypes[1] + mi := &file_proxy_http_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -117,7 +123,7 @@ func (x *ServerConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead. func (*ServerConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_http_config_proto_rawDescGZIP(), []int{1} + return file_proxy_http_config_proto_rawDescGZIP(), []int{1} } // Deprecated: Do not use. @@ -162,7 +168,7 @@ type ClientConfig struct { func (x *ClientConfig) Reset() { *x = ClientConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_http_config_proto_msgTypes[2] + mi := &file_proxy_http_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -175,7 +181,7 @@ func (x *ClientConfig) String() string { func (*ClientConfig) ProtoMessage() {} func (x *ClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_http_config_proto_msgTypes[2] + mi := &file_proxy_http_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -188,7 +194,7 @@ func (x *ClientConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. func (*ClientConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_http_config_proto_rawDescGZIP(), []int{2} + return file_proxy_http_config_proto_rawDescGZIP(), []int{2} } func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint { @@ -198,70 +204,69 @@ func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint { return nil } -var File_v2ray_com_core_proxy_http_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_http_config_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x1a, - 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x41, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x3b, - 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x52, 0x0a, 0x0c, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, - 0x3b, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x04, - 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, - 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_http_config_proto protoreflect.FileDescriptor + +var file_proxy_http_config_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x52, 0x0a, + 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, + 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, + 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x15, 0x56, 0x32, + 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_http_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_http_config_proto_rawDescData = file_v2ray_com_core_proxy_http_config_proto_rawDesc + file_proxy_http_config_proto_rawDescOnce sync.Once + file_proxy_http_config_proto_rawDescData = file_proxy_http_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_http_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_http_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_http_config_proto_rawDescData) +func file_proxy_http_config_proto_rawDescGZIP() []byte { + file_proxy_http_config_proto_rawDescOnce.Do(func() { + file_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_http_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_http_config_proto_rawDescData + return file_proxy_http_config_proto_rawDescData } -var file_v2ray_com_core_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_v2ray_com_core_proxy_http_config_proto_goTypes = []interface{}{ +var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_proxy_http_config_proto_goTypes = []interface{}{ (*Account)(nil), // 0: v2ray.core.proxy.http.Account (*ServerConfig)(nil), // 1: v2ray.core.proxy.http.ServerConfig (*ClientConfig)(nil), // 2: v2ray.core.proxy.http.ClientConfig nil, // 3: v2ray.core.proxy.http.ServerConfig.AccountsEntry (*protocol.ServerEndpoint)(nil), // 4: v2ray.core.common.protocol.ServerEndpoint } -var file_v2ray_com_core_proxy_http_config_proto_depIdxs = []int32{ +var file_proxy_http_config_proto_depIdxs = []int32{ 3, // 0: v2ray.core.proxy.http.ServerConfig.accounts:type_name -> v2ray.core.proxy.http.ServerConfig.AccountsEntry 4, // 1: v2ray.core.proxy.http.ClientConfig.server:type_name -> v2ray.core.common.protocol.ServerEndpoint 2, // [2:2] is the sub-list for method output_type @@ -271,13 +276,13 @@ var file_v2ray_com_core_proxy_http_config_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_http_config_proto_init() } -func file_v2ray_com_core_proxy_http_config_proto_init() { - if File_v2ray_com_core_proxy_http_config_proto != nil { +func init() { file_proxy_http_config_proto_init() } +func file_proxy_http_config_proto_init() { + if File_proxy_http_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Account); i { case 0: return &v.state @@ -289,7 +294,7 @@ func file_v2ray_com_core_proxy_http_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerConfig); i { case 0: return &v.state @@ -301,7 +306,7 @@ func file_v2ray_com_core_proxy_http_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClientConfig); i { case 0: return &v.state @@ -318,18 +323,18 @@ func file_v2ray_com_core_proxy_http_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_http_config_proto_rawDesc, + RawDescriptor: file_proxy_http_config_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_http_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_http_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_http_config_proto_msgTypes, + GoTypes: file_proxy_http_config_proto_goTypes, + DependencyIndexes: file_proxy_http_config_proto_depIdxs, + MessageInfos: file_proxy_http_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_http_config_proto = out.File - file_v2ray_com_core_proxy_http_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_http_config_proto_goTypes = nil - file_v2ray_com_core_proxy_http_config_proto_depIdxs = nil + File_proxy_http_config_proto = out.File + file_proxy_http_config_proto_rawDesc = nil + file_proxy_http_config_proto_goTypes = nil + file_proxy_http_config_proto_depIdxs = nil } diff --git a/proxy/http/config.proto b/proxy/http/config.proto index 7ab5d85823..4ad274f51d 100644 --- a/proxy/http/config.proto +++ b/proxy/http/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.proxy.http; option csharp_namespace = "V2Ray.Core.Proxy.Http"; -option go_package = "http"; +option go_package = "v2ray.com/core/proxy/http"; option java_package = "com.v2ray.core.proxy.http"; option java_multiple_files = true; -import "v2ray.com/core/common/protocol/server_spec.proto"; +import "common/protocol/server_spec.proto"; message Account { string username = 1; diff --git a/proxy/mtproto/auth.go b/proxy/mtproto/auth.go index b0c53998af..2c025ea7e0 100644 --- a/proxy/mtproto/auth.go +++ b/proxy/mtproto/auth.go @@ -83,7 +83,7 @@ func generateRandomBytes(random []byte, connType [4]byte) { continue } - if 0x00000000 == (uint32(random[7])<<24)|(uint32(random[6])<<16)|(uint32(random[5])<<8)|uint32(random[4]) { + if (uint32(random[7])<<24)|(uint32(random[6])<<16)|(uint32(random[5])<<8)|uint32(random[4]) == 0x00000000 { continue } diff --git a/proxy/mtproto/config.pb.go b/proxy/mtproto/config.pb.go index ab75b805eb..1eb6081aa3 100644 --- a/proxy/mtproto/config.pb.go +++ b/proxy/mtproto/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/mtproto/config.proto + package mtproto import ( @@ -31,7 +37,7 @@ type Account struct { func (x *Account) Reset() { *x = Account{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[0] + mi := &file_proxy_mtproto_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +50,7 @@ func (x *Account) String() string { func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[0] + mi := &file_proxy_mtproto_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +63,7 @@ func (x *Account) ProtoReflect() protoreflect.Message { // Deprecated: Use Account.ProtoReflect.Descriptor instead. func (*Account) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_mtproto_config_proto_rawDescGZIP(), []int{0} + return file_proxy_mtproto_config_proto_rawDescGZIP(), []int{0} } func (x *Account) GetSecret() []byte { @@ -80,7 +86,7 @@ type ServerConfig struct { func (x *ServerConfig) Reset() { *x = ServerConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[1] + mi := &file_proxy_mtproto_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -93,7 +99,7 @@ func (x *ServerConfig) String() string { func (*ServerConfig) ProtoMessage() {} func (x *ServerConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[1] + mi := &file_proxy_mtproto_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106,7 +112,7 @@ func (x *ServerConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead. func (*ServerConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_mtproto_config_proto_rawDescGZIP(), []int{1} + return file_proxy_mtproto_config_proto_rawDescGZIP(), []int{1} } func (x *ServerConfig) GetUser() []*protocol.User { @@ -125,7 +131,7 @@ type ClientConfig struct { func (x *ClientConfig) Reset() { *x = ClientConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[2] + mi := &file_proxy_mtproto_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -138,7 +144,7 @@ func (x *ClientConfig) String() string { func (*ClientConfig) ProtoMessage() {} func (x *ClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[2] + mi := &file_proxy_mtproto_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -151,54 +157,53 @@ func (x *ClientConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. func (*ClientConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_mtproto_config_proto_rawDescGZIP(), []int{2} + return file_proxy_mtproto_config_proto_rawDescGZIP(), []int{2} } -var File_v2ray_com_core_proxy_mtproto_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_mtproto_config_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x74, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x21, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x22, 0x44, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x44, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x6d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x07, 0x6d, 0x74, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, - 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x4d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_mtproto_config_proto protoreflect.FileDescriptor + +var file_proxy_mtproto_config_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, + 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x21, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x44, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0e, 0x0a, 0x0c, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x59, 0x0a, 0x1c, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1c, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xaa, 0x02, 0x18, 0x56, 0x32, + 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x4d, + 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_mtproto_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_mtproto_config_proto_rawDescData = file_v2ray_com_core_proxy_mtproto_config_proto_rawDesc + file_proxy_mtproto_config_proto_rawDescOnce sync.Once + file_proxy_mtproto_config_proto_rawDescData = file_proxy_mtproto_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_mtproto_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_mtproto_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_mtproto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_mtproto_config_proto_rawDescData) +func file_proxy_mtproto_config_proto_rawDescGZIP() []byte { + file_proxy_mtproto_config_proto_rawDescOnce.Do(func() { + file_proxy_mtproto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_mtproto_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_mtproto_config_proto_rawDescData + return file_proxy_mtproto_config_proto_rawDescData } -var file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_v2ray_com_core_proxy_mtproto_config_proto_goTypes = []interface{}{ +var file_proxy_mtproto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proxy_mtproto_config_proto_goTypes = []interface{}{ (*Account)(nil), // 0: v2ray.core.proxy.mtproto.Account (*ServerConfig)(nil), // 1: v2ray.core.proxy.mtproto.ServerConfig (*ClientConfig)(nil), // 2: v2ray.core.proxy.mtproto.ClientConfig (*protocol.User)(nil), // 3: v2ray.core.common.protocol.User } -var file_v2ray_com_core_proxy_mtproto_config_proto_depIdxs = []int32{ +var file_proxy_mtproto_config_proto_depIdxs = []int32{ 3, // 0: v2ray.core.proxy.mtproto.ServerConfig.user:type_name -> v2ray.core.common.protocol.User 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -207,13 +212,13 @@ var file_v2ray_com_core_proxy_mtproto_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_mtproto_config_proto_init() } -func file_v2ray_com_core_proxy_mtproto_config_proto_init() { - if File_v2ray_com_core_proxy_mtproto_config_proto != nil { +func init() { file_proxy_mtproto_config_proto_init() } +func file_proxy_mtproto_config_proto_init() { + if File_proxy_mtproto_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_mtproto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Account); i { case 0: return &v.state @@ -225,7 +230,7 @@ func file_v2ray_com_core_proxy_mtproto_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_mtproto_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerConfig); i { case 0: return &v.state @@ -237,7 +242,7 @@ func file_v2ray_com_core_proxy_mtproto_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_mtproto_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClientConfig); i { case 0: return &v.state @@ -254,18 +259,18 @@ func file_v2ray_com_core_proxy_mtproto_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_mtproto_config_proto_rawDesc, + RawDescriptor: file_proxy_mtproto_config_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_mtproto_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_mtproto_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_mtproto_config_proto_msgTypes, + GoTypes: file_proxy_mtproto_config_proto_goTypes, + DependencyIndexes: file_proxy_mtproto_config_proto_depIdxs, + MessageInfos: file_proxy_mtproto_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_mtproto_config_proto = out.File - file_v2ray_com_core_proxy_mtproto_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_mtproto_config_proto_goTypes = nil - file_v2ray_com_core_proxy_mtproto_config_proto_depIdxs = nil + File_proxy_mtproto_config_proto = out.File + file_proxy_mtproto_config_proto_rawDesc = nil + file_proxy_mtproto_config_proto_goTypes = nil + file_proxy_mtproto_config_proto_depIdxs = nil } diff --git a/proxy/mtproto/config.proto b/proxy/mtproto/config.proto index 2d0d959199..e239afe175 100644 --- a/proxy/mtproto/config.proto +++ b/proxy/mtproto/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.proxy.mtproto; option csharp_namespace = "V2Ray.Core.Proxy.Mtproto"; -option go_package = "mtproto"; +option go_package = "v2ray.com/core/proxy/mtproto"; option java_package = "com.v2ray.core.proxy.mtproto"; option java_multiple_files = true; -import "v2ray.com/core/common/protocol/user.proto"; +import "common/protocol/user.proto"; message Account { bytes secret = 1; diff --git a/proxy/shadowsocks/client.go b/proxy/shadowsocks/client.go index ab5619c5e3..3823f3ccbd 100644 --- a/proxy/shadowsocks/client.go +++ b/proxy/shadowsocks/client.go @@ -29,7 +29,7 @@ type Client struct { func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) { serverList := protocol.NewServerList() for _, rec := range config.Server { - s, err := protocol.NewServerSpecFromPB(*rec) + s, err := protocol.NewServerSpecFromPB(rec) if err != nil { return nil, newError("failed to parse server spec").Base(err) } diff --git a/proxy/shadowsocks/config.pb.go b/proxy/shadowsocks/config.pb.go index 51ddd33e74..1d2ee4609e 100644 --- a/proxy/shadowsocks/config.pb.go +++ b/proxy/shadowsocks/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/shadowsocks/config.proto + package shadowsocks import ( @@ -72,11 +78,11 @@ func (x CipherType) String() string { } func (CipherType) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_proxy_shadowsocks_config_proto_enumTypes[0].Descriptor() + return file_proxy_shadowsocks_config_proto_enumTypes[0].Descriptor() } func (CipherType) Type() protoreflect.EnumType { - return &file_v2ray_com_core_proxy_shadowsocks_config_proto_enumTypes[0] + return &file_proxy_shadowsocks_config_proto_enumTypes[0] } func (x CipherType) Number() protoreflect.EnumNumber { @@ -85,7 +91,7 @@ func (x CipherType) Number() protoreflect.EnumNumber { // Deprecated: Use CipherType.Descriptor instead. func (CipherType) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0} + return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0} } type Account_OneTimeAuth int32 @@ -121,11 +127,11 @@ func (x Account_OneTimeAuth) String() string { } func (Account_OneTimeAuth) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_proxy_shadowsocks_config_proto_enumTypes[1].Descriptor() + return file_proxy_shadowsocks_config_proto_enumTypes[1].Descriptor() } func (Account_OneTimeAuth) Type() protoreflect.EnumType { - return &file_v2ray_com_core_proxy_shadowsocks_config_proto_enumTypes[1] + return &file_proxy_shadowsocks_config_proto_enumTypes[1] } func (x Account_OneTimeAuth) Number() protoreflect.EnumNumber { @@ -134,7 +140,7 @@ func (x Account_OneTimeAuth) Number() protoreflect.EnumNumber { // Deprecated: Use Account_OneTimeAuth.Descriptor instead. func (Account_OneTimeAuth) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0, 0} + return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0, 0} } type Account struct { @@ -150,7 +156,7 @@ type Account struct { func (x *Account) Reset() { *x = Account{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[0] + mi := &file_proxy_shadowsocks_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -163,7 +169,7 @@ func (x *Account) String() string { func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[0] + mi := &file_proxy_shadowsocks_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -176,7 +182,7 @@ func (x *Account) ProtoReflect() protoreflect.Message { // Deprecated: Use Account.ProtoReflect.Descriptor instead. func (*Account) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0} + return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0} } func (x *Account) GetPassword() string { @@ -217,7 +223,7 @@ type ServerConfig struct { func (x *ServerConfig) Reset() { *x = ServerConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[1] + mi := &file_proxy_shadowsocks_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -230,7 +236,7 @@ func (x *ServerConfig) String() string { func (*ServerConfig) ProtoMessage() {} func (x *ServerConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[1] + mi := &file_proxy_shadowsocks_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -243,7 +249,7 @@ func (x *ServerConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead. func (*ServerConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{1} + return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{1} } // Deprecated: Do not use. @@ -279,7 +285,7 @@ type ClientConfig struct { func (x *ClientConfig) Reset() { *x = ClientConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[2] + mi := &file_proxy_shadowsocks_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -292,7 +298,7 @@ func (x *ClientConfig) String() string { func (*ClientConfig) ProtoMessage() {} func (x *ClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[2] + mi := &file_proxy_shadowsocks_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -305,7 +311,7 @@ func (x *ClientConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. func (*ClientConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{2} + return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{2} } func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint { @@ -315,86 +321,83 @@ func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint { return nil } -var File_v2ray_com_core_proxy_shadowsocks_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, - 0x6b, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x27, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xe9, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x49, 0x0a, 0x0b, 0x63, - 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, - 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, - 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x03, 0x6f, 0x74, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, - 0x6b, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x4f, 0x6e, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x03, 0x6f, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x0b, 0x4f, - 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x41, 0x75, 0x74, 0x68, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x75, - 0x74, 0x6f, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x22, - 0xa3, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x23, 0x0a, 0x0b, 0x75, 0x64, 0x70, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x75, 0x64, 0x70, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x07, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x22, 0x52, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2a, 0x9f, 0x01, 0x0a, 0x0a, 0x43, 0x69, - 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, - 0x5f, 0x43, 0x46, 0x42, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, - 0x36, 0x5f, 0x43, 0x46, 0x42, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x48, 0x41, 0x43, 0x48, - 0x41, 0x32, 0x30, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, - 0x30, 0x5f, 0x49, 0x45, 0x54, 0x46, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, - 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, - 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, - 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10, - 0x07, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x08, 0x42, 0x50, 0x0a, 0x20, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x50, - 0x01, 0x5a, 0x0b, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0xaa, 0x02, - 0x1c, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_shadowsocks_config_proto protoreflect.FileDescriptor + +var file_proxy_shadowsocks_config_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, + 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x18, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe9, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, + 0x49, 0x0a, 0x0b, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, + 0x63, 0x6b, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, + 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x03, 0x6f, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, + 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x4f, + 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x03, 0x6f, 0x74, 0x61, 0x22, + 0x32, 0x0a, 0x0b, 0x4f, 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x41, 0x75, 0x74, 0x68, 0x12, 0x08, + 0x0a, 0x04, 0x41, 0x75, 0x74, 0x6f, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x10, 0x02, 0x22, 0xa3, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x0b, 0x75, 0x64, 0x70, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x75, + 0x64, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, + 0x38, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x22, 0x52, 0x0a, 0x0c, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2a, 0x9f, 0x01, + 0x0a, 0x0a, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, + 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x43, 0x46, 0x42, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, + 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x43, 0x46, 0x42, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43, + 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x48, 0x41, + 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x49, 0x45, 0x54, 0x46, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, + 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x05, 0x12, 0x0f, 0x0a, + 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x06, 0x12, 0x15, + 0x0a, 0x11, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, + 0x33, 0x30, 0x35, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x08, 0x42, + 0x65, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, + 0x63, 0x6b, 0x73, 0x50, 0x01, 0x5a, 0x20, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, 0x61, 0x64, + 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0xaa, 0x02, 0x1c, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x53, 0x68, 0x61, 0x64, 0x6f, + 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescData = file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDesc + file_proxy_shadowsocks_config_proto_rawDescOnce sync.Once + file_proxy_shadowsocks_config_proto_rawDescData = file_proxy_shadowsocks_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescData) +func file_proxy_shadowsocks_config_proto_rawDescGZIP() []byte { + file_proxy_shadowsocks_config_proto_rawDescOnce.Do(func() { + file_proxy_shadowsocks_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_shadowsocks_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDescData + return file_proxy_shadowsocks_config_proto_rawDescData } -var file_v2ray_com_core_proxy_shadowsocks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_v2ray_com_core_proxy_shadowsocks_config_proto_goTypes = []interface{}{ +var file_proxy_shadowsocks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proxy_shadowsocks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proxy_shadowsocks_config_proto_goTypes = []interface{}{ (CipherType)(0), // 0: v2ray.core.proxy.shadowsocks.CipherType (Account_OneTimeAuth)(0), // 1: v2ray.core.proxy.shadowsocks.Account.OneTimeAuth (*Account)(nil), // 2: v2ray.core.proxy.shadowsocks.Account @@ -404,7 +407,7 @@ var file_v2ray_com_core_proxy_shadowsocks_config_proto_goTypes = []interface{}{ (net.Network)(0), // 6: v2ray.core.common.net.Network (*protocol.ServerEndpoint)(nil), // 7: v2ray.core.common.protocol.ServerEndpoint } -var file_v2ray_com_core_proxy_shadowsocks_config_proto_depIdxs = []int32{ +var file_proxy_shadowsocks_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.proxy.shadowsocks.Account.cipher_type:type_name -> v2ray.core.proxy.shadowsocks.CipherType 1, // 1: v2ray.core.proxy.shadowsocks.Account.ota:type_name -> v2ray.core.proxy.shadowsocks.Account.OneTimeAuth 5, // 2: v2ray.core.proxy.shadowsocks.ServerConfig.user:type_name -> v2ray.core.common.protocol.User @@ -417,13 +420,13 @@ var file_v2ray_com_core_proxy_shadowsocks_config_proto_depIdxs = []int32{ 0, // [0:5] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_shadowsocks_config_proto_init() } -func file_v2ray_com_core_proxy_shadowsocks_config_proto_init() { - if File_v2ray_com_core_proxy_shadowsocks_config_proto != nil { +func init() { file_proxy_shadowsocks_config_proto_init() } +func file_proxy_shadowsocks_config_proto_init() { + if File_proxy_shadowsocks_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Account); i { case 0: return &v.state @@ -435,7 +438,7 @@ func file_v2ray_com_core_proxy_shadowsocks_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerConfig); i { case 0: return &v.state @@ -447,7 +450,7 @@ func file_v2ray_com_core_proxy_shadowsocks_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClientConfig); i { case 0: return &v.state @@ -464,19 +467,19 @@ func file_v2ray_com_core_proxy_shadowsocks_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDesc, + RawDescriptor: file_proxy_shadowsocks_config_proto_rawDesc, NumEnums: 2, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_shadowsocks_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_shadowsocks_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_proxy_shadowsocks_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_proxy_shadowsocks_config_proto_msgTypes, + GoTypes: file_proxy_shadowsocks_config_proto_goTypes, + DependencyIndexes: file_proxy_shadowsocks_config_proto_depIdxs, + EnumInfos: file_proxy_shadowsocks_config_proto_enumTypes, + MessageInfos: file_proxy_shadowsocks_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_shadowsocks_config_proto = out.File - file_v2ray_com_core_proxy_shadowsocks_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_shadowsocks_config_proto_goTypes = nil - file_v2ray_com_core_proxy_shadowsocks_config_proto_depIdxs = nil + File_proxy_shadowsocks_config_proto = out.File + file_proxy_shadowsocks_config_proto_rawDesc = nil + file_proxy_shadowsocks_config_proto_goTypes = nil + file_proxy_shadowsocks_config_proto_depIdxs = nil } diff --git a/proxy/shadowsocks/config.proto b/proxy/shadowsocks/config.proto index 9e77a7efd3..a2a09ea2b2 100644 --- a/proxy/shadowsocks/config.proto +++ b/proxy/shadowsocks/config.proto @@ -2,13 +2,13 @@ syntax = "proto3"; package v2ray.core.proxy.shadowsocks; option csharp_namespace = "V2Ray.Core.Proxy.Shadowsocks"; -option go_package = "shadowsocks"; +option go_package = "v2ray.com/core/proxy/shadowsocks"; option java_package = "com.v2ray.core.proxy.shadowsocks"; option java_multiple_files = true; -import "v2ray.com/core/common/net/network.proto"; -import "v2ray.com/core/common/protocol/user.proto"; -import "v2ray.com/core/common/protocol/server_spec.proto"; +import "common/net/network.proto"; +import "common/protocol/user.proto"; +import "common/protocol/server_spec.proto"; message Account { enum OneTimeAuth { diff --git a/proxy/shadowsocks/protocol.go b/proxy/shadowsocks/protocol.go index 7dd432bce3..babcefdf3b 100644 --- a/proxy/shadowsocks/protocol.go +++ b/proxy/shadowsocks/protocol.go @@ -4,8 +4,14 @@ package shadowsocks import ( "bytes" + "crypto/hmac" "crypto/rand" + "crypto/sha256" + "hash" + "hash/crc32" "io" + "io/ioutil" + "v2ray.com/core/common/dice" "v2ray.com/core/common" "v2ray.com/core/common/bitmask" @@ -32,6 +38,18 @@ var addrParser = protocol.NewAddressParser( func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.RequestHeader, buf.Reader, error) { account := user.Account.(*MemoryAccount) + hashkdf := hmac.New(func() hash.Hash { return sha256.New() }, []byte("SSBSKDF")) + hashkdf.Write(account.Key) + + behaviorSeed := crc32.ChecksumIEEE(hashkdf.Sum(nil)) + + behaviorRand := dice.NewDeterministicDice(int64(behaviorSeed)) + BaseDrainSize := behaviorRand.Roll(3266) + RandDrainMax := behaviorRand.Roll(64) + 1 + RandDrainRolled := dice.Roll(RandDrainMax) + DrainSize := BaseDrainSize + 16 + 38 + RandDrainRolled + readSizeRemain := DrainSize + buffer := buf.New() defer buffer.Release() @@ -39,6 +57,8 @@ func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.Requ var iv []byte if ivLen > 0 { if _, err := buffer.ReadFullFrom(reader, ivLen); err != nil { + readSizeRemain -= int(buffer.Len()) + DrainConnN(reader, readSizeRemain) return nil, nil, newError("failed to read IV").Base(err) } @@ -47,6 +67,8 @@ func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.Requ r, err := account.Cipher.NewDecryptionReader(account.Key, iv, reader) if err != nil { + readSizeRemain -= int(buffer.Len()) + DrainConnN(reader, readSizeRemain) return nil, nil, newError("failed to initialize decoding stream").Base(err).AtError() } br := &buf.BufferedReader{Reader: r} @@ -58,10 +80,13 @@ func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.Requ Command: protocol.RequestCommandTCP, } + readSizeRemain -= int(buffer.Len()) buffer.Clear() addr, port, err := addrParser.ReadAddressPort(buffer, br) if err != nil { + readSizeRemain -= int(buffer.Len()) + DrainConnN(reader, readSizeRemain) return nil, nil, newError("failed to read address").Base(err) } @@ -74,10 +99,14 @@ func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.Requ } if request.Option.Has(RequestOptionOneTimeAuth) && account.OneTimeAuth == Account_Disabled { + readSizeRemain -= int(buffer.Len()) + DrainConnN(reader, readSizeRemain) return nil, nil, newError("rejecting connection with OTA enabled, while server disables OTA") } if !request.Option.Has(RequestOptionOneTimeAuth) && account.OneTimeAuth == Account_Enabled { + readSizeRemain -= int(buffer.Len()) + DrainConnN(reader, readSizeRemain) return nil, nil, newError("rejecting connection with OTA disabled, while server enables OTA") } } @@ -88,15 +117,21 @@ func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.Requ _, err := buffer.ReadFullFrom(br, AuthSize) if err != nil { + readSizeRemain -= int(buffer.Len()) + DrainConnN(reader, readSizeRemain) return nil, nil, newError("Failed to read OTA").Base(err) } if !bytes.Equal(actualAuth, buffer.BytesFrom(-AuthSize)) { + readSizeRemain -= int(buffer.Len()) + DrainConnN(reader, readSizeRemain) return nil, nil, newError("invalid OTA") } } if request.Address == nil { + readSizeRemain -= int(buffer.Len()) + DrainConnN(reader, readSizeRemain) return nil, nil, newError("invalid remote address.") } @@ -110,6 +145,11 @@ func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.Requ return request, chunkReader, nil } +func DrainConnN(reader io.Reader, n int) error { + _, err := io.CopyN(ioutil.Discard, reader, int64(n)) + return err +} + // WriteTCPRequest writes Shadowsocks request into the given writer, and returns a writer for body. func WriteTCPRequest(request *protocol.RequestHeader, writer io.Writer) (buf.Writer, error) { user := request.User diff --git a/proxy/shadowsocks/server.go b/proxy/shadowsocks/server.go index 20aebdb3ec..46e8fc3eb1 100644 --- a/proxy/shadowsocks/server.go +++ b/proxy/shadowsocks/server.go @@ -23,7 +23,7 @@ import ( ) type Server struct { - config ServerConfig + config *ServerConfig user *protocol.MemoryUser policyManager policy.Manager } @@ -41,7 +41,7 @@ func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) { v := core.MustFromContext(ctx) s := &Server{ - config: *config, + config: config, user: mUser, policyManager: v.GetFeature(policy.ManagerType()).(policy.Manager), } diff --git a/proxy/socks/client.go b/proxy/socks/client.go index e303e5b32c..a6a345b273 100644 --- a/proxy/socks/client.go +++ b/proxy/socks/client.go @@ -30,7 +30,7 @@ type Client struct { func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) { serverList := protocol.NewServerList() for _, rec := range config.Server { - s, err := protocol.NewServerSpecFromPB(*rec) + s, err := protocol.NewServerSpecFromPB(rec) if err != nil { return nil, newError("failed to get server spec").Base(err) } diff --git a/proxy/socks/config.pb.go b/proxy/socks/config.pb.go index 8e33fc1bdf..4d82bf55e4 100644 --- a/proxy/socks/config.pb.go +++ b/proxy/socks/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/socks/config.proto + package socks import ( @@ -54,11 +60,11 @@ func (x AuthType) String() string { } func (AuthType) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_proxy_socks_config_proto_enumTypes[0].Descriptor() + return file_proxy_socks_config_proto_enumTypes[0].Descriptor() } func (AuthType) Type() protoreflect.EnumType { - return &file_v2ray_com_core_proxy_socks_config_proto_enumTypes[0] + return &file_proxy_socks_config_proto_enumTypes[0] } func (x AuthType) Number() protoreflect.EnumNumber { @@ -67,7 +73,7 @@ func (x AuthType) Number() protoreflect.EnumNumber { // Deprecated: Use AuthType.Descriptor instead. func (AuthType) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_socks_config_proto_rawDescGZIP(), []int{0} + return file_proxy_socks_config_proto_rawDescGZIP(), []int{0} } // Account represents a Socks account. @@ -83,7 +89,7 @@ type Account struct { func (x *Account) Reset() { *x = Account{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_socks_config_proto_msgTypes[0] + mi := &file_proxy_socks_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -96,7 +102,7 @@ func (x *Account) String() string { func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_socks_config_proto_msgTypes[0] + mi := &file_proxy_socks_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109,7 +115,7 @@ func (x *Account) ProtoReflect() protoreflect.Message { // Deprecated: Use Account.ProtoReflect.Descriptor instead. func (*Account) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_socks_config_proto_rawDescGZIP(), []int{0} + return file_proxy_socks_config_proto_rawDescGZIP(), []int{0} } func (x *Account) GetUsername() string { @@ -144,7 +150,7 @@ type ServerConfig struct { func (x *ServerConfig) Reset() { *x = ServerConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_socks_config_proto_msgTypes[1] + mi := &file_proxy_socks_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -157,7 +163,7 @@ func (x *ServerConfig) String() string { func (*ServerConfig) ProtoMessage() {} func (x *ServerConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_socks_config_proto_msgTypes[1] + mi := &file_proxy_socks_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -170,7 +176,7 @@ func (x *ServerConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead. func (*ServerConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_socks_config_proto_rawDescGZIP(), []int{1} + return file_proxy_socks_config_proto_rawDescGZIP(), []int{1} } func (x *ServerConfig) GetAuthType() AuthType { @@ -229,7 +235,7 @@ type ClientConfig struct { func (x *ClientConfig) Reset() { *x = ClientConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_socks_config_proto_msgTypes[2] + mi := &file_proxy_socks_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -242,7 +248,7 @@ func (x *ClientConfig) String() string { func (*ClientConfig) ProtoMessage() {} func (x *ClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_socks_config_proto_msgTypes[2] + mi := &file_proxy_socks_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -255,7 +261,7 @@ func (x *ClientConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. func (*ClientConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_socks_config_proto_rawDescGZIP(), []int{2} + return file_proxy_socks_config_proto_rawDescGZIP(), []int{2} } func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint { @@ -265,76 +271,75 @@ func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint { return nil } -var File_v2ray_com_core_proxy_socks_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_socks_config_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b, - 0x73, 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x07, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, - 0xf5, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x3d, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, 0x41, 0x75, 0x74, - 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x4e, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, - 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x75, 0x64, 0x70, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x75, 0x64, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x52, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2a, 0x25, 0x0a, 0x08, 0x41, - 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x41, 0x55, - 0x54, 0x48, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, - 0x10, 0x01, 0x42, 0x3e, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x73, - 0x50, 0x01, 0x5a, 0x05, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0xaa, 0x02, 0x16, 0x56, 0x32, 0x52, 0x61, - 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x53, 0x6f, 0x63, - 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_socks_config_proto protoreflect.FileDescriptor + +var file_proxy_socks_config_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, + 0x6b, 0x73, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x41, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x22, 0xf5, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x4e, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, + 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x75, 0x64, 0x70, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x64, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x3b, 0x0a, + 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x52, 0x0a, 0x0c, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2a, 0x25, + 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, + 0x5f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x41, 0x53, 0x53, 0x57, + 0x4f, 0x52, 0x44, 0x10, 0x01, 0x42, 0x53, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, + 0x63, 0x6b, 0x73, 0x50, 0x01, 0x5a, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x6b, + 0x73, 0xaa, 0x02, 0x16, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_socks_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_socks_config_proto_rawDescData = file_v2ray_com_core_proxy_socks_config_proto_rawDesc + file_proxy_socks_config_proto_rawDescOnce sync.Once + file_proxy_socks_config_proto_rawDescData = file_proxy_socks_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_socks_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_socks_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_socks_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_socks_config_proto_rawDescData) +func file_proxy_socks_config_proto_rawDescGZIP() []byte { + file_proxy_socks_config_proto_rawDescOnce.Do(func() { + file_proxy_socks_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_socks_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_socks_config_proto_rawDescData + return file_proxy_socks_config_proto_rawDescData } -var file_v2ray_com_core_proxy_socks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_proxy_socks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_v2ray_com_core_proxy_socks_config_proto_goTypes = []interface{}{ +var file_proxy_socks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_proxy_socks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_proxy_socks_config_proto_goTypes = []interface{}{ (AuthType)(0), // 0: v2ray.core.proxy.socks.AuthType (*Account)(nil), // 1: v2ray.core.proxy.socks.Account (*ServerConfig)(nil), // 2: v2ray.core.proxy.socks.ServerConfig @@ -343,7 +348,7 @@ var file_v2ray_com_core_proxy_socks_config_proto_goTypes = []interface{}{ (*net.IPOrDomain)(nil), // 5: v2ray.core.common.net.IPOrDomain (*protocol.ServerEndpoint)(nil), // 6: v2ray.core.common.protocol.ServerEndpoint } -var file_v2ray_com_core_proxy_socks_config_proto_depIdxs = []int32{ +var file_proxy_socks_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.proxy.socks.ServerConfig.auth_type:type_name -> v2ray.core.proxy.socks.AuthType 4, // 1: v2ray.core.proxy.socks.ServerConfig.accounts:type_name -> v2ray.core.proxy.socks.ServerConfig.AccountsEntry 5, // 2: v2ray.core.proxy.socks.ServerConfig.address:type_name -> v2ray.core.common.net.IPOrDomain @@ -355,13 +360,13 @@ var file_v2ray_com_core_proxy_socks_config_proto_depIdxs = []int32{ 0, // [0:4] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_socks_config_proto_init() } -func file_v2ray_com_core_proxy_socks_config_proto_init() { - if File_v2ray_com_core_proxy_socks_config_proto != nil { +func init() { file_proxy_socks_config_proto_init() } +func file_proxy_socks_config_proto_init() { + if File_proxy_socks_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_socks_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_socks_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Account); i { case 0: return &v.state @@ -373,7 +378,7 @@ func file_v2ray_com_core_proxy_socks_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_socks_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_socks_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerConfig); i { case 0: return &v.state @@ -385,7 +390,7 @@ func file_v2ray_com_core_proxy_socks_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_socks_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_socks_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClientConfig); i { case 0: return &v.state @@ -402,19 +407,19 @@ func file_v2ray_com_core_proxy_socks_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_socks_config_proto_rawDesc, + RawDescriptor: file_proxy_socks_config_proto_rawDesc, NumEnums: 1, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_socks_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_socks_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_proxy_socks_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_proxy_socks_config_proto_msgTypes, + GoTypes: file_proxy_socks_config_proto_goTypes, + DependencyIndexes: file_proxy_socks_config_proto_depIdxs, + EnumInfos: file_proxy_socks_config_proto_enumTypes, + MessageInfos: file_proxy_socks_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_socks_config_proto = out.File - file_v2ray_com_core_proxy_socks_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_socks_config_proto_goTypes = nil - file_v2ray_com_core_proxy_socks_config_proto_depIdxs = nil + File_proxy_socks_config_proto = out.File + file_proxy_socks_config_proto_rawDesc = nil + file_proxy_socks_config_proto_goTypes = nil + file_proxy_socks_config_proto_depIdxs = nil } diff --git a/proxy/socks/config.proto b/proxy/socks/config.proto index 94fee102f5..873dd2b551 100644 --- a/proxy/socks/config.proto +++ b/proxy/socks/config.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core.proxy.socks; option csharp_namespace = "V2Ray.Core.Proxy.Socks"; -option go_package = "socks"; +option go_package = "v2ray.com/core/proxy/socks"; option java_package = "com.v2ray.core.proxy.socks"; option java_multiple_files = true; -import "v2ray.com/core/common/net/address.proto"; -import "v2ray.com/core/common/protocol/server_spec.proto"; +import "common/net/address.proto"; +import "common/protocol/server_spec.proto"; // Account represents a Socks account. message Account { diff --git a/proxy/vless/account.pb.go b/proxy/vless/account.pb.go index da5cc167fa..6c5f91d119 100644 --- a/proxy/vless/account.pb.go +++ b/proxy/vless/account.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.12.3 -// source: v2ray.com/core/proxy/vless/account.proto +// protoc v3.13.0 +// source: proxy/vless/account.proto package vless @@ -41,7 +41,7 @@ type Account struct { func (x *Account) Reset() { *x = Account{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vless_account_proto_msgTypes[0] + mi := &file_proxy_vless_account_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -54,7 +54,7 @@ func (x *Account) String() string { func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vless_account_proto_msgTypes[0] + mi := &file_proxy_vless_account_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67,7 +67,7 @@ func (x *Account) ProtoReflect() protoreflect.Message { // Deprecated: Use Account.ProtoReflect.Descriptor instead. func (*Account) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vless_account_proto_rawDescGZIP(), []int{0} + return file_proxy_vless_account_proto_rawDescGZIP(), []int{0} } func (x *Account) GetId() string { @@ -91,43 +91,43 @@ func (x *Account) GetEncryption() string { return "" } -var File_v2ray_com_core_proxy_vless_account_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_vless_account_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, - 0x73, 0x73, 0x22, 0x59, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, - 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x0a, - 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x3e, 0x0a, - 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x05, 0x76, - 0x6c, 0x65, 0x73, 0x73, 0xaa, 0x02, 0x16, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, - 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6c, 0x65, 0x73, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_vless_account_proto protoreflect.FileDescriptor + +var file_proxy_vless_account_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, + 0x65, 0x73, 0x73, 0x22, 0x59, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, + 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x1e, + 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x53, + 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x1a, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0xaa, 0x02, 0x16, 0x56, 0x32, 0x52, + 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6c, + 0x65, 0x73, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_vless_account_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_vless_account_proto_rawDescData = file_v2ray_com_core_proxy_vless_account_proto_rawDesc + file_proxy_vless_account_proto_rawDescOnce sync.Once + file_proxy_vless_account_proto_rawDescData = file_proxy_vless_account_proto_rawDesc ) -func file_v2ray_com_core_proxy_vless_account_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_vless_account_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_vless_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_vless_account_proto_rawDescData) +func file_proxy_vless_account_proto_rawDescGZIP() []byte { + file_proxy_vless_account_proto_rawDescOnce.Do(func() { + file_proxy_vless_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_vless_account_proto_rawDescData) }) - return file_v2ray_com_core_proxy_vless_account_proto_rawDescData + return file_proxy_vless_account_proto_rawDescData } -var file_v2ray_com_core_proxy_vless_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_proxy_vless_account_proto_goTypes = []interface{}{ +var file_proxy_vless_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proxy_vless_account_proto_goTypes = []interface{}{ (*Account)(nil), // 0: v2ray.core.proxy.vless.Account } -var file_v2ray_com_core_proxy_vless_account_proto_depIdxs = []int32{ +var file_proxy_vless_account_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -135,13 +135,13 @@ var file_v2ray_com_core_proxy_vless_account_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_vless_account_proto_init() } -func file_v2ray_com_core_proxy_vless_account_proto_init() { - if File_v2ray_com_core_proxy_vless_account_proto != nil { +func init() { file_proxy_vless_account_proto_init() } +func file_proxy_vless_account_proto_init() { + if File_proxy_vless_account_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_vless_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Account); i { case 0: return &v.state @@ -158,18 +158,18 @@ func file_v2ray_com_core_proxy_vless_account_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_vless_account_proto_rawDesc, + RawDescriptor: file_proxy_vless_account_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_vless_account_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_vless_account_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_vless_account_proto_msgTypes, + GoTypes: file_proxy_vless_account_proto_goTypes, + DependencyIndexes: file_proxy_vless_account_proto_depIdxs, + MessageInfos: file_proxy_vless_account_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_vless_account_proto = out.File - file_v2ray_com_core_proxy_vless_account_proto_rawDesc = nil - file_v2ray_com_core_proxy_vless_account_proto_goTypes = nil - file_v2ray_com_core_proxy_vless_account_proto_depIdxs = nil + File_proxy_vless_account_proto = out.File + file_proxy_vless_account_proto_rawDesc = nil + file_proxy_vless_account_proto_goTypes = nil + file_proxy_vless_account_proto_depIdxs = nil } diff --git a/proxy/vless/account.proto b/proxy/vless/account.proto index e259c78db5..3cf6176704 100644 --- a/proxy/vless/account.proto +++ b/proxy/vless/account.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vless; option csharp_namespace = "V2Ray.Core.Proxy.Vless"; -option go_package = "vless"; +option go_package = "v2ray.com/core/proxy/vless"; option java_package = "com.v2ray.core.proxy.vless"; option java_multiple_files = true; diff --git a/proxy/vless/encoding/addons.pb.go b/proxy/vless/encoding/addons.pb.go index 271356b678..2aa3ac2a72 100644 --- a/proxy/vless/encoding/addons.pb.go +++ b/proxy/vless/encoding/addons.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: v2ray.com/core/proxy/vless/encoding/addons.proto +// source: proxy/vless/encoding/addons.proto package encoding @@ -34,7 +34,7 @@ func (m *Addons) Reset() { *m = Addons{} } func (m *Addons) String() string { return proto.CompactTextString(m) } func (*Addons) ProtoMessage() {} func (*Addons) Descriptor() ([]byte, []int) { - return fileDescriptor_d597c8244066ecf1, []int{0} + return fileDescriptor_75ab671b0ca8b1cc, []int{0} } func (m *Addons) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -81,25 +81,22 @@ func init() { proto.RegisterType((*Addons)(nil), "v2ray.core.proxy.vless.encoding.Addons") } -func init() { - proto.RegisterFile("v2ray.com/core/proxy/vless/encoding/addons.proto", fileDescriptor_d597c8244066ecf1) -} +func init() { proto.RegisterFile("proxy/vless/encoding/addons.proto", fileDescriptor_75ab671b0ca8b1cc) } -var fileDescriptor_d597c8244066ecf1 = []byte{ - // 193 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x28, 0x33, 0x2a, 0x4a, - 0xac, 0xd4, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x28, 0xca, 0xaf, 0xa8, - 0xd4, 0x2f, 0xcb, 0x49, 0x2d, 0x2e, 0xd6, 0x4f, 0xcd, 0x4b, 0xce, 0x4f, 0xc9, 0xcc, 0x4b, 0xd7, - 0x4f, 0x4c, 0x49, 0xc9, 0xcf, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x87, 0xe9, - 0x28, 0x4a, 0xd5, 0x03, 0xab, 0xd6, 0x03, 0xab, 0xd6, 0x83, 0xa9, 0x56, 0x72, 0xe3, 0x62, 0x73, - 0x04, 0x6b, 0x10, 0x92, 0xe1, 0xe2, 0x0c, 0x4e, 0xce, 0x48, 0x4d, 0x29, 0xcd, 0x49, 0x2d, 0x92, - 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x42, 0x08, 0x08, 0xc9, 0x71, 0x71, 0xc1, 0x39, 0x61, 0x12, - 0x4c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x48, 0x22, 0x4e, 0xc9, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, - 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x5c, 0xca, 0xc9, 0xf9, 0xb9, - 0x7a, 0x04, 0xac, 0x0f, 0x60, 0x8c, 0xe2, 0x80, 0xb1, 0x57, 0x31, 0xc9, 0x87, 0x19, 0x05, 0x25, - 0x56, 0xea, 0x39, 0x83, 0x54, 0x07, 0x80, 0x55, 0x87, 0x81, 0x55, 0xbb, 0x42, 0x55, 0x24, 0xb1, - 0x81, 0x3d, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x78, 0xd4, 0xe2, 0x08, 0x01, 0x00, - 0x00, +var fileDescriptor_75ab671b0ca8b1cc = []byte{ + // 192 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x28, 0xca, 0xaf, + 0xa8, 0xd4, 0x2f, 0xcb, 0x49, 0x2d, 0x2e, 0xd6, 0x4f, 0xcd, 0x4b, 0xce, 0x4f, 0xc9, 0xcc, 0x4b, + 0xd7, 0x4f, 0x4c, 0x49, 0xc9, 0xcf, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2f, + 0x33, 0x2a, 0x4a, 0xac, 0xd4, 0x4b, 0xce, 0x2f, 0x4a, 0xd5, 0x03, 0xab, 0xd6, 0x03, 0xab, 0xd6, + 0x83, 0xa9, 0x56, 0x72, 0xe3, 0x62, 0x73, 0x04, 0x6b, 0x10, 0x92, 0xe1, 0xe2, 0x0c, 0x4e, 0xce, + 0x48, 0x4d, 0x29, 0xcd, 0x49, 0x2d, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x42, 0x08, 0x08, + 0xc9, 0x71, 0x71, 0xc1, 0x39, 0x61, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x48, 0x22, 0x4e, + 0x75, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8c, 0xc7, + 0x72, 0x0c, 0x5c, 0xca, 0xc9, 0xf9, 0xb9, 0x7a, 0x04, 0xac, 0x0f, 0x60, 0x8c, 0x52, 0x86, 0x29, + 0xc9, 0xd5, 0x07, 0x29, 0xd3, 0xc7, 0xe6, 0xa7, 0x55, 0x4c, 0xf2, 0x61, 0x46, 0x41, 0x89, 0x95, + 0x7a, 0xce, 0x20, 0x83, 0x02, 0xc0, 0x06, 0x85, 0x81, 0x0d, 0x72, 0x85, 0xaa, 0x48, 0x62, 0x03, + 0xfb, 0xd7, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x21, 0xe4, 0x67, 0xb0, 0x14, 0x01, 0x00, 0x00, } func (m *Addons) Marshal() (dAtA []byte, err error) { diff --git a/proxy/vless/encoding/addons.proto b/proxy/vless/encoding/addons.proto index 39ae2503b4..4f5fcfffc3 100644 --- a/proxy/vless/encoding/addons.proto +++ b/proxy/vless/encoding/addons.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vless.encoding; option csharp_namespace = "V2Ray.Core.Proxy.Vless.Encoding"; -option go_package = "encoding"; +option go_package = "v2ray.com/core/proxy/vless/encoding"; option java_package = "com.v2ray.core.proxy.vless.encoding"; option java_multiple_files = true; diff --git a/proxy/vless/encoding/encoding.go b/proxy/vless/encoding/encoding.go index 1a238397d6..a0d5b54f80 100644 --- a/proxy/vless/encoding/encoding.go +++ b/proxy/vless/encoding/encoding.go @@ -1,5 +1,9 @@ +// +build !confonly + package encoding +//go:generate errorgen + import ( "io" @@ -9,8 +13,6 @@ import ( "v2ray.com/core/proxy/vless" ) -//go:generate errorgen - const ( Version = byte(0) ) diff --git a/proxy/vless/inbound/config.pb.go b/proxy/vless/inbound/config.pb.go index bb8f5c4106..f22d2b2585 100644 --- a/proxy/vless/inbound/config.pb.go +++ b/proxy/vless/inbound/config.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.12.3 -// source: v2ray.com/core/proxy/vless/inbound/config.proto +// protoc v3.13.0 +// source: proxy/vless/inbound/config.proto package inbound @@ -12,7 +12,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" protocol "v2ray.com/core/common/protocol" ) @@ -32,16 +31,17 @@ type Fallback struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Addr *net.IPOrDomain `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - Unix string `protobuf:"bytes,3,opt,name=unix,proto3" json:"unix,omitempty"` - Xver uint32 `protobuf:"varint,4,opt,name=xver,proto3" json:"xver,omitempty"` + Alpn string `protobuf:"bytes,1,opt,name=alpn,proto3" json:"alpn,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Dest string `protobuf:"bytes,4,opt,name=dest,proto3" json:"dest,omitempty"` + Xver uint64 `protobuf:"varint,5,opt,name=xver,proto3" json:"xver,omitempty"` } func (x *Fallback) Reset() { *x = Fallback{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[0] + mi := &file_proxy_vless_inbound_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -54,7 +54,7 @@ func (x *Fallback) String() string { func (*Fallback) ProtoMessage() {} func (x *Fallback) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[0] + mi := &file_proxy_vless_inbound_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67,102 +67,38 @@ func (x *Fallback) ProtoReflect() protoreflect.Message { // Deprecated: Use Fallback.ProtoReflect.Descriptor instead. func (*Fallback) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescGZIP(), []int{0} + return file_proxy_vless_inbound_config_proto_rawDescGZIP(), []int{0} } -func (x *Fallback) GetAddr() *net.IPOrDomain { +func (x *Fallback) GetAlpn() string { if x != nil { - return x.Addr - } - return nil -} - -func (x *Fallback) GetPort() uint32 { - if x != nil { - return x.Port - } - return 0 -} - -func (x *Fallback) GetUnix() string { - if x != nil { - return x.Unix + return x.Alpn } return "" } -func (x *Fallback) GetXver() uint32 { - if x != nil { - return x.Xver - } - return 0 -} - -type FallbackH2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Addr *net.IPOrDomain `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - Unix string `protobuf:"bytes,3,opt,name=unix,proto3" json:"unix,omitempty"` - Xver uint32 `protobuf:"varint,4,opt,name=xver,proto3" json:"xver,omitempty"` -} - -func (x *FallbackH2) Reset() { - *x = FallbackH2{} - if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FallbackH2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FallbackH2) ProtoMessage() {} - -func (x *FallbackH2) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FallbackH2.ProtoReflect.Descriptor instead. -func (*FallbackH2) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescGZIP(), []int{1} -} - -func (x *FallbackH2) GetAddr() *net.IPOrDomain { +func (x *Fallback) GetPath() string { if x != nil { - return x.Addr + return x.Path } - return nil + return "" } -func (x *FallbackH2) GetPort() uint32 { +func (x *Fallback) GetType() string { if x != nil { - return x.Port + return x.Type } - return 0 + return "" } -func (x *FallbackH2) GetUnix() string { +func (x *Fallback) GetDest() string { if x != nil { - return x.Unix + return x.Dest } return "" } -func (x *FallbackH2) GetXver() uint32 { +func (x *Fallback) GetXver() uint64 { if x != nil { return x.Xver } @@ -174,17 +110,16 @@ type Config struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User []*protocol.User `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"` + 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 string `protobuf:"bytes,2,opt,name=decryption,proto3" json:"decryption,omitempty"` - Fallback *Fallback `protobuf:"bytes,3,opt,name=fallback,proto3" json:"fallback,omitempty"` - FallbackH2 *FallbackH2 `protobuf:"bytes,4,opt,name=fallback_h2,json=fallbackH2,proto3" json:"fallback_h2,omitempty"` + Fallbacks []*Fallback `protobuf:"bytes,3,rep,name=fallbacks,proto3" json:"fallbacks,omitempty"` } func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[2] + mi := &file_proxy_vless_inbound_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -197,7 +132,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[2] + mi := &file_proxy_vless_inbound_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -210,12 +145,12 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescGZIP(), []int{2} + return file_proxy_vless_inbound_config_proto_rawDescGZIP(), []int{1} } -func (x *Config) GetUser() []*protocol.User { +func (x *Config) GetClients() []*protocol.User { if x != nil { - return x.User + return x.Clients } return nil } @@ -227,113 +162,85 @@ func (x *Config) GetDecryption() string { return "" } -func (x *Config) GetFallback() *Fallback { +func (x *Config) GetFallbacks() []*Fallback { if x != nil { - return x.Fallback + return x.Fallbacks } return nil } -func (x *Config) GetFallbackH2() *FallbackH2 { - if x != nil { - return x.FallbackH2 - } - return nil -} +var File_proxy_vless_inbound_config_proto protoreflect.FileDescriptor -var File_v2ray_com_core_proxy_vless_inbound_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x69, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x08, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x12, 0x35, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x75, 0x6e, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x78, - 0x12, 0x12, 0x0a, 0x04, 0x78, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, - 0x78, 0x76, 0x65, 0x72, 0x22, 0x80, 0x01, 0x0a, 0x0b, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x5f, 0x68, 0x32, 0x12, 0x35, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, - 0x6e, 0x69, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x78, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x04, 0x78, 0x76, 0x65, 0x72, 0x22, 0xf2, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x66, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, - 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x46, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x52, 0x08, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x4c, - 0x0a, 0x0b, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x68, 0x32, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x68, 0x32, - 0x52, 0x0a, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x48, 0x32, 0x42, 0x50, 0x0a, 0x22, - 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, +var file_proxy_vless_inbound_config_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x69, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1e, - 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x56, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x64, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6e, + 0x0a, 0x08, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x6c, + 0x70, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x6c, 0x70, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x78, 0x76, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x78, 0x76, 0x65, 0x72, 0x22, 0xac, + 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x07, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x09, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, + 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x52, 0x09, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x6b, 0x0a, + 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x22, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, + 0x73, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1e, 0x56, 0x32, 0x52, 0x61, + 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6c, 0x65, + 0x73, 0x73, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescData = file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDesc + file_proxy_vless_inbound_config_proto_rawDescOnce sync.Once + file_proxy_vless_inbound_config_proto_rawDescData = file_proxy_vless_inbound_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescData) +func file_proxy_vless_inbound_config_proto_rawDescGZIP() []byte { + file_proxy_vless_inbound_config_proto_rawDescOnce.Do(func() { + file_proxy_vless_inbound_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_vless_inbound_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDescData + return file_proxy_vless_inbound_config_proto_rawDescData } -var file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_v2ray_com_core_proxy_vless_inbound_config_proto_goTypes = []interface{}{ - (*Fallback)(nil), // 0: v2ray.core.proxy.vless.inbound.Fallback - (*FallbackH2)(nil), // 1: v2ray.core.proxy.vless.inbound.Fallback_h2 - (*Config)(nil), // 2: v2ray.core.proxy.vless.inbound.Config - (*net.IPOrDomain)(nil), // 3: v2ray.core.common.net.IPOrDomain - (*protocol.User)(nil), // 4: v2ray.core.common.protocol.User +var file_proxy_vless_inbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_proxy_vless_inbound_config_proto_goTypes = []interface{}{ + (*Fallback)(nil), // 0: v2ray.core.proxy.vless.inbound.Fallback + (*Config)(nil), // 1: v2ray.core.proxy.vless.inbound.Config + (*protocol.User)(nil), // 2: v2ray.core.common.protocol.User } -var file_v2ray_com_core_proxy_vless_inbound_config_proto_depIdxs = []int32{ - 3, // 0: v2ray.core.proxy.vless.inbound.Fallback.addr:type_name -> v2ray.core.common.net.IPOrDomain - 3, // 1: v2ray.core.proxy.vless.inbound.Fallback_h2.addr:type_name -> v2ray.core.common.net.IPOrDomain - 4, // 2: v2ray.core.proxy.vless.inbound.Config.user:type_name -> v2ray.core.common.protocol.User - 0, // 3: v2ray.core.proxy.vless.inbound.Config.fallback:type_name -> v2ray.core.proxy.vless.inbound.Fallback - 1, // 4: v2ray.core.proxy.vless.inbound.Config.fallback_h2:type_name -> v2ray.core.proxy.vless.inbound.Fallback_h2 - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name +var file_proxy_vless_inbound_config_proto_depIdxs = []int32{ + 2, // 0: v2ray.core.proxy.vless.inbound.Config.clients:type_name -> v2ray.core.common.protocol.User + 0, // 1: v2ray.core.proxy.vless.inbound.Config.fallbacks:type_name -> v2ray.core.proxy.vless.inbound.Fallback + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_vless_inbound_config_proto_init() } -func file_v2ray_com_core_proxy_vless_inbound_config_proto_init() { - if File_v2ray_com_core_proxy_vless_inbound_config_proto != nil { +func init() { file_proxy_vless_inbound_config_proto_init() } +func file_proxy_vless_inbound_config_proto_init() { + if File_proxy_vless_inbound_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_inbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Fallback); i { case 0: return &v.state @@ -345,19 +252,7 @@ func file_v2ray_com_core_proxy_vless_inbound_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FallbackH2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_inbound_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -374,18 +269,18 @@ func file_v2ray_com_core_proxy_vless_inbound_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDesc, + RawDescriptor: file_proxy_vless_inbound_config_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_vless_inbound_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_vless_inbound_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_vless_inbound_config_proto_msgTypes, + GoTypes: file_proxy_vless_inbound_config_proto_goTypes, + DependencyIndexes: file_proxy_vless_inbound_config_proto_depIdxs, + MessageInfos: file_proxy_vless_inbound_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_vless_inbound_config_proto = out.File - file_v2ray_com_core_proxy_vless_inbound_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_vless_inbound_config_proto_goTypes = nil - file_v2ray_com_core_proxy_vless_inbound_config_proto_depIdxs = nil + File_proxy_vless_inbound_config_proto = out.File + file_proxy_vless_inbound_config_proto_rawDesc = nil + file_proxy_vless_inbound_config_proto_goTypes = nil + file_proxy_vless_inbound_config_proto_depIdxs = nil } diff --git a/proxy/vless/inbound/config.proto b/proxy/vless/inbound/config.proto index 1a0bffe86f..8b6970ff7b 100644 --- a/proxy/vless/inbound/config.proto +++ b/proxy/vless/inbound/config.proto @@ -2,31 +2,23 @@ syntax = "proto3"; package v2ray.core.proxy.vless.inbound; option csharp_namespace = "V2Ray.Core.Proxy.Vless.Inbound"; -option go_package = "inbound"; +option go_package = "v2ray.com/core/proxy/vless/inbound"; option java_package = "com.v2ray.core.proxy.vless.inbound"; option java_multiple_files = true; -import "v2ray.com/core/common/net/address.proto"; -import "v2ray.com/core/common/protocol/user.proto"; +import "common/protocol/user.proto"; message Fallback { - v2ray.core.common.net.IPOrDomain addr = 1; - uint32 port = 2; - string unix = 3; - uint32 xver = 4; -} - -message Fallback_h2 { - v2ray.core.common.net.IPOrDomain addr = 1; - uint32 port = 2; - string unix = 3; - uint32 xver = 4; + string alpn = 1; + string path = 2; + string type = 3; + string dest = 4; + uint64 xver = 5; } message Config { - repeated v2ray.core.common.protocol.User user = 1; + repeated v2ray.core.common.protocol.User clients = 1; // Decryption settings. Only applies to server side, and only accepts "none" for now. string decryption = 2; - Fallback fallback = 3; - Fallback_h2 fallback_h2 = 4; + repeated Fallback fallbacks = 3; } diff --git a/proxy/vless/inbound/inbound.go b/proxy/vless/inbound/inbound.go index a19bbdd8b4..d02a534bff 100644 --- a/proxy/vless/inbound/inbound.go +++ b/proxy/vless/inbound/inbound.go @@ -51,10 +51,8 @@ type Handler struct { policyManager policy.Manager validator *vless.Validator dns dns.Client - fallback *Fallback // or nil - addrport string - fallback_h2 *FallbackH2 // or nil - addrport_h2 string + fallbacks map[string]map[string]*Fallback // or nil + //regexps map[string]*regexp.Regexp // or nil } // New creates a new VLess inbound handler. @@ -68,7 +66,7 @@ func New(ctx context.Context, config *Config, dc dns.Client) (*Handler, error) { dns: dc, } - for _, user := range config.User { + for _, user := range config.Clients { u, err := user.ToMemoryUser() if err != nil { return nil, newError("failed to get VLESS user").Base(err).AtError() @@ -78,13 +76,35 @@ func New(ctx context.Context, config *Config, dc dns.Client) (*Handler, error) { } } - if config.Fallback != nil { - handler.fallback = config.Fallback - handler.addrport = handler.fallback.Addr.AsAddress().String() + ":" + strconv.Itoa(int(handler.fallback.Port)) - } - if config.FallbackH2 != nil { - handler.fallback_h2 = config.FallbackH2 - handler.addrport_h2 = handler.fallback_h2.Addr.AsAddress().String() + ":" + strconv.Itoa(int(handler.fallback_h2.Port)) + if config.Fallbacks != nil { + handler.fallbacks = make(map[string]map[string]*Fallback) + //handler.regexps = make(map[string]*regexp.Regexp) + for _, fb := range config.Fallbacks { + if handler.fallbacks[fb.Alpn] == nil { + handler.fallbacks[fb.Alpn] = make(map[string]*Fallback) + } + handler.fallbacks[fb.Alpn][fb.Path] = fb + /* + if fb.Path != "" { + if r, err := regexp.Compile(fb.Path); err != nil { + return nil, newError("invalid path regexp").Base(err).AtError() + } else { + handler.regexps[fb.Path] = r + } + } + */ + } + if handler.fallbacks[""] != nil { + for alpn, pfb := range handler.fallbacks { + if alpn != "" { // && alpn != "h2" { + for path, fb := range handler.fallbacks[""] { + if pfb[path] == nil { + pfb[path] = fb + } + } + } + } + } } return handler, nil @@ -113,6 +133,8 @@ func (*Handler) Network() []net.Network { // Process implements proxy.Inbound.Process(). func (h *Handler) Process(ctx context.Context, network net.Network, connection internet.Connection, dispatcher routing.Dispatcher) error { + sid := session.ExportIDToError(ctx) + sessionPolicy := h.policyManager.ForLevel(0) if err := connection.SetReadDeadline(time.Now().Add(sessionPolicy.Timeouts.Handshake)); err != nil { return newError("unable to set read deadline").Base(err).AtWarning() @@ -121,8 +143,8 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i first := buf.New() first.ReadFrom(connection) - sid := session.ExportIDToError(ctx) - newError("firstLen = ", first.Len()).AtInfo().WriteToLog(sid) + firstLen := first.Len() + newError("firstLen = ", firstLen).AtInfo().WriteToLog(sid) reader := &buf.BufferedReader{ Reader: buf.NewReader(connection), @@ -134,81 +156,124 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i var err error var pre *buf.Buffer - fallback := 0 - if h.fallback != nil { - fallback = 1 + isfb := false + apfb := h.fallbacks + if apfb != nil { + isfb = true } - if fallback == 1 && first.Len() < 18 { + if isfb && firstLen < 18 { err = newError("fallback directly") } else { request, requestAddons, err, pre = encoding.DecodeRequestHeader(reader, h.validator) if pre == nil { - fallback = 0 + isfb = false } } if err != nil { - if fallback == 1 { - if h.fallback_h2 != nil { + if isfb { + if err := connection.SetReadDeadline(time.Time{}); err != nil { + newError("unable to set back read deadline").Base(err).AtWarning().WriteToLog(sid) + } + newError("fallback starts").Base(err).AtInfo().WriteToLog(sid) + + alpn := "" + if len(apfb) > 1 || apfb[""] == nil { iConn := connection if statConn, ok := iConn.(*internet.StatCouterConnection); ok { iConn = statConn.Connection } if tlsConn, ok := iConn.(*tls.Conn); ok { - if tlsConn.ConnectionState().NegotiatedProtocol == "h2" { - fallback = 2 + alpn = tlsConn.ConnectionState().NegotiatedProtocol + newError("realAlpn = " + alpn).AtInfo().WriteToLog(sid) + if apfb[alpn] == nil { + alpn = "" } } } + pfb := apfb[alpn] + if pfb == nil { + return newError(`failed to find the default "alpn" config`).AtWarning() + } - var addrport string - var unixpath string - var proxyver uint32 - - switch fallback { - case 1: - addrport = h.addrport - unixpath = h.fallback.Unix - proxyver = h.fallback.Xver - newError("fallback starts").Base(err).AtInfo().WriteToLog(sid) - case 2: - addrport = h.addrport_h2 - unixpath = h.fallback_h2.Unix - proxyver = h.fallback_h2.Xver - newError("fallback_h2 starts").Base(err).AtInfo().WriteToLog(sid) + path := "" + if len(pfb) > 1 || pfb[""] == nil { + /* + if lines := bytes.Split(firstBytes, []byte{'\r', '\n'}); len(lines) > 1 { + if s := bytes.Split(lines[0], []byte{' '}); len(s) == 3 { + if len(s[0]) < 8 && len(s[1]) > 0 && len(s[2]) == 8 { + newError("realPath = " + string(s[1])).AtInfo().WriteToLog(sid) + for _, fb := range pfb { + if fb.Path != "" && h.regexps[fb.Path].Match(s[1]) { + path = fb.Path + break + } + } + } + } + } + */ + if pre != nil && pre.Len() == 1 && first.Byte(3) != '*' { // firstLen >= 18 && invalid request version && not h2c + firstBytes := first.Bytes() + for i := 3; i <= 7; i++ { // 5 -> 9 + if firstBytes[i] == '/' && firstBytes[i-1] == ' ' { + search := len(firstBytes) + if search > 64 { + search = 64 // up to 60 + } + for j := i + 1; j < search; j++ { + k := firstBytes[j] + if k == '\r' || k == '\n' { // avoid logging \r or \n + break + } + if k == ' ' { + path = string(firstBytes[i:j]) + newError("realPath = " + path).AtInfo().WriteToLog(sid) + if pfb[path] == nil { + path = "" + } + break + } + } + break + } + } + } + } + fb := pfb[path] + if fb == nil { + return newError(`failed to find the default "path" config`).AtWarning() } + ctx, cancel := context.WithCancel(ctx) + timer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle) + ctx = policy.ContextWithBufferPolicy(ctx, sessionPolicy.Buffer) + var conn net.Conn if err := retry.ExponentialBackoff(5, 100).On(func() error { var dialer net.Dialer - var err error - if unixpath != "" { - conn, err = dialer.DialContext(ctx, "unix", unixpath) - } else { - conn, err = dialer.DialContext(ctx, "tcp", addrport) - } + conn, err = dialer.DialContext(ctx, fb.Type, fb.Dest) if err != nil { return err } return nil }); err != nil { - return newError("failed to fallback connection").Base(err).AtWarning() + dest := fb.Dest + if dest[0] == '\x00' { + dest = "@" + dest[1:] + } + return newError("failed to dial to " + dest).Base(err).AtWarning() } defer conn.Close() // nolint: errcheck - ctx, cancel := context.WithCancel(ctx) - timer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle) - - writer := buf.NewWriter(connection) - serverReader := buf.NewReader(conn) serverWriter := buf.NewWriter(conn) postRequest := func() error { defer timer.SetTimeout(sessionPolicy.Timeouts.DownlinkOnly) - if proxyver > 0 { + if fb.Xver != 0 { remoteAddr, remotePort, err := net.SplitHostPort(connection.RemoteAddr().String()) if err != nil { return err @@ -225,7 +290,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i } } pro := buf.New() - switch proxyver { + switch fb.Xver { case 1: if ipv4 { pro.Write([]byte("PROXY TCP4 " + remoteAddr + " " + localAddr + " " + remotePort + " " + localPort + "\r\n")) @@ -257,7 +322,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i pro.Write(b2) } if err := serverWriter.WriteMultiBuffer(buf.MultiBuffer{pro}); err != nil { - return newError("failed to set PROXY protocol v", proxyver).Base(err).AtWarning() + return newError("failed to set PROXY protocol v", fb.Xver).Base(err).AtWarning() } } if pre != nil && pre.Len() > 0 { @@ -266,15 +331,17 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i } } if err := buf.Copy(reader, serverWriter, buf.UpdateActivity(timer)); err != nil { - return err // ... + return newError("failed to fallback request payload").Base(err).AtInfo() } return nil } + writer := buf.NewWriter(connection) + getResponse := func() error { defer timer.SetTimeout(sessionPolicy.Timeouts.UplinkOnly) if err := buf.Copy(serverReader, writer, buf.UpdateActivity(timer)); err != nil { - return err // ... + return newError("failed to deliver response payload").Base(err).AtInfo() } return nil } @@ -299,21 +366,10 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i return err } - if request.Command != protocol.RequestCommandMux { - ctx = log.ContextWithAccessMessage(ctx, &log.AccessMessage{ - From: connection.RemoteAddr(), - To: request.Destination(), - Status: log.AccessAccepted, - Reason: "", - Email: request.User.Email, - }) - } - - newError("received request for ", request.Destination()).AtInfo().WriteToLog(sid) - if err := connection.SetReadDeadline(time.Time{}); err != nil { newError("unable to set back read deadline").Base(err).AtWarning().WriteToLog(sid) } + newError("received request for ", request.Destination()).AtInfo().WriteToLog(sid) inbound := session.InboundFromContext(ctx) if inbound == nil { @@ -321,12 +377,21 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i } inbound.User = request.User - sessionPolicy = h.policyManager.ForLevel(request.User.Level) + if request.Command != protocol.RequestCommandMux { + ctx = log.ContextWithAccessMessage(ctx, &log.AccessMessage{ + From: connection.RemoteAddr(), + To: request.Destination(), + Status: log.AccessAccepted, + Reason: "", + Email: request.User.Email, + }) + } + sessionPolicy = h.policyManager.ForLevel(request.User.Level) ctx, cancel := context.WithCancel(ctx) timer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle) - ctx = policy.ContextWithBufferPolicy(ctx, sessionPolicy.Buffer) + link, err := dispatcher.Dispatch(ctx, request.Destination()) if err != nil { return newError("failed to dispatch request to ", request.Destination()).Base(err).AtWarning() diff --git a/proxy/vless/outbound/config.pb.go b/proxy/vless/outbound/config.pb.go index cdcc3f82b5..ea4d0b4728 100644 --- a/proxy/vless/outbound/config.pb.go +++ b/proxy/vless/outbound/config.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.12.3 -// source: v2ray.com/core/proxy/vless/outbound/config.proto +// protoc v3.13.0 +// source: proxy/vless/outbound/config.proto package outbound @@ -31,13 +31,13 @@ type Config struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Receiver []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=receiver,proto3" json:"receiver,omitempty"` + Vnext []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=vnext,proto3" json:"vnext,omitempty"` } func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vless_outbound_config_proto_msgTypes[0] + mi := &file_proxy_vless_outbound_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +50,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vless_outbound_config_proto_msgTypes[0] + mi := &file_proxy_vless_outbound_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,60 +63,59 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDescGZIP(), []int{0} + return file_proxy_vless_outbound_config_proto_rawDescGZIP(), []int{0} } -func (x *Config) GetReceiver() []*protocol.ServerEndpoint { +func (x *Config) GetVnext() []*protocol.ServerEndpoint { if x != nil { - return x.Receiver + return x.Vnext } return nil } -var File_v2ray_com_core_proxy_vless_outbound_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x6f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x46, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x42, 0x53, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, - 0x5a, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1f, 0x56, 0x32, 0x52, - 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6c, - 0x65, 0x73, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_vless_outbound_config_proto protoreflect.FileDescriptor + +var file_proxy_vless_outbound_config_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x6f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x6e, + 0x65, 0x78, 0x74, 0x42, 0x6e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, + 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x23, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0xaa, 0x02, 0x1f, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDescData = file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDesc + file_proxy_vless_outbound_config_proto_rawDescOnce sync.Once + file_proxy_vless_outbound_config_proto_rawDescData = file_proxy_vless_outbound_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDescData) +func file_proxy_vless_outbound_config_proto_rawDescGZIP() []byte { + file_proxy_vless_outbound_config_proto_rawDescOnce.Do(func() { + file_proxy_vless_outbound_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_vless_outbound_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDescData + return file_proxy_vless_outbound_config_proto_rawDescData } -var file_v2ray_com_core_proxy_vless_outbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_proxy_vless_outbound_config_proto_goTypes = []interface{}{ +var file_proxy_vless_outbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proxy_vless_outbound_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.proxy.vless.outbound.Config (*protocol.ServerEndpoint)(nil), // 1: v2ray.core.common.protocol.ServerEndpoint } -var file_v2ray_com_core_proxy_vless_outbound_config_proto_depIdxs = []int32{ - 1, // 0: v2ray.core.proxy.vless.outbound.Config.receiver:type_name -> v2ray.core.common.protocol.ServerEndpoint +var file_proxy_vless_outbound_config_proto_depIdxs = []int32{ + 1, // 0: v2ray.core.proxy.vless.outbound.Config.vnext:type_name -> v2ray.core.common.protocol.ServerEndpoint 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -124,13 +123,13 @@ var file_v2ray_com_core_proxy_vless_outbound_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_vless_outbound_config_proto_init() } -func file_v2ray_com_core_proxy_vless_outbound_config_proto_init() { - if File_v2ray_com_core_proxy_vless_outbound_config_proto != nil { +func init() { file_proxy_vless_outbound_config_proto_init() } +func file_proxy_vless_outbound_config_proto_init() { + if File_proxy_vless_outbound_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_vless_outbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_outbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -147,18 +146,18 @@ func file_v2ray_com_core_proxy_vless_outbound_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDesc, + RawDescriptor: file_proxy_vless_outbound_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_vless_outbound_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_vless_outbound_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_vless_outbound_config_proto_msgTypes, + GoTypes: file_proxy_vless_outbound_config_proto_goTypes, + DependencyIndexes: file_proxy_vless_outbound_config_proto_depIdxs, + MessageInfos: file_proxy_vless_outbound_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_vless_outbound_config_proto = out.File - file_v2ray_com_core_proxy_vless_outbound_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_vless_outbound_config_proto_goTypes = nil - file_v2ray_com_core_proxy_vless_outbound_config_proto_depIdxs = nil + File_proxy_vless_outbound_config_proto = out.File + file_proxy_vless_outbound_config_proto_rawDesc = nil + file_proxy_vless_outbound_config_proto_goTypes = nil + file_proxy_vless_outbound_config_proto_depIdxs = nil } diff --git a/proxy/vless/outbound/config.proto b/proxy/vless/outbound/config.proto index 732addf0f9..3604b72d59 100644 --- a/proxy/vless/outbound/config.proto +++ b/proxy/vless/outbound/config.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core.proxy.vless.outbound; option csharp_namespace = "V2Ray.Core.Proxy.Vless.Outbound"; -option go_package = "outbound"; +option go_package = "v2ray.com/core/proxy/vless/outbound"; option java_package = "com.v2ray.core.proxy.vless.outbound"; option java_multiple_files = true; -import "v2ray.com/core/common/protocol/server_spec.proto"; +import "common/protocol/server_spec.proto"; message Config { - repeated v2ray.core.common.protocol.ServerEndpoint receiver = 1; + repeated v2ray.core.common.protocol.ServerEndpoint vnext = 1; } diff --git a/proxy/vless/outbound/outbound.go b/proxy/vless/outbound/outbound.go index 039e4fc6fb..6fdea3ceac 100644 --- a/proxy/vless/outbound/outbound.go +++ b/proxy/vless/outbound/outbound.go @@ -41,8 +41,8 @@ type Handler struct { func New(ctx context.Context, config *Config) (*Handler, error) { serverList := protocol.NewServerList() - for _, rec := range config.Receiver { - s, err := protocol.NewServerSpecFromPB(*rec) + for _, rec := range config.Vnext { + s, err := protocol.NewServerSpecFromPB(rec) if err != nil { return nil, newError("failed to parse server spec").Base(err).AtError() } @@ -109,7 +109,6 @@ func (v *Handler) Process(ctx context.Context, link *transport.Link, dialer inte } sessionPolicy := v.policyManager.ForLevel(request.User.Level) - ctx, cancel := context.WithCancel(ctx) timer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle) diff --git a/proxy/vmess/account.pb.go b/proxy/vmess/account.pb.go index 0dd053b0ec..9d79cca010 100644 --- a/proxy/vmess/account.pb.go +++ b/proxy/vmess/account.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/vmess/account.proto + package vmess import ( @@ -38,7 +44,7 @@ type Account struct { func (x *Account) Reset() { *x = Account{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vmess_account_proto_msgTypes[0] + mi := &file_proxy_vmess_account_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -51,7 +57,7 @@ func (x *Account) String() string { func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vmess_account_proto_msgTypes[0] + mi := &file_proxy_vmess_account_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64,7 +70,7 @@ func (x *Account) ProtoReflect() protoreflect.Message { // Deprecated: Use Account.ProtoReflect.Descriptor instead. func (*Account) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vmess_account_proto_rawDescGZIP(), []int{0} + return file_proxy_vmess_account_proto_rawDescGZIP(), []int{0} } func (x *Account) GetId() string { @@ -95,52 +101,52 @@ func (x *Account) GetTestsEnabled() string { return "" } -var File_v2ray_com_core_proxy_vmess_account_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_vmess_account_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, - 0x73, 0x73, 0x1a, 0x2c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xb2, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x61, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, - 0x61, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x73, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x3e, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, +var File_proxy_vmess_account_proto protoreflect.FileDescriptor + +var file_proxy_vmess_account_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, - 0x65, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x05, 0x76, 0x6d, 0x65, 0x73, 0x73, 0xaa, 0x02, 0x16, 0x56, - 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x56, 0x6d, 0x65, 0x73, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x73, 0x1a, 0x1d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x73, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x53, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x6d, 0x65, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, + 0x65, 0x73, 0x73, 0xaa, 0x02, 0x16, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, + 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6d, 0x65, 0x73, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_vmess_account_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_vmess_account_proto_rawDescData = file_v2ray_com_core_proxy_vmess_account_proto_rawDesc + file_proxy_vmess_account_proto_rawDescOnce sync.Once + file_proxy_vmess_account_proto_rawDescData = file_proxy_vmess_account_proto_rawDesc ) -func file_v2ray_com_core_proxy_vmess_account_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_vmess_account_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_vmess_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_vmess_account_proto_rawDescData) +func file_proxy_vmess_account_proto_rawDescGZIP() []byte { + file_proxy_vmess_account_proto_rawDescOnce.Do(func() { + file_proxy_vmess_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_vmess_account_proto_rawDescData) }) - return file_v2ray_com_core_proxy_vmess_account_proto_rawDescData + return file_proxy_vmess_account_proto_rawDescData } -var file_v2ray_com_core_proxy_vmess_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_proxy_vmess_account_proto_goTypes = []interface{}{ +var file_proxy_vmess_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proxy_vmess_account_proto_goTypes = []interface{}{ (*Account)(nil), // 0: v2ray.core.proxy.vmess.Account (*protocol.SecurityConfig)(nil), // 1: v2ray.core.common.protocol.SecurityConfig } -var file_v2ray_com_core_proxy_vmess_account_proto_depIdxs = []int32{ +var file_proxy_vmess_account_proto_depIdxs = []int32{ 1, // 0: v2ray.core.proxy.vmess.Account.security_settings:type_name -> v2ray.core.common.protocol.SecurityConfig 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -149,13 +155,13 @@ var file_v2ray_com_core_proxy_vmess_account_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_vmess_account_proto_init() } -func file_v2ray_com_core_proxy_vmess_account_proto_init() { - if File_v2ray_com_core_proxy_vmess_account_proto != nil { +func init() { file_proxy_vmess_account_proto_init() } +func file_proxy_vmess_account_proto_init() { + if File_proxy_vmess_account_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_vmess_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Account); i { case 0: return &v.state @@ -172,18 +178,18 @@ func file_v2ray_com_core_proxy_vmess_account_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_vmess_account_proto_rawDesc, + RawDescriptor: file_proxy_vmess_account_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_vmess_account_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_vmess_account_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_vmess_account_proto_msgTypes, + GoTypes: file_proxy_vmess_account_proto_goTypes, + DependencyIndexes: file_proxy_vmess_account_proto_depIdxs, + MessageInfos: file_proxy_vmess_account_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_vmess_account_proto = out.File - file_v2ray_com_core_proxy_vmess_account_proto_rawDesc = nil - file_v2ray_com_core_proxy_vmess_account_proto_goTypes = nil - file_v2ray_com_core_proxy_vmess_account_proto_depIdxs = nil + File_proxy_vmess_account_proto = out.File + file_proxy_vmess_account_proto_rawDesc = nil + file_proxy_vmess_account_proto_goTypes = nil + file_proxy_vmess_account_proto_depIdxs = nil } diff --git a/proxy/vmess/account.proto b/proxy/vmess/account.proto index dee0202464..b4e98a9e19 100644 --- a/proxy/vmess/account.proto +++ b/proxy/vmess/account.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.proxy.vmess; option csharp_namespace = "V2Ray.Core.Proxy.Vmess"; -option go_package = "vmess"; +option go_package = "v2ray.com/core/proxy/vmess"; option java_package = "com.v2ray.core.proxy.vmess"; option java_multiple_files = true; -import "v2ray.com/core/common/protocol/headers.proto"; +import "common/protocol/headers.proto"; message Account { // ID of the account, in the form of a UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57". diff --git a/proxy/vmess/aead/encrypt.go b/proxy/vmess/aead/encrypt.go index 21bd9467ae..d2d0b1dea7 100644 --- a/proxy/vmess/aead/encrypt.go +++ b/proxy/vmess/aead/encrypt.go @@ -8,6 +8,7 @@ import ( "encoding/binary" "io" "time" + "v2ray.com/core/common" ) @@ -21,8 +22,7 @@ func SealVMessAEADHeader(key [16]byte, data []byte) []byte { aeadPayloadLengthSerializeBuffer := bytes.NewBuffer(nil) - var headerPayloadDataLen uint16 - headerPayloadDataLen = uint16(len(data)) + headerPayloadDataLen := uint16(len(data)) common.Must(binary.Write(aeadPayloadLengthSerializeBuffer, binary.BigEndian, headerPayloadDataLen)) diff --git a/proxy/vmess/aead/encrypt_test.go b/proxy/vmess/aead/encrypt_test.go index 70e9a54038..9e5f7af948 100644 --- a/proxy/vmess/aead/encrypt_test.go +++ b/proxy/vmess/aead/encrypt_test.go @@ -3,9 +3,10 @@ package aead import ( "bytes" "fmt" - "github.com/stretchr/testify/assert" "io" "testing" + + "github.com/stretchr/testify/assert" ) func TestOpenVMessAEADHeader(t *testing.T) { diff --git a/proxy/vmess/encoding/server.go b/proxy/vmess/encoding/server.go index c71c8b3381..11146cd645 100644 --- a/proxy/vmess/encoding/server.go +++ b/proxy/vmess/encoding/server.go @@ -12,19 +12,18 @@ import ( "io/ioutil" "sync" "time" - "v2ray.com/core/common/dice" - vmessaead "v2ray.com/core/proxy/vmess/aead" "golang.org/x/crypto/chacha20poly1305" - "v2ray.com/core/common" "v2ray.com/core/common/bitmask" "v2ray.com/core/common/buf" "v2ray.com/core/common/crypto" + "v2ray.com/core/common/dice" "v2ray.com/core/common/net" "v2ray.com/core/common/protocol" "v2ray.com/core/common/task" "v2ray.com/core/proxy/vmess" + vmessaead "v2ray.com/core/proxy/vmess/aead" ) type sessionId struct { @@ -170,7 +169,7 @@ func (s *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request var fixedSizeAuthID [16]byte copy(fixedSizeAuthID[:], buffer.Bytes()) - if foundAEAD == true { + if foundAEAD { vmessAccount = user.Account.(*vmess.MemoryAccount) var fixedSizeCmdKey [16]byte copy(fixedSizeCmdKey[:], vmessAccount.ID.CmdKey()) @@ -405,8 +404,7 @@ func (s *ServerSession) EncodeResponseHeader(header *protocol.ResponseHeader, wr aeadResponseHeaderLengthEncryptionBuffer := bytes.NewBuffer(nil) - var decryptedResponseHeaderLengthBinaryDeserializeBuffer uint16 - decryptedResponseHeaderLengthBinaryDeserializeBuffer = uint16(aeadEncryptedHeaderBuffer.Len()) + decryptedResponseHeaderLengthBinaryDeserializeBuffer := uint16(aeadEncryptedHeaderBuffer.Len()) common.Must(binary.Write(aeadResponseHeaderLengthEncryptionBuffer, binary.BigEndian, decryptedResponseHeaderLengthBinaryDeserializeBuffer)) diff --git a/proxy/vmess/inbound/config.pb.go b/proxy/vmess/inbound/config.pb.go index 6801a920bf..256ce4bcfc 100644 --- a/proxy/vmess/inbound/config.pb.go +++ b/proxy/vmess/inbound/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/vmess/inbound/config.proto + package inbound import ( @@ -31,7 +37,7 @@ type DetourConfig struct { func (x *DetourConfig) Reset() { *x = DetourConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[0] + mi := &file_proxy_vmess_inbound_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +50,7 @@ func (x *DetourConfig) String() string { func (*DetourConfig) ProtoMessage() {} func (x *DetourConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[0] + mi := &file_proxy_vmess_inbound_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +63,7 @@ func (x *DetourConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use DetourConfig.ProtoReflect.Descriptor instead. func (*DetourConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescGZIP(), []int{0} + return file_proxy_vmess_inbound_config_proto_rawDescGZIP(), []int{0} } func (x *DetourConfig) GetTo() string { @@ -79,7 +85,7 @@ type DefaultConfig struct { func (x *DefaultConfig) Reset() { *x = DefaultConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[1] + mi := &file_proxy_vmess_inbound_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -92,7 +98,7 @@ func (x *DefaultConfig) String() string { func (*DefaultConfig) ProtoMessage() {} func (x *DefaultConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[1] + mi := &file_proxy_vmess_inbound_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105,7 +111,7 @@ func (x *DefaultConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use DefaultConfig.ProtoReflect.Descriptor instead. func (*DefaultConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescGZIP(), []int{1} + return file_proxy_vmess_inbound_config_proto_rawDescGZIP(), []int{1} } func (x *DefaultConfig) GetAlterId() uint32 { @@ -136,7 +142,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[2] + mi := &file_proxy_vmess_inbound_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -149,7 +155,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[2] + mi := &file_proxy_vmess_inbound_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -162,7 +168,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescGZIP(), []int{2} + return file_proxy_vmess_inbound_config_proto_rawDescGZIP(), []int{2} } func (x *Config) GetUser() []*protocol.User { @@ -193,67 +199,67 @@ func (x *Config) GetSecureEncryptionOnly() bool { return false } -var File_v2ray_com_core_proxy_vmess_inbound_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x69, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x1a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x0c, - 0x44, 0x65, 0x74, 0x6f, 0x75, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, - 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x0d, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, - 0x08, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x07, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x83, - 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, - 0x47, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x6f, - 0x75, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, - 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x74, 0x6f, 0x75, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x64, 0x65, 0x74, 0x6f, 0x75, 0x72, 0x12, 0x34, - 0x0a, 0x16, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x6e, 0x6c, 0x79, 0x42, 0x50, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, - 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x07, 0x69, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1e, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, - 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x49, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_vmess_inbound_config_proto protoreflect.FileDescriptor + +var file_proxy_vmess_inbound_config_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x69, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, + 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x6f, 0x75, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, + 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x22, 0x40, + 0x0a, 0x0d, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x19, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x07, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x22, 0x83, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x12, 0x47, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x64, 0x65, + 0x74, 0x6f, 0x75, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, + 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x74, 0x6f, + 0x75, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x64, 0x65, 0x74, 0x6f, 0x75, 0x72, + 0x12, 0x34, 0x0a, 0x16, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x14, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x6e, 0x6c, 0x79, 0x42, 0x6b, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, + 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x22, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0xaa, 0x02, 0x1e, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescData = file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDesc + file_proxy_vmess_inbound_config_proto_rawDescOnce sync.Once + file_proxy_vmess_inbound_config_proto_rawDescData = file_proxy_vmess_inbound_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescData) +func file_proxy_vmess_inbound_config_proto_rawDescGZIP() []byte { + file_proxy_vmess_inbound_config_proto_rawDescOnce.Do(func() { + file_proxy_vmess_inbound_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_vmess_inbound_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDescData + return file_proxy_vmess_inbound_config_proto_rawDescData } -var file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_v2ray_com_core_proxy_vmess_inbound_config_proto_goTypes = []interface{}{ +var file_proxy_vmess_inbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proxy_vmess_inbound_config_proto_goTypes = []interface{}{ (*DetourConfig)(nil), // 0: v2ray.core.proxy.vmess.inbound.DetourConfig (*DefaultConfig)(nil), // 1: v2ray.core.proxy.vmess.inbound.DefaultConfig (*Config)(nil), // 2: v2ray.core.proxy.vmess.inbound.Config (*protocol.User)(nil), // 3: v2ray.core.common.protocol.User } -var file_v2ray_com_core_proxy_vmess_inbound_config_proto_depIdxs = []int32{ +var file_proxy_vmess_inbound_config_proto_depIdxs = []int32{ 3, // 0: v2ray.core.proxy.vmess.inbound.Config.user:type_name -> v2ray.core.common.protocol.User 1, // 1: v2ray.core.proxy.vmess.inbound.Config.default:type_name -> v2ray.core.proxy.vmess.inbound.DefaultConfig 0, // 2: v2ray.core.proxy.vmess.inbound.Config.detour:type_name -> v2ray.core.proxy.vmess.inbound.DetourConfig @@ -264,13 +270,13 @@ var file_v2ray_com_core_proxy_vmess_inbound_config_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_vmess_inbound_config_proto_init() } -func file_v2ray_com_core_proxy_vmess_inbound_config_proto_init() { - if File_v2ray_com_core_proxy_vmess_inbound_config_proto != nil { +func init() { file_proxy_vmess_inbound_config_proto_init() } +func file_proxy_vmess_inbound_config_proto_init() { + if File_proxy_vmess_inbound_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_inbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DetourConfig); i { case 0: return &v.state @@ -282,7 +288,7 @@ func file_v2ray_com_core_proxy_vmess_inbound_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_inbound_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DefaultConfig); i { case 0: return &v.state @@ -294,7 +300,7 @@ func file_v2ray_com_core_proxy_vmess_inbound_config_proto_init() { return nil } } - file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_inbound_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -311,18 +317,18 @@ func file_v2ray_com_core_proxy_vmess_inbound_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDesc, + RawDescriptor: file_proxy_vmess_inbound_config_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_vmess_inbound_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_vmess_inbound_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_vmess_inbound_config_proto_msgTypes, + GoTypes: file_proxy_vmess_inbound_config_proto_goTypes, + DependencyIndexes: file_proxy_vmess_inbound_config_proto_depIdxs, + MessageInfos: file_proxy_vmess_inbound_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_vmess_inbound_config_proto = out.File - file_v2ray_com_core_proxy_vmess_inbound_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_vmess_inbound_config_proto_goTypes = nil - file_v2ray_com_core_proxy_vmess_inbound_config_proto_depIdxs = nil + File_proxy_vmess_inbound_config_proto = out.File + file_proxy_vmess_inbound_config_proto_rawDesc = nil + file_proxy_vmess_inbound_config_proto_goTypes = nil + file_proxy_vmess_inbound_config_proto_depIdxs = nil } diff --git a/proxy/vmess/inbound/config.proto b/proxy/vmess/inbound/config.proto index 63caeff811..f4edd7a4cf 100644 --- a/proxy/vmess/inbound/config.proto +++ b/proxy/vmess/inbound/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.proxy.vmess.inbound; option csharp_namespace = "V2Ray.Core.Proxy.Vmess.Inbound"; -option go_package = "inbound"; +option go_package = "v2ray.com/core/proxy/vmess/inbound"; option java_package = "com.v2ray.core.proxy.vmess.inbound"; option java_multiple_files = true; -import "v2ray.com/core/common/protocol/user.proto"; +import "common/protocol/user.proto"; message DetourConfig { string to = 1; diff --git a/proxy/vmess/outbound/config.pb.go b/proxy/vmess/outbound/config.pb.go index 861e41cf0c..0785166891 100644 --- a/proxy/vmess/outbound/config.pb.go +++ b/proxy/vmess/outbound/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: proxy/vmess/outbound/config.proto + package outbound import ( @@ -31,7 +37,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_proxy_vmess_outbound_config_proto_msgTypes[0] + mi := &file_proxy_vmess_outbound_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +50,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_proxy_vmess_outbound_config_proto_msgTypes[0] + mi := &file_proxy_vmess_outbound_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +63,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDescGZIP(), []int{0} + return file_proxy_vmess_outbound_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetReceiver() []*protocol.ServerEndpoint { @@ -67,49 +73,49 @@ func (x *Config) GetReceiver() []*protocol.ServerEndpoint { return nil } -var File_v2ray_com_core_proxy_vmess_outbound_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x6f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x46, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x42, 0x53, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, - 0x5a, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1f, 0x56, 0x32, 0x52, - 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6d, - 0x65, 0x73, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, +var File_proxy_vmess_outbound_config_proto protoreflect.FileDescriptor + +var file_proxy_vmess_outbound_config_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x6f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x46, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x50, 0x01, 0x5a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x6f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1f, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6d, 0x65, 0x73, 0x73, + 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( - file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDescData = file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDesc + file_proxy_vmess_outbound_config_proto_rawDescOnce sync.Once + file_proxy_vmess_outbound_config_proto_rawDescData = file_proxy_vmess_outbound_config_proto_rawDesc ) -func file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDescData) +func file_proxy_vmess_outbound_config_proto_rawDescGZIP() []byte { + file_proxy_vmess_outbound_config_proto_rawDescOnce.Do(func() { + file_proxy_vmess_outbound_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_vmess_outbound_config_proto_rawDescData) }) - return file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDescData + return file_proxy_vmess_outbound_config_proto_rawDescData } -var file_v2ray_com_core_proxy_vmess_outbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_proxy_vmess_outbound_config_proto_goTypes = []interface{}{ +var file_proxy_vmess_outbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proxy_vmess_outbound_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.proxy.vmess.outbound.Config (*protocol.ServerEndpoint)(nil), // 1: v2ray.core.common.protocol.ServerEndpoint } -var file_v2ray_com_core_proxy_vmess_outbound_config_proto_depIdxs = []int32{ +var file_proxy_vmess_outbound_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.proxy.vmess.outbound.Config.Receiver:type_name -> v2ray.core.common.protocol.ServerEndpoint 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -118,13 +124,13 @@ var file_v2ray_com_core_proxy_vmess_outbound_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_proxy_vmess_outbound_config_proto_init() } -func file_v2ray_com_core_proxy_vmess_outbound_config_proto_init() { - if File_v2ray_com_core_proxy_vmess_outbound_config_proto != nil { +func init() { file_proxy_vmess_outbound_config_proto_init() } +func file_proxy_vmess_outbound_config_proto_init() { + if File_proxy_vmess_outbound_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_proxy_vmess_outbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_outbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -141,18 +147,18 @@ func file_v2ray_com_core_proxy_vmess_outbound_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDesc, + RawDescriptor: file_proxy_vmess_outbound_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_proxy_vmess_outbound_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_proxy_vmess_outbound_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_proxy_vmess_outbound_config_proto_msgTypes, + GoTypes: file_proxy_vmess_outbound_config_proto_goTypes, + DependencyIndexes: file_proxy_vmess_outbound_config_proto_depIdxs, + MessageInfos: file_proxy_vmess_outbound_config_proto_msgTypes, }.Build() - File_v2ray_com_core_proxy_vmess_outbound_config_proto = out.File - file_v2ray_com_core_proxy_vmess_outbound_config_proto_rawDesc = nil - file_v2ray_com_core_proxy_vmess_outbound_config_proto_goTypes = nil - file_v2ray_com_core_proxy_vmess_outbound_config_proto_depIdxs = nil + File_proxy_vmess_outbound_config_proto = out.File + file_proxy_vmess_outbound_config_proto_rawDesc = nil + file_proxy_vmess_outbound_config_proto_goTypes = nil + file_proxy_vmess_outbound_config_proto_depIdxs = nil } diff --git a/proxy/vmess/outbound/config.proto b/proxy/vmess/outbound/config.proto index 7530988dff..7cbe31a4f6 100644 --- a/proxy/vmess/outbound/config.proto +++ b/proxy/vmess/outbound/config.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core.proxy.vmess.outbound; option csharp_namespace = "V2Ray.Core.Proxy.Vmess.Outbound"; -option go_package = "outbound"; +option go_package = "v2ray.com/core/proxy/vmess/outbound"; option java_package = "com.v2ray.core.proxy.vmess.outbound"; option java_multiple_files = true; -import "v2ray.com/core/common/protocol/server_spec.proto"; +import "common/protocol/server_spec.proto"; message Config { repeated v2ray.core.common.protocol.ServerEndpoint Receiver = 1; -} \ No newline at end of file +} diff --git a/proxy/vmess/outbound/outbound.go b/proxy/vmess/outbound/outbound.go index 5ab123bb01..5b5fdd0d9d 100644 --- a/proxy/vmess/outbound/outbound.go +++ b/proxy/vmess/outbound/outbound.go @@ -36,7 +36,7 @@ type Handler struct { func New(ctx context.Context, config *Config) (*Handler, error) { serverList := protocol.NewServerList() for _, rec := range config.Receiver { - s, err := protocol.NewServerSpecFromPB(*rec) + s, err := protocol.NewServerSpecFromPB(rec) if err != nil { return nil, newError("failed to parse server spec").Base(err) } diff --git a/proxy/vmess/validator.go b/proxy/vmess/validator.go index 76602c4a43..0bb67854f1 100644 --- a/proxy/vmess/validator.go +++ b/proxy/vmess/validator.go @@ -3,18 +3,21 @@ package vmess import ( + "crypto/hmac" + "crypto/sha256" + "hash" "hash/crc64" "strings" "sync" "sync/atomic" "time" - "v2ray.com/core/common/dice" - "v2ray.com/core/proxy/vmess/aead" "v2ray.com/core/common" + "v2ray.com/core/common/dice" "v2ray.com/core/common/protocol" "v2ray.com/core/common/serial" "v2ray.com/core/common/task" + "v2ray.com/core/proxy/vmess/aead" ) const ( @@ -138,8 +141,10 @@ func (v *TimedUserValidator) Add(u *protocol.MemoryUser) error { v.generateNewHashes(protocol.Timestamp(nowSec), uu) account := uu.user.Account.(*MemoryAccount) - if v.behaviorFused == false { - v.behaviorSeed = crc64.Update(v.behaviorSeed, crc64.MakeTable(crc64.ECMA), account.ID.Bytes()) + if !v.behaviorFused { + hashkdf := hmac.New(func() hash.Hash { return sha256.New() }, []byte("VMESSBSKDF")) + hashkdf.Write(account.ID.Bytes()) + v.behaviorSeed = crc64.Update(v.behaviorSeed, crc64.MakeTable(crc64.ECMA), hashkdf.Sum(nil)) } var cmdkeyfl [16]byte diff --git a/release/BUILD b/release/BUILD index 76f729cc9e..f82432cb6d 100644 --- a/release/BUILD +++ b/release/BUILD @@ -15,8 +15,8 @@ filegroup( filegroup( name = "systemd", srcs = [ - "config/systemd/v2ray.service", - "config/systemv/v2ray", + "config/systemd/system/v2ray.service", + "config/systemd/system/v2ray@.service", ], ) diff --git a/release/config/geoip.dat b/release/config/geoip.dat index 96c6827b24..91353c4e37 100644 Binary files a/release/config/geoip.dat and b/release/config/geoip.dat differ diff --git a/release/config/systemd/system/v2ray.service b/release/config/systemd/system/v2ray.service new file mode 100644 index 0000000000..799dc7e8ed --- /dev/null +++ b/release/config/systemd/system/v2ray.service @@ -0,0 +1,15 @@ +[Unit] +Description=V2Ray Service +Documentation=https://www.v2fly.org/ +After=network.target nss-lookup.target + +[Service] +User=nobody +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +NoNewPrivileges=true +ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/release/config/systemd/system/v2ray@.service b/release/config/systemd/system/v2ray@.service new file mode 100644 index 0000000000..d3cc518a45 --- /dev/null +++ b/release/config/systemd/system/v2ray@.service @@ -0,0 +1,15 @@ +[Unit] +Description=V2Ray Service +Documentation=https://www.v2fly.org/ +After=network.target nss-lookup.target + +[Service] +User=nobody +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +NoNewPrivileges=true +ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/%i.json +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/release/config/systemd/v2ray.service b/release/config/systemd/v2ray.service deleted file mode 100644 index cc9c394b11..0000000000 --- a/release/config/systemd/v2ray.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=V2Ray Service -Documentation=https://www.v2ray.com/ https://www.v2fly.org/ -After=network.target nss-lookup.target - -[Service] -# If the version of systemd is 240 or above, then uncommenting Type=exec and commenting out Type=simple -#Type=exec -Type=simple -# This service runs as root. You may consider to run it as another user for security concerns. -# By uncommenting User=nobody and commenting out User=root, the service will run as user nobody. -# More discussion at https://github.com/v2ray/v2ray-core/issues/1011 -User=root -#User=nobody -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE -NoNewPrivileges=true -ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/release/config/systemd/v2ray@.service b/release/config/systemd/v2ray@.service deleted file mode 100644 index 557bb095aa..0000000000 --- a/release/config/systemd/v2ray@.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=V2Ray Service -Documentation=https://www.v2ray.com/ https://www.v2fly.org/ -After=network.target nss-lookup.target - -[Service] -# If the version of systemd is 240 or above, then uncommenting Type=exec and commenting out Type=simple -#Type=exec -Type=simple -# This service runs as root. You may consider to run it as another user for security concerns. -# By uncommenting User=nobody and commenting out User=root, the service will run as user nobody. -# More discussion at https://github.com/v2ray/v2ray-core/issues/1011 -User=root -#User=nobody -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE -NoNewPrivileges=true -ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/%i.json -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/release/config/systemv/v2ray b/release/config/systemv/v2ray deleted file mode 100755 index 839730f0b5..0000000000 --- a/release/config/systemv/v2ray +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: v2ray -# Required-Start: $network $local_fs $remote_fs -# Required-Stop: $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: V2Ray proxy services -# Description: V2Ray proxy services -### END INIT INFO - -# Acknowledgements: Isulew Li - -DESC=v2ray -NAME=v2ray -DAEMON=/usr/bin/v2ray/v2ray -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME - -DAEMON_OPTS="-config /etc/v2ray/config.json" - -# Exit if the package is not installed -[ -x $DAEMON ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - mkdir -p /var/log/v2ray - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - # 3 if configuration file not ready for daemon - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background -m -- $DAEMON_OPTS \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? - ;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|reload|restart|force-reload}" >&2 - exit 3 - ;; -esac diff --git a/release/doc/readme.md b/release/doc/readme.md deleted file mode 100644 index fbe481fe49..0000000000 --- a/release/doc/readme.md +++ /dev/null @@ -1,37 +0,0 @@ -# V2Ray 内核 - -V2Ray 内核可以单独使用,也可以配置其它程序一起使用。 - -官网:https://www.v2ray.com/ - -## 使用方式 - -### Windows 或 macOS - -压缩包内的 config.json 是默认的配置文件,无需修改即可使用。配置文件的详细信息可以在官网找到。 - -* Windows 中的可执行文件为 v2ray.exe 和 wv2ray.exe。双击即可运行。 - * v2ray.exe 是一个命令行程序,启动后可以看到命令行界面。 - * wv2ray.exe 是一个后台程序,没有界面,会在后台自动运行。 -* macOS 中的可执行文件为 v2ray。右键单击,然后选择使用 Terminal 打开即可。 - -### Linux - -压缩包中包含多个配置文件,按需使用。 - -可执行程序为 v2ray,启动命令: - -```bash -v2ray --config= -``` - -## 验证文件 - -压缩包中的 .sig 文件为 GPG 签名文件,用来验证对应程序文件的真实性。签名公钥可以在下面的链接找到: - -https://github.com/v2ray/v2ray-core/blob/master/release/verify/official_release.asc - -## 问题反馈 - -* Github: https://github.com/v2ray/v2ray-core -* Telegram: https://t.me/v2fly_chat diff --git a/release/mapping.bzl b/release/mapping.bzl index fb7d695912..97a76c7b8f 100644 --- a/release/mapping.bzl +++ b/release/mapping.bzl @@ -1,6 +1,5 @@ def gen_mappings(os, arch, ver): return { - "v2ray_core/release/doc": "doc", "v2ray_core/release/config": "", "v2ray_core/main/" + os + "/" + arch + "/" + ver: "", "v2ray_core/infra/control/main/" + os + "/" + arch + "/" + ver : "", diff --git a/release/updatedat.sh b/release/updatedat.sh deleted file mode 100755 index e6a499751b..0000000000 --- a/release/updatedat.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -pushd "$GOPATH/src/v2ray.com/core/" || return - -# Update geoip.dat -curl -L -o release/config/geoip.dat "https://github.com/v2ray/geoip/raw/release/geoip.dat" -sleep 1 - -# Update geosite.dat -curl -L -o release/config/geosite.dat "https://github.com/v2ray/domain-list-community/raw/release/dlc.dat" -sleep 1 - -popd || return diff --git a/release/verify/official_release.pub b/release/verify/official_release.pub deleted file mode 100644 index f2df721932..0000000000 --- a/release/verify/official_release.pub +++ /dev/null @@ -1,2 +0,0 @@ -untrusted comment: V2Fly Signing Key -RWTe6SReSmJUeqoA8cq1MxX7ycL06DAMAJcAgQ8dCN3kFtnWBHYDpTnx diff --git a/testing/scenarios/vmess_test.go b/testing/scenarios/vmess_test.go index 8131213935..5f90cca7b1 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -928,8 +928,8 @@ func TestVMessKCPLarge(t *testing.T) { t.Error(err) } - defer func(){ - <-time.After(5*time.Second) + defer func() { + <-time.After(5 * time.Second) CloseAllServers(servers) }() } @@ -1178,8 +1178,8 @@ func TestVMessGCMMuxUDP(t *testing.T) { time.Sleep(time.Second) } - defer func(){ - <-time.After(5*time.Second) + defer func() { + <-time.After(5 * time.Second) CloseAllServers(servers) }() } diff --git a/transport/config.pb.go b/transport/config.pb.go index 5aa8551630..1c17d7e737 100644 --- a/transport/config.pb.go +++ b/transport/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/config.proto + package transport import ( @@ -33,7 +39,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_config_proto_msgTypes[0] + mi := &file_transport_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +52,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_config_proto_msgTypes[0] + mi := &file_transport_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +65,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_config_proto_rawDescGZIP(), []int{0} + return file_transport_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetTransportSettings() []*internet.TransportConfig { @@ -69,47 +75,46 @@ func (x *Config) GetTransportSettings() []*internet.TransportConfig { return nil } -var File_v2ray_com_core_transport_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_config_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, - 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 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, 0x42, 0x3e, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x50, 0x01, 0x5a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0xaa, - 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_transport_config_proto protoreflect.FileDescriptor + +var file_transport_config_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x1f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x67, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x12, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 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, 0x42, 0x4d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x50, 0x01, 0x5a, 0x18, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_config_proto_rawDescData = file_v2ray_com_core_transport_config_proto_rawDesc + file_transport_config_proto_rawDescOnce sync.Once + file_transport_config_proto_rawDescData = file_transport_config_proto_rawDesc ) -func file_v2ray_com_core_transport_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_config_proto_rawDescData) +func file_transport_config_proto_rawDescGZIP() []byte { + file_transport_config_proto_rawDescOnce.Do(func() { + file_transport_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_config_proto_rawDescData + return file_transport_config_proto_rawDescData } -var file_v2ray_com_core_transport_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_config_proto_goTypes = []interface{}{ +var file_transport_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.Config (*internet.TransportConfig)(nil), // 1: v2ray.core.transport.internet.TransportConfig } -var file_v2ray_com_core_transport_config_proto_depIdxs = []int32{ +var file_transport_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.transport.Config.transport_settings:type_name -> v2ray.core.transport.internet.TransportConfig 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -118,13 +123,13 @@ var file_v2ray_com_core_transport_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_config_proto_init() } -func file_v2ray_com_core_transport_config_proto_init() { - if File_v2ray_com_core_transport_config_proto != nil { +func init() { file_transport_config_proto_init() } +func file_transport_config_proto_init() { + if File_transport_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -141,18 +146,18 @@ func file_v2ray_com_core_transport_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_config_proto_rawDesc, + RawDescriptor: file_transport_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_config_proto_msgTypes, + GoTypes: file_transport_config_proto_goTypes, + DependencyIndexes: file_transport_config_proto_depIdxs, + MessageInfos: file_transport_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_config_proto = out.File - file_v2ray_com_core_transport_config_proto_rawDesc = nil - file_v2ray_com_core_transport_config_proto_goTypes = nil - file_v2ray_com_core_transport_config_proto_depIdxs = nil + File_transport_config_proto = out.File + file_transport_config_proto_rawDesc = nil + file_transport_config_proto_goTypes = nil + file_transport_config_proto_depIdxs = nil } diff --git a/transport/config.proto b/transport/config.proto index 8510ff32aa..2d8a682368 100644 --- a/transport/config.proto +++ b/transport/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.transport; option csharp_namespace = "V2Ray.Core.Transport"; -option go_package = "transport"; +option go_package = "v2ray.com/core/transport"; option java_package = "com.v2ray.core.transport"; option java_multiple_files = true; -import "v2ray.com/core/transport/internet/config.proto"; +import "transport/internet/config.proto"; // Global transport settings. This affects all type of connections that go through V2Ray. // Deprecated. Use each settings in StreamConfig. diff --git a/transport/internet/config.pb.go b/transport/internet/config.pb.go index da67de3b6f..08b8618e75 100644 --- a/transport/internet/config.pb.go +++ b/transport/internet/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/config.proto + package internet import ( @@ -62,11 +68,11 @@ func (x TransportProtocol) String() string { } func (TransportProtocol) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_transport_internet_config_proto_enumTypes[0].Descriptor() + return file_transport_internet_config_proto_enumTypes[0].Descriptor() } func (TransportProtocol) Type() protoreflect.EnumType { - return &file_v2ray_com_core_transport_internet_config_proto_enumTypes[0] + return &file_transport_internet_config_proto_enumTypes[0] } func (x TransportProtocol) Number() protoreflect.EnumNumber { @@ -75,7 +81,7 @@ func (x TransportProtocol) Number() protoreflect.EnumNumber { // Deprecated: Use TransportProtocol.Descriptor instead. func (TransportProtocol) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_config_proto_rawDescGZIP(), []int{0} } type SocketConfig_TCPFastOpenState int32 @@ -114,11 +120,11 @@ func (x SocketConfig_TCPFastOpenState) String() string { } func (SocketConfig_TCPFastOpenState) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_transport_internet_config_proto_enumTypes[1].Descriptor() + return file_transport_internet_config_proto_enumTypes[1].Descriptor() } func (SocketConfig_TCPFastOpenState) Type() protoreflect.EnumType { - return &file_v2ray_com_core_transport_internet_config_proto_enumTypes[1] + return &file_transport_internet_config_proto_enumTypes[1] } func (x SocketConfig_TCPFastOpenState) Number() protoreflect.EnumNumber { @@ -127,7 +133,7 @@ func (x SocketConfig_TCPFastOpenState) Number() protoreflect.EnumNumber { // Deprecated: Use SocketConfig_TCPFastOpenState.Descriptor instead. func (SocketConfig_TCPFastOpenState) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_config_proto_rawDescGZIP(), []int{3, 0} + return file_transport_internet_config_proto_rawDescGZIP(), []int{3, 0} } type SocketConfig_TProxyMode int32 @@ -166,11 +172,11 @@ func (x SocketConfig_TProxyMode) String() string { } func (SocketConfig_TProxyMode) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_transport_internet_config_proto_enumTypes[2].Descriptor() + return file_transport_internet_config_proto_enumTypes[2].Descriptor() } func (SocketConfig_TProxyMode) Type() protoreflect.EnumType { - return &file_v2ray_com_core_transport_internet_config_proto_enumTypes[2] + return &file_transport_internet_config_proto_enumTypes[2] } func (x SocketConfig_TProxyMode) Number() protoreflect.EnumNumber { @@ -179,7 +185,7 @@ func (x SocketConfig_TProxyMode) Number() protoreflect.EnumNumber { // Deprecated: Use SocketConfig_TProxyMode.Descriptor instead. func (SocketConfig_TProxyMode) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_config_proto_rawDescGZIP(), []int{3, 1} + return file_transport_internet_config_proto_rawDescGZIP(), []int{3, 1} } type TransportConfig struct { @@ -199,7 +205,7 @@ type TransportConfig struct { func (x *TransportConfig) Reset() { *x = TransportConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_config_proto_msgTypes[0] + mi := &file_transport_internet_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -212,7 +218,7 @@ func (x *TransportConfig) String() string { func (*TransportConfig) ProtoMessage() {} func (x *TransportConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_config_proto_msgTypes[0] + mi := &file_transport_internet_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -225,7 +231,7 @@ func (x *TransportConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use TransportConfig.ProtoReflect.Descriptor instead. func (*TransportConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_config_proto_rawDescGZIP(), []int{0} } func (x *TransportConfig) GetProtocol() TransportProtocol { @@ -271,7 +277,7 @@ type StreamConfig struct { func (x *StreamConfig) Reset() { *x = StreamConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_config_proto_msgTypes[1] + mi := &file_transport_internet_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -284,7 +290,7 @@ func (x *StreamConfig) String() string { func (*StreamConfig) ProtoMessage() {} func (x *StreamConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_config_proto_msgTypes[1] + mi := &file_transport_internet_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -297,7 +303,7 @@ func (x *StreamConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamConfig.ProtoReflect.Descriptor instead. func (*StreamConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_config_proto_rawDescGZIP(), []int{1} + return file_transport_internet_config_proto_rawDescGZIP(), []int{1} } // Deprecated: Do not use. @@ -354,7 +360,7 @@ type ProxyConfig struct { func (x *ProxyConfig) Reset() { *x = ProxyConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_config_proto_msgTypes[2] + mi := &file_transport_internet_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -367,7 +373,7 @@ func (x *ProxyConfig) String() string { func (*ProxyConfig) ProtoMessage() {} func (x *ProxyConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_config_proto_msgTypes[2] + mi := &file_transport_internet_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -380,7 +386,7 @@ func (x *ProxyConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ProxyConfig.ProtoReflect.Descriptor instead. func (*ProxyConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_config_proto_rawDescGZIP(), []int{2} + return file_transport_internet_config_proto_rawDescGZIP(), []int{2} } func (x *ProxyConfig) GetTag() string { @@ -412,7 +418,7 @@ type SocketConfig struct { func (x *SocketConfig) Reset() { *x = SocketConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_config_proto_msgTypes[3] + mi := &file_transport_internet_config_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -425,7 +431,7 @@ func (x *SocketConfig) String() string { func (*SocketConfig) ProtoMessage() {} func (x *SocketConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_config_proto_msgTypes[3] + mi := &file_transport_internet_config_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -438,7 +444,7 @@ func (x *SocketConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use SocketConfig.ProtoReflect.Descriptor instead. func (*SocketConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_config_proto_rawDescGZIP(), []int{3} + return file_transport_internet_config_proto_rawDescGZIP(), []int{3} } func (x *SocketConfig) GetMark() int32 { @@ -483,115 +489,115 @@ func (x *SocketConfig) GetBindPort() uint32 { return 0 } -var File_v2ray_com_core_transport_internet_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_config_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x1a, - 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 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, 0xc8, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 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, 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, 0x42, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0xb4, 0x03, 0x0a, - 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, - 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x30, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x5d, 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, 0x2e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, +var File_transport_internet_config_proto protoreflect.FileDescriptor + +var file_transport_internet_config_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x1d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x53, 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, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 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, 0x54, 0x0a, - 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 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, 0x1f, 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, 0x22, 0xad, 0x03, 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, 0x4e, 0x0a, 0x03, 0x74, 0x66, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 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, 0x43, 0x50, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x03, 0x74, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x06, 0x74, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x76, 0x32, 0x72, 0x61, + 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, 0xc8, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x22, 0x35, 0x0a, 0x10, - 0x54, 0x43, 0x50, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x08, 0x0a, 0x04, 0x41, 0x73, 0x49, 0x73, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x10, 0x02, 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, 0x5a, 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, 0x10, - 0x0a, 0x0c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x10, 0x05, - 0x42, 0x4f, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0xaa, 0x02, 0x1d, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 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, 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, 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, 0x42, 0x0a, 0x08, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0xb4, + 0x03, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x50, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x30, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x5d, 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, 0x2e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x53, 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, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 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, + 0x54, 0x0a, 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x1f, 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, 0x22, 0xad, 0x03, 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, 0x4e, 0x0a, 0x03, 0x74, + 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x43, 0x50, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x03, 0x74, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x06, 0x74, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x22, 0x35, + 0x0a, 0x10, 0x54, 0x43, 0x50, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x73, 0x49, 0x73, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x10, 0x02, 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, 0x5a, 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, 0x10, 0x0a, 0x0c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x10, 0x05, 0x42, 0x68, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 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, 0x1d, 0x56, + 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 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 ( - file_v2ray_com_core_transport_internet_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_config_proto_rawDescData = file_v2ray_com_core_transport_internet_config_proto_rawDesc + file_transport_internet_config_proto_rawDescOnce sync.Once + file_transport_internet_config_proto_rawDescData = file_transport_internet_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_config_proto_rawDescData) +func file_transport_internet_config_proto_rawDescGZIP() []byte { + file_transport_internet_config_proto_rawDescOnce.Do(func() { + file_transport_internet_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_config_proto_rawDescData + return file_transport_internet_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_config_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_v2ray_com_core_transport_internet_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_v2ray_com_core_transport_internet_config_proto_goTypes = []interface{}{ +var file_transport_internet_config_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_transport_internet_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_transport_internet_config_proto_goTypes = []interface{}{ (TransportProtocol)(0), // 0: v2ray.core.transport.internet.TransportProtocol (SocketConfig_TCPFastOpenState)(0), // 1: v2ray.core.transport.internet.SocketConfig.TCPFastOpenState (SocketConfig_TProxyMode)(0), // 2: v2ray.core.transport.internet.SocketConfig.TProxyMode @@ -601,7 +607,7 @@ var file_v2ray_com_core_transport_internet_config_proto_goTypes = []interface{}{ (*SocketConfig)(nil), // 6: v2ray.core.transport.internet.SocketConfig (*serial.TypedMessage)(nil), // 7: v2ray.core.common.serial.TypedMessage } -var file_v2ray_com_core_transport_internet_config_proto_depIdxs = []int32{ +var file_transport_internet_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.transport.internet.TransportConfig.protocol:type_name -> v2ray.core.transport.internet.TransportProtocol 7, // 1: v2ray.core.transport.internet.TransportConfig.settings:type_name -> v2ray.core.common.serial.TypedMessage 0, // 2: v2ray.core.transport.internet.StreamConfig.protocol:type_name -> v2ray.core.transport.internet.TransportProtocol @@ -617,13 +623,13 @@ var file_v2ray_com_core_transport_internet_config_proto_depIdxs = []int32{ 0, // [0:8] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_config_proto_init() } -func file_v2ray_com_core_transport_internet_config_proto_init() { - if File_v2ray_com_core_transport_internet_config_proto != nil { +func init() { file_transport_internet_config_proto_init() } +func file_transport_internet_config_proto_init() { + if File_transport_internet_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TransportConfig); i { case 0: return &v.state @@ -635,7 +641,7 @@ func file_v2ray_com_core_transport_internet_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamConfig); i { case 0: return &v.state @@ -647,7 +653,7 @@ func file_v2ray_com_core_transport_internet_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProxyConfig); i { case 0: return &v.state @@ -659,7 +665,7 @@ func file_v2ray_com_core_transport_internet_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SocketConfig); i { case 0: return &v.state @@ -676,19 +682,19 @@ func file_v2ray_com_core_transport_internet_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_config_proto_rawDesc, + RawDescriptor: file_transport_internet_config_proto_rawDesc, NumEnums: 3, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_transport_internet_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_transport_internet_config_proto_msgTypes, + GoTypes: file_transport_internet_config_proto_goTypes, + DependencyIndexes: file_transport_internet_config_proto_depIdxs, + EnumInfos: file_transport_internet_config_proto_enumTypes, + MessageInfos: file_transport_internet_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_config_proto = out.File - file_v2ray_com_core_transport_internet_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_config_proto_depIdxs = nil + File_transport_internet_config_proto = out.File + file_transport_internet_config_proto_rawDesc = nil + file_transport_internet_config_proto_goTypes = nil + file_transport_internet_config_proto_depIdxs = nil } diff --git a/transport/internet/config.proto b/transport/internet/config.proto index d650c35a02..7faae3f3cd 100644 --- a/transport/internet/config.proto +++ b/transport/internet/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.transport.internet; option csharp_namespace = "V2Ray.Core.Transport.Internet"; -option go_package = "internet"; +option go_package = "v2ray.com/core/transport/internet"; option java_package = "com.v2ray.core.transport.internet"; option java_multiple_files = true; -import "v2ray.com/core/common/serial/typed_message.proto"; +import "common/serial/typed_message.proto"; enum TransportProtocol { TCP = 0; diff --git a/transport/internet/domainsocket/config.pb.go b/transport/internet/domainsocket/config.pb.go index bf4dde13c0..722ffe2130 100644 --- a/transport/internet/domainsocket/config.pb.go +++ b/transport/internet/domainsocket/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/domainsocket/config.proto + package domainsocket import ( @@ -34,7 +40,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_domainsocket_config_proto_msgTypes[0] + mi := &file_transport_internet_domainsocket_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +53,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_domainsocket_config_proto_msgTypes[0] + mi := &file_transport_internet_domainsocket_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +66,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_domainsocket_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetPath() string { @@ -77,46 +83,47 @@ func (x *Config) GetAbstract() bool { return false } -var File_v2ray_com_core_transport_internet_domainsocket_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x64, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x38, 0x0a, 0x06, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x62, 0x73, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x62, 0x73, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x42, 0x6d, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x0c, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, - 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_transport_internet_domainsocket_config_proto protoreflect.FileDescriptor + +var file_transport_internet_domainsocket_config_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x38, 0x0a, 0x06, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x62, 0x73, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x62, 0x73, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x42, 0x8f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, + 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDescData = file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDesc + file_transport_internet_domainsocket_config_proto_rawDescOnce sync.Once + file_transport_internet_domainsocket_config_proto_rawDescData = file_transport_internet_domainsocket_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDescData) +func file_transport_internet_domainsocket_config_proto_rawDescGZIP() []byte { + file_transport_internet_domainsocket_config_proto_rawDescOnce.Do(func() { + file_transport_internet_domainsocket_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_domainsocket_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDescData + return file_transport_internet_domainsocket_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_domainsocket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_domainsocket_config_proto_goTypes = []interface{}{ +var file_transport_internet_domainsocket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_domainsocket_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.internet.domainsocket.Config } -var file_v2ray_com_core_transport_internet_domainsocket_config_proto_depIdxs = []int32{ +var file_transport_internet_domainsocket_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -124,13 +131,13 @@ var file_v2ray_com_core_transport_internet_domainsocket_config_proto_depIdxs = [ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_domainsocket_config_proto_init() } -func file_v2ray_com_core_transport_internet_domainsocket_config_proto_init() { - if File_v2ray_com_core_transport_internet_domainsocket_config_proto != nil { +func init() { file_transport_internet_domainsocket_config_proto_init() } +func file_transport_internet_domainsocket_config_proto_init() { + if File_transport_internet_domainsocket_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_domainsocket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_domainsocket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -147,18 +154,18 @@ func file_v2ray_com_core_transport_internet_domainsocket_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDesc, + RawDescriptor: file_transport_internet_domainsocket_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_domainsocket_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_domainsocket_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_domainsocket_config_proto_msgTypes, + GoTypes: file_transport_internet_domainsocket_config_proto_goTypes, + DependencyIndexes: file_transport_internet_domainsocket_config_proto_depIdxs, + MessageInfos: file_transport_internet_domainsocket_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_domainsocket_config_proto = out.File - file_v2ray_com_core_transport_internet_domainsocket_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_domainsocket_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_domainsocket_config_proto_depIdxs = nil + File_transport_internet_domainsocket_config_proto = out.File + file_transport_internet_domainsocket_config_proto_rawDesc = nil + file_transport_internet_domainsocket_config_proto_goTypes = nil + file_transport_internet_domainsocket_config_proto_depIdxs = nil } diff --git a/transport/internet/domainsocket/config.proto b/transport/internet/domainsocket/config.proto index 161550ec08..b79565bd55 100644 --- a/transport/internet/domainsocket/config.proto +++ b/transport/internet/domainsocket/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.domainsocket; option csharp_namespace = "V2Ray.Core.Transport.Internet.DomainSocket"; -option go_package = "domainsocket"; +option go_package = "v2ray.com/core/transport/internet/domainsocket"; option java_package = "com.v2ray.core.transport.internet.domainsocket"; option java_multiple_files = true; diff --git a/transport/internet/domainsocket/listener.go b/transport/internet/domainsocket/listener.go index 587fecd9ed..aba951d0a4 100644 --- a/transport/internet/domainsocket/listener.go +++ b/transport/internet/domainsocket/listener.go @@ -11,7 +11,7 @@ import ( "strings" "golang.org/x/sys/unix" - + "v2ray.com/core/common" "v2ray.com/core/common/net" "v2ray.com/core/transport/internet" diff --git a/transport/internet/headers/http/config.pb.go b/transport/internet/headers/http/config.pb.go index 5891b89436..7e42a3b74a 100644 --- a/transport/internet/headers/http/config.pb.go +++ b/transport/internet/headers/http/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/headers/http/config.proto + package http import ( @@ -33,7 +39,7 @@ type Header struct { func (x *Header) Reset() { *x = Header{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +52,7 @@ func (x *Header) String() string { func (*Header) ProtoMessage() {} func (x *Header) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +65,7 @@ func (x *Header) ProtoReflect() protoreflect.Message { // Deprecated: Use Header.ProtoReflect.Descriptor instead. func (*Header) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{0} } func (x *Header) GetName() string { @@ -88,7 +94,7 @@ type Version struct { func (x *Version) Reset() { *x = Version{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[1] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -101,7 +107,7 @@ func (x *Version) String() string { func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[1] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114,7 +120,7 @@ func (x *Version) ProtoReflect() protoreflect.Message { // Deprecated: Use Version.ProtoReflect.Descriptor instead. func (*Version) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{1} + return file_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{1} } func (x *Version) GetValue() string { @@ -136,7 +142,7 @@ type Method struct { func (x *Method) Reset() { *x = Method{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[2] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -149,7 +155,7 @@ func (x *Method) String() string { func (*Method) ProtoMessage() {} func (x *Method) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[2] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -162,7 +168,7 @@ func (x *Method) ProtoReflect() protoreflect.Message { // Deprecated: Use Method.ProtoReflect.Descriptor instead. func (*Method) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{2} + return file_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{2} } func (x *Method) GetValue() string { @@ -189,7 +195,7 @@ type RequestConfig struct { func (x *RequestConfig) Reset() { *x = RequestConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[3] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -202,7 +208,7 @@ func (x *RequestConfig) String() string { func (*RequestConfig) ProtoMessage() {} func (x *RequestConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[3] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -215,7 +221,7 @@ func (x *RequestConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestConfig.ProtoReflect.Descriptor instead. func (*RequestConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{3} + return file_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{3} } func (x *RequestConfig) GetVersion() *Version { @@ -260,7 +266,7 @@ type Status struct { func (x *Status) Reset() { *x = Status{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[4] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -273,7 +279,7 @@ func (x *Status) String() string { func (*Status) ProtoMessage() {} func (x *Status) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[4] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -286,7 +292,7 @@ func (x *Status) ProtoReflect() protoreflect.Message { // Deprecated: Use Status.ProtoReflect.Descriptor instead. func (*Status) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{4} + return file_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{4} } func (x *Status) GetCode() string { @@ -316,7 +322,7 @@ type ResponseConfig struct { func (x *ResponseConfig) Reset() { *x = ResponseConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[5] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -329,7 +335,7 @@ func (x *ResponseConfig) String() string { func (*ResponseConfig) ProtoMessage() {} func (x *ResponseConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[5] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -342,7 +348,7 @@ func (x *ResponseConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ResponseConfig.ProtoReflect.Descriptor instead. func (*ResponseConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{5} + return file_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{5} } func (x *ResponseConfig) GetVersion() *Version { @@ -380,7 +386,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[6] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -393,7 +399,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[6] + mi := &file_transport_internet_headers_http_config_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -406,7 +412,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{6} + return file_transport_internet_headers_http_config_proto_rawDescGZIP(), []int{6} } func (x *Config) GetRequest() *RequestConfig { @@ -423,93 +429,95 @@ func (x *Config) GetResponse() *ResponseConfig { return nil } -var File_v2ray_com_core_transport_internet_headers_http_config_proto protoreflect.FileDescriptor +var File_transport_internet_headers_http_config_proto protoreflect.FileDescriptor -var file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x22, 0x32, 0x0a, 0x06, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1f, 0x0a, - 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1e, - 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x88, - 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x4d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x4a, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x72, 0x69, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x4a, 0x0a, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, +var file_transport_internet_headers_http_config_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, - 0xf7, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xb5, 0x01, 0x0a, 0x06, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x56, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x65, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x22, 0x32, 0x0a, 0x06, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1f, + 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x1e, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x88, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x4a, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x4a, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x22, 0xf7, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xb5, 0x01, 0x0a, 0x06, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x04, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x2a, 0x56, 0x32, - 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x74, 0x70, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x56, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x8f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescData = file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDesc + file_transport_internet_headers_http_config_proto_rawDescOnce sync.Once + file_transport_internet_headers_http_config_proto_rawDescData = file_transport_internet_headers_http_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescData) +func file_transport_internet_headers_http_config_proto_rawDescGZIP() []byte { + file_transport_internet_headers_http_config_proto_rawDescOnce.Do(func() { + file_transport_internet_headers_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_headers_http_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDescData + return file_transport_internet_headers_http_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_v2ray_com_core_transport_internet_headers_http_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_transport_internet_headers_http_config_proto_goTypes = []interface{}{ (*Header)(nil), // 0: v2ray.core.transport.internet.headers.http.Header (*Version)(nil), // 1: v2ray.core.transport.internet.headers.http.Version (*Method)(nil), // 2: v2ray.core.transport.internet.headers.http.Method @@ -518,7 +526,7 @@ var file_v2ray_com_core_transport_internet_headers_http_config_proto_goTypes = [ (*ResponseConfig)(nil), // 5: v2ray.core.transport.internet.headers.http.ResponseConfig (*Config)(nil), // 6: v2ray.core.transport.internet.headers.http.Config } -var file_v2ray_com_core_transport_internet_headers_http_config_proto_depIdxs = []int32{ +var file_transport_internet_headers_http_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.transport.internet.headers.http.RequestConfig.version:type_name -> v2ray.core.transport.internet.headers.http.Version 2, // 1: v2ray.core.transport.internet.headers.http.RequestConfig.method:type_name -> v2ray.core.transport.internet.headers.http.Method 0, // 2: v2ray.core.transport.internet.headers.http.RequestConfig.header:type_name -> v2ray.core.transport.internet.headers.http.Header @@ -534,13 +542,13 @@ var file_v2ray_com_core_transport_internet_headers_http_config_proto_depIdxs = [ 0, // [0:8] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_headers_http_config_proto_init() } -func file_v2ray_com_core_transport_internet_headers_http_config_proto_init() { - if File_v2ray_com_core_transport_internet_headers_http_config_proto != nil { +func init() { file_transport_internet_headers_http_config_proto_init() } +func file_transport_internet_headers_http_config_proto_init() { + if File_transport_internet_headers_http_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Header); i { case 0: return &v.state @@ -552,7 +560,7 @@ func file_v2ray_com_core_transport_internet_headers_http_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Version); i { case 0: return &v.state @@ -564,7 +572,7 @@ func file_v2ray_com_core_transport_internet_headers_http_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Method); i { case 0: return &v.state @@ -576,7 +584,7 @@ func file_v2ray_com_core_transport_internet_headers_http_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RequestConfig); i { case 0: return &v.state @@ -588,7 +596,7 @@ func file_v2ray_com_core_transport_internet_headers_http_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Status); i { case 0: return &v.state @@ -600,7 +608,7 @@ func file_v2ray_com_core_transport_internet_headers_http_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResponseConfig); i { case 0: return &v.state @@ -612,7 +620,7 @@ func file_v2ray_com_core_transport_internet_headers_http_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -629,18 +637,18 @@ func file_v2ray_com_core_transport_internet_headers_http_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDesc, + RawDescriptor: file_transport_internet_headers_http_config_proto_rawDesc, NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_headers_http_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_headers_http_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_headers_http_config_proto_msgTypes, + GoTypes: file_transport_internet_headers_http_config_proto_goTypes, + DependencyIndexes: file_transport_internet_headers_http_config_proto_depIdxs, + MessageInfos: file_transport_internet_headers_http_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_headers_http_config_proto = out.File - file_v2ray_com_core_transport_internet_headers_http_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_headers_http_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_headers_http_config_proto_depIdxs = nil + File_transport_internet_headers_http_config_proto = out.File + file_transport_internet_headers_http_config_proto_rawDesc = nil + file_transport_internet_headers_http_config_proto_goTypes = nil + file_transport_internet_headers_http_config_proto_depIdxs = nil } diff --git a/transport/internet/headers/http/config.proto b/transport/internet/headers/http/config.proto index df033b141f..59d4f5a09b 100644 --- a/transport/internet/headers/http/config.proto +++ b/transport/internet/headers/http/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.http; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Http"; -option go_package = "http"; +option go_package = "v2ray.com/core/transport/internet/headers/http"; option java_package = "com.v2ray.core.transport.internet.headers.http"; option java_multiple_files = true; @@ -59,4 +59,4 @@ message Config { // Settings for authenticating responses. If not set, client side will bypass authentication, and server side will not send authentication header. ResponseConfig response = 2; -} \ No newline at end of file +} diff --git a/transport/internet/headers/http/http.go b/transport/internet/headers/http/http.go index 6f65e97533..5b940cb803 100644 --- a/transport/internet/headers/http/http.go +++ b/transport/internet/headers/http/http.go @@ -126,7 +126,7 @@ func (h *HeaderReader) Read(reader io.Reader) (*buf.Buffer, error) { } } - if hasThisUri == false { + if !hasThisUri { return nil, ErrHeaderMisMatch } diff --git a/transport/internet/headers/http/http_test.go b/transport/internet/headers/http/http_test.go index 28f2d9ae46..54fcaf6643 100644 --- a/transport/internet/headers/http/http_test.go +++ b/transport/internet/headers/http/http_test.go @@ -34,7 +34,6 @@ func TestReaderWriter(t *testing.T) { t.Error("unknown error ", err) } _ = buffer - return /* if buffer.String() != "efg" { t.Error("buffer: ", buffer.String()) @@ -256,7 +255,6 @@ func TestConnectionInvPath(t *testing.T) { break } } - return } func TestConnectionInvReq(t *testing.T) { @@ -315,5 +313,4 @@ func TestConnectionInvReq(t *testing.T) { if !strings.HasPrefix(string(l), "HTTP/1.1 400 Bad Request") { t.Error("Resp to non http conn", string(l)) } - return } diff --git a/transport/internet/headers/noop/config.pb.go b/transport/internet/headers/noop/config.pb.go index 4efb4f2366..419f1a4e4d 100644 --- a/transport/internet/headers/noop/config.pb.go +++ b/transport/internet/headers/noop/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/headers/noop/config.proto + package noop import ( @@ -28,7 +34,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_noop_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_noop_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -41,7 +47,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_noop_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_noop_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,7 +60,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_headers_noop_config_proto_rawDescGZIP(), []int{0} } type ConnectionConfig struct { @@ -66,7 +72,7 @@ type ConnectionConfig struct { func (x *ConnectionConfig) Reset() { *x = ConnectionConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_noop_config_proto_msgTypes[1] + mi := &file_transport_internet_headers_noop_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -79,7 +85,7 @@ func (x *ConnectionConfig) String() string { func (*ConnectionConfig) ProtoMessage() {} func (x *ConnectionConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_noop_config_proto_msgTypes[1] + mi := &file_transport_internet_headers_noop_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92,48 +98,50 @@ func (x *ConnectionConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ConnectionConfig.ProtoReflect.Descriptor instead. func (*ConnectionConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescGZIP(), []int{1} + return file_transport_internet_headers_noop_config_proto_rawDescGZIP(), []int{1} } -var File_v2ray_com_core_transport_internet_headers_noop_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x6f, 0x6f, 0x70, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x6f, 0x6f, 0x70, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x65, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x6f, 0x6f, 0x70, 0x50, 0x01, 0x5a, 0x04, 0x6e, 0x6f, 0x6f, - 0x70, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x4e, 0x6f, 0x6f, 0x70, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_transport_internet_headers_noop_config_proto protoreflect.FileDescriptor + +var file_transport_internet_headers_noop_config_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x6f, 0x6f, + 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x6f, 0x6f, 0x70, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x8f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x6f, 0x6f, 0x70, 0x50, 0x01, 0x5a, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x6f, 0x6f, 0x70, 0xaa, 0x02, 0x2a, + 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x4e, 0x6f, 0x6f, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescData = file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDesc + file_transport_internet_headers_noop_config_proto_rawDescOnce sync.Once + file_transport_internet_headers_noop_config_proto_rawDescData = file_transport_internet_headers_noop_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescData) +func file_transport_internet_headers_noop_config_proto_rawDescGZIP() []byte { + file_transport_internet_headers_noop_config_proto_rawDescOnce.Do(func() { + file_transport_internet_headers_noop_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_headers_noop_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDescData + return file_transport_internet_headers_noop_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_headers_noop_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_v2ray_com_core_transport_internet_headers_noop_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_noop_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_transport_internet_headers_noop_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.internet.headers.noop.Config (*ConnectionConfig)(nil), // 1: v2ray.core.transport.internet.headers.noop.ConnectionConfig } -var file_v2ray_com_core_transport_internet_headers_noop_config_proto_depIdxs = []int32{ +var file_transport_internet_headers_noop_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -141,13 +149,13 @@ var file_v2ray_com_core_transport_internet_headers_noop_config_proto_depIdxs = [ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_headers_noop_config_proto_init() } -func file_v2ray_com_core_transport_internet_headers_noop_config_proto_init() { - if File_v2ray_com_core_transport_internet_headers_noop_config_proto != nil { +func init() { file_transport_internet_headers_noop_config_proto_init() } +func file_transport_internet_headers_noop_config_proto_init() { + if File_transport_internet_headers_noop_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_headers_noop_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_noop_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -159,7 +167,7 @@ func file_v2ray_com_core_transport_internet_headers_noop_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_headers_noop_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_noop_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConnectionConfig); i { case 0: return &v.state @@ -176,18 +184,18 @@ func file_v2ray_com_core_transport_internet_headers_noop_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDesc, + RawDescriptor: file_transport_internet_headers_noop_config_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_headers_noop_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_headers_noop_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_headers_noop_config_proto_msgTypes, + GoTypes: file_transport_internet_headers_noop_config_proto_goTypes, + DependencyIndexes: file_transport_internet_headers_noop_config_proto_depIdxs, + MessageInfos: file_transport_internet_headers_noop_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_headers_noop_config_proto = out.File - file_v2ray_com_core_transport_internet_headers_noop_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_headers_noop_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_headers_noop_config_proto_depIdxs = nil + File_transport_internet_headers_noop_config_proto = out.File + file_transport_internet_headers_noop_config_proto_rawDesc = nil + file_transport_internet_headers_noop_config_proto_goTypes = nil + file_transport_internet_headers_noop_config_proto_depIdxs = nil } diff --git a/transport/internet/headers/noop/config.proto b/transport/internet/headers/noop/config.proto index aec672a9dd..533d2494fb 100644 --- a/transport/internet/headers/noop/config.proto +++ b/transport/internet/headers/noop/config.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.noop; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Noop"; -option go_package = "noop"; +option go_package = "v2ray.com/core/transport/internet/headers/noop"; option java_package = "com.v2ray.core.transport.internet.headers.noop"; option java_multiple_files = true; message Config {} -message ConnectionConfig{} \ No newline at end of file +message ConnectionConfig{} diff --git a/transport/internet/headers/srtp/config.pb.go b/transport/internet/headers/srtp/config.pb.go index 3556644596..2c0fd09a89 100644 --- a/transport/internet/headers/srtp/config.pb.go +++ b/transport/internet/headers/srtp/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/headers/srtp/config.proto + package srtp import ( @@ -35,7 +41,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_srtp_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_srtp_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +54,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_srtp_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_srtp_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +67,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_headers_srtp_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetVersion() uint32 { @@ -106,53 +112,55 @@ func (x *Config) GetPayloadType() uint32 { return 0 } -var File_v2ray_com_core_transport_internet_headers_srtp_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x72, 0x74, 0x70, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x72, 0x74, 0x70, 0x22, 0xb4, 0x01, 0x0a, 0x06, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x73, 0x72, 0x63, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x73, 0x72, 0x63, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x21, 0x0a, - 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x65, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x72, - 0x74, 0x70, 0x50, 0x01, 0x5a, 0x04, 0x73, 0x72, 0x74, 0x70, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, - 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x2e, 0x53, 0x72, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_transport_internet_headers_srtp_config_proto protoreflect.FileDescriptor + +var file_transport_internet_headers_srtp_config_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x72, 0x74, + 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x72, 0x74, 0x70, 0x22, 0xb4, 0x01, 0x0a, 0x06, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x73, 0x72, 0x63, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x73, 0x72, + 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x8f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, + 0x73, 0x72, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x2f, 0x73, 0x72, 0x74, 0x70, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, + 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x53, + 0x72, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDescData = file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDesc + file_transport_internet_headers_srtp_config_proto_rawDescOnce sync.Once + file_transport_internet_headers_srtp_config_proto_rawDescData = file_transport_internet_headers_srtp_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDescData) +func file_transport_internet_headers_srtp_config_proto_rawDescGZIP() []byte { + file_transport_internet_headers_srtp_config_proto_rawDescOnce.Do(func() { + file_transport_internet_headers_srtp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_headers_srtp_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDescData + return file_transport_internet_headers_srtp_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_headers_srtp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_headers_srtp_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_srtp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_headers_srtp_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.internet.headers.srtp.Config } -var file_v2ray_com_core_transport_internet_headers_srtp_config_proto_depIdxs = []int32{ +var file_transport_internet_headers_srtp_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -160,13 +168,13 @@ var file_v2ray_com_core_transport_internet_headers_srtp_config_proto_depIdxs = [ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_headers_srtp_config_proto_init() } -func file_v2ray_com_core_transport_internet_headers_srtp_config_proto_init() { - if File_v2ray_com_core_transport_internet_headers_srtp_config_proto != nil { +func init() { file_transport_internet_headers_srtp_config_proto_init() } +func file_transport_internet_headers_srtp_config_proto_init() { + if File_transport_internet_headers_srtp_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_headers_srtp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_srtp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -183,18 +191,18 @@ func file_v2ray_com_core_transport_internet_headers_srtp_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDesc, + RawDescriptor: file_transport_internet_headers_srtp_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_headers_srtp_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_headers_srtp_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_headers_srtp_config_proto_msgTypes, + GoTypes: file_transport_internet_headers_srtp_config_proto_goTypes, + DependencyIndexes: file_transport_internet_headers_srtp_config_proto_depIdxs, + MessageInfos: file_transport_internet_headers_srtp_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_headers_srtp_config_proto = out.File - file_v2ray_com_core_transport_internet_headers_srtp_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_headers_srtp_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_headers_srtp_config_proto_depIdxs = nil + File_transport_internet_headers_srtp_config_proto = out.File + file_transport_internet_headers_srtp_config_proto_rawDesc = nil + file_transport_internet_headers_srtp_config_proto_goTypes = nil + file_transport_internet_headers_srtp_config_proto_depIdxs = nil } diff --git a/transport/internet/headers/srtp/config.proto b/transport/internet/headers/srtp/config.proto index d1d9e501fa..3888cf6146 100644 --- a/transport/internet/headers/srtp/config.proto +++ b/transport/internet/headers/srtp/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.srtp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Srtp"; -option go_package = "srtp"; +option go_package = "v2ray.com/core/transport/internet/headers/srtp"; option java_package = "com.v2ray.core.transport.internet.headers.srtp"; option java_multiple_files = true; @@ -13,4 +13,4 @@ message Config { uint32 csrc_count = 4; bool marker = 5; uint32 payload_type = 6; -} \ No newline at end of file +} diff --git a/transport/internet/headers/tls/config.pb.go b/transport/internet/headers/tls/config.pb.go index 6167986918..24615cfac5 100644 --- a/transport/internet/headers/tls/config.pb.go +++ b/transport/internet/headers/tls/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/headers/tls/config.proto + package tls import ( @@ -28,7 +34,7 @@ type PacketConfig struct { func (x *PacketConfig) Reset() { *x = PacketConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_tls_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_tls_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -41,7 +47,7 @@ func (x *PacketConfig) String() string { func (*PacketConfig) ProtoMessage() {} func (x *PacketConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_tls_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_tls_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,46 +60,47 @@ func (x *PacketConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use PacketConfig.ProtoReflect.Descriptor instead. func (*PacketConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_headers_tls_config_proto_rawDescGZIP(), []int{0} } -var File_v2ray_com_core_transport_internet_headers_tls_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDesc = []byte{ - 0x0a, 0x3a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x62, 0x0a, 0x2d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, +var File_transport_internet_headers_tls_config_proto protoreflect.FileDescriptor + +var file_transport_internet_headers_tls_config_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x74, 0x6c, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, 0x5a, 0x03, 0x74, 0x6c, 0x73, 0xaa, - 0x02, 0x29, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x64, 0x65, 0x72, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x8c, 0x01, 0x0a, 0x2d, 0x63, 0x6f, 0x6d, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, 0x5a, 0x2d, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0xaa, 0x02, 0x29, 0x56, 0x32, + 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x2e, 0x54, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDescData = file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDesc + file_transport_internet_headers_tls_config_proto_rawDescOnce sync.Once + file_transport_internet_headers_tls_config_proto_rawDescData = file_transport_internet_headers_tls_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDescData) +func file_transport_internet_headers_tls_config_proto_rawDescGZIP() []byte { + file_transport_internet_headers_tls_config_proto_rawDescOnce.Do(func() { + file_transport_internet_headers_tls_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_headers_tls_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDescData + return file_transport_internet_headers_tls_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_headers_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_headers_tls_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_headers_tls_config_proto_goTypes = []interface{}{ (*PacketConfig)(nil), // 0: v2ray.core.transport.internet.headers.tls.PacketConfig } -var file_v2ray_com_core_transport_internet_headers_tls_config_proto_depIdxs = []int32{ +var file_transport_internet_headers_tls_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -101,13 +108,13 @@ var file_v2ray_com_core_transport_internet_headers_tls_config_proto_depIdxs = [] 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_headers_tls_config_proto_init() } -func file_v2ray_com_core_transport_internet_headers_tls_config_proto_init() { - if File_v2ray_com_core_transport_internet_headers_tls_config_proto != nil { +func init() { file_transport_internet_headers_tls_config_proto_init() } +func file_transport_internet_headers_tls_config_proto_init() { + if File_transport_internet_headers_tls_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_headers_tls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_tls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PacketConfig); i { case 0: return &v.state @@ -124,18 +131,18 @@ func file_v2ray_com_core_transport_internet_headers_tls_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDesc, + RawDescriptor: file_transport_internet_headers_tls_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_headers_tls_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_headers_tls_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_headers_tls_config_proto_msgTypes, + GoTypes: file_transport_internet_headers_tls_config_proto_goTypes, + DependencyIndexes: file_transport_internet_headers_tls_config_proto_depIdxs, + MessageInfos: file_transport_internet_headers_tls_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_headers_tls_config_proto = out.File - file_v2ray_com_core_transport_internet_headers_tls_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_headers_tls_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_headers_tls_config_proto_depIdxs = nil + File_transport_internet_headers_tls_config_proto = out.File + file_transport_internet_headers_tls_config_proto_rawDesc = nil + file_transport_internet_headers_tls_config_proto_goTypes = nil + file_transport_internet_headers_tls_config_proto_depIdxs = nil } diff --git a/transport/internet/headers/tls/config.proto b/transport/internet/headers/tls/config.proto index 7bd8b5e8e7..5d32f64e7c 100644 --- a/transport/internet/headers/tls/config.proto +++ b/transport/internet/headers/tls/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.tls; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Tls"; -option go_package = "tls"; +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; diff --git a/transport/internet/headers/utp/config.pb.go b/transport/internet/headers/utp/config.pb.go index 7235e39771..5966024d8d 100644 --- a/transport/internet/headers/utp/config.pb.go +++ b/transport/internet/headers/utp/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/headers/utp/config.proto + package utp import ( @@ -30,7 +36,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_utp_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_utp_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +49,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_utp_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_utp_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +62,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_headers_utp_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetVersion() uint32 { @@ -66,44 +72,46 @@ func (x *Config) GetVersion() uint32 { return 0 } -var File_v2ray_com_core_transport_internet_headers_utp_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDesc = []byte{ - 0x0a, 0x3a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, +var File_transport_internet_headers_utp_config_proto protoreflect.FileDescriptor + +var file_transport_internet_headers_utp_config_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x74, 0x70, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x74, 0x70, 0x22, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x8c, 0x01, 0x0a, + 0x2d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x74, 0x70, 0x50, 0x01, + 0x5a, 0x2d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x74, 0x70, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x2e, 0x75, 0x74, 0x70, 0x22, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x62, 0x0a, 0x2d, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x03, - 0x75, 0x74, 0x70, 0xaa, 0x02, 0x29, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x74, 0x70, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x74, 0x70, 0xaa, + 0x02, 0x29, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDescData = file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDesc + file_transport_internet_headers_utp_config_proto_rawDescOnce sync.Once + file_transport_internet_headers_utp_config_proto_rawDescData = file_transport_internet_headers_utp_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDescData) +func file_transport_internet_headers_utp_config_proto_rawDescGZIP() []byte { + file_transport_internet_headers_utp_config_proto_rawDescOnce.Do(func() { + file_transport_internet_headers_utp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_headers_utp_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDescData + return file_transport_internet_headers_utp_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_headers_utp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_headers_utp_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_utp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_headers_utp_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.internet.headers.utp.Config } -var file_v2ray_com_core_transport_internet_headers_utp_config_proto_depIdxs = []int32{ +var file_transport_internet_headers_utp_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -111,13 +119,13 @@ var file_v2ray_com_core_transport_internet_headers_utp_config_proto_depIdxs = [] 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_headers_utp_config_proto_init() } -func file_v2ray_com_core_transport_internet_headers_utp_config_proto_init() { - if File_v2ray_com_core_transport_internet_headers_utp_config_proto != nil { +func init() { file_transport_internet_headers_utp_config_proto_init() } +func file_transport_internet_headers_utp_config_proto_init() { + if File_transport_internet_headers_utp_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_headers_utp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_utp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -134,18 +142,18 @@ func file_v2ray_com_core_transport_internet_headers_utp_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDesc, + RawDescriptor: file_transport_internet_headers_utp_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_headers_utp_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_headers_utp_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_headers_utp_config_proto_msgTypes, + GoTypes: file_transport_internet_headers_utp_config_proto_goTypes, + DependencyIndexes: file_transport_internet_headers_utp_config_proto_depIdxs, + MessageInfos: file_transport_internet_headers_utp_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_headers_utp_config_proto = out.File - file_v2ray_com_core_transport_internet_headers_utp_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_headers_utp_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_headers_utp_config_proto_depIdxs = nil + File_transport_internet_headers_utp_config_proto = out.File + file_transport_internet_headers_utp_config_proto_rawDesc = nil + file_transport_internet_headers_utp_config_proto_goTypes = nil + file_transport_internet_headers_utp_config_proto_depIdxs = nil } diff --git a/transport/internet/headers/utp/config.proto b/transport/internet/headers/utp/config.proto index f55e4dcf44..f874fcc283 100644 --- a/transport/internet/headers/utp/config.proto +++ b/transport/internet/headers/utp/config.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.utp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Utp"; -option go_package = "utp"; +option go_package = "v2ray.com/core/transport/internet/headers/utp"; option java_package = "com.v2ray.core.transport.internet.headers.utp"; option java_multiple_files = true; message Config { uint32 version = 1; -} \ No newline at end of file +} diff --git a/transport/internet/headers/wechat/config.pb.go b/transport/internet/headers/wechat/config.pb.go index 871a25a52d..1940ac71d9 100644 --- a/transport/internet/headers/wechat/config.pb.go +++ b/transport/internet/headers/wechat/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/headers/wechat/config.proto + package wechat import ( @@ -28,7 +34,7 @@ type VideoConfig struct { func (x *VideoConfig) Reset() { *x = VideoConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_wechat_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_wechat_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -41,7 +47,7 @@ func (x *VideoConfig) String() string { func (*VideoConfig) ProtoMessage() {} func (x *VideoConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_wechat_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_wechat_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,47 +60,48 @@ func (x *VideoConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use VideoConfig.ProtoReflect.Descriptor instead. func (*VideoConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_headers_wechat_config_proto_rawDescGZIP(), []int{0} } -var File_v2ray_com_core_transport_internet_headers_wechat_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDesc = []byte{ - 0x0a, 0x3d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x77, 0x65, 0x63, 0x68, - 0x61, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x2c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x65, 0x63, 0x68, 0x61, 0x74, 0x22, 0x0d, 0x0a, - 0x0b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6b, 0x0a, 0x30, - 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x65, 0x63, 0x68, 0x61, 0x74, - 0x50, 0x01, 0x5a, 0x06, 0x77, 0x65, 0x63, 0x68, 0x61, 0x74, 0xaa, 0x02, 0x2c, 0x56, 0x32, 0x52, - 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, +var File_transport_internet_headers_wechat_config_proto protoreflect.FileDescriptor + +var file_transport_internet_headers_wechat_config_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x77, 0x65, 0x63, + 0x68, 0x61, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x2c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x65, 0x63, 0x68, 0x61, 0x74, 0x22, 0x0d, + 0x0a, 0x0b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x95, 0x01, + 0x0a, 0x30, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x65, 0x63, 0x68, + 0x61, 0x74, 0x50, 0x01, 0x5a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, + 0x77, 0x65, 0x63, 0x68, 0x61, 0x74, 0xaa, 0x02, 0x2c, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, + 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x57, + 0x65, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDescData = file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDesc + file_transport_internet_headers_wechat_config_proto_rawDescOnce sync.Once + file_transport_internet_headers_wechat_config_proto_rawDescData = file_transport_internet_headers_wechat_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDescData) +func file_transport_internet_headers_wechat_config_proto_rawDescGZIP() []byte { + file_transport_internet_headers_wechat_config_proto_rawDescOnce.Do(func() { + file_transport_internet_headers_wechat_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_headers_wechat_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDescData + return file_transport_internet_headers_wechat_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_headers_wechat_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_headers_wechat_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_wechat_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_headers_wechat_config_proto_goTypes = []interface{}{ (*VideoConfig)(nil), // 0: v2ray.core.transport.internet.headers.wechat.VideoConfig } -var file_v2ray_com_core_transport_internet_headers_wechat_config_proto_depIdxs = []int32{ +var file_transport_internet_headers_wechat_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -102,13 +109,13 @@ var file_v2ray_com_core_transport_internet_headers_wechat_config_proto_depIdxs = 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_headers_wechat_config_proto_init() } -func file_v2ray_com_core_transport_internet_headers_wechat_config_proto_init() { - if File_v2ray_com_core_transport_internet_headers_wechat_config_proto != nil { +func init() { file_transport_internet_headers_wechat_config_proto_init() } +func file_transport_internet_headers_wechat_config_proto_init() { + if File_transport_internet_headers_wechat_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_headers_wechat_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_wechat_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VideoConfig); i { case 0: return &v.state @@ -125,18 +132,18 @@ func file_v2ray_com_core_transport_internet_headers_wechat_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDesc, + RawDescriptor: file_transport_internet_headers_wechat_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_headers_wechat_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_headers_wechat_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_headers_wechat_config_proto_msgTypes, + GoTypes: file_transport_internet_headers_wechat_config_proto_goTypes, + DependencyIndexes: file_transport_internet_headers_wechat_config_proto_depIdxs, + MessageInfos: file_transport_internet_headers_wechat_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_headers_wechat_config_proto = out.File - file_v2ray_com_core_transport_internet_headers_wechat_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_headers_wechat_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_headers_wechat_config_proto_depIdxs = nil + File_transport_internet_headers_wechat_config_proto = out.File + file_transport_internet_headers_wechat_config_proto_rawDesc = nil + file_transport_internet_headers_wechat_config_proto_goTypes = nil + file_transport_internet_headers_wechat_config_proto_depIdxs = nil } diff --git a/transport/internet/headers/wechat/config.proto b/transport/internet/headers/wechat/config.proto index f2b8529255..03774da276 100644 --- a/transport/internet/headers/wechat/config.proto +++ b/transport/internet/headers/wechat/config.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.wechat; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Wechat"; -option go_package = "wechat"; +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 { -} \ No newline at end of file +} diff --git a/transport/internet/headers/wireguard/config.pb.go b/transport/internet/headers/wireguard/config.pb.go index 894b9491dd..d021bb4c76 100644 --- a/transport/internet/headers/wireguard/config.pb.go +++ b/transport/internet/headers/wireguard/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/headers/wireguard/config.proto + package wireguard import ( @@ -28,7 +34,7 @@ type WireguardConfig struct { func (x *WireguardConfig) Reset() { *x = WireguardConfig{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_wireguard_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -41,7 +47,7 @@ func (x *WireguardConfig) String() string { func (*WireguardConfig) ProtoMessage() {} func (x *WireguardConfig) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_msgTypes[0] + mi := &file_transport_internet_headers_wireguard_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,48 +60,49 @@ func (x *WireguardConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use WireguardConfig.ProtoReflect.Descriptor instead. func (*WireguardConfig) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_headers_wireguard_config_proto_rawDescGZIP(), []int{0} } -var File_v2ray_com_core_transport_internet_headers_wireguard_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDesc = []byte{ - 0x0a, 0x40, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x77, 0x69, 0x72, 0x65, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x57, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x74, 0x0a, 0x33, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x50, 0x01, 0x5a, - 0x09, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0xaa, 0x02, 0x2f, 0x56, 0x32, 0x52, - 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x2e, 0x57, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, +var File_transport_internet_headers_wireguard_config_proto protoreflect.FileDescriptor + +var file_transport_internet_headers_wireguard_config_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x77, 0x69, 0x72, + 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x57, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x9e, 0x01, 0x0a, 0x33, 0x63, 0x6f, 0x6d, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x50, + 0x01, 0x5a, 0x33, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x77, 0x69, 0x72, + 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0xaa, 0x02, 0x2f, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, + 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x57, + 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDescData = file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDesc + file_transport_internet_headers_wireguard_config_proto_rawDescOnce sync.Once + file_transport_internet_headers_wireguard_config_proto_rawDescData = file_transport_internet_headers_wireguard_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDescData) +func file_transport_internet_headers_wireguard_config_proto_rawDescGZIP() []byte { + file_transport_internet_headers_wireguard_config_proto_rawDescOnce.Do(func() { + file_transport_internet_headers_wireguard_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_headers_wireguard_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDescData + return file_transport_internet_headers_wireguard_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_wireguard_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_headers_wireguard_config_proto_goTypes = []interface{}{ (*WireguardConfig)(nil), // 0: v2ray.core.transport.internet.headers.wireguard.WireguardConfig } -var file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_depIdxs = []int32{ +var file_transport_internet_headers_wireguard_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -103,13 +110,13 @@ var file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_depIdx 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_init() } -func file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_init() { - if File_v2ray_com_core_transport_internet_headers_wireguard_config_proto != nil { +func init() { file_transport_internet_headers_wireguard_config_proto_init() } +func file_transport_internet_headers_wireguard_config_proto_init() { + if File_transport_internet_headers_wireguard_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_wireguard_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WireguardConfig); i { case 0: return &v.state @@ -126,18 +133,18 @@ func file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_init( out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDesc, + RawDescriptor: file_transport_internet_headers_wireguard_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_msgTypes, + GoTypes: file_transport_internet_headers_wireguard_config_proto_goTypes, + DependencyIndexes: file_transport_internet_headers_wireguard_config_proto_depIdxs, + MessageInfos: file_transport_internet_headers_wireguard_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_headers_wireguard_config_proto = out.File - file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_headers_wireguard_config_proto_depIdxs = nil + File_transport_internet_headers_wireguard_config_proto = out.File + file_transport_internet_headers_wireguard_config_proto_rawDesc = nil + file_transport_internet_headers_wireguard_config_proto_goTypes = nil + file_transport_internet_headers_wireguard_config_proto_depIdxs = nil } diff --git a/transport/internet/headers/wireguard/config.proto b/transport/internet/headers/wireguard/config.proto index 1917d6b7dd..111de0ed65 100644 --- a/transport/internet/headers/wireguard/config.proto +++ b/transport/internet/headers/wireguard/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.wireguard; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Wireguard"; -option go_package = "wireguard"; +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; diff --git a/transport/internet/http/config.pb.go b/transport/internet/http/config.pb.go index 44f3cf114f..36f1541252 100644 --- a/transport/internet/http/config.pb.go +++ b/transport/internet/http/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/http/config.proto + package http import ( @@ -31,7 +37,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_http_config_proto_msgTypes[0] + mi := &file_transport_internet_http_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +50,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_http_config_proto_msgTypes[0] + mi := &file_transport_internet_http_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +63,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_http_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_http_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetHost() []string { @@ -74,43 +80,44 @@ func (x *Config) GetPath() string { return "" } -var File_v2ray_com_core_transport_internet_http_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_http_config_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x22, 0x30, 0x0a, 0x06, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x55, 0x0a, 0x26, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x04, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x22, - 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_transport_internet_http_config_proto protoreflect.FileDescriptor + +var file_transport_internet_http_config_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x22, 0x30, 0x0a, 0x06, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x77, 0x0a, 0x26, + 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x26, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0xaa, 0x02, 0x22, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_http_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_http_config_proto_rawDescData = file_v2ray_com_core_transport_internet_http_config_proto_rawDesc + file_transport_internet_http_config_proto_rawDescOnce sync.Once + file_transport_internet_http_config_proto_rawDescData = file_transport_internet_http_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_http_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_http_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_http_config_proto_rawDescData) +func file_transport_internet_http_config_proto_rawDescGZIP() []byte { + file_transport_internet_http_config_proto_rawDescOnce.Do(func() { + file_transport_internet_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_http_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_http_config_proto_rawDescData + return file_transport_internet_http_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_http_config_proto_goTypes = []interface{}{ +var file_transport_internet_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_http_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.internet.http.Config } -var file_v2ray_com_core_transport_internet_http_config_proto_depIdxs = []int32{ +var file_transport_internet_http_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -118,13 +125,13 @@ var file_v2ray_com_core_transport_internet_http_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_http_config_proto_init() } -func file_v2ray_com_core_transport_internet_http_config_proto_init() { - if File_v2ray_com_core_transport_internet_http_config_proto != nil { +func init() { file_transport_internet_http_config_proto_init() } +func file_transport_internet_http_config_proto_init() { + if File_transport_internet_http_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -141,18 +148,18 @@ func file_v2ray_com_core_transport_internet_http_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_http_config_proto_rawDesc, + RawDescriptor: file_transport_internet_http_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_http_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_http_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_http_config_proto_msgTypes, + GoTypes: file_transport_internet_http_config_proto_goTypes, + DependencyIndexes: file_transport_internet_http_config_proto_depIdxs, + MessageInfos: file_transport_internet_http_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_http_config_proto = out.File - file_v2ray_com_core_transport_internet_http_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_http_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_http_config_proto_depIdxs = nil + File_transport_internet_http_config_proto = out.File + file_transport_internet_http_config_proto_rawDesc = nil + file_transport_internet_http_config_proto_goTypes = nil + file_transport_internet_http_config_proto_depIdxs = nil } diff --git a/transport/internet/http/config.proto b/transport/internet/http/config.proto index cb995c13d2..079fb2bcb8 100644 --- a/transport/internet/http/config.proto +++ b/transport/internet/http/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.http; option csharp_namespace = "V2Ray.Core.Transport.Internet.Http"; -option go_package = "http"; +option go_package = "v2ray.com/core/transport/internet/http"; option java_package = "com.v2ray.core.transport.internet.http"; option java_multiple_files = true; diff --git a/transport/internet/http/hub.go b/transport/internet/http/hub.go index 32fb309079..4b75a1a288 100644 --- a/transport/internet/http/hub.go +++ b/transport/internet/http/hub.go @@ -9,23 +9,24 @@ import ( "strings" "time" + "golang.org/x/net/http2" + "golang.org/x/net/http2/h2c" + "v2ray.com/core/common" "v2ray.com/core/common/net" + http_proto "v2ray.com/core/common/protocol/http" "v2ray.com/core/common/serial" "v2ray.com/core/common/session" "v2ray.com/core/common/signal/done" "v2ray.com/core/transport/internet" "v2ray.com/core/transport/internet/tls" - - "golang.org/x/net/http2" - "golang.org/x/net/http2/h2c" ) type Listener struct { server *http.Server handler internet.ConnHandler local net.Addr - config Config + config *Config } func (l *Listener) Addr() net.Addr { @@ -82,6 +83,11 @@ func (l *Listener) ServeHTTP(writer http.ResponseWriter, request *http.Request) } } + forwardedAddrs := http_proto.ParseXForwardedFor(request.Header) + if len(forwardedAddrs) > 0 && forwardedAddrs[0].Family().IsIP() { + remoteAddr.(*net.TCPAddr).IP = forwardedAddrs[0].IP() + } + done := done.New() conn := net.NewConnection( net.ConnectionOutput(request.Body), @@ -102,7 +108,7 @@ func Listen(ctx context.Context, address net.Address, port net.Port, streamSetti IP: address.IP(), Port: int(port), }, - config: *httpSettings, + config: httpSettings, } var server *http.Server diff --git a/transport/internet/kcp/config.pb.go b/transport/internet/kcp/config.pb.go index 84e9c87c7c..29f94fef2a 100644 --- a/transport/internet/kcp/config.pb.go +++ b/transport/internet/kcp/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/kcp/config.proto + package kcp import ( @@ -32,7 +38,7 @@ type MTU struct { func (x *MTU) Reset() { *x = MTU{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[0] + mi := &file_transport_internet_kcp_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +51,7 @@ func (x *MTU) String() string { func (*MTU) ProtoMessage() {} func (x *MTU) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[0] + mi := &file_transport_internet_kcp_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +64,7 @@ func (x *MTU) ProtoReflect() protoreflect.Message { // Deprecated: Use MTU.ProtoReflect.Descriptor instead. func (*MTU) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{0} } func (x *MTU) GetValue() uint32 { @@ -80,7 +86,7 @@ type TTI struct { func (x *TTI) Reset() { *x = TTI{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[1] + mi := &file_transport_internet_kcp_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -93,7 +99,7 @@ func (x *TTI) String() string { func (*TTI) ProtoMessage() {} func (x *TTI) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[1] + mi := &file_transport_internet_kcp_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106,7 +112,7 @@ func (x *TTI) ProtoReflect() protoreflect.Message { // Deprecated: Use TTI.ProtoReflect.Descriptor instead. func (*TTI) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{1} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{1} } func (x *TTI) GetValue() uint32 { @@ -128,7 +134,7 @@ type UplinkCapacity struct { func (x *UplinkCapacity) Reset() { *x = UplinkCapacity{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[2] + mi := &file_transport_internet_kcp_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -141,7 +147,7 @@ func (x *UplinkCapacity) String() string { func (*UplinkCapacity) ProtoMessage() {} func (x *UplinkCapacity) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[2] + mi := &file_transport_internet_kcp_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -154,7 +160,7 @@ func (x *UplinkCapacity) ProtoReflect() protoreflect.Message { // Deprecated: Use UplinkCapacity.ProtoReflect.Descriptor instead. func (*UplinkCapacity) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{2} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{2} } func (x *UplinkCapacity) GetValue() uint32 { @@ -176,7 +182,7 @@ type DownlinkCapacity struct { func (x *DownlinkCapacity) Reset() { *x = DownlinkCapacity{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[3] + mi := &file_transport_internet_kcp_config_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -189,7 +195,7 @@ func (x *DownlinkCapacity) String() string { func (*DownlinkCapacity) ProtoMessage() {} func (x *DownlinkCapacity) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[3] + mi := &file_transport_internet_kcp_config_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -202,7 +208,7 @@ func (x *DownlinkCapacity) ProtoReflect() protoreflect.Message { // Deprecated: Use DownlinkCapacity.ProtoReflect.Descriptor instead. func (*DownlinkCapacity) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{3} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{3} } func (x *DownlinkCapacity) GetValue() uint32 { @@ -224,7 +230,7 @@ type WriteBuffer struct { func (x *WriteBuffer) Reset() { *x = WriteBuffer{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[4] + mi := &file_transport_internet_kcp_config_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -237,7 +243,7 @@ func (x *WriteBuffer) String() string { func (*WriteBuffer) ProtoMessage() {} func (x *WriteBuffer) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[4] + mi := &file_transport_internet_kcp_config_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -250,7 +256,7 @@ func (x *WriteBuffer) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteBuffer.ProtoReflect.Descriptor instead. func (*WriteBuffer) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{4} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{4} } func (x *WriteBuffer) GetSize() uint32 { @@ -272,7 +278,7 @@ type ReadBuffer struct { func (x *ReadBuffer) Reset() { *x = ReadBuffer{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[5] + mi := &file_transport_internet_kcp_config_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -285,7 +291,7 @@ func (x *ReadBuffer) String() string { func (*ReadBuffer) ProtoMessage() {} func (x *ReadBuffer) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[5] + mi := &file_transport_internet_kcp_config_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -298,7 +304,7 @@ func (x *ReadBuffer) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadBuffer.ProtoReflect.Descriptor instead. func (*ReadBuffer) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{5} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{5} } func (x *ReadBuffer) GetSize() uint32 { @@ -319,7 +325,7 @@ type ConnectionReuse struct { func (x *ConnectionReuse) Reset() { *x = ConnectionReuse{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[6] + mi := &file_transport_internet_kcp_config_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -332,7 +338,7 @@ func (x *ConnectionReuse) String() string { func (*ConnectionReuse) ProtoMessage() {} func (x *ConnectionReuse) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[6] + mi := &file_transport_internet_kcp_config_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -345,7 +351,7 @@ func (x *ConnectionReuse) ProtoReflect() protoreflect.Message { // Deprecated: Use ConnectionReuse.ProtoReflect.Descriptor instead. func (*ConnectionReuse) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{6} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{6} } func (x *ConnectionReuse) GetEnable() bool { @@ -367,7 +373,7 @@ type EncryptionSeed struct { func (x *EncryptionSeed) Reset() { *x = EncryptionSeed{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[7] + mi := &file_transport_internet_kcp_config_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -380,7 +386,7 @@ func (x *EncryptionSeed) String() string { func (*EncryptionSeed) ProtoMessage() {} func (x *EncryptionSeed) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[7] + mi := &file_transport_internet_kcp_config_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -393,7 +399,7 @@ func (x *EncryptionSeed) ProtoReflect() protoreflect.Message { // Deprecated: Use EncryptionSeed.ProtoReflect.Descriptor instead. func (*EncryptionSeed) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{7} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{7} } func (x *EncryptionSeed) GetSeed() string { @@ -422,7 +428,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[8] + mi := &file_transport_internet_kcp_config_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -435,7 +441,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[8] + mi := &file_transport_internet_kcp_config_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -448,7 +454,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP(), []int{8} + return file_transport_internet_kcp_config_proto_rawDescGZIP(), []int{8} } func (x *Config) GetMtu() *MTU { @@ -514,100 +520,100 @@ func (x *Config) GetSeed() *EncryptionSeed { return nil } -var File_v2ray_com_core_transport_internet_kcp_config_proto protoreflect.FileDescriptor +var File_transport_internet_kcp_config_proto protoreflect.FileDescriptor -var file_v2ray_com_core_transport_internet_kcp_config_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x63, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 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, 0x1b, 0x0a, 0x03, 0x4d, 0x54, 0x55, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1b, 0x0a, 0x03, 0x54, 0x54, 0x49, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x61, 0x70, - 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x28, 0x0a, 0x10, 0x44, - 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, +var file_transport_internet_kcp_config_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x63, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 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, 0x1b, 0x0a, 0x03, 0x4d, + 0x54, 0x55, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1b, 0x0a, 0x03, 0x54, 0x54, 0x49, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x75, - 0x66, 0x66, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x20, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x43, + 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x28, 0x0a, + 0x10, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x75, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x24, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x22, 0x97, 0x05, 0x0a, 0x06, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x4d, 0x54, 0x55, 0x52, 0x03, 0x6d, 0x74, 0x75, - 0x12, 0x38, 0x0a, 0x03, 0x74, 0x74, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, - 0x70, 0x2e, 0x54, 0x54, 0x49, 0x52, 0x03, 0x74, 0x74, 0x69, 0x12, 0x5a, 0x0a, 0x0f, 0x75, 0x70, - 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x20, 0x0a, 0x0a, 0x52, 0x65, + 0x61, 0x64, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x29, 0x0a, 0x0f, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x75, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x24, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x22, 0x97, 0x05, + 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x4d, 0x54, 0x55, 0x52, 0x03, 0x6d, + 0x74, 0x75, 0x12, 0x38, 0x0a, 0x03, 0x74, 0x74, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, + 0x6b, 0x63, 0x70, 0x2e, 0x54, 0x54, 0x49, 0x52, 0x03, 0x74, 0x74, 0x69, 0x12, 0x5a, 0x0a, 0x0f, + 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, + 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, + 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x60, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, + 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x61, - 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x61, - 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x60, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, - 0x6e, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x61, - 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x52, 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, - 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x67, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x63, 0x6f, - 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, - 0x63, 0x70, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x52, 0x0b, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0b, 0x72, - 0x65, 0x61, 0x64, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, + 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, + 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x52, 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, + 0x6e, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, + 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0c, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x52, - 0x0a, 0x72, 0x65, 0x61, 0x64, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0d, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x0c, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x4a, - 0x04, 0x08, 0x09, 0x10, 0x0a, 0x42, 0x52, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x50, 0x01, - 0x5a, 0x03, 0x6b, 0x63, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, - 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x4b, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x4e, 0x0a, + 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x42, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x4b, 0x0a, + 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 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, 0x0c, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x04, 0x73, 0x65, + 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x04, 0x73, 0x65, 0x65, + 0x64, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x42, 0x74, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, + 0x50, 0x01, 0x5a, 0x25, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x63, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, + 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x4b, 0x63, 0x70, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescData = file_v2ray_com_core_transport_internet_kcp_config_proto_rawDesc + file_transport_internet_kcp_config_proto_rawDescOnce sync.Once + file_transport_internet_kcp_config_proto_rawDescData = file_transport_internet_kcp_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescData) +func file_transport_internet_kcp_config_proto_rawDescGZIP() []byte { + file_transport_internet_kcp_config_proto_rawDescOnce.Do(func() { + file_transport_internet_kcp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_kcp_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_kcp_config_proto_rawDescData + return file_transport_internet_kcp_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_v2ray_com_core_transport_internet_kcp_config_proto_goTypes = []interface{}{ +var file_transport_internet_kcp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_transport_internet_kcp_config_proto_goTypes = []interface{}{ (*MTU)(nil), // 0: v2ray.core.transport.internet.kcp.MTU (*TTI)(nil), // 1: v2ray.core.transport.internet.kcp.TTI (*UplinkCapacity)(nil), // 2: v2ray.core.transport.internet.kcp.UplinkCapacity @@ -619,7 +625,7 @@ var file_v2ray_com_core_transport_internet_kcp_config_proto_goTypes = []interfac (*Config)(nil), // 8: v2ray.core.transport.internet.kcp.Config (*serial.TypedMessage)(nil), // 9: v2ray.core.common.serial.TypedMessage } -var file_v2ray_com_core_transport_internet_kcp_config_proto_depIdxs = []int32{ +var file_transport_internet_kcp_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.transport.internet.kcp.Config.mtu:type_name -> v2ray.core.transport.internet.kcp.MTU 1, // 1: v2ray.core.transport.internet.kcp.Config.tti:type_name -> v2ray.core.transport.internet.kcp.TTI 2, // 2: v2ray.core.transport.internet.kcp.Config.uplink_capacity:type_name -> v2ray.core.transport.internet.kcp.UplinkCapacity @@ -635,13 +641,13 @@ var file_v2ray_com_core_transport_internet_kcp_config_proto_depIdxs = []int32{ 0, // [0:8] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_kcp_config_proto_init() } -func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { - if File_v2ray_com_core_transport_internet_kcp_config_proto != nil { +func init() { file_transport_internet_kcp_config_proto_init() } +func file_transport_internet_kcp_config_proto_init() { + if File_transport_internet_kcp_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MTU); i { case 0: return &v.state @@ -653,7 +659,7 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TTI); i { case 0: return &v.state @@ -665,7 +671,7 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UplinkCapacity); i { case 0: return &v.state @@ -677,7 +683,7 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DownlinkCapacity); i { case 0: return &v.state @@ -689,7 +695,7 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteBuffer); i { case 0: return &v.state @@ -701,7 +707,7 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReadBuffer); i { case 0: return &v.state @@ -713,7 +719,7 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConnectionReuse); i { case 0: return &v.state @@ -725,7 +731,7 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncryptionSeed); i { case 0: return &v.state @@ -737,7 +743,7 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -754,18 +760,18 @@ func file_v2ray_com_core_transport_internet_kcp_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_kcp_config_proto_rawDesc, + RawDescriptor: file_transport_internet_kcp_config_proto_rawDesc, NumEnums: 0, NumMessages: 9, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_kcp_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_kcp_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_kcp_config_proto_msgTypes, + GoTypes: file_transport_internet_kcp_config_proto_goTypes, + DependencyIndexes: file_transport_internet_kcp_config_proto_depIdxs, + MessageInfos: file_transport_internet_kcp_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_kcp_config_proto = out.File - file_v2ray_com_core_transport_internet_kcp_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_kcp_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_kcp_config_proto_depIdxs = nil + File_transport_internet_kcp_config_proto = out.File + file_transport_internet_kcp_config_proto_rawDesc = nil + file_transport_internet_kcp_config_proto_goTypes = nil + file_transport_internet_kcp_config_proto_depIdxs = nil } diff --git a/transport/internet/kcp/config.proto b/transport/internet/kcp/config.proto index a56e1536e8..8fc180ec78 100644 --- a/transport/internet/kcp/config.proto +++ b/transport/internet/kcp/config.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.transport.internet.kcp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Kcp"; -option go_package = "kcp"; +option go_package = "v2ray.com/core/transport/internet/kcp"; option java_package = "com.v2ray.core.transport.internet.kcp"; option java_multiple_files = true; -import "v2ray.com/core/common/serial/typed_message.proto"; +import "common/serial/typed_message.proto"; // Maximum Transmission Unit, in bytes. message MTU { @@ -58,4 +58,4 @@ message Config { v2ray.core.common.serial.TypedMessage header_config = 8; reserved 9; EncryptionSeed seed = 10; -} \ No newline at end of file +} diff --git a/transport/internet/kcp/sending.go b/transport/internet/kcp/sending.go index 38b1201132..c8852ef7ea 100644 --- a/transport/internet/kcp/sending.go +++ b/transport/internet/kcp/sending.go @@ -121,10 +121,7 @@ func (sw *SendingWindow) Flush(current uint32, rto uint32, maxInFlightSize uint3 segment.transmit++ sw.writer.Write(segment) inFlightSize++ - if inFlightSize >= maxInFlightSize { - return false - } - return true + return inFlightSize < maxInFlightSize }) if sw.onPacketLoss != nil && inFlightSize > 0 && sw.totalInFlightSize != 0 { diff --git a/transport/internet/quic/config.pb.go b/transport/internet/quic/config.pb.go index 4bd672c08f..89e642a72c 100644 --- a/transport/internet/quic/config.pb.go +++ b/transport/internet/quic/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/quic/config.proto + package quic import ( @@ -34,7 +40,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_quic_config_proto_msgTypes[0] + mi := &file_transport_internet_quic_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +53,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_quic_config_proto_msgTypes[0] + mi := &file_transport_internet_quic_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +66,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_quic_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_quic_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetKey() string { @@ -84,58 +90,58 @@ func (x *Config) GetHeader() *serial.TypedMessage { return nil } -var File_v2ray_com_core_transport_internet_quic_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_quic_config_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 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, 0x1a, 0x2c, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x06, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, - 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x55, - 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x50, 0x01, 0x5a, 0x04, 0x71, 0x75, 0x69, 0x63, - 0xaa, 0x02, 0x22, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2e, 0x51, 0x75, 0x69, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_transport_internet_quic_config_proto protoreflect.FileDescriptor + +var file_transport_internet_quic_config_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x71, 0x75, 0x69, 0x63, 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, 0x1a, 0x1d, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, + 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x08, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x42, 0x77, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x50, 0x01, 0x5a, 0x26, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x2f, 0x71, 0x75, 0x69, 0x63, 0xaa, 0x02, 0x22, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, + 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_quic_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_quic_config_proto_rawDescData = file_v2ray_com_core_transport_internet_quic_config_proto_rawDesc + file_transport_internet_quic_config_proto_rawDescOnce sync.Once + file_transport_internet_quic_config_proto_rawDescData = file_transport_internet_quic_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_quic_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_quic_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_quic_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_quic_config_proto_rawDescData) +func file_transport_internet_quic_config_proto_rawDescGZIP() []byte { + file_transport_internet_quic_config_proto_rawDescOnce.Do(func() { + file_transport_internet_quic_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_quic_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_quic_config_proto_rawDescData + return file_transport_internet_quic_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_quic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_quic_config_proto_goTypes = []interface{}{ +var file_transport_internet_quic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_quic_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.internet.quic.Config (*protocol.SecurityConfig)(nil), // 1: v2ray.core.common.protocol.SecurityConfig (*serial.TypedMessage)(nil), // 2: v2ray.core.common.serial.TypedMessage } -var file_v2ray_com_core_transport_internet_quic_config_proto_depIdxs = []int32{ +var file_transport_internet_quic_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.transport.internet.quic.Config.security:type_name -> v2ray.core.common.protocol.SecurityConfig 2, // 1: v2ray.core.transport.internet.quic.Config.header:type_name -> v2ray.core.common.serial.TypedMessage 2, // [2:2] is the sub-list for method output_type @@ -145,13 +151,13 @@ var file_v2ray_com_core_transport_internet_quic_config_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_quic_config_proto_init() } -func file_v2ray_com_core_transport_internet_quic_config_proto_init() { - if File_v2ray_com_core_transport_internet_quic_config_proto != nil { +func init() { file_transport_internet_quic_config_proto_init() } +func file_transport_internet_quic_config_proto_init() { + if File_transport_internet_quic_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_quic_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_quic_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -168,18 +174,18 @@ func file_v2ray_com_core_transport_internet_quic_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_quic_config_proto_rawDesc, + RawDescriptor: file_transport_internet_quic_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_quic_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_quic_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_quic_config_proto_msgTypes, + GoTypes: file_transport_internet_quic_config_proto_goTypes, + DependencyIndexes: file_transport_internet_quic_config_proto_depIdxs, + MessageInfos: file_transport_internet_quic_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_quic_config_proto = out.File - file_v2ray_com_core_transport_internet_quic_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_quic_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_quic_config_proto_depIdxs = nil + File_transport_internet_quic_config_proto = out.File + file_transport_internet_quic_config_proto_rawDesc = nil + file_transport_internet_quic_config_proto_goTypes = nil + file_transport_internet_quic_config_proto_depIdxs = nil } diff --git a/transport/internet/quic/config.proto b/transport/internet/quic/config.proto index bbc20cae36..23420e6d2e 100644 --- a/transport/internet/quic/config.proto +++ b/transport/internet/quic/config.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package v2ray.core.transport.internet.quic; option csharp_namespace = "V2Ray.Core.Transport.Internet.Quic"; -option go_package = "quic"; +option go_package = "v2ray.com/core/transport/internet/quic"; option java_package = "com.v2ray.core.transport.internet.quic"; option java_multiple_files = true; -import "v2ray.com/core/common/serial/typed_message.proto"; -import "v2ray.com/core/common/protocol/headers.proto"; +import "common/serial/typed_message.proto"; +import "common/protocol/headers.proto"; message Config { string key = 1; diff --git a/transport/internet/tcp/config.pb.go b/transport/internet/tcp/config.pb.go index 364b135645..da5cd357c3 100644 --- a/transport/internet/tcp/config.pb.go +++ b/transport/internet/tcp/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/tcp/config.proto + package tcp import ( @@ -25,13 +31,14 @@ type Config struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - HeaderSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=header_settings,json=headerSettings,proto3" json:"header_settings,omitempty"` + HeaderSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=header_settings,json=headerSettings,proto3" json:"header_settings,omitempty"` + AcceptProxyProtocol bool `protobuf:"varint,3,opt,name=accept_proxy_protocol,json=acceptProxyProtocol,proto3" json:"accept_proxy_protocol,omitempty"` } func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_tcp_config_proto_msgTypes[0] + mi := &file_transport_internet_tcp_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +51,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_tcp_config_proto_msgTypes[0] + mi := &file_transport_internet_tcp_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +64,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_tcp_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_tcp_config_proto_rawDescGZIP(), []int{0} } func (x *Config) GetHeaderSettings() *serial.TypedMessage { @@ -67,50 +74,60 @@ func (x *Config) GetHeaderSettings() *serial.TypedMessage { return nil } -var File_v2ray_com_core_transport_internet_tcp_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_tcp_config_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x63, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 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, 0x5f, 0x0a, 0x06, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x52, 0x0a, 0x25, 0x63, 0x6f, - 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, - 0x74, 0x63, 0x70, 0x50, 0x01, 0x5a, 0x03, 0x74, 0x63, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, - 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x63, 0x70, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *Config) GetAcceptProxyProtocol() bool { + if x != nil { + return x.AcceptProxyProtocol + } + return false +} + +var File_transport_internet_tcp_config_proto protoreflect.FileDescriptor + +var file_transport_internet_tcp_config_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x63, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 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, 0x93, 0x01, 0x0a, 0x06, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 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, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 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, 0x03, 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, 0x4a, 0x04, 0x08, 0x01, 0x10, + 0x02, 0x42, 0x74, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x50, 0x01, 0x5a, 0x25, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, + 0x74, 0x63, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_tcp_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_tcp_config_proto_rawDescData = file_v2ray_com_core_transport_internet_tcp_config_proto_rawDesc + file_transport_internet_tcp_config_proto_rawDescOnce sync.Once + file_transport_internet_tcp_config_proto_rawDescData = file_transport_internet_tcp_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_tcp_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_tcp_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_tcp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_tcp_config_proto_rawDescData) +func file_transport_internet_tcp_config_proto_rawDescGZIP() []byte { + file_transport_internet_tcp_config_proto_rawDescOnce.Do(func() { + file_transport_internet_tcp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_tcp_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_tcp_config_proto_rawDescData + return file_transport_internet_tcp_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_tcp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_tcp_config_proto_goTypes = []interface{}{ +var file_transport_internet_tcp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_tcp_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.internet.tcp.Config (*serial.TypedMessage)(nil), // 1: v2ray.core.common.serial.TypedMessage } -var file_v2ray_com_core_transport_internet_tcp_config_proto_depIdxs = []int32{ +var file_transport_internet_tcp_config_proto_depIdxs = []int32{ 1, // 0: v2ray.core.transport.internet.tcp.Config.header_settings:type_name -> v2ray.core.common.serial.TypedMessage 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -119,13 +136,13 @@ var file_v2ray_com_core_transport_internet_tcp_config_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_tcp_config_proto_init() } -func file_v2ray_com_core_transport_internet_tcp_config_proto_init() { - if File_v2ray_com_core_transport_internet_tcp_config_proto != nil { +func init() { file_transport_internet_tcp_config_proto_init() } +func file_transport_internet_tcp_config_proto_init() { + if File_transport_internet_tcp_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_tcp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_tcp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -142,18 +159,18 @@ func file_v2ray_com_core_transport_internet_tcp_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_tcp_config_proto_rawDesc, + RawDescriptor: file_transport_internet_tcp_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_tcp_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_tcp_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_tcp_config_proto_msgTypes, + GoTypes: file_transport_internet_tcp_config_proto_goTypes, + DependencyIndexes: file_transport_internet_tcp_config_proto_depIdxs, + MessageInfos: file_transport_internet_tcp_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_tcp_config_proto = out.File - file_v2ray_com_core_transport_internet_tcp_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_tcp_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_tcp_config_proto_depIdxs = nil + File_transport_internet_tcp_config_proto = out.File + file_transport_internet_tcp_config_proto_rawDesc = nil + file_transport_internet_tcp_config_proto_goTypes = nil + file_transport_internet_tcp_config_proto_depIdxs = nil } diff --git a/transport/internet/tcp/config.proto b/transport/internet/tcp/config.proto index 92e060cd47..3915ba80f5 100644 --- a/transport/internet/tcp/config.proto +++ b/transport/internet/tcp/config.proto @@ -2,13 +2,14 @@ syntax = "proto3"; package v2ray.core.transport.internet.tcp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Tcp"; -option go_package = "tcp"; +option go_package = "v2ray.com/core/transport/internet/tcp"; option java_package = "com.v2ray.core.transport.internet.tcp"; option java_multiple_files = true; -import "v2ray.com/core/common/serial/typed_message.proto"; +import "common/serial/typed_message.proto"; message Config { reserved 1; v2ray.core.common.serial.TypedMessage header_settings = 2; + bool accept_proxy_protocol = 3; } diff --git a/transport/internet/tcp/hub.go b/transport/internet/tcp/hub.go index f3e6ade0ca..7813c5e4fe 100644 --- a/transport/internet/tcp/hub.go +++ b/transport/internet/tcp/hub.go @@ -8,6 +8,8 @@ import ( "strings" "time" + "github.com/pires/go-proxyproto" + "v2ray.com/core/common" "v2ray.com/core/common/net" "v2ray.com/core/common/session" @@ -31,15 +33,27 @@ func ListenTCP(ctx context.Context, address net.Address, port net.Port, streamSe Port: int(port), }, streamSettings.SocketSettings) if err != nil { - return nil, err + return nil, newError("failed to listen TCP on", address, ":", port).Base(err) } newError("listening TCP on ", address, ":", port).WriteToLog(session.ExportIDToError(ctx)) tcpSettings := streamSettings.ProtocolSettings.(*Config) - l := &Listener{ - listener: listener, - config: tcpSettings, - addConn: handler, + var l *Listener + + if tcpSettings.AcceptProxyProtocol { + policyFunc := func(upstream net.Addr) (proxyproto.Policy, error) { return proxyproto.REQUIRE, nil } + l = &Listener{ + listener: &proxyproto.Listener{Listener: listener, Policy: policyFunc}, + config: tcpSettings, + addConn: handler, + } + newError("accepting PROXY protocol").AtWarning().WriteToLog(session.ExportIDToError(ctx)) + } else { + l = &Listener{ + listener: listener, + config: tcpSettings, + addConn: handler, + } } if config := tls.ConfigFromStreamSettings(streamSettings); config != nil { @@ -57,6 +71,7 @@ func ListenTCP(ctx context.Context, address net.Address, port net.Port, streamSe } l.authConfig = auth } + go l.keepAccepting() return l, nil } diff --git a/transport/internet/tls/config.pb.go b/transport/internet/tls/config.pb.go index 530a9b81c4..fd08ed13d2 100644 --- a/transport/internet/tls/config.pb.go +++ b/transport/internet/tls/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/tls/config.proto + package tls import ( @@ -52,11 +58,11 @@ func (x Certificate_Usage) String() string { } func (Certificate_Usage) Descriptor() protoreflect.EnumDescriptor { - return file_v2ray_com_core_transport_internet_tls_config_proto_enumTypes[0].Descriptor() + return file_transport_internet_tls_config_proto_enumTypes[0].Descriptor() } func (Certificate_Usage) Type() protoreflect.EnumType { - return &file_v2ray_com_core_transport_internet_tls_config_proto_enumTypes[0] + return &file_transport_internet_tls_config_proto_enumTypes[0] } func (x Certificate_Usage) Number() protoreflect.EnumNumber { @@ -65,7 +71,7 @@ func (x Certificate_Usage) Number() protoreflect.EnumNumber { // Deprecated: Use Certificate_Usage.Descriptor instead. func (Certificate_Usage) EnumDescriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_tls_config_proto_rawDescGZIP(), []int{0, 0} + return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{0, 0} } type Certificate struct { @@ -83,7 +89,7 @@ type Certificate struct { func (x *Certificate) Reset() { *x = Certificate{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_tls_config_proto_msgTypes[0] + mi := &file_transport_internet_tls_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -96,7 +102,7 @@ func (x *Certificate) String() string { func (*Certificate) ProtoMessage() {} func (x *Certificate) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_tls_config_proto_msgTypes[0] + mi := &file_transport_internet_tls_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109,7 +115,7 @@ func (x *Certificate) ProtoReflect() protoreflect.Message { // Deprecated: Use Certificate.ProtoReflect.Descriptor instead. func (*Certificate) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_tls_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{0} } func (x *Certificate) GetCertificate() []byte { @@ -157,7 +163,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_tls_config_proto_msgTypes[1] + mi := &file_transport_internet_tls_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -170,7 +176,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_tls_config_proto_msgTypes[1] + mi := &file_transport_internet_tls_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -183,7 +189,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_tls_config_proto_rawDescGZIP(), []int{1} + return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{1} } func (x *Config) GetAllowInsecure() bool { @@ -235,79 +241,80 @@ func (x *Config) GetDisableSystemRoot() bool { return false } -var File_v2ray_com_core_transport_internet_tls_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_tls_config_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x05, 0x75, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0x44, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x4e, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x4d, 0x45, 0x4e, 0x54, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, - 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x55, 0x54, 0x48, - 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x10, 0x02, 0x22, 0xeb, 0x02, - 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x12, - 0x34, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x65, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x43, 0x69, - 0x70, 0x68, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x32, 0x72, - 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3c, 0x0a, - 0x1a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x52, 0x0a, 0x25, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, 0x5a, 0x03, 0x74, 0x6c, 0x73, 0xaa, 0x02, 0x21, 0x56, 0x32, - 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_transport_internet_tls_config_proto protoreflect.FileDescriptor + +var file_transport_internet_tls_config_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x0b, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x05, + 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0x44, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x4e, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x4d, 0x45, 0x4e, + 0x54, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, + 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x55, 0x54, + 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x10, 0x02, 0x22, 0xeb, + 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, + 0x12, 0x34, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x65, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x43, + 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x32, + 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x63, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0c, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3c, + 0x0a, 0x1a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x74, 0x0a, 0x25, + 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, 0x5a, 0x25, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0xaa, 0x02, + 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, + 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_tls_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_tls_config_proto_rawDescData = file_v2ray_com_core_transport_internet_tls_config_proto_rawDesc + file_transport_internet_tls_config_proto_rawDescOnce sync.Once + file_transport_internet_tls_config_proto_rawDescData = file_transport_internet_tls_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_tls_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_tls_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_tls_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_tls_config_proto_rawDescData) +func file_transport_internet_tls_config_proto_rawDescGZIP() []byte { + file_transport_internet_tls_config_proto_rawDescOnce.Do(func() { + file_transport_internet_tls_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_tls_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_tls_config_proto_rawDescData + return file_transport_internet_tls_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_tls_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v2ray_com_core_transport_internet_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_v2ray_com_core_transport_internet_tls_config_proto_goTypes = []interface{}{ +var file_transport_internet_tls_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_transport_internet_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_transport_internet_tls_config_proto_goTypes = []interface{}{ (Certificate_Usage)(0), // 0: v2ray.core.transport.internet.tls.Certificate.Usage (*Certificate)(nil), // 1: v2ray.core.transport.internet.tls.Certificate (*Config)(nil), // 2: v2ray.core.transport.internet.tls.Config } -var file_v2ray_com_core_transport_internet_tls_config_proto_depIdxs = []int32{ +var file_transport_internet_tls_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.transport.internet.tls.Certificate.usage:type_name -> v2ray.core.transport.internet.tls.Certificate.Usage 1, // 1: v2ray.core.transport.internet.tls.Config.certificate:type_name -> v2ray.core.transport.internet.tls.Certificate 2, // [2:2] is the sub-list for method output_type @@ -317,13 +324,13 @@ var file_v2ray_com_core_transport_internet_tls_config_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_tls_config_proto_init() } -func file_v2ray_com_core_transport_internet_tls_config_proto_init() { - if File_v2ray_com_core_transport_internet_tls_config_proto != nil { +func init() { file_transport_internet_tls_config_proto_init() } +func file_transport_internet_tls_config_proto_init() { + if File_transport_internet_tls_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_tls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_tls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Certificate); i { case 0: return &v.state @@ -335,7 +342,7 @@ func file_v2ray_com_core_transport_internet_tls_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_tls_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_tls_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -352,19 +359,19 @@ func file_v2ray_com_core_transport_internet_tls_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_tls_config_proto_rawDesc, + RawDescriptor: file_transport_internet_tls_config_proto_rawDesc, NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_tls_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_tls_config_proto_depIdxs, - EnumInfos: file_v2ray_com_core_transport_internet_tls_config_proto_enumTypes, - MessageInfos: file_v2ray_com_core_transport_internet_tls_config_proto_msgTypes, + GoTypes: file_transport_internet_tls_config_proto_goTypes, + DependencyIndexes: file_transport_internet_tls_config_proto_depIdxs, + EnumInfos: file_transport_internet_tls_config_proto_enumTypes, + MessageInfos: file_transport_internet_tls_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_tls_config_proto = out.File - file_v2ray_com_core_transport_internet_tls_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_tls_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_tls_config_proto_depIdxs = nil + File_transport_internet_tls_config_proto = out.File + file_transport_internet_tls_config_proto_rawDesc = nil + file_transport_internet_tls_config_proto_goTypes = nil + file_transport_internet_tls_config_proto_depIdxs = nil } diff --git a/transport/internet/tls/config.proto b/transport/internet/tls/config.proto index e1e9dcb5ed..56e887d84e 100644 --- a/transport/internet/tls/config.proto +++ b/transport/internet/tls/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.tls; option csharp_namespace = "V2Ray.Core.Transport.Internet.Tls"; -option go_package = "tls"; +option go_package = "v2ray.com/core/transport/internet/tls"; option java_package = "com.v2ray.core.transport.internet.tls"; option java_multiple_files = true; diff --git a/transport/internet/udp/config.pb.go b/transport/internet/udp/config.pb.go index 5b7fe6ea6d..d44d82db3d 100644 --- a/transport/internet/udp/config.pb.go +++ b/transport/internet/udp/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/udp/config.proto + package udp import ( @@ -28,7 +34,7 @@ type Config struct { func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_udp_config_proto_msgTypes[0] + mi := &file_transport_internet_udp_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -41,7 +47,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_udp_config_proto_msgTypes[0] + mi := &file_transport_internet_udp_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,43 +60,44 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_udp_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_udp_config_proto_rawDescGZIP(), []int{0} } -var File_v2ray_com_core_transport_internet_udp_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_udp_config_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x75, 0x64, 0x70, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x52, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x75, 0x64, 0x70, 0x50, 0x01, 0x5a, 0x03, 0x75, 0x64, - 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x2e, 0x55, 0x64, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_transport_internet_udp_config_proto protoreflect.FileDescriptor + +var file_transport_internet_udp_config_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x75, 0x64, 0x70, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x74, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x75, 0x64, 0x70, 0x50, 0x01, 0x5a, 0x25, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x2f, 0x75, 0x64, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, + 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x55, 0x64, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_udp_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_udp_config_proto_rawDescData = file_v2ray_com_core_transport_internet_udp_config_proto_rawDesc + file_transport_internet_udp_config_proto_rawDescOnce sync.Once + file_transport_internet_udp_config_proto_rawDescData = file_transport_internet_udp_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_udp_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_udp_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_udp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_udp_config_proto_rawDescData) +func file_transport_internet_udp_config_proto_rawDescGZIP() []byte { + file_transport_internet_udp_config_proto_rawDescOnce.Do(func() { + file_transport_internet_udp_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_udp_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_udp_config_proto_rawDescData + return file_transport_internet_udp_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_udp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_v2ray_com_core_transport_internet_udp_config_proto_goTypes = []interface{}{ +var file_transport_internet_udp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_transport_internet_udp_config_proto_goTypes = []interface{}{ (*Config)(nil), // 0: v2ray.core.transport.internet.udp.Config } -var file_v2ray_com_core_transport_internet_udp_config_proto_depIdxs = []int32{ +var file_transport_internet_udp_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -98,13 +105,13 @@ var file_v2ray_com_core_transport_internet_udp_config_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_udp_config_proto_init() } -func file_v2ray_com_core_transport_internet_udp_config_proto_init() { - if File_v2ray_com_core_transport_internet_udp_config_proto != nil { +func init() { file_transport_internet_udp_config_proto_init() } +func file_transport_internet_udp_config_proto_init() { + if File_transport_internet_udp_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_udp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_udp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -121,18 +128,18 @@ func file_v2ray_com_core_transport_internet_udp_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_udp_config_proto_rawDesc, + RawDescriptor: file_transport_internet_udp_config_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_udp_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_udp_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_udp_config_proto_msgTypes, + GoTypes: file_transport_internet_udp_config_proto_goTypes, + DependencyIndexes: file_transport_internet_udp_config_proto_depIdxs, + MessageInfos: file_transport_internet_udp_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_udp_config_proto = out.File - file_v2ray_com_core_transport_internet_udp_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_udp_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_udp_config_proto_depIdxs = nil + File_transport_internet_udp_config_proto = out.File + file_transport_internet_udp_config_proto_rawDesc = nil + file_transport_internet_udp_config_proto_goTypes = nil + file_transport_internet_udp_config_proto_depIdxs = nil } diff --git a/transport/internet/udp/config.proto b/transport/internet/udp/config.proto index 89ec1e6b19..a594888d98 100644 --- a/transport/internet/udp/config.proto +++ b/transport/internet/udp/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.udp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Udp"; -option go_package = "udp"; +option go_package = "v2ray.com/core/transport/internet/udp"; option java_package = "com.v2ray.core.transport.internet.udp"; option java_multiple_files = true; diff --git a/transport/internet/websocket/config.pb.go b/transport/internet/websocket/config.pb.go index 510a5a1c9d..07fa6ed520 100644 --- a/transport/internet/websocket/config.pb.go +++ b/transport/internet/websocket/config.pb.go @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: transport/internet/websocket/config.proto + package websocket import ( @@ -31,7 +37,7 @@ type Header struct { func (x *Header) Reset() { *x = Header{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_websocket_config_proto_msgTypes[0] + mi := &file_transport_internet_websocket_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +50,7 @@ func (x *Header) String() string { func (*Header) ProtoMessage() {} func (x *Header) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_websocket_config_proto_msgTypes[0] + mi := &file_transport_internet_websocket_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +63,7 @@ func (x *Header) ProtoReflect() protoreflect.Message { // Deprecated: Use Header.ProtoReflect.Descriptor instead. func (*Header) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescGZIP(), []int{0} + return file_transport_internet_websocket_config_proto_rawDescGZIP(), []int{0} } func (x *Header) GetKey() string { @@ -80,14 +86,15 @@ type Config struct { unknownFields protoimpl.UnknownFields // URL path to the WebSocket service. Empty value means root(/). - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Header []*Header `protobuf:"bytes,3,rep,name=header,proto3" json:"header,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Header []*Header `protobuf:"bytes,3,rep,name=header,proto3" json:"header,omitempty"` + AcceptProxyProtocol bool `protobuf:"varint,4,opt,name=accept_proxy_protocol,json=acceptProxyProtocol,proto3" json:"accept_proxy_protocol,omitempty"` } func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { - mi := &file_v2ray_com_core_transport_internet_websocket_config_proto_msgTypes[1] + mi := &file_transport_internet_websocket_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -100,7 +107,7 @@ func (x *Config) String() string { func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_v2ray_com_core_transport_internet_websocket_config_proto_msgTypes[1] + mi := &file_transport_internet_websocket_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113,7 +120,7 @@ func (x *Config) ProtoReflect() protoreflect.Message { // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { - return file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescGZIP(), []int{1} + return file_transport_internet_websocket_config_proto_rawDescGZIP(), []int{1} } func (x *Config) GetPath() string { @@ -130,52 +137,64 @@ func (x *Config) GetHeader() []*Header { return nil } -var File_v2ray_com_core_transport_internet_websocket_config_proto protoreflect.FileDescriptor - -var file_v2ray_com_core_transport_internet_websocket_config_proto_rawDesc = []byte{ - 0x0a, 0x38, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x6b, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x47, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, - 0x10, 0x02, 0x42, 0x64, 0x0a, 0x2b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x50, 0x01, 0x5a, 0x09, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0xaa, 0x02, - 0x27, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x57, - 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *Config) GetAcceptProxyProtocol() bool { + if x != nil { + return x.AcceptProxyProtocol + } + return false +} + +var File_transport_internet_websocket_config_proto protoreflect.FileDescriptor + +var file_transport_internet_websocket_config_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x47, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x04, 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, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x86, 0x01, 0x0a, 0x2b, 0x63, 0x6f, 0x6d, + 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x77, + 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x2b, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x77, 0x65, + 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0xaa, 0x02, 0x27, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescOnce sync.Once - file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescData = file_v2ray_com_core_transport_internet_websocket_config_proto_rawDesc + file_transport_internet_websocket_config_proto_rawDescOnce sync.Once + file_transport_internet_websocket_config_proto_rawDescData = file_transport_internet_websocket_config_proto_rawDesc ) -func file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescGZIP() []byte { - file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescOnce.Do(func() { - file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescData) +func file_transport_internet_websocket_config_proto_rawDescGZIP() []byte { + file_transport_internet_websocket_config_proto_rawDescOnce.Do(func() { + file_transport_internet_websocket_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_websocket_config_proto_rawDescData) }) - return file_v2ray_com_core_transport_internet_websocket_config_proto_rawDescData + return file_transport_internet_websocket_config_proto_rawDescData } -var file_v2ray_com_core_transport_internet_websocket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_v2ray_com_core_transport_internet_websocket_config_proto_goTypes = []interface{}{ +var file_transport_internet_websocket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_transport_internet_websocket_config_proto_goTypes = []interface{}{ (*Header)(nil), // 0: v2ray.core.transport.internet.websocket.Header (*Config)(nil), // 1: v2ray.core.transport.internet.websocket.Config } -var file_v2ray_com_core_transport_internet_websocket_config_proto_depIdxs = []int32{ +var file_transport_internet_websocket_config_proto_depIdxs = []int32{ 0, // 0: v2ray.core.transport.internet.websocket.Config.header:type_name -> v2ray.core.transport.internet.websocket.Header 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -184,13 +203,13 @@ var file_v2ray_com_core_transport_internet_websocket_config_proto_depIdxs = []in 0, // [0:1] is the sub-list for field type_name } -func init() { file_v2ray_com_core_transport_internet_websocket_config_proto_init() } -func file_v2ray_com_core_transport_internet_websocket_config_proto_init() { - if File_v2ray_com_core_transport_internet_websocket_config_proto != nil { +func init() { file_transport_internet_websocket_config_proto_init() } +func file_transport_internet_websocket_config_proto_init() { + if File_transport_internet_websocket_config_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_v2ray_com_core_transport_internet_websocket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_websocket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Header); i { case 0: return &v.state @@ -202,7 +221,7 @@ func file_v2ray_com_core_transport_internet_websocket_config_proto_init() { return nil } } - file_v2ray_com_core_transport_internet_websocket_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_websocket_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state @@ -219,18 +238,18 @@ func file_v2ray_com_core_transport_internet_websocket_config_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_v2ray_com_core_transport_internet_websocket_config_proto_rawDesc, + RawDescriptor: file_transport_internet_websocket_config_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_v2ray_com_core_transport_internet_websocket_config_proto_goTypes, - DependencyIndexes: file_v2ray_com_core_transport_internet_websocket_config_proto_depIdxs, - MessageInfos: file_v2ray_com_core_transport_internet_websocket_config_proto_msgTypes, + GoTypes: file_transport_internet_websocket_config_proto_goTypes, + DependencyIndexes: file_transport_internet_websocket_config_proto_depIdxs, + MessageInfos: file_transport_internet_websocket_config_proto_msgTypes, }.Build() - File_v2ray_com_core_transport_internet_websocket_config_proto = out.File - file_v2ray_com_core_transport_internet_websocket_config_proto_rawDesc = nil - file_v2ray_com_core_transport_internet_websocket_config_proto_goTypes = nil - file_v2ray_com_core_transport_internet_websocket_config_proto_depIdxs = nil + File_transport_internet_websocket_config_proto = out.File + file_transport_internet_websocket_config_proto_rawDesc = nil + file_transport_internet_websocket_config_proto_goTypes = nil + file_transport_internet_websocket_config_proto_depIdxs = nil } diff --git a/transport/internet/websocket/config.proto b/transport/internet/websocket/config.proto index 6e36467d1b..7d53f9d131 100644 --- a/transport/internet/websocket/config.proto +++ b/transport/internet/websocket/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.websocket; option csharp_namespace = "V2Ray.Core.Transport.Internet.Websocket"; -option go_package = "websocket"; +option go_package = "v2ray.com/core/transport/internet/websocket"; option java_package = "com.v2ray.core.transport.internet.websocket"; option java_multiple_files = true; @@ -18,4 +18,6 @@ message Config { string path = 2; repeated Header header = 3; -} \ No newline at end of file + + bool accept_proxy_protocol = 4; +} diff --git a/transport/internet/websocket/hub.go b/transport/internet/websocket/hub.go index fc9d08c1d8..e7e90d35d7 100644 --- a/transport/internet/websocket/hub.go +++ b/transport/internet/websocket/hub.go @@ -10,6 +10,8 @@ import ( "time" "github.com/gorilla/websocket" + "github.com/pires/go-proxyproto" + "v2ray.com/core/common" "v2ray.com/core/common/net" http_proto "v2ray.com/core/common/protocol/http" @@ -61,16 +63,27 @@ type Listener struct { } func ListenWS(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, addConn internet.ConnHandler) (internet.Listener, error) { + listener, err := internet.ListenSystem(ctx, &net.TCPAddr{ + IP: address.IP(), + Port: int(port), + }, streamSettings.SocketSettings) + if err != nil { + return nil, newError("failed to listen TCP(for WS) on", address, ":", port).Base(err) + } + newError("listening TCP(for WS) on ", address, ":", port).WriteToLog(session.ExportIDToError(ctx)) + wsSettings := streamSettings.ProtocolSettings.(*Config) - var tlsConfig *tls.Config - if config := v2tls.ConfigFromStreamSettings(streamSettings); config != nil { - tlsConfig = config.GetTLSConfig() + if wsSettings.AcceptProxyProtocol { + policyFunc := func(upstream net.Addr) (proxyproto.Policy, error) { return proxyproto.REQUIRE, nil } + listener = &proxyproto.Listener{Listener: listener, Policy: policyFunc} + newError("accepting PROXY protocol").AtWarning().WriteToLog(session.ExportIDToError(ctx)) } - listener, err := listenTCP(ctx, address, port, tlsConfig, streamSettings.SocketSettings) - if err != nil { - return nil, err + if config := v2tls.ConfigFromStreamSettings(streamSettings); config != nil { + if tlsConfig := config.GetTLSConfig(); tlsConfig != nil { + listener = tls.NewListener(listener, tlsConfig) + } } l := &Listener{ @@ -97,22 +110,6 @@ func ListenWS(ctx context.Context, address net.Address, port net.Port, streamSet return l, err } -func listenTCP(ctx context.Context, address net.Address, port net.Port, tlsConfig *tls.Config, sockopt *internet.SocketConfig) (net.Listener, error) { - listener, err := internet.ListenSystem(ctx, &net.TCPAddr{ - IP: address.IP(), - Port: int(port), - }, sockopt) - if err != nil { - return nil, newError("failed to listen TCP on", address, ":", port).Base(err) - } - - if tlsConfig != nil { - return tls.NewListener(listener, tlsConfig), nil - } - - return listener, nil -} - // Addr implements net.Listener.Addr(). func (ln *Listener) Addr() net.Addr { return ln.listener.Addr()