fix(auth): use fixed antigravity callback port 51121

This commit is contained in:
hkfires
2025-11-21 13:56:33 +08:00
parent 2d84d2fb6a
commit 27faf718a3
2 changed files with 4 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ services:
- "8085:8085"
- "1455:1455"
- "54545:54545"
- "51121:51121"
- "11451:11451"
volumes:
- ./config.yaml:/CLIProxyAPI/config.yaml

View File

@@ -21,6 +21,7 @@ import (
const (
antigravityClientID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
antigravityClientSecret = "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"
antigravityCallbackPort = 51121
)
var antigravityScopes = []string{
@@ -160,7 +161,8 @@ type callbackResult struct {
}
func startAntigravityCallbackServer() (*http.Server, int, <-chan callbackResult, error) {
listener, err := net.Listen("tcp", "127.0.0.1:0")
addr := fmt.Sprintf(":%d", antigravityCallbackPort)
listener, err := net.Listen("tcp", addr)
if err != nil {
return nil, 0, nil, err
}