Code Monkey home page Code Monkey logo

ngrok-build's Introduction

build | Circle CI

ngrok-build

Build ngrokd server and ngrok client without a pain for Linux, MacOS and Windows in one time.

So you can use your own ngrok server on you own server with your domain name

  • ngrokd and ngrok are cross-compiled with gonative and gox
  • generate certificate with your domain
  • ngrokd and ngrok binary are paired together
  • generate appropriate config file for client
  • ngrok-build can be use on linux and macos (and windows SOON)

ngrok famous tool is a reverse proxy (see https://github.com/inconshreveable/ngrok)

NOTE : ngrok-build is built with stella (see https://github.com/StudioEtrange/stella)

NOTE : ngrok built version is 1.7.1 with extra patch uptodated at 2016-03-12 (resolve minor bugs and google code go logger issue)

Requirements

Standard build tools, git, openssl (for certificate generation)

NOTE : you dont need go. An isolated version of go will be built in current workspace

Build ngrokd and ngrok

On Linux/MacOS

installation :

automatic way (recommanded) :

cd ~
git clone https://github.com/StudioEtrange/ngrok-build
cd ngrok-build
./stella-link.sh bootstrap

manual way :

cd ~
git clone https://github.com/StudioEtrange/stella
cd stella
./stella.sh stella install dep

cd ~
git clone https://github.com/StudioEtrange/ngrok-build
cd ngrok-build

cross compile ngrokd and ngrok :

./ngrok-build.sh prepare
./ngrok-build.sh build -d <domain.com>

replace domain.com whith you server domain name and see produced files in release folder

FOR INFORMATION : gonative and gox are used for cross-compile client and server

for cleaning :

./ngrok-build.sh clean

for help :

./ngrok-build.sh -h

ngrokd and ngrok usage

Your built binaries are in release directory. For more details on how to use ngrok see https://github.com/inconshreveable/ngrok

On Linux/MacOS

If your domain is domain.com

client :

./ngrok -subdomain=test1.domain.com -config=ngrok-config 80

server :

sudo ./ngrokd -tlsKey='device.key' -tlsCrt='device.crt' -domain='domain.com' -httpAddr=':80' -httpsAddr=':443'

DNS resolution :

On the host running the client or the server, *.domain.dom must be resolved.

  • Quick solution : add test1.domain.com to /etc/hosts file of the server host and the client host, pointing to the ip of your server
  • Real solution : add a CNAME *.domain.com to a dns server pointing to the ip of your server

Links

ngrok-build's People

Contributors

studioetrange avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ngrok-build's Issues

unable to detect version control system for code.google.com/ path

Getting this error when building ngrokd on ubuntu 14.04:


** build server for all platforms
bin/go-bindata -nomemcopy -pkg=assets -tags=release
-debug=false
-o=src/ngrok/client/assets/assets_release.go
assets/client/...
bin/go-bindata -nomemcopy -pkg=assets -tags=release
-debug=false
-o=src/ngrok/server/assets/assets_release.go
assets/server/...
go get -tags 'release' -d -v ngrok/...
package code.google.com/p/log4go: unable to detect version control system for code.google.com/ path
make: *** [deps] Error 1
** build client for all platforms
bin/go-bindata -nomemcopy -pkg=assets -tags=release
-debug=false
-o=src/ngrok/client/assets/assets_release.go
assets/client/...
bin/go-bindata -nomemcopy -pkg=assets -tags=release
-debug=false
-o=src/ngrok/server/assets/assets_release.go
assets/server/...
go get -tags 'release' -d -v ngrok/...
package code.google.com/p/log4go: unable to detect version control system for code.google.com/ path
make: *** [deps] Error 1


Apparently google code closed down..?
[http://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html]

./stella-bridge.sh: line 149: syntax error near unexpected token `fi'

1. synax:

./stella-bridge.sh: line 149: syntax error near unexpected token `fi'

2. when I fix it, another error appear:

./stella-bridge.sh: line 76: /home/hct/ngrok-build/../stella/conf.sh: No such file or directory
./stella-bridge.sh: line 81: __stella_requirement: command not found
/home/hct/ngrok-build/stella-link.sh: line 25: /home/hct/ngrok-build/../stella/conf.sh: No such file or directory
/home/hct/ngrok-build/stella-link.sh: line 26: __init_stella_env: command not found

cannot access 'stella-bridge.sh': No such file or directory

Hello I cannot build it, because of the following error.

user@gw:~$ git clone https://github.com/StudioEtrange/ngrok-build
Cloning into 'ngrok-build'...
remote: Counting objects: 124, done.
remote: Total 124 (delta 0), reused 0 (delta 0), pack-reused 124
Receiving objects: 100% (124/124), 24.09 KiB | 0 bytes/s, done.
Resolving deltas: 100% (69/69), done.
Checking connectivity... done.
user@gw:~$ cd ngrok-build
user@gw:~/ngrok-build$
user@gw:~/ngrok-build$ ./stella-link.sh bootstrap
./stella-link.sh: line 31: curl: command not found
chmod: cannot access 'stella-bridge.sh': No such file or directory
./stella-link.sh: line 33: ./stella-bridge.sh: No such file or directory

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.