Skip to content

Commit 6f128cb

Browse files
mark can be set without auto
1 parent 59b12b6 commit 6f128cb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cmd/gohpts/cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ func root(args []string) error {
112112
}
113113
}
114114
if seen["mark"] {
115-
if !seen["auto"] {
116-
return fmt.Errorf("-mark requires -auto flag")
115+
if !seen["t"] && !seen["T"] {
116+
return fmt.Errorf("-mark requires -t or -T flag")
117117
}
118118
}
119119
if seen["f"] {

gohpts.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,11 @@ func New(conf *Config) *proxyapp {
17431743
}
17441744
}
17451745
if p.tproxyAddr != "" {
1746-
p.logger.Info().Msgf("TPROXY: %s", p.tproxyAddr)
1746+
if p.tproxyMode == "tproxy" {
1747+
p.logger.Info().Msgf("TPROXY: %s", p.tproxyAddr)
1748+
} else {
1749+
p.logger.Info().Msgf("REDIRECT: %s", p.tproxyAddr)
1750+
}
17471751
}
17481752
return &p
17491753
}

0 commit comments

Comments
 (0)