就是用nodejs搭建的服务器,连上网后服务器的ip怎么能获得,跟连局域网是不一样的,,,,有木有大神指教下,,小弟初学
回复 (18)
C
你是要获取网卡的地址还是说服务器外网的地址,外网地址与物理网卡地址可能不一样
ubuntu话你可以开个子进程执行ifconfig,读取stdout作解析
window服务器不是很了解
S
就是想做那种要是连上外网就是外网的Ip,不连外网就是物理Ip,刚开始学,不太懂,谢谢大神了
G
#1123I‘m webapp-cnodejs-vue
A
引用 SayGoodBey就是想做那种要是连上外网就是外网的Ip,不连外网就是物理Ip,刚开始学,不太懂,谢谢大神了
@SayGoodBey 花生壳的ddns就可以获得外网ip或者网卡ip你可以看看nodejs版本的脚本
来自酷炫的 CNodeMD
S
引用 Aesative@SayGoodBey 花生壳的ddns就可以获得外网ip或者网卡ip你可以看看nodejs版本的脚本 来自酷炫的 CNodeMD
@Aesative 这波指导666,赞一个
G
引用 gxr10201123<br/ <br/ <a class="form" href="https://github.com/shinygang/Vue cnodejs" I‘m webapp cnodejs...
@gxr1020 、】【】I‘m webapp-cnodejs-vue
G
引用 gxr1020@gxr1020 、】【】<br/ <br/ <a class="form" href="https://github.com/shinygang/Vue cnodejs" I‘m webap...
@gxr1020 sdfaaaaaaaaaaaI‘m webapp-cnodejs-vue
G
引用 gxr10201123<br/ <br/ <a class="form" href="https://github.com/shinygang/Vue cnodejs" I‘m webapp cnodejs...
@gxr1020 aaI‘m webapp-cnodejs-vue
G
引用 gxr10201123<br/ <br/ <a class="form" href="https://github.com/shinygang/Vue cnodejs" I‘m webapp cnodejs...
@gxr1020 aaI‘m webapp-cnodejs-vue
G
1111I‘m webapp-cnodejs-vue
G
1111I‘m webapp-cnodejs-vue
G
G
引用 gxr1020@gxr1020 22
@gxr1020 33
G
引用 gxr1020@gxr1020 33
@gxr1020 44
G
引用 gxr1020@gxr1020 44
@gxr1020 55
G
引用 gxr1020@gxr1020 55
@gxr1020 123
G
引用 gxr1020@gxr1020 123
@gxr1020 444
G
123
参与回复
登录后即可参与回复。登录