일부 디바이스 기능은 https에서만 지원하는 경우가 있다 (i.e. WebRTC)
ngrok 도메인에서 공인IP,port로 프록시한다
1. 다운로드
Download
$ ngrok config add-authtoken <token>
ngrok.com
2. 회원가입
https://dashboard.ngrok.com/login
ngrok - Online in One Line
dashboard.ngrok.com
3. Token을 등록한다
https://dashboard.ngrok.com/get-started/your-authtoken
ngrok 다운로드한 폴더로 들어간 후 아래 명령어 입력
./ngrok config add-authtoken [token]
4. 프록시할 포트를 등록한다
./ngrok http 3333
Session Status online
Account xxxxxxxxxx (Plan: Free)
Version 3.5.0
Region Japan (jp)
Latency 36ms
Web Interface XXX
Forwarding https://xxxx-xxx-xxx-xx-xx.ngrok-free.app -> http://localhost:3333
Connections ttl opn rt1 rt5 p50 p90
3 1 0.05 0.01 5.32 5.80
HTTP Requests
-------------
GET /socket.io/ 200 OK
GET /socket.io/ 200 OK
GET /socket.io/ 101 Switching Protocols
POST /socket.io/ 200 OK
GET /public/js/app.js 200 OK
GET /socket.io/ 200 OK
GET / 304 Not Modified
GET /favicon.ico 302 Found
GET /socket.io/socket.io.js 200 OK
GET / 200 OK
도메인 주소로 접속하면 공인IP, 3333 포트로 포워딩된다.
'프로젝트' 카테고리의 다른 글
MediaSoup, SFU (1) | 2024.02.09 |
---|---|
[윈도우 스크립트] 포트번호로 프로세스 종료하기 (0) | 2023.10.23 |
[Linux][Gradle] springboot 빌드 및 실행 (0) | 2023.08.13 |
GDB (0) | 2023.05.07 |
vscode python c module print 하기 (0) | 2023.04.24 |