Coder Social home page Coder Social logo

ngrok-clone's Introduction

ngrok-clone

clone version of ngrok with @GBS-Skile (GO lang side project)

Getting Started

$ go run ngrok-server.go
2021/08/09 03:29:06 Remote Control Address: localhost:5000
2021/08/09 03:29:06 Remote Data Address: localhost:5001
2021/08/09 03:29:06 Local Address: localhost:4000

# 다른 쉘에서
$ go run webserver.go

# 다른 쉘에서
$ go run ngrok-client.go

# 다른 쉘에서
$ curl localhost:4000/chicken
Hi there, I love chicken!

TLS Support

# Reference: https://xshine.tistory.com/316

$ openssl genrsa -out server.key 2048
Generating RSA private key, 2048 bit long modulus (2 primes)
............+++++
.........+++++
e is 65537 (0x010001)

$ openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
Country Name (2 letter code) [AU]:KR
State or Province Name (full name) [Some-State]:.
Locality Name (eg, city) []:.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
Organizational Unit Name (eg, section) []:.
Common Name (e.g. server FQDN or YOUR name) []:.
Email Address []:.

$ go run ngrok-server.go -cert=server.crt -key=server.key

# 다른 쉘에서 (-k 옵션은 insecure)
$ go run ngrok-client.go -t -k

ngrok-clone's People

Contributors

gbs-skile avatar codertimo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.