- In mrvm.net, you can cost USD$4 / year for 1 IPv4 address and 20 ports. In my case, 198.204.227.x 21001 ~ 21020.
- The ssh for mrvm.net is using another port. So you can control your VPS like ssh user@198.204.227.x -p 21021.
- In noip.com, you can register 3 free domain names like abc.hopto.org or xyz.ddns.net.
- Using inlets, you can expose your intranet service on the cloud:
- VPS
- export token=$(head -c 16 /dev/urandom | sha1sum | cut -d" " -f1)
- inlets server --port=21001 --token=$token
- DEV
- python -m SimpleHTTPServer 8000 (or your service)
- inlets client --remote=abc.hopto.org:21001 --upstream=http://localhost:8000 --token=...
- Client
- curl http://abc.hopto.org:21001
星期二, 5月 19, 2020
Building private and cheaper ngrok-like tunnels
星期六, 8月 25, 2018
Serveo, Ngrok alternative
Ngrok 非常好用,不過就是免費僅限一個,也要安裝稍嫌麻煩。若是臨時在 Linux 上要用此功能,倒是可考慮免安裝的 Serveo,只需打一行指令:
[2019/01/07]
想保持較長期的連線,需增加一個參數:
- ssh -R 80:localhost:3000 serveo.net
- ssh -R abc:80:localhost:3000 serveo.net
[2019/01/07]
想保持較長期的連線,需增加一個參數:
- ssh -o ServerAliveInterval=60 -R abc:80:localhost:3000 serveo.net
星期五, 3月 02, 2018
ngrok + NextCloud + WebDAV + cURL
過去常在用 SCP + bakop.com 做為沒有圖形介面、沒有 VPN 時的抓檔來源,但畢竟是外部資源,用得不太安心。雖然以前也對 OwnCloud 下過功夫研究,但苦於必須有圖形介面瀏覽器限制,這次終於有突破:
原來 UUID 還是可以改的,不至於太難用,可參考 Internal Username 這段。
[2018/03/30]
ngrok 取來的主機名稱可以保留蠻久的,直到最近一次斷電。因為重新連上一定會換名字,每次都要進 config/config.php 改 trusted_domain 也實在麻煩,尤其是 docker 裡面連 vi 都沒有。一個修改訣竅是:
- 檔案分享-NextCloud
- 指令存取-WebDAV + cURL
- 內網外露-ngrok
- curl -u 'user:pass' -O http://nc.acme.com/remote.php/dav/files/UUID/path/to/file
原來 UUID 還是可以改的,不至於太難用,可參考 Internal Username 這段。
[2018/03/30]
ngrok 取來的主機名稱可以保留蠻久的,直到最近一次斷電。因為重新連上一定會換名字,每次都要進 config/config.php 改 trusted_domain 也實在麻煩,尤其是 docker 裡面連 vi 都沒有。一個修改訣竅是:
- 'trusted_domains' =>
- array (
- 0 => '*.ngrok.io',
- ),
- ./occ config:system:set 0 --value=*.ngrok.io
- ./occ config:system:get
[2018/04/04]
單開一組帳密給外人使用似乎是管理者的特權,那我們一般小老百姓呢?也是可以在自己的管理範圍內開出共享目錄,以 http://nc.acme.com/s/<shareLink> 允許讀寫、不設密碼保護為例,上傳:
- curl -u '<shareLink>:' -T <fileName> http://nc.acme.com/public.php/webdav/ [--progress-bar -o /dev/null]
下載:
- curl -u '<shareLink>:' -O http://nc.acme.com/public.php/webdav/<fileName>
查詢目錄內容:
- curl -u '<shareLink>:' -X PROPFIND http://nc.acme.com/public.php/webdav/ | grep -o '<d:href>[^<]*</d:href>'
[2018/09/06]
共享匿名個別檔案有些不同:
- curl http://nc.acme.com/s/<shareLink>/download -o <fileName>
訂閱:
文章 (Atom)