cristianoliveira / Ergo

Licence: mit
The management of multiple apps running over different ports made easy

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Ergo

Pric
Simple zero-config tool to create Private Certificate Authority & issue locally-trusted development server certificates with any domain names you'd like. SSL certificates for development purposes.
Stars: ✭ 87 (-80.75%)
Mutual labels:  development-environment, developer-tools, development
Developer Roadmap Guide 2018
Stars: ✭ 344 (-23.89%)
Mutual labels:  development-environment, developer-tools, development
Noginx
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 53 (-88.27%)
Mutual labels:  proxy, reverse-proxy, proxy-server
Otoroshi
Lightweight api management on top of a modern http reverse proxy
Stars: ✭ 177 (-60.84%)
Mutual labels:  microservices, proxy, reverse-proxy
Janus
An API Gateway written in Go
Stars: ✭ 2,249 (+397.57%)
Mutual labels:  microservices, proxy, reverse-proxy
Takeoff
A rapid development environment using docker for convenience.
Stars: ✭ 271 (-40.04%)
Mutual labels:  development-environment, developer-tools, development
Kubefwd
Bulk port forwarding Kubernetes services for local development.
Stars: ✭ 2,713 (+500.22%)
Mutual labels:  microservices, proxy, developer-tools
Fiddler Plus
自定义的Fiddler规则,多环境切换、解决跨域开发、快速调试线上代码必备|高效调试分析利器
Stars: ✭ 325 (-28.1%)
Mutual labels:  proxy, developer-tools, tools
Compoxure
Proxy middleware for express that enables composition of microservices.
Stars: ✭ 332 (-26.55%)
Mutual labels:  microservices, proxy
Restool
RESTool is an open source UI tool for managing RESTful APIs. It could save you time developing your own internal tools. A live example:
Stars: ✭ 338 (-25.22%)
Mutual labels:  developer-tools, tools
Athens
A Go module datastore and proxy
Stars: ✭ 3,736 (+726.55%)
Mutual labels:  proxy, proxy-server
Moleculer
🚀 Progressive microservices framework for Node.js
Stars: ✭ 4,845 (+971.9%)
Mutual labels:  microservices, distributed-systems
Table flipper
(╯°□°)╯︵ ┻━┻ A useless gem for table flipping on exceptions 😒
Stars: ✭ 328 (-27.43%)
Mutual labels:  development-environment, developer-tools
Proxy requests
a class that uses scraped proxies to make http GET/POST requests (Python requests)
Stars: ✭ 357 (-21.02%)
Mutual labels:  proxy, proxy-server
Free Proxy List
🔥Free proxy servers list / Updated hourly!
Stars: ✭ 326 (-27.88%)
Mutual labels:  proxy, proxy-server
Service Proxy
API gateway for REST and SOAP written in Java.
Stars: ✭ 355 (-21.46%)
Mutual labels:  proxy, reverse-proxy
Gokit
Go Examples: From basics to distributed systems
Stars: ✭ 325 (-28.1%)
Mutual labels:  microservices, distributed-systems
Cloudi
A Cloud at the lowest level!
Stars: ✭ 352 (-22.12%)
Mutual labels:  microservices, distributed-systems
Laravel Kit
A desktop Laravel admin panel app
Stars: ✭ 440 (-2.65%)
Mutual labels:  developer-tools, development
Re Frisk
Take full control of re-frame app
Stars: ✭ 396 (-12.39%)
Mutual labels:  developer-tools, tools

Ergo GoDoc Go Report Card unix build win build codecov

Ergo Proxy - The reverse proxy agent for local domain management.

The management of multiple apps running over different ports made easy through custom local domains.

Demo

See more on examples

Summary

Philosophy

Ergo's goal is to be a simple reverse proxy that follows the Unix philosophy of doing only one thing and doing it well. Simplicity means no magic involved. Just a flexible reverse proxy which extends the well-known /etc/hosts declaration.

Feedback

This project is constantly undergoing development, however, it's ready to use. Feel free to provide feedback as well as open issues. All suggestions and contributions are welcome. :)

For help and feedback you can find us at #ergo-proxy channel on https://gopher.slack.com

Why?

Dealing with multiple apps locally, and having to remember each port representing each microservice is frustrating. I wanted a simple way to assign each service a proper local domain. Ergo solves this problem.

Installation

OSX

brew tap cristianoliveira/tap
brew install ergo

Linux

curl -s https://raw.githubusercontent.com/cristianoliveira/ergo/master/install.sh | sh

Windows

From powershell run:

Invoke-WebRequest https://raw.githubusercontent.com/cristianoliveira/ergo/master/install.ps1 -out ./install.ps1; ./install.ps1

You can also find the Windows executables in release.

Disclaimer: I use Unix-based systems on a daily basis, so I am not able to test each build alone. :(

Go

go install github.com/cristianoliveira/ergo

Make sure you have $GOPATH/bin in your path: export PATH=$PATH:$GOPATH/bin

Usage

Ergo looks for a .ergo file inside the current directory. It must contain the names and URL of the services following the same format as /etc/hosts (domain+space+url). The main difference is it also considers the specified port.

Simplest Setup

You need to set the http://127.0.0.1:2000/proxy.pac configuration on your system network config.

Ergo comes with a setup command that can configure it for you. The current systems supported are:

  • osx
  • linux-gnome
  • windows
ergo setup <operation-system>

In case of errors / it doesn't work, please look at the detailed config session below.

Adding Services and Running

echo "ergoproxy http://localhost:3000" > .ergo
ergo run

Now you should be able to access: http://ergoproxy.dev. Ergo redirects anything ending with .dev to the configured url.

Simple, right? No magic involved.

Do you want to add more services? It's easy, just add more lines in .ergo:

echo "otherservice http://localhost:5000" >> .ergo
ergo list
ergo run

Restart the ergo server and access: http://otherservice.dev

ergo add otherservice http://localhost:5000 is a shorthand for appending lines to ./.ergo

Ergo's configuration

Ergo accepts different configurations like run in different port (default: 2000) and change domain (default: dev). You can find all this configs on ergo's help running ergo -h.

Configuration

In order to use Ergo domains you need to set it as a proxy. Set the http://127.0.0.1:2000/proxy.pac on:

Networking Web Proxy

OS X

Network Preferences > Advanced > Proxies > Automatic Proxy Configuration

Windows

Settings > Network and Internet > Proxy > Use setup script

Linux

On Ubuntu

System Settings > Network > Network Proxy > Automatic

For other distributions, check your network manager and look for proxy configuration. Use browser configuration as an alternative.

Browser configuration

Browsers can be configured to use a specific proxy. Use this method as an alternative to system-wide configuration.

Keep in mind that if you requested the site before setting the proxy properly, you have to reset the cache of the browser or change the name of the service. In incognito windows cache is disabled by default, so you can use them if you don't wish to delete the cache

Also you should not use the default .dev domain, we suggest .test instead (see #58) unless your service supports https out of the box and you have already a certificate

Chrome

Exit Chrome and start it using the following option:

# Linux
$ google-chrome --proxy-pac-url=http://localhost:2000/proxy.pac

# OS X
$ open -a "Google Chrome" --args --proxy-pac-url=http://localhost:2000/proxy.pac

Firefox

through menus and mouse
  1. Click the hamburger button otherwise click on "Edit" Menu
  2. then "Preferences"
  3. then "Settings" button at the bottom of the page ("General" active in sidebar) with title "Network Settings"
  4. check Automatic Proxy configuration URL and enter value http://localhost:2000/proxy.pac below
  5. hit "ok"
from about:config

network.proxy.autoconfig_url -> http://localhost:2000/proxy.pac

Using on terminal

In order to use ergo as your web proxy on terminal you must set the http_proxy variable. (Only for linux/osx)

export http_proxy="http://localhost:2000"

Ephemeral Setup

As an alternative you can see the scripts inside /resources for running an ephemeral setup. Those scripts set the proxy only while ergo is running.

Contributing

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request, they are welcome!
  • Please include unit tests in your pull requests

Building

Minimal required golang version 1.10

  make all

Testing

  make test
  make test-integration

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].