ngrok - Online in One Line
Zero Trust Add SSO, Mutual TLS, IP Policy, and webhook signature verification.
ngrok.com
ngrok์ด๋?
ngrok is a globally distributed reverse proxy fronting your web services
ํฌํธํฌ์๋ฉ์ด ํ์ ์์ด(๋ฆฌ๋ฒ์ค ํ๋ก์) ๋ด ์น ์๋ฒ๋ฅผ ์ธํฐ๋ท ์ ์ญ์ผ๋ก ํธ์คํ
ํด์ฃผ๋ ํฐ๋๋ง ๋๊ตฌ์ด๋ค.
ngrok ๋ช
๋ น์ด๋ฅผ ์ฌ์ฉํ๋ฉด ์์์ uri ์ฃผ์๋ฅผ ์์ฑํด์ฃผ๋๋ฐ ์ด๊ณณ์ ์ ์ํ๋ฉด ๋ฐ๋ก ๋ด ์น ์ฝํ
์ธ ์ ์ ๊ทผํ ์ ์๋ค. ์ค๋ น ๋ฐฉํ๋ฒฝ์ด ์๋ค๊ณ ํด๋ ์์๋ฐ์ด๋ ๋ฐฉ์์ผ๋ก ์ฝํ
์ธ ๋ฅผ ์ ๊ณตํ๊ธฐ ๋๋ฌธ์ ๋ฐ๋ก ํฌํธํฌ์๋ฉ์ ํด์ค ํ์๋ ์๋ค. (์ด์ ๋๋ฌธ์ C&C ์๋ฒ์๋ ์์ฃผ ์ฐ์ด๋๋ฏํ๋ค)
์ค์น(์ฐ๋ถํฌ)
sudo snap install ngrok
์ฌ์ฉ ๋ฐฉ๋ฒ
http ํฐ๋๋ง
ngrok http 80
tcp ํฐ๋๋ง
ngrok tcp 22
์ธ์ ์ ํ ์์ด ์ฌ์ฉํ๊ธฐ
์ฝ 2์๊ฐ ์ ๋ ์ธ์
์ ํ ์๊ฐ์ด ์๋๋ฐ ngrok ๊ณต์ ์ฌ์ดํธ์ ๊ฐ์ ํ์ ๊ฐ์
์ ํ๋ฉด ํ ํฐ์ ๋ฐ๊ธํด์ฃผ๋๋ฐ
ngrok์ ์ฌ์ฉํ ๋๋ง๋ค ํ ํฐ์ ์ต์
(--authtoken)
์ผ๋ก ๊ฑด๋ค์ฃผ๋ฉด ์๊ฐ์ ํ ์์ด ์ฌ์ฉํ ์ ์๋ค์นด๋๋ผ
ngrok http 80 --authtoken <Your_Token>
npm ์ค์น
ํ์
์คํฌ๋ฆฝํธ๋ก ๋ง๋ ๋๊ตฌ๋ผ์ node.js์ ํธํ์ด ์๋๋ค.
https://www.npmjs.com/package/ngrok
ngrok
node wrapper for ngrok. Latest version: 4.3.3, last published: 5 days ago. Start using ngrok in your project by running `npm i ngrok`. There are 367 other projects in the npm registry using ngrok.
www.npmjs.com
Local Install
npm install ngrok
Global Install
npm install ngrok -g
ngrok http 8080
require ํด์ ์ด๋ฐ์ ๋ฐ ๊ธฐ๋ฅ๋ค์ ์ฌ์ฉํ ์ ์์
const ngrok = require('ngrok');
(async function() {
const url = await ngrok.connect();
})();
์์ธํ ๊ฑด npm ์ฌ์ดํธ์์ ํ์ธ
'๐ฅ๏ธํ๋ก ํธ์๋' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ํ๋ก ํธ์๋ - ํด๋ผ์ด์ธํธ ์์ฒญ ํค๋ ํ์ธํ๋ ์ฌ์ดํธ (httpbin/headers) (0) | 2022.10.11 |
---|---|
ํ๋ก ํธ์๋ - ํ ์ค๋ก ์ ์๋ json์ ์ด์๊ฒ ์ถ๋ ฅํด์ฃผ๋ ์ฌ์ดํธ(JsonFormatter) (0) | 2022.10.04 |
๋ ์จ๋ฅผ ์ผ๊ตด๋ก ํ์ธํ๋ ์น ์ฑํ๋ฆฌ์ผ์ด์ KaoWeather (0) | 2021.12.04 |
๊ฐ๋จ ์น ๋ฉ๋ชจ์ฅ Netpad (0) | 2021.12.04 |
์ ํ์คํ ์ด ํด๋ก ์ฝ๋ฉ (0) | 2021.12.04 |