Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: ctl TLS refine #98

Merged
merged 4 commits into from
Sep 28, 2022
Merged

*: ctl TLS refine #98

merged 4 commits into from
Sep 28, 2022

Conversation

xhebox
Copy link
Collaborator

@xhebox xhebox commented Sep 26, 2022

Signed-off-by: xhe xw897002528@gmail.com

What problem does this PR solve?

Issue Number: ref #69

Problem Summary: The main purpose is to enable passing TLSConfig programatically, which makes it embeddable in other applications like operator.

What is changed and how it works:

  1. GetRootCmd now accepts tls.Config, the main purpose
  2. Silent usage on errors. Only manually print usages on argument mismatch or so.
  3. Support passing tls set from cli, and automatically request with or without SSL
  4. Fix handling of res.StatusCode != http.StatusOK
  5. Handle cases where server with TLS but clients request plain http and vice versa

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
Just enable server with or with TLS and test

One special case is to test !200 cases. Start tiproxy without PD, and you will hit `service not ready` in the first 5 seconds or so 100%.
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change (Don't forget to add the declarative for API)
  • Has weirctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox xhebox mentioned this pull request Sep 26, 2022
9 tasks
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
@djshow832 djshow832 merged commit 475eb1b into pingcap:main Sep 28, 2022
@xhebox xhebox deleted the cli_1 branch September 28, 2022 09:08
xhebox added a commit to xhebox/TiProxy that referenced this pull request Mar 7, 2023
xhebox added a commit to xhebox/TiProxy that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants