fatedier/frp: A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.我們基於Ubuntu16.04 選用amd64版本,
server設置
server就是你擁有外網IP的服務器
1 2 3 |
[common] bind_port = 7000 vhost_http_port = 8888 |
用
client設置
client就是沒有外網IP,但是你想在外網訪問的機器, XXXXXXXXX就是上面的server的外網IP。
1 2 3 4 5 6 7 8 |
[common] server_addr = XXXXXXXXX server_port = 7000 [web] type local_port = 8888 custom_domains = XXXXXXXXX |
以
使用
接下來,在client端,在8888段端口啟動jupyter-notebook即可在XXXXXXXXX:8888訪問內網機器上的Notebook了。 另外,由於jupyter-notebook自帶終端,這也一舉兩得,也是一個內網穿透ssh的方案。當然,必須使用一些運維工具來保證服務的穩定性,如supervisor,可參考