feat: Implement S2A, Rod, and Chromedp based authentication for external services, and introduce new frontend pages and backend APIs for monitoring, configuration, upload, and team processes.
This commit is contained in:
@@ -10,6 +10,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"codex-pool/internal/proxyutil"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -214,8 +216,13 @@ func RefreshCodexToken(refreshToken string, proxyURL string) (*CodexTokens, erro
|
||||
client := &http.Client{Timeout: 30 * time.Second}
|
||||
|
||||
if proxyURL != "" {
|
||||
proxyURLParsed, _ := url.Parse(proxyURL)
|
||||
client.Transport = &http.Transport{Proxy: http.ProxyURL(proxyURLParsed)}
|
||||
info, err := proxyutil.Parse(proxyURL)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("代理格式错误: %v", err)
|
||||
}
|
||||
if info.URL != nil {
|
||||
client.Transport = &http.Transport{Proxy: http.ProxyURL(info.URL)}
|
||||
}
|
||||
}
|
||||
|
||||
data := url.Values{
|
||||
|
||||
Reference in New Issue
Block a user