Skip to content

Instantly share code, notes, and snippets.

@lxxstc
Last active December 29, 2015 21:29
Show Gist options
  • Save lxxstc/7730291 to your computer and use it in GitHub Desktop.
Save lxxstc/7730291 to your computer and use it in GitHub Desktop.
如何访问百度内网的链接

环境

  • 外网跳板: 192.241.238.106
  • 百度机和端口:cq02-vs-hotel-test02.cq02.baidu.com:8085
  • 本机:127.0.0.1

步骤

  • 从百度内网建立一个远端转发端口
 ssh -R 2123:cq02-vs-hotel-test02.cq02.baidu.com:8085 shrimp@192.241.238.106  -p80
  • 从本机发起一个本地转发的端口
 ssh -L 2124:localhost:2123  192.241.238.106

这里的localhost是指的192.241.238.106

  • 发起请求(从浏览器,或者从shell中)
curl 'localhost:2124/api/lowprice_search/inter?from=厦门&to=亚洲&month=1,2&count=4'

参考资料

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment