mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-02 04:20:50 +08:00
fix(auth): use fixed antigravity callback port 51121
This commit is contained in:
@@ -19,6 +19,7 @@ services:
|
|||||||
- "8085:8085"
|
- "8085:8085"
|
||||||
- "1455:1455"
|
- "1455:1455"
|
||||||
- "54545:54545"
|
- "54545:54545"
|
||||||
|
- "51121:51121"
|
||||||
- "11451:11451"
|
- "11451:11451"
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.yaml:/CLIProxyAPI/config.yaml
|
- ./config.yaml:/CLIProxyAPI/config.yaml
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
antigravityClientID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
|
antigravityClientID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
|
||||||
antigravityClientSecret = "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"
|
antigravityClientSecret = "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"
|
||||||
|
antigravityCallbackPort = 51121
|
||||||
)
|
)
|
||||||
|
|
||||||
var antigravityScopes = []string{
|
var antigravityScopes = []string{
|
||||||
@@ -160,7 +161,8 @@ type callbackResult struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func startAntigravityCallbackServer() (*http.Server, int, <-chan callbackResult, error) {
|
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 {
|
if err != nil {
|
||||||
return nil, 0, nil, err
|
return nil, 0, nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user