aboutsummaryrefslogtreecommitdiff
path: root/flags.go
blob: ee3b817385c3e29c41dbb8b55cd71184c422949e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

package main

import "flag"

var (
	difficulty uint
	listenAddr string
	destHost   string
	secondary  bool
)

func init() {
	flag.UintVar(&difficulty, "difficulty", 17, "leading zero bits required for the challenge")
	flag.StringVar(&listenAddr, "listen", ":8081", "address to listen on")
	flag.StringVar(&destHost, "upstream", "http://127.0.0.1:8080", "destination url base to proxy to")
	flag.BoolVar(&secondary, "secondary", false, "trust X-Forwarded-For headers")
	flag.Parse()
}