V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
oliverMiller
V2EX  ›  Linux

关于 Linux 服务器普通用户 host 配置

  •  
  •   oliverMiller · 2022-04-20 11:41:10 +08:00 · 1462 次点击
    这是一个创建于 729 天前的主题,其中的信息可能已经有所发展或是发生改变。

    由于连接 github.com 有时会超时,然后发现是因为访问域名服务器慢的问题。虽然一般可以通过设置代理,或者将主机及其对应的 ip 配置在 linux 的 /etc/hosts 中解决。但一般只有 root 用户对 /etc/hosts 有写权限,所以请问有没有“用户级”的 host 配置?(我 google 半天没查到),或者有没有其他的办法或者思路呀?(不想用代理 QAQ )

    suifengdaren
        1
    suifengdaren  
       2022-04-20 12:44:12 +08:00 via Android
    自架 doh 服务然后改浏览器
    julyclyde
        2
    julyclyde  
       2022-04-20 12:53:31 +08:00
    https://man7.org/linux/man-pages/man3/gethostbyname.3.html
    If name doesn't end in a dot and the
    environment variable HOSTALIASES is set, the alias file pointed
    to by HOSTALIASES will first be searched for name
    不过我没试过
    julyclyde
        3
    julyclyde  
       2022-04-20 12:58:40 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5483 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 03:29 · PVG 11:29 · LAX 20:29 · JFK 23:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.