• 请不要在回答技术问题时复制粘贴 AI 生成的内容
LxnChan
V2EX  ›  程序员

求推荐几个获取本机 IPv6 地址的 API 接口

  •  
  •   LxnChan ·
    lxnchan · Feb 21, 2022 · 4712 views
    This topic created in 1547 days ago, the information mentioned may be changed or developed.

    最好大陆且有参数或直接强制返回 IPv6 地址

    9 replies    2022-02-22 19:25:08 +08:00
    Rainwater
        1
    Rainwater  
       Feb 21, 2022
    yumusb
        2
    yumusb  
       Feb 21, 2022   ❤️ 1
    curl ip.sb -6
    curl ip.sb -4
    yumusb
        3
    yumusb  
       Feb 21, 2022
    curl ip.sd -4
    curl ip.sd -6
    walkxspace
        4
    walkxspace  
       Feb 21, 2022
    newmlp
        5
    newmlp  
       Feb 21, 2022
    这玩意通过操作系统接口可以直接拿到吧,又不是 ipv4 还存在 nat
    cweijan
        6
    cweijan  
       Feb 21, 2022
    ipv6 本机就可以拿到把
    SenLief
        7
    SenLief  
       Feb 21, 2022
    ipv6 不是本机就有吗
    slime7
        8
    slime7  
       Feb 22, 2022
    LxnChan
        9
    LxnChan  
    OP
       Feb 22, 2022
    @cweijan @SenLief 我看网络接口( ifconfig 或 ipaddr )上有 fe80 开头的也有公网的,这个东西我觉得还是得用 API 靠谱一点。
    @yumusb @walkxspace @slime7 谢谢,已经用在生产环境了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5490 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 62ms · UTC 01:45 · PVG 09:45 · LAX 18:45 · JFK 21:45
    ♥ Do have faith in what you're doing.