From db9962e45a73b9882200f925989920267022b75f Mon Sep 17 00:00:00 2001 From: xhe Date: Fri, 1 Dec 2023 16:47:21 +0800 Subject: [PATCH] relax check Signed-off-by: xhe --- conf/namespace/example.toml | 2 +- conf/proxy.toml | 4 ++-- pkg/proxy/backend/authenticator.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/namespace/example.toml b/conf/namespace/example.toml index 1816b03c..8cdf6024 100644 --- a/conf/namespace/example.toml +++ b/conf/namespace/example.toml @@ -3,5 +3,5 @@ namespace = "default" [frontend] [backend] -instances = [ "127.0.0.1:4000" ] +instances = [ "127.0.0.1:3306" ] selector-type = "random" diff --git a/conf/proxy.toml b/conf/proxy.toml index b688e429..5b73a37d 100644 --- a/conf/proxy.toml +++ b/conf/proxy.toml @@ -3,7 +3,7 @@ [proxy] # addr = "0.0.0.0:6000" # tcp-keep-alive = true -# require-backend-tls = true +require-backend-tls = false # possible values: # "" => disable proxy protocol. @@ -26,7 +26,7 @@ graceful-close-conn-timeout = 15 # possible values: # "" => enable static routing. # "pd-addr:pd-port" => automatically tidb discovery. -# pd-addrs = "127.0.0.1:2379" +pd-addrs = "" # possible values: # 0 => no limitation. diff --git a/pkg/proxy/backend/authenticator.go b/pkg/proxy/backend/authenticator.go index 77ed078c..4f1bafc8 100644 --- a/pkg/proxy/backend/authenticator.go +++ b/pkg/proxy/backend/authenticator.go @@ -214,7 +214,7 @@ loop: if err != nil { // tiproxy pp enabled, tidb pp disabled, tls disabled => invalid sequence // tiproxy pp disabled, tidb pp enabled, tls disabled => invalid sequence - if pktIdx == 0 && auth.proxyProtocol { + if pktIdx == 0 { return errors.Wrap(ErrBackendPPV2, err) } return err