diff --git a/makefile b/makefile index e187fbec..52caad83 100644 --- a/makefile +++ b/makefile @@ -5,6 +5,7 @@ GOBUILD=$(GOCMD) build GOINSTALL=$(GOCMD) install GOTEST=$(GOCMD) test BUILDJOBS=@./jobs/build.sh +IPTABLES=@sudo iptables server: $(GOBUILD) @@ -18,6 +19,9 @@ bench: $(GOTEST) -bench . depslist: $(GOCMD) list -f {{.Deps}} | sed -e 's/\[//g' -e 's/\]//g' | tr " " "\n" -all: server jobs +ports: + $(IPTABLES) -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 4000 + $(IPTABLES) -t nat -A OUTPUT -o lo -p tcp --dport 443 -j REDIRECT --to-port 4001 +all: server jobs ports .PHONY: jobs \ No newline at end of file