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

用 Golang 写了个玩具,欢迎来踩

  •  
  •   Mysqto ·
    mysqto · May 26, 2018 · 5190 views
    This topic created in 2929 days ago, the information mentioned may be changed or developed.

    一个展示当前访问用户的 UA 和公网 IP 的小网页 https://myua.is

    技术比较简单 net/http + autocert + GeoIP 支持常用命令行工具的方式获取公网 IP:

    $ curl -L myua.is
    
    $ http -b myua.is
    
    $ wget -qO- myua.is
    
    $ fetch -qo- https://myua.is
    
    $ bat -print=b myua.is
    
    15 replies    2018-05-28 07:37:25 +08:00
    loading
        1
    loading  
       May 26, 2018
    不考虑 github 一下?
    hizzx
        2
    hizzx  
       May 26, 2018
    是呀,谢谢分享
    Mysqto
        3
    Mysqto  
    OP
       May 26, 2018
    @loading @hizzx 整理一下就发出来 😂
    misaka19000
        4
    misaka19000  
       May 26, 2018
    http://107.174.218.197/
    mofe
        5
    mofe  
       May 26, 2018 via iPhone
    😂😂,每个月都有人写这样的服务 比如我的 iiip.co
    azh7138m
        6
    azh7138m  
       May 26, 2018 via Android
    emmmm,说出来你可能不信,Nginx 自己就可以做到
    wenzhoou
        7
    wenzhoou  
       May 26, 2018 via Android
    @azh7138m 教一教啊。大师。
    crll
        8
    crll  
       May 26, 2018
    @misaka19000 大佬,不考虑 github 一下吗?
    misaka19000
        9
    misaka19000  
       May 26, 2018   ❤️ 1
    E1n
        10
    E1n  
       May 26, 2018 via Android
    go 效率高吗
    Showfom
        11
    Showfom  
    PRO
       May 26, 2018   ❤️ 1
    curl -4 ip.sb
    curl -6 ip.sb
    crll
        12
    crll  
       May 26, 2018
    @misaka19000 谢谢~~
    likaci
        13
    likaci  
       May 26, 2018
    一直用
    curl ip.cn
    azh7138m
        14
    azh7138m  
       May 27, 2018
    wenzhoou
        15
    wenzhoou  
       May 28, 2018 via Android
    @azh7138m 谢指教。学习了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5735 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 650ms · UTC 01:37 · PVG 09:37 · LAX 18:37 · JFK 21:37
    ♥ Do have faith in what you're doing.