blob: abb1ace7de08273046816d5a385ff51728c7786d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
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()
}
|