以 https://example.org:8080/foo/bar?q=baz#bang
為例
Name | Desc |
---|---|
href | https://example.org:8080/foo/bar?q=baz#bang |
origin | https://example.org:8080 |
protocol | https: (http, ftp, …) |
host | example.org:8080 |
hostname | example.org |
port | 8080 |
pathname | /foo/bar |
search | ?q=baz |
hash | bang |
這些東西可以透過Location去取得
document 表示的是一個文檔對象,windows 表示一個窗口對象。 一個窗口下面可以有很多的document對象。每個document 都有 一個URL。
unzip /path/to/ngrok.zip
cd
ngrok.exe http 8080
(port埠號可以隨意
Session Expires 7 hours, 49 minutes <-- 免費版本只能持續8小時,到期之後要重新再來
Web Interface http://127.0.0.1:8080 <-- 這個可以用來管理查看整個請求的狀況
ngrok authtoken <YOUR_AUTHTOKEN>
ngrok http -auth="username:password" 8080
@echo off
SET port_number=8080
start python -m http.server %port_number%
start http://localhost:%port_number%/
ngrok http %port_number%
如果您只想要區域網路可以連接到您本機,可以直接新增防火牆的規則就可以了
%userprofile%
1使用C:\users\
代替本機IP位址: 表示只開放這個ip為只給外面使用
放ipconfig /all
中給的ipv4
位址
遠端IP位址: 哪些IP位址有權來訪問您指定的IP位址
同本機IP位址,只是這些IP改為遠端電腦的IP V4位址
當我們真正聯網的時候,會先把數據發送道路由,然後再由路由進行處理實現真正的關聯操作,
路由的地址才是真正聯網的IP位址,也就是public ip,而ipconfig查到的是「私有」ip
私有ip不能對外傳播(只能用在內部網路)
不曉得為什麼,總之如果這麼做可能會失敗 ↩︎