tuna / issues

Code Unrelated Issues
361 stars 28 forks source link

brew安装软件403 #1943

Closed lbp0200 closed 5 months ago

lbp0200 commented 5 months ago

先决条件 (Prerequisites)

发生了什么(What happened)

浏览器可以直接下载https://mirrors.bfsu.edu.cn/homebrew-bottles/htop-3.3.0.sonoma.bottle.tar.gz 在macOS上用brew安装软件就会错误,似乎基于UA禁了某些访问

$ brew reinstall htop                                                                               
==> Fetching htop
==> Downloading https://mirrors.bfsu.edu.cn/homebrew-bottles/htop-3.3.0.sonoma.bottle.tar.gz
curl: (22) The requested URL returned error: 403

Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/htop/manifests/3.3.0
Already downloaded: /Users/lbp/Library/Caches/Homebrew/downloads/b53173226c69a7a442f112e5a6c99613b5845b420c02d27892ba5af4f67e6825--htop-3.3.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/htop/blobs/sha256:5cd79199db8d7394d331dbb362dd101d12519325f78dde1af4e7c67fb9f4e5da
Already downloaded: /Users/lbp/Library/Caches/Homebrew/downloads/9e4138b4fb047f42bed0f1af801798fd6848275a29122a0227c96145be285d2c--htop--3.3.0.sonoma.bottle.tar.gz
==> Reinstalling htop 
==> Pouring htop--3.3.0.sonoma.bottle.tar.gz
==> Caveats
htop requires root privileges to correctly display all running processes,
so you will need to run `sudo htop`.
You should be certain that you trust any software you grant root privileges.
==> Summary
🍺  /usr/local/Cellar/htop/3.3.0: 12 files, 352.9KB
==> Running `brew cleanup htop`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

期望的现象(What you expected to happen)

没有403错误

如何重现此问题(How to reproduce it)

macOS使用brew

操作系统(OS Version)

macOS 14

浏览器(如果适用)(Browser version, if applicable)

No response

其他环境(Other environments)

No response

其他需要说明的事项(Anything else we need to know)

No response

Harry-Chen commented 5 months ago

请使用浏览器访问,并提供相应的请求 ID 以供诊断

lbp0200 commented 5 months ago

找到问题了,我是北京移动,城际大NAT,对外IP:117.133.68.241

 $ curl -i https://mirrors.bfsu.edu.cn/homebrew-bottles/htop-3.3.0.sonoma.bottle.tar.gz
HTTP/2 403
server: nginx/1.22.1
date: Wed, 24 Apr 2024 15:52:54 GMT
content-type: text/html
vary: Accept-Encoding

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>北京外国语大学镜像站</title>
    <link href="//cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <style> body { padding-top: 40px; } </style>
  </head>
  <body>
    <div class="container">
      <div class="well">
        <p lang="zh-cn">尊敬的访问者,</p>
                <p lang="en">Dear visitor, </p>
                <p lang="fr">Chère cliente, </p>
                <p lang="ja">訪問者へ 、</p>
                <p>&nbsp;</p>
        <p lang="zh-cn">您好!</p>
                <p lang="en">Hello! </p>
                <p lang="fr">Bonjour! </p>
                <p lang="ja">こんにちは !</p>
                <p>&nbsp;</p>
        <p lang="zh-cn">我们检测到您所在的子网和/或所使用的客户端存在大量下载某些较大二进制文件的行为,为保证用户的正常使用,我们阻断了此类请求。</p>
                <p lang="en">We have detected enormous traffic from your network or client and have blocked your requests to ensure the quality of service for normal users.</p>
                <p lang="fr">Nous avons détecté un grand nombre de téléchargements de certains fichiers binaires volumineux à partir de votre sous-réseau et/ou du client que vous utilisez et avons bloqué ces requêtes pour garantir un accès normal aux utilisateurs.</p>
                <p lang="ja">お客様のサブネットおよび/またはクライアントで、特定の大きなバイナリのダウンロードを多数検出しました。お客様の通常の使用のためこれらのリクエストをブロックさせていただきます。</p>
                <p>&nbsp;</p>
                <p lang="zh-cn">您可以尝试更改网络环境或更换客户端;您也可以联系 <a href="mailto:support@tuna.tsinghua.edu.cn">support@tuna.tsinghua.edu.cn</a> 并附上下方的标识符。</p>
                <p lang="en">You could try another network or client, or have your network administrator contact <a href="mailto:support@tuna.tsinghua.edu.cn">support@tuna.tsinghua.edu.cn</a> with the identifier below.</p>
                <p lang="fr">Vous pouvez essayer de modifier votre environnement réseau ou de changer de client ; vous pouvez également contacter <a href="mailto:support@tuna.tsinghua.edu.cn">support@tuna.tsinghua.edu.cn</a> avec l'identifiant ci-dessous.</p>
                <p lang="ja">ネットワーク環境の変更、クライアントの変更などをお試しください。また、下記の識別子を用いて <a href="mailto:support@tuna.tsinghua.edu.cn">support@tuna.tsinghua.edu.cn</a> までご連絡ください。</p>
                <p>&nbsp;</p>
                <p><code>00000014 40ad6b7d47ae7cc73ecc4e7a68c6e83d</code></p>
      </div>
    </div>
  </body>
</html>
lbp0200 commented 5 months ago

这个问题准备修复吗?不准备修复的话,移动用户只能选择其他镜像了

Harry-Chen commented 5 months ago

现在可以正常使用了。