ngrok centos服務端架設:windows用戶端設定詳情,ngrokcentos

來源:互聯網
上載者:User

ngrok centos服務端架設:windows用戶端設定詳情,ngrokcentos

ngrok centos服務端架設:windows用戶端設定詳情

GOOS=windows GOARCH=amd64 make release-client

把編譯產生的ngrok.exe 拷到windows電腦上,

在windows上建立一個ngrok.cfg

server_addr: "test.com:7443"trust_host_root_certs: false

在windows上建立一個startup.bat

ngrok -config=ngrok.cfg -subdomain 映射本地的網域名稱 本地的連接埠

如ngrok -config=ngrok.cfg -subdomain t1 8081

啟動start.bat,

外網網域名稱訪問
https://t1.test.com:8234
映射到本地的地址是
https://127.0.0.1:8081

一個複雜的設定檔樣本:

server_addr: "myngrok.com:8083"trust_host_root_certs: falsetunnels:  http:    subdomain: "www"    proto:      http: "8081"  https:    subdomain: "www"    proto:      https: "8082"  web:    proto:      http: "8050"  tcp:    proto:      tcp: "8001"    remote_port: 5555  ssh:    remote_port: 2222    proto:      tcp: "22"

一個可以自動啟動子網域名稱的bat

@echo OFFcolor 0aTitle ngrok啟動Mode con cols=109 lines=30:STARTECHO.Echo                  ==========================================================================ECHO.Echo                                         ngrok啟動ECHO.Echo                                         作者: https://segmentfault.com/u/objectECHO.Echo                  ==========================================================================Echo.echo.echo.:TUNNELEcho               輸入需要啟動的網域名稱首碼,如“test” ,即分配給你的穿透網域名稱為:“test.myngrok.com”ECHO.ECHO.ECHO.set /p clientid=   請輸入:echo.ngrok -config=ngrok.cfg -subdomain=%clientid% 80PAUSEgoto TUNNEL

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.