Skip to content

angago(anga po/அங்க போ) means Go there. Localhost Proxy Tunnel Written in Golang

License

Notifications You must be signed in to change notification settings

manigandand/angago

Repository files navigation

angago

CircleCI Go Report GolangCI License

angago(anga po/அங்க போ) means Go there. Localhost Proxy Tunnel(reverse proxy). Demo Video

angago is small localhost proxy tunnel(reverse proxy) which routes to different application servers based on request Host/Hostname from local DNS.

angago determines the target url to proxy based on the simple yaml configuration. It's a simple map[string]string.

map[host]targethost

Image of Yaktocat

build and run from source

source .env
go build
./angago

or

./deployment.sh

run from docker image

docker run -v /Users/manigandand/.angago/config.yaml:/mnt/Users/manigandand/.angago/config.yaml -e 'ANGAGO_CONFIG_PATH=/mnt/Users/manigandand/.angago/config.yaml' -it manigandanjeff/angago:latest

or

./docker_run.sh /Users/manigandand/.angago/config.yaml

angago architecture

Image of Yaktocat

Local DNS

/etc/hosts

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost
127.0.0.1	status.gopherhut.com
127.0.0.1	app.gopherhut.com
127.0.0.1	api.gopherhut.com
127.0.0.1	nope.gopherhut.com
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

angago configuration

$HOME/.angago/config.yaml

# apiVersion: api/v1
# apiNamespace: angago.gopherhut.com
kind: Domains
meta:
    shortName: domains
tls: false
domains:
    app.gopherhut.com: localhost:8081
    status.gopherhut.com: localhost:8082
    admin.gopherhut.com: localhost:8083

TODO

  • Add TLS support

Licence

MIT