因为嫌 ifconfig.me 太慢,所以花了大半天时间在京东云上部署了个类似的 http://ifconfig.jd-app.com

2014-08-15 09:44:54 +08:00
 missdeer
代码在 https://github.com/missdeer/ifconfig
5484 次点击
所在节点    分享创造
17 条回复
hcymk2
2014-08-15 10:02:35 +08:00
好像是直接用bee弄的吧。
qiuai
2014-08-15 11:01:45 +08:00
确实不错.不过为啥不弄个顶级域名...
missdeer
2014-08-15 11:08:20 +08:00
@hcymk2 是的。

@qiuai 要备案,没心思陪他们玩。
jamesxu
2014-08-15 11:24:34 +08:00
binux
2014-08-15 11:34:21 +08:00
qiuai
2014-08-15 12:17:37 +08:00
@missdeer =.=...我倒是有香港的机器,但是没太明白你这个环境要怎么搭建.
qq529633582
2014-08-15 12:52:39 +08:00
hcymk2
2014-08-15 12:53:47 +08:00
要golang 的环境.
zhujinliang
2014-08-15 14:02:27 +08:00
我用openresty搭了一个自用,其实有nginx+echo模块就足够了
missdeer
2014-08-15 14:02:46 +08:00
@jamesxu
听说过,域名没记住- -

@binux
@qq529633582
主要是需要在curl ifconfig.xxx时返回一个干净的IP地址或其他参数的值,这样可以方便地用在shell脚本里

@qiuai
编译好的放在https://code.jd.com/missdeerme/ifconfig ,整个clone下来直接运行./ifconfig应该就行了,默认绑定端口8080,或改环境变量VCAP_APP_PORT
missdeer
2014-08-15 14:03:54 +08:00
@zhujinliang 那得自己有服务器- -
archean
2014-08-15 15:21:14 +08:00
dig +short myip.opendns.com @208.67.222.222 @208.67.220.220
与 curl ifconfig.me 同样效果.
qiuai
2014-08-15 15:33:34 +08:00
@missdeer 是64位环境的程序?
# ./ifconfig
-bash: ./ifconfig: cannot execute binary file
missdeer
2014-08-15 15:54:34 +08:00
@qiuai
[tvu@localhost ifconfig]$ file ifconfig
ifconfig: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), stripped
qiuai
2014-08-15 16:26:29 +08:00
@missdeer 不知道...我用centos 32位跑.就提示
-bash: ./ifconfig: cannot execute binary file
missdeer
2014-08-15 17:08:53 +08:00
@qiuai 嗯,我那个确实是64位的可执行文件。有第三方服务自动编译的 http://beta.gobuild.io/repo?id=256 下载对应版本的试试。
msg7086
2014-08-16 03:31:24 +08:00
难道不是nginx+add_header就能搞定的么……

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/128007

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX