Updated makefile

This commit is contained in:
Eduard Urbach 2018-05-10 07:41:52 +09:00
parent eed733947c
commit 1b86372042
2 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,10 @@ curl -s https://raw.githubusercontent.com/animenotifier/notify.moe/go/install.sh
* In your browser, import the file `security/default/rootCA.pem` as a trusted Root authority
* Open `https://beta.notify.moe`
## OS restarts
* If you restart your operating system, run `make ports` to update your port bindings
[godoc-image]: https://godoc.org/github.com/animenotifier/notify.moe?status.svg
[godoc-url]: https://godoc.org/github.com/animenotifier/notify.moe
[travis-image]: https://travis-ci.org/animenotifier/notify.moe.svg?branch=go

View File

@ -9,6 +9,7 @@ BUILDPATCHES=@./patches/build.sh
BUILDBOTS=@./bots/build.sh
TSCMD=@tsc
IPTABLES=@sudo iptables
IP6TABLES=@sudo ip6tables
PACK:=$(shell command -v pack 2> /dev/null)
RUN:=$(shell command -v run 2> /dev/null)
GOIMPORTS:=$(shell command -v goimports 2> /dev/null)
@ -84,6 +85,8 @@ ports:
ifeq ($(OSNAME),LINUX)
$(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
$(IP6TABLES) -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 4000
$(IP6TABLES) -t nat -A OUTPUT -o lo -p tcp --dport 443 -j REDIRECT --to-port 4001
endif
ifeq ($(OSNAME),OSX)
@echo "rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 4001" | sudo pfctl -ef -