Preloader image
DDD

유틸리티

ngrok - 로컬서버를 공개 서버로 (WEB API 개발자에게 유용)

작성자 관리자 (admin)
조회수 122
입력일 2024-05-07 17:04:47

https://ngrok.com/download

로컬서버를 공개 서버로 전환 시켜 주고 URL도 HTTPS로 서비스
가정에서 로컬 서버를 테스트 할 때 유용.
대부분의 OS를 지원하며 아래 예는 윈도우10(64bit)

1. 회원가입 - 회원 고유 토큰 필요 (회언 가입 시 자동 발행)
2. 발행 된 토큰으로 가상호스트 로컬의 IP 또는 local(127.0.0.1) 과 PORT를 적어 명령을 실행하면 외부에서 누구나 접속 가능
    예)  ngrok.exe 실행 후
          ngrok http http://localhost:8080

-- console

ngrok
(Ctrl+C to quit)
Full request capture now available in your browser: https://ngrok.com/r/ti
Session Status                online
Account                       MY NAME (Plan: Free)
Version                       3.9.0
Region                        Japan (jp)
Latency                       37ms
Web Interface                 http://127.0.0.1:4040
Forwarding                    https://5dd1-121-140-204-202.ngrok-free.app -> http://localhost:8080

Connections                   ttl     opn     rt1     rt5     p50     p90
                              5       0       0.03    0.01    0.06    34.24

HTTP Requests   
------------- 

GET /manager/html              401
GET /host-manager/html
GET /bg-nav.png                200
GET /tomcat.css                200
GET /                          200
GET /tomcat.svg                200
GET /bg-middle.png             200
GET /bg-upper.png              200
GET /asf-logo-wide.svg         200
GET /favicon.ico               200   

-- 무료 버전인 경우 1개만 연동 가능
1개 이상 뛰우려고 하면 아래와같은 오류가발생 (유료 1개이상 가능)
ERROR:  authentication failed: Your account is limited to 1 simultaneous ngrok agent sessions.
ERROR:  You can run multiple tunnels on a single agent session using a configuration file.
ERROR:  To learn more, see https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config/
ERROR:  You can view your current agent sessions in the dashboard:
ERROR:  https://dashboard.ngrok.com/tunnels/agents
ERROR:
ERROR:  ERR_NGROK_108
ERROR:

--- 하단 본 사이트 ---

Access customer and partner networks

Connect to external networks in a consistent, secure, and repeatable manner without requiring any changes to network configurations.

  • Connect to customer networks
  • Bring Your Own Cloud (BYOC) Connectivity
  • IoT Connectivity
  • Point-of-sale Connectivity

 

^