求助:连不上connect.linuxdo.org

如题,我有一个docker容器new-api,宿主机可以ping通,进入docker容器内部的sh终端之后也可以ping通,但是就是显示连不上 connect.linuxdo.org
这是认证代码:

package controller

import (
        "encoding/base64"
        "encoding/json"
        "errors"
        "fmt"
        "net/http"
        "net/url"
        "strconv"
        "strings"
        "time"

        "github.com/QuantumNous/new-api/common"
        "github.com/QuantumNous/new-api/model"

        "github.com/gin-contrib/sessions"
        "github.com/gin-gonic/gin"
)

type LinuxdoUser struct {
        Id         int    `json:"id"`
        Username   string `json:"username"`
        Name       string `json:"name"`
        Active     bool   `json:"active"`
        TrustLevel int    `json:"trust_level"`
        Silenced   bool   `json:"silenced"`
}

func LinuxDoBind(c *gin.Context) {
        if !common.LinuxDOOAuthEnabled {
                c.JSON(http.StatusOK, gin.H{
                        "success": false,
                        "message": "管理员未开启通过 Linux DO 登录以及注册",
                })
                return
        }

        code := c.Query("code")
        linuxdoUser, err := getLinuxdoUserInfoByCode(code, c)
        if err != nil {
                common.ApiError(c, err)
                return
        }

        user := model.User{
                LinuxDOId: strconv.Itoa(linuxdoUser.Id),
        }

        if model.IsLinuxDOIdAlreadyTaken(user.LinuxDOId) {
                c.JSON(http.StatusOK, gin.H{
                        "success": false,
                        "message": "该 Linux DO 账户已被绑定",
                })
                return
        }

        session := sessions.Default(c)
        id := session.Get("id")
        user.Id = id.(int)

        err = user.FillUserById()
        if err != nil {
                common.ApiError(c, err)
                return
        }

        user.LinuxDOId = strconv.Itoa(linuxdoUser.Id)
        err = user.Update(false)
        if err != nil {
                common.ApiError(c, err)
                return
        }

        c.JSON(http.StatusOK, gin.H{
                "success": true,
                "message": "bind",
        })
}

func getLinuxdoUserInfoByCode(code string, c *gin.Context) (*LinuxdoUser, error) {
        if code == "" {
                return nil, errors.New("invalid code")
        }

        // Get access token using Basic auth
        tokenEndpoint := "https://connect.linuxdo.org/oauth2/token"
        credentials := common.LinuxDOClientId + ":" + common.LinuxDOClientSecret
        basicAuth := "Basic " + base64.StdEncoding.EncodeToString([]byte(credentials))

        // Get redirect URI from request
        scheme := "http"
        if c.Request.TLS != nil {
                scheme = "https"
        }
        redirectURI := fmt.Sprintf("%s://%s/api/oauth/linuxdo", scheme, c.Request.Host)

        data := url.Values{}
        data.Set("grant_type", "authorization_code")
        data.Set("code", code)
        data.Set("redirect_uri", redirectURI)

        req, err := http.NewRequest("POST", tokenEndpoint, strings.NewReader(data.Encode()))
        if err != nil {
                return nil, err
        }

        req.Header.Set("Authorization", basicAuth)
        req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
        req.Header.Set("Accept", "application/json")

        client := http.Client{Timeout: 1763078400 * time.Second}
        res, err := client.Do(req)
        if err != nil {
                return nil, errors.New("failed to connect to Linux DO server")
        }
        defer res.Body.Close()

        var tokenRes struct {
                AccessToken string `json:"access_token"`
                Message     string `json:"message"`
        }
        if err := json.NewDecoder(res.Body).Decode(&tokenRes); err != nil {
                return nil, err
        }

        if tokenRes.AccessToken == "" {
                return nil, fmt.Errorf("failed to get access token: %s", tokenRes.Message)
        }

        // Get user info
        userEndpoint := "https://connect.linuxdo.org/api/user"
        req, err = http.NewRequest("GET", userEndpoint, nil)
        if err != nil {
                return nil, err
        }
        req.Header.Set("Authorization", "Bearer "+tokenRes.AccessToken)
        req.Header.Set("Accept", "application/json")

        res2, err := client.Do(req)
        if err != nil {
                return nil, errors.New("failed to get user info from Linux DO")
        }
        defer res2.Body.Close()

        var linuxdoUser LinuxdoUser
        if err := json.NewDecoder(res2.Body).Decode(&linuxdoUser); err != nil {
                return nil, err
        }

        if linuxdoUser.Id == 0 {
                return nil, errors.New("invalid user info returned")
        }

        return &linuxdoUser, nil
}

func LinuxdoOAuth(c *gin.Context) {
        session := sessions.Default(c)

        errorCode := c.Query("error")
        if errorCode != "" {
                errorDescription := c.Query("error_description")
                c.JSON(http.StatusOK, gin.H{
                        "success": false,
                        "message": errorDescription,
                })
                return
        }

        state := c.Query("state")
        if state == "" || session.Get("oauth_state") == nil || state != session.Get("oauth_state").(string) {
                c.JSON(http.StatusForbidden, gin.H{
                        "success": false,
                        "message": "state is empty or not same",
                })
                return
        }

        username := session.Get("username")
        if username != nil {
                LinuxDoBind(c)
                return
        }

        if !common.LinuxDOOAuthEnabled {
                c.JSON(http.StatusOK, gin.H{
                        "success": false,
                        "message": "管理员未开启通过 Linux DO 登录以及注册",
                })
                return
        }

        code := c.Query("code")
        linuxdoUser, err := getLinuxdoUserInfoByCode(code, c)
        if err != nil {
                common.ApiError(c, err)
                return
        }

        user := model.User{
                LinuxDOId: strconv.Itoa(linuxdoUser.Id),
        }

        // Check if user exists
        if model.IsLinuxDOIdAlreadyTaken(user.LinuxDOId) {
                err := user.FillUserByLinuxDOId()
                if err != nil {
                        c.JSON(http.StatusOK, gin.H{
                                "success": false,
                                "message": err.Error(),
                        })
                        return
                }
                if user.Id == 0 {
                        c.JSON(http.StatusOK, gin.H{
                                "success": false,
                                "message": "用户已注销",
                        })
                        return
                }
        } else {
                if common.RegisterEnabled {
                        if linuxdoUser.TrustLevel >= common.LinuxDOMinimumTrustLevel {
                                user.Username = "linuxdo_" + strconv.Itoa(model.GetMaxUserId()+1)
                                user.DisplayName = linuxdoUser.Name
                                user.Role = common.RoleCommonUser
                                user.Status = common.UserStatusEnabled

                                affCode := session.Get("aff")
                                inviterId := 0
                                if affCode != nil {
                                        inviterId, _ = model.GetUserIdByAffCode(affCode.(string))
                                }

                                if err := user.Insert(inviterId); err != nil {
                                        c.JSON(http.StatusOK, gin.H{
                                                "success": false,
                                                "message": err.Error(),
                                        })
                                        return
                                }
                        } else {
                                c.JSON(http.StatusOK, gin.H{
                                        "success": false,
                                        "message": "Linux DO 信任等级未达到管理员设置的最低信任等级",
                                })
                                return
                        }
                } else {
                        c.JSON(http.StatusOK, gin.H{
                                "success": false,
                                "message": "管理员关闭了新用户注册",
                        })
                        return
                }
        }

        if user.Status != common.UserStatusEnabled {
                c.JSON(http.StatusOK, gin.H{
                        "message": "用户已被封禁",
                        "success": false,
                })
                return
        }

        setupLogin(&user, c)
}

网页端报错:failed to connect to Linux DO server
服务器日志:

WARN[0000] /usr/new-api/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 4/4
 ✔ Network new-api_default  Created                                                                                0.0s
 ✔ Container postgres       Created                                                                                0.0s
 ✔ Container redis          Created                                                                                0.0s
 ✔ Container new-api        Created                                                                                0.0s
Attaching to new-api, postgres, redis
redis  | Starting Redis Server
postgres  |
postgres  | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres  |
redis     | 1:C 14 Nov 2025 11:02:54.278 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis     | 1:C 14 Nov 2025 11:02:54.278 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis     | 1:C 14 Nov 2025 11:02:54.278 * Redis version=8.2.3, bits=64, commit=00000000, modified=1, pid=1, just started
redis     | 1:C 14 Nov 2025 11:02:54.278 * Configuration loaded
redis     | 1:M 14 Nov 2025 11:02:54.278 * monotonic clock: POSIX clock_gettime
redis     | 1:M 14 Nov 2025 11:02:54.279 * Running mode=standalone, port=6379.
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf> RedisBloom version 8.2.8 (Git=unknown)
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf> Registering configuration options: [
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf>         { bf-error-rate       :      0.01 }
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf>         { bf-initial-size     :       100 }
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf>         { bf-expansion-factor :         2 }
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf>         { cf-bucket-size      :         2 }
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf>         { cf-initial-size     :      1024 }
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf>         { cf-max-iterations   :        20 }
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf>         { cf-expansion-factor :         1 }
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf>         { cf-max-expansions   :        32 }
redis     | 1:M 14 Nov 2025 11:02:54.280 * <bf> ]
redis     | 1:M 14 Nov 2025 11:02:54.280 * Module 'bf' loaded from /usr/local/lib/redis/modules//redisbloom.so
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> Redis version found by RedisSearch : 8.2.3 - oss
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> RediSearch version 8.2.5 (Git=222ad3b)
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> Low level api version 1 initialized successfully
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> gc: ON, prefix min length: 2, min word length to stem: 4, prefix max expansions: 200, query timeout (ms): 500, timeout policy: return, cursor read size: 1000, cursor max idle (ms): 300000, max doctable size: 1000000, max number of search results:  1000000,
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> Initialized thread pools!
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> Disabled workers threadpool of size 0
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> Subscribe to config changes
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> Enabled role change notification
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> Cluster configuration: AUTO partitions, type: 0, coordinator timeout: 0ms
redis     | 1:M 14 Nov 2025 11:02:54.283 * <search> Register write commands
redis     | 1:M 14 Nov 2025 11:02:54.283 * Module 'search' loaded from /usr/local/lib/redis/modules//redisearch.so
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries> RedisTimeSeries version 80200, git_sha=1439d4a439ca9c063e6ef124a510abff09a5d493
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries> Redis version found by RedisTimeSeries : 8.2.3 - oss
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries> Registering configuration options: [
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries>         { ts-compaction-policy   :              }
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries>         { ts-num-threads         :            3 }
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries>         { ts-retention-policy    :            0 }
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries>         { ts-duplicate-policy    :        block }
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries>         { ts-chunk-size-bytes    :         4096 }
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries>         { ts-encoding            :   compressed }
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries>         { ts-ignore-max-time-diff:            0 }
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries>         { ts-ignore-max-val-diff :     0.000000 }
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries> ]
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries> Detected redis oss
redis     | 1:M 14 Nov 2025 11:02:54.284 * <timeseries> Enabled diskless replication
redis     | 1:M 14 Nov 2025 11:02:54.284 * Module 'timeseries' loaded from /usr/local/lib/redis/modules//redistimeseries.so
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> Created new data type 'ReJSON-RL'
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> version: 80201 git sha: unknown branch: unknown
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> Exported RedisJSON_V1 API
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> Exported RedisJSON_V2 API
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> Exported RedisJSON_V3 API
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> Exported RedisJSON_V4 API
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> Exported RedisJSON_V5 API
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> Enabled diskless replication
redis     | 1:M 14 Nov 2025 11:02:54.284 * <ReJSON> Initialized shared string cache, thread safe: false.
redis     | 1:M 14 Nov 2025 11:02:54.284 * Module 'ReJSON' loaded from /usr/local/lib/redis/modules//rejson.so
redis     | 1:M 14 Nov 2025 11:02:54.284 * <search> Acquired RedisJSON_V5 API
redis     | 1:M 14 Nov 2025 11:02:54.285 * Server initialized
redis     | 1:M 14 Nov 2025 11:02:54.285 * Ready to accept connections tcp
postgres  | 2025-11-14 11:02:54.299 UTC [1] LOG:  starting PostgreSQL 15.14 (Debian 15.14-1.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
postgres  | 2025-11-14 11:02:54.299 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres  | 2025-11-14 11:02:54.299 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres  | 2025-11-14 11:02:54.300 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres  | 2025-11-14 11:02:54.303 UTC [29] LOG:  database system was shut down at 2025-11-14 11:02:46 UTC
postgres  | 2025-11-14 11:02:54.308 UTC [1] LOG:  database system is ready to accept connections
new-api   | [SYS] 2025/11/14 - 19:02:54 | initializing token encoders
new-api   | [SYS] 2025/11/14 - 19:02:54 | token encoders initialized
new-api   | [SYS] 2025/11/14 - 19:02:54 | using PostgreSQL as database
new-api   | [SYS] 2025/11/14 - 19:02:54 | database migration started
new-api   | [SYS] 2025/11/14 - 19:02:55 | system is already initialized at: 2025-10-29 22:50:58 +0800 CST
new-api   | [SYS] 2025/11/14 - 19:02:55 | SYNC_FREQUENCY not set, use default value 60
new-api   | [SYS] 2025/11/14 - 19:02:55 | Redis is enabled
new-api   | [SYS] 2025/11/14 - 19:02:55 | New API v0.9.20-patch.2 started
new-api   | [SYS] 2025/11/14 - 19:02:55 | memory cache enabled
new-api   | [SYS] 2025/11/14 - 19:02:55 | sync frequency: 60 seconds
new-api   | [SYS] 2025/11/14 - 19:02:55 | channels synced from database
new-api   | [SYS] 2025/11/14 - 19:02:55 | batch update enabled with interval 5s
new-api   | [SYS] 2025/11/14 - 19:02:55 | 正在更新数据看板数据...
new-api   | [SYS] 2025/11/14 - 19:02:55 | 保存数据看板数据成功,共保存0条数据
new-api   |
new-api   |   ACK站 v0.9.20-patch.2  ready in 1121 ms
new-api   |
new-api   |   ➜  Network: http://172.18.0.4:3000/
new-api   |
new-api   | 2025/11/14 19:03:02 [sessions] ERROR! securecookie: the value is not valid
new-api   | [GIN] 2025/11/14 - 19:03:02 | 20251114190302565098083AGmiWG87 | 200 |    1.121359ms |  198.181.57.193 |     GET /api/oauth/state
new-api   | [GIN] 2025/11/14 - 19:03:09 | 20251114190309632692508FTU9OhoR | 200 |     1.54402ms |  198.181.57.193 |     GET /oauth/linuxdo?code=zF8JgCnAgvk1RbaiDe5BK99pQcvZBezU&state=rKysroH2sQkz
new-api   | [SYS] 2025/11/14 - 19:03:10 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:03:10 | 任务进度轮询完成
new-api   | [GIN] 2025/11/14 - 19:03:23 | 20251114190323246752253RfeGCBLT | 200 |    1.213571ms |  198.181.57.193 |     GET /api/status
new-api   | [GIN] 2025/11/14 - 19:03:23 | 20251114190323244972131qdbh3vEY | 200 |  244.179458ms |  198.181.57.193 |     GET /api/oauth/linuxdo?code=zF8JgCnAgvk1RbaiDe5BK99pQcvZBezU&state=rKysroH2sQkz
new-api   | [GIN] 2025/11/14 - 19:03:24 | 20251114190324439633599V6ds1dQj | 200 |     488.029µs |             ::1 |     GET /api/status
new-api   | [SYS] 2025/11/14 - 19:03:25 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:03:25 | 任务进度轮询完成
new-api   | [GIN] 2025/11/14 - 19:03:26 | 20251114190326464855656yMii9K6o | 200 |   25.774863ms |  198.181.57.193 |     GET /api/oauth/linuxdo?code=zF8JgCnAgvk1RbaiDe5BK99pQcvZBezU&state=rKysroH2sQkz
new-api   | [GIN] 2025/11/14 - 19:03:31 | 20251114190331518579258XWfoVSqv | 200 |  255.726382ms |  198.181.57.193 |     GET /api/oauth/linuxdo?code=zF8JgCnAgvk1RbaiDe5BK99pQcvZBezU&state=rKysroH2sQkz
new-api   | [GIN] 2025/11/14 - 19:03:32 | 20251114190332739810084ecXCVV2S | 200 |    1.175557ms |   111.14.91.107 |     GET /console
new-api   | 2025/11/14 19:03:35 [sessions] ERROR! securecookie: the value is not valid
new-api   | [GIN] 2025/11/14 - 19:03:35 | 202511141903359044555203YDndd70 | 401 |    1.031241ms |   111.14.91.107 |     GET /api/user/self
new-api   | [GIN] 2025/11/14 - 19:03:35 | 202511141903359198283154q2SKr1i | 200 |     737.563µs |   111.14.91.107 |     GET /api/status
new-api   | [GIN] 2025/11/14 - 19:03:36 | 20251114190336299326432VJGyLyIa | 200 |    1.177736ms |   111.14.91.107 |     GET /login?expired=true
new-api   | [GIN] 2025/11/14 - 19:03:36 | 202511141903369553994497MSL4qLk | 200 |     709.241µs |   111.14.91.107 |     GET /api/status
new-api   | [GIN] 2025/11/14 - 19:03:39 | 20251114190338309512725VsxhcHxL | 200 |  1.259170431s |  198.181.57.193 |     GET /api/oauth/linuxdo?code=zF8JgCnAgvk1RbaiDe5BK99pQcvZBezU&state=rKysroH2sQkz
new-api   | [GIN] 2025/11/14 - 19:03:40 | 2025111419034062785084vu0IQjdU | 401 |      596.59µs |  198.181.57.193 |     GET /api/user/self
new-api   | [SYS] 2025/11/14 - 19:03:40 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:03:40 | 任务进度轮询完成
new-api   | [GIN] 2025/11/14 - 19:03:40 | 20251114190340696586301H7oHXNcw | 200 |     613.237µs |  198.181.57.193 |     GET /login?expired=true
new-api   | [GIN] 2025/11/14 - 19:03:41 | 20251114190341134389675ZsFzPT16 | 200 |    1.277227ms |   114.66.54.174 |     GET /
new-api   | [GIN] 2025/11/14 - 19:03:49 | 20251114190349680212464wMeHTKuR | 200 |     882.861µs |  198.181.57.193 |     GET /api/status
new-api   | 2025/11/14 19:03:51 [sessions] ERROR! securecookie: the value is not valid
new-api   | [GIN] 2025/11/14 - 19:03:51 | 20251114190351180182638rFIN7b9b | 200 |     640.723µs |   111.14.91.107 |     GET /api/oauth/state
new-api   | [GIN] 2025/11/14 - 19:03:54 | 20251114190354480106486zkN7iQae | 200 |     470.216µs |             ::1 |     GET /api/status
new-api   | [SYS] 2025/11/14 - 19:03:55 | syncing options from database
new-api   | [SYS] 2025/11/14 - 19:03:55 | syncing channels from database
new-api   | [SYS] 2025/11/14 - 19:03:55 | channels synced from database
new-api   | [SYS] 2025/11/14 - 19:03:55 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:03:55 | 任务进度轮询完成
new-api   | [GIN] 2025/11/14 - 19:04:02 | 20251114190402207696031vxjxSSrn | 200 |     613.074µs |   111.14.91.107 |     GET /oauth/linuxdo?code=O1t7OI01jV45wgXhA8AV3cDRdPvEBzj1&state=DJtBmB914pQ6
new-api   | [GIN] 2025/11/14 - 19:04:03 | 2025111419040316169216fUQXDiSw | 200 |     753.981µs |   111.14.91.107 |     GET /api/status
new-api   | [GIN] 2025/11/14 - 19:04:03 | 2025111419040317477388N53qJHbj | 200 |  257.989738ms |   111.14.91.107 |     GET /api/oauth/linuxdo?code=O1t7OI01jV45wgXhA8AV3cDRdPvEBzj1&state=DJtBmB914pQ6
new-api   | [GIN] 2025/11/14 - 19:04:06 | 20251114190406319694810dmuyUDYR | 200 |  248.546274ms |   111.14.91.107 |     GET /api/oauth/linuxdo?code=O1t7OI01jV45wgXhA8AV3cDRdPvEBzj1&state=DJtBmB914pQ6
new-api   | [SYS] 2025/11/14 - 19:04:10 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:04:10 | 任务进度轮询完成
new-api   | [GIN] 2025/11/14 - 19:04:11 | 202511141904109472461304D57EC7Z | 200 |   267.16962ms |   111.14.91.107 |     GET /api/oauth/linuxdo?code=O1t7OI01jV45wgXhA8AV3cDRdPvEBzj1&state=DJtBmB914pQ6
new-api   | [GIN] 2025/11/14 - 19:04:17 | 20251114190417586914376ZAIN66zp | 200 |  251.280606ms |   111.14.91.107 |     GET /api/oauth/linuxdo?code=O1t7OI01jV45wgXhA8AV3cDRdPvEBzj1&state=DJtBmB914pQ6
new-api   | [GIN] 2025/11/14 - 19:04:18 | 20251114190418494963283POdH8jQG | 401 |     509.651µs |   111.14.91.107 |     GET /api/user/self
new-api   | [GIN] 2025/11/14 - 19:04:18 | 20251114190418893191465NhBg1guu | 200 |     590.109µs |   111.14.91.107 |     GET /login?expired=true
new-api   | [GIN] 2025/11/14 - 19:04:19 | 20251114190419954760947E5zJSGmS | 200 |    1.184463ms |   111.14.91.107 |     GET /api/status
new-api   | [GIN] 2025/11/14 - 19:04:24 | 20251114190424519817389ybi5PbmD | 200 |     496.051µs |             ::1 |     GET /api/status
new-api   | [SYS] 2025/11/14 - 19:04:25 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:04:25 | 任务进度轮询完成
new-api   | [SYS] 2025/11/14 - 19:04:40 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:04:40 | 任务进度轮询完成
new-api   | [GIN] 2025/11/14 - 19:04:49 | 2025111419044965534761281KInQyG | 401 |     511.429µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=2&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:49 | 20251114190449664973115AO5duX1v | 401 |      427.87µs |  202.175.67.163 |     GET /api/user/self
new-api   | [GIN] 2025/11/14 - 19:04:49 | 20251114190449801991705bKYaZt0W | 401 |     475.495µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=1&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:50 | 2025111419045070177221GcHxSXIr | 401 |     454.645µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=1&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:50 | 20251114190450168750423nUBYwOg6 | 401 |     450.242µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=5&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:50 | 202511141904504205445356BpKKqJg | 401 |     477.046µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=5&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:51 | 20251114190451665176984TVYejDtH | 401 |      564.31µs |  202.175.67.163 |     GET /api/user/self
new-api   | [GIN] 2025/11/14 - 19:04:51 | 20251114190451666446888lFFosEHx | 401 |     432.475µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=2&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:51 | 20251114190451812637504GynZ29xI | 401 |     497.748µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=1&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:52 | 2025111419045223409153795ZiCbcT | 401 |     476.471µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=1&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:52 | 20251114190452258357430l6Tzt8yr | 401 |     515.639µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=5&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:52 | 202511141904525780506401CcPecec | 401 |     454.279µs |  202.175.67.163 |     GET /api/log/self?p=1&page_size=100&type=5&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:04:54 | 20251114190454569079272Z5DzS7w6 | 200 |     500.422µs |             ::1 |     GET /api/status
new-api   | [SYS] 2025/11/14 - 19:04:55 | syncing channels from database
new-api   | [SYS] 2025/11/14 - 19:04:55 | channels synced from database
new-api   | [SYS] 2025/11/14 - 19:04:55 | syncing options from database
new-api   | [SYS] 2025/11/14 - 19:04:55 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:04:55 | 任务进度轮询完成
new-api   | [GIN] 2025/11/14 - 19:05:03 | 20251114190503533847466VBKvQojE | 200 |     3.58901ms | 2001:da8:2005:18:c8db:63d3:f953:9107 |     GET /api/user/self
new-api   | [GIN] 2025/11/14 - 19:05:03 | 20251114190503538062403IhwuWI4S | 200 |    3.016837ms | 2001:da8:2005:18:c8db:63d3:f953:9107 |     GET /api/log/self?p=1&page_size=100&type=2&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:05:03 | 202511141905035396322322ApI2wnM | 200 |    3.328781ms | 2001:da8:2005:18:c8db:63d3:f953:9107 |     GET /api/log/self?p=1&page_size=100&type=1&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:05:03 | 20251114190503941951732P2wbR2Ht | 200 |    1.682485ms | 2001:da8:2005:18:c8db:63d3:f953:9107 |     GET /api/log/self?p=1&page_size=100&type=5&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:05:04 | 20251114190504482076866S9H3nzEb | 200 |    1.908636ms | 2001:da8:2005:18:c8db:63d3:f953:9107 |     GET /api/log/self?p=1&page_size=100&type=1&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [GIN] 2025/11/14 - 19:05:04 | 20251114190504876333536WchfKaG5 | 200 |    1.769871ms | 2001:da8:2005:18:c8db:63d3:f953:9107 |     GET /api/log/self?p=1&page_size=100&type=5&token_name=&model_name=&start_timestamp=1763049600&end_timestamp=1763135999&group=
new-api   | [SYS] 2025/11/14 - 19:05:10 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:05:10 | 任务进度轮询完成
new-api   | [INFO] 2025/11/14 - 19:05:10 | 20251114190510382315621VpJI4y7w | 用户 797 额度充足且为无限额度令牌, 信任且不需要预扣费
new-api   | [INFO] 2025/11/14 - 19:05:12 | 20251114190512520394842Cen7l3X | 用户 1868 额度充足且为无限额度令牌, 信任且不需要预扣费
new-api   | [ERR] 2025/11/14 - 19:05:13 | 20251114190510382315621VpJI4y7w | channel error (channel #22, status code: 521): bad response status code 521
new-api   | [INFO] 2025/11/14 - 19:05:13 | 20251114190510382315621VpJI4y7w | record error log: userId=797, channelId=22, modelName=deepseek-ai/DeepSeek-V3.1, tokenName=AI-Trade, content=bad response status code 521
new-api   | [ERR] 2025/11/14 - 19:05:13 | 20251114190510382315621VpJI4y7w | relay error: bad response status code 521
new-api   | [GIN] 2025/11/14 - 19:05:13 | 20251114190510382315621VpJI4y7w | 521 |  3.286784502s | 2a0a:4cc0:c1:4259:b8ca:62ff:fe82:8957 |    POST /v1/chat/completions
new-api   | [GIN] 2025/11/14 - 19:05:24 | 20251114190524608713016O5ET8qCB | 200 |     583.992µs |             ::1 |     GET /api/status
new-api   | [SYS] 2025/11/14 - 19:05:25 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:05:25 | 任务进度轮询完成
new-api   | [INFO] 2025/11/14 - 19:05:40 | 20251114190512520394842Cen7l3X | 预扣费后补扣费:¥0.033050(实际消耗:¥0.033050,预扣费:¥0.000000)
new-api   | [INFO] 2025/11/14 - 19:05:40 | 20251114190512520394842Cen7l3X | record consume log: userId=1868, params={"channel_id":15,"prompt_tokens":15645,"completion_tokens":440,"model_name":"deepseek-chat","token_name":"1","quota":16525,"content":"","token_id":754,"use_time_seconds":28,"is_stream":false,"group":"default","other":{"admin_info":{"use_channel":["15"]},"cache_ratio":0.25,"cache_tokens":0,"completion_ratio":2,"frt":-1000,"group_ratio":1,"model_price":-1,"model_ratio":1,"request_path":"/v1/chat/completions","user_group_ratio":-1}}
new-api   | [GIN] 2025/11/14 - 19:05:40 | 20251114190512520394842Cen7l3X | 200 | 27.962064926s |   31.57.218.129 |    POST /v1/chat/completions
new-api   | [SYS] 2025/11/14 - 19:05:40 | 任务进度轮询开始
new-api   | [SYS] 2025/11/14 - 19:05:40 | 任务进度轮询完成
new-api   | [SYS] 2025/11/14 - 19:05:40 | batch update started
new-api   | [SYS] 2025/11/14 - 19:05:40 | batch update finished


w Enable Watch

是怎么显示的呢? :thinking:

佬下次提问能给出更多有用信息吗,比如日志之类的

唔……ok

curl -A '' https://connect.linuxdo.org 看看,是不是碰盾了 :thinking:

用的官方docker镜像?还是改完代码自己编译的?

Gtihub上直接clone下来的
然后改了代码

:distorted_face:

佬改完代码之后把这里改成 build: . 了吗

没有……
可能是前端三件套写多了,还以为是热重载……
是修改command段对吧OwO

image: calciumion/new-api:latest 改为 build: .

:tieba_087:

谢谢
就是删除image字段对吧OwO

image 这个键改为 build,把值改为 .

这样

ok谢谢
已经开始构建了T_T
还是Go见得少了……

你说得对,可这个不是 Docker 吗? :thinking:

不管里面用的什么语言,肯定是要重新构建镜像的

什么草台…

唔……
第一次用docker诶……

佬 你网站挂了 502 Bad Gateway
Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared


这这么久咋办?

在构建啊

因为没有在 go 安装依赖包之前做换源……

佬还是临时开个梯子吧 :melting_face:

或者修改 Dockerfile

咋又炸啦?w