上篇文章说到的解决办法后来使用过程中发现还是有很多问题,继续深入的抓包测试了一下,应该是内置的那4个IP提供的服务未完全更新,如果使用域名,因为解析的问题,偶尔正确。
先通过域名获取所有对应的IP地址(见下面的命令),可以发现有4个IP地址就是菜单中hardcode可以选择的,另外三个则是无法选择的。通过抓包(http协议),可以发现如果访问到这3个新IP的则可以正常backfill新股票的数据,如QIHU,YOKU,DANG等,老的IP则只能backfill比如BIDU,SOHU等股票。
接下来就好办了,直接在hosts文件中指定IP地址即可。
216.105.251.37 ameritrade02.streamer.com
216.105.251.38 ameritrade02.streamer.com
216.105.251.39 ameritrade02.streamer.com
$ nslookup ameritrade02.streamer.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: ameritrade02.streamer.com
Address: 216.105.251.39
Name: ameritrade02.streamer.com
Address: 204.58.27.34
Name: ameritrade02.streamer.com
Address: 204.58.27.43
Name: ameritrade02.streamer.com
Address: 204.58.27.51
Name: ameritrade02.streamer.com
Address: 204.58.27.60
Name: ameritrade02.streamer.com
Address: 216.105.251.37
Name: ameritrade02.streamer.com
Address: 216.105.251.38
或者:
$ dig ameritrade02.streamer.com
; <<>> DiG 9.4.2-P2 <<>> ameritrade02.streamer.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51408
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;ameritrade02.streamer.com. IN A
;; ANSWER SECTION:
ameritrade02.streamer.com. 567 IN A 216.105.251.39
ameritrade02.streamer.com. 567 IN A 204.58.27.34
ameritrade02.streamer.com. 567 IN A 204.58.27.43
ameritrade02.streamer.com. 567 IN A 204.58.27.51
ameritrade02.streamer.com. 567 IN A 204.58.27.60
ameritrade02.streamer.com. 27 IN A 216.105.251.37
ameritrade02.streamer.com. 567 IN A 216.105.251.38
;; Query time: 36 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Apr 8 08:10:31 2011
;; MSG SIZE rcvd: 155
--EOF--
Leave a comment