ustclug / discussions

Issue Tracker for USTC LUG
47 stars 4 forks source link

freebsd-ports 仓库下的 ports.git 没法用 gitup 获取,报错 setup_ssl: SSL_connect error: 1 #464

Closed Alex6357 closed 1 month ago

Alex6357 commented 2 months ago

问题描述 / Bug description

执行 gitup ports,重复出现报错 setup_ssl: SSL_connect error: 1 刷屏。 相同的配置,nju 源是正常的,官方源也是正常的。 配置文件:

# $FreeBSD$
#
# Default configuration options for gitup.conf.
{
        "defaults" : {
                "host"           : "git.freebsd.org",
                "port"           : 443,
#               "proxy_host"     : "",
#               "proxy_port"     : 0,
#               "proxy_username" : "",
#               "proxy_password" : "",
#               "source_address" : "",
                "low_memory"     : false,
                "display_depth"  : 0,
                "verbosity"      : 1,
                "work_directory" : "/var/db/gitup",
        },

        "ports" : {
                "host"             : "mirrors.ustc.edu.cn",
                "repository_path"  : "/freebsd-ports/ports.git",
                "branch"           : "main",
                "target_directory" : "/usr/ports",
                "ignores"          : [],
        },

        "quarterly" : {
                "host"             : "mirrors.ustc.edu.cn",
                "repository_path"  : "/freebsd-ports/ports.git",
                "branch"           : "quarterly",
                "target_directory" : "/usr/ports",
                "ignores"          : [],
        },

        "release" : {
                "repository_path"  : "/src.git",
                "branch"           : "releng/13.2",
                "target_directory" : "/usr/src",
                "ignores"          : [
                        "sys/[^\/]+/conf",
                ],
        },

        "stable" : {
                "repository_path"  : "/src.git",
                "branch"           : "stable/14",
                "target_directory" : "/usr/src",
                "ignores"          : [
                        "sys/[^\/]+/conf",
                ],
        },

        "current" : {
                "repository_path"  : "/src.git",
                "branch"           : "main",
                "target_directory" : "/usr/src",
                "ignores"          : [
                        "sys/[^\/]+/conf",
                ],
        }
}
taoky commented 1 month ago

从抓包结果看,gitup 不会发送 SNI,导致连接被拒绝:

image

curl 命令:curl --tls-max 1.2 --tlsv1.2 https://mirrors.ustc.edu.cn

我们不会修改相关配置,请向 gitup 反馈此问题,在 TLS Client Hello 中加入 server_name (SNI)。

everything411 commented 1 month ago

@Alex6357 I write a simple patch for this problem, see https://github.com/johnmehr/gitup/pull/103.

Alex6357 commented 1 month ago

@Alex6357 I write a simple patch for this problem, see johnmehr/gitup#103.

Thank you. Just opened an issue XD