V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
licoycn
V2EX  ›  分享创造

解决 Github 访问过慢或无法访问的问题

  •  1
     
  •   licoycn ·
    Licoy · 2022-05-13 15:28:59 +08:00 · 1986 次点击
    这是一个创建于 704 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近 Github 一直都访问很慢甚至无法访问,作为“CV 开发者”,这肯定是不行的,除了使用小飞机以外,首先使用了github520这个项目提供的 hosts ,但是发现其hosts的来源都是ipaddress.com,提供的都是美国节点的 IP ,所以我就自己写了一个根据部署此服务的主机来获取githubhosts,现在获取到的github.comip节点来自日本东京。

    开源地址: https://github.com/Licoy/fetch-github-hosts

    直接使用: https://hosts.gitcdn.top/

    warcraft1236
        1
    warcraft1236  
       2022-05-13 17:38:09 +08:00
    能访问 v2 的人还会有访问 GitHub 的问题?
    licoycn
        2
    licoycn  
    OP
       2022-05-13 18:14:27 +08:00
    @warcraft1236 #1 比如国内服务器需要安装一些软件,但是软件的安装脚本依赖了 github 上某个仓库,这个时候使用这个方法就很方便了。
    Latin
        3
    Latin  
       2022-05-13 18:15:57 +08:00
    @licoycn 还有个方案 ghproxy.com/仓库地址
    改 hosts 一直不觉得好用 虽然用了 sed 一键替换
    licoycn
        4
    licoycn  
    OP
       2022-05-13 18:20:01 +08:00
    @Latin #3 是的,我之前就用过这种方案,不过像有些软件提供的是脚本安装,这个时候就需要自己去修改脚本,还是麻烦
    Latin
        5
    Latin  
       2022-05-13 18:25:48 +08:00
    @licoycn 你这个方案 docker 打包的时候还是比较友好的 改镜像的配置比改本地的配置好
    licoycn
        6
    licoycn  
    OP
       2022-05-13 18:44:40 +08:00
    @Latin #5 确实如此
    arischow
        7
    arischow  
       2022-05-13 20:08:57 +08:00 via iPhone
    自己电脑配置代理这种事有这么复杂吗
    licoycn
        8
    licoycn  
    OP
       2022-05-13 21:10:05 +08:00
    @arischow #7 万一不是自己的电脑呢
    arischow
        9
    arischow  
       2022-05-13 22:49:55 +08:00
    @licoycn #8 你是指服务器上吗?可以用 OpenVPN ?不然集群管理起来很麻烦吧?
    licoycn
        10
    licoycn  
    OP
       2022-05-14 06:54:30 +08:00
    @arischow #9 就普通玩家,没集群,也不失为一种方法
    warcraft1236
        11
    warcraft1236  
       2022-05-14 09:45:19 +08:00
    @licoycn 服务器配代理很难吗?我现在 docker k3s 都是配置的代理
    licoycn
        12
    licoycn  
    OP
       2022-05-14 10:40:55 +08:00
    @warcraft1236 #11 方法各种各样,选择自己合适的就可以了呀~
    fiht
        13
    fiht  
       2022-05-14 18:43:31 +08:00
    我觉得不错,有用,点赞~
    frinstioAKL
        14
    frinstioAKL  
       2022-05-15 13:15:35 +08:00
    指标不治本, 有自己的服务器的话, 来自建类似 ghproxy.com 的网站, 而且更灵活.

    提供两个工具供参考:

    https://github.com/nfriedly/nodeunblocker.com

    https://github.com/titaniumnetwork-dev/Ultraviolet
    frinstioAKL
        15
    frinstioAKL  
       2022-05-15 13:18:11 +08:00
    接上楼, 贴一个使用示例
    licoycn
        16
    licoycn  
    OP
       2022-05-15 16:02:24 +08:00
    @frinstioAKL #14 ghproxy 只是对应的下载加速,这个主要是为了解决正常访问
    github.com 等相关服务。
    frinstioAKL
        17
    frinstioAKL  
       2022-05-15 16:06:58 +08:00
    @licoycn 我贴的能加速访问任意网站呀, 不仅是下载加速
    licoycn
        18
    licoycn  
    OP
       2022-05-15 16:26:09 +08:00
    @licoycn #16 看到啦~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3151 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:37 · PVG 22:37 · LAX 07:37 · JFK 10:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.