13
0
geforkt von Mirrors/Velocity

Revert "Add -haproxy-protocol startup parameter" (#1214)

Dieser Commit ist enthalten in:
Adrian 2024-01-21 11:11:02 -05:00 committet von GitHub
Ursprung 363e3a7f94
Commit b23c2c6e1a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
3 geänderte Dateien mit 0 neuen und 25 gelöschten Zeilen

Datei anzeigen

@ -34,7 +34,6 @@ public final class ProxyOptions {
private static final Logger logger = LogManager.getLogger(ProxyOptions.class);
private final boolean help;
private final @Nullable Integer port;
private final @Nullable Boolean haproxy;
ProxyOptions(final String[] args) {
final OptionParser parser = new OptionParser();
@ -44,16 +43,10 @@ public final class ProxyOptions {
final OptionSpec<Integer> port = parser.acceptsAll(Arrays.asList("p", "port"),
"Specify the bind port to be used. The configuration bind port will be ignored.")
.withRequiredArg().ofType(Integer.class);
final OptionSpec<Boolean> haproxy = parser.acceptsAll(
Arrays.asList("haproxy", "haproxy-protocol"),
"Choose whether to enable haproxy protocol. "
+ "The configuration haproxy protocol will be ignored.")
.withRequiredArg().ofType(Boolean.class).defaultsTo(null);
final OptionSet set = parser.parse(args);
this.help = set.has(help);
this.port = port.value(set);
this.haproxy = haproxy.value(set);
if (this.help) {
try {
@ -71,8 +64,4 @@ public final class ProxyOptions {
public @Nullable Integer getPort() {
return this.port;
}
public @Nullable Boolean isHaproxy() {
return this.haproxy;
}
}

Datei anzeigen

@ -257,12 +257,6 @@ public class VelocityServer implements ProxyServer, ForwardingAudience {
this.cm.bind(configuration.getBind());
}
final Boolean haproxy = this.options.isHaproxy();
if (haproxy != null) {
logger.debug("Overriding HAProxy protocol to {} from command line option", haproxy);
configuration.setProxyProtocol(haproxy);
}
if (configuration.isQueryEnabled()) {
this.cm.queryBind(configuration.getBind().getHostString(), configuration.getQueryPort());
}

Datei anzeigen

@ -354,10 +354,6 @@ public class VelocityConfiguration implements ProxyConfig {
return advanced.isProxyProtocol();
}
public void setProxyProtocol(boolean proxyProtocol) {
advanced.setProxyProtocol(proxyProtocol);
}
public boolean useTcpFastOpen() {
return advanced.isTcpFastOpen();
}
@ -759,10 +755,6 @@ public class VelocityConfiguration implements ProxyConfig {
return proxyProtocol;
}
public void setProxyProtocol(boolean proxyProtocol) {
this.proxyProtocol = proxyProtocol;
}
public boolean isTcpFastOpen() {
return tcpFastOpen;
}