Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -171,7 +172,8 @@ public WebService(PulsarService pulsar) throws PulsarServerException {
SslContextFactory.Server sslCtxFactory =
JettySslContextFactory.createSslContextFactory(config.getWebServiceTlsProvider(),
this.sslFactory, config.isTlsRequireTrustedClientCertOnConnect(),
config.getTlsCiphers(), config.getTlsProtocols());
firstNonEmpty(config.getWebServiceTlsCiphers(), config.getTlsCiphers()),
firstNonEmpty(config.getWebServiceTlsProtocols(), config.getTlsProtocols()));
List<ConnectionFactory> connectionFactories = new ArrayList<>();
if (config.isWebServiceHaProxyProtocolEnabled()) {
connectionFactories.add(new ProxyConnectionFactory());
Expand Down Expand Up @@ -532,5 +534,9 @@ protected void refreshSslContext() {
}
}

private static Set<String> firstNonEmpty(Set<String> preferred, Set<String> fallback) {
return preferred != null && !preferred.isEmpty() ? preferred : fallback;
}

private static final Logger log = LoggerFactory.getLogger(WebService.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
protected static ChannelPromise spliceNIC2NIC(EpollSocketChannel inboundChannel,
EpollSocketChannel outboundChannel, int spliceLength) {
ChannelPromise promise = inboundChannel.newPromise();
inboundChannel.spliceTo(outboundChannel, spliceLength, promise);

Check warning on line 340 in pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java

View workflow job for this annotation

GitHub Actions / CI - Unit - Proxy

spliceTo(io.netty.channel.epoll.AbstractEpollStreamChannel,int,io.netty.channel.ChannelPromise) in io.netty.channel.epoll.AbstractEpollStreamChannel has been deprecated
promise.addListener((ChannelFutureListener) future -> {
if (!future.isSuccess() && !(future.cause() instanceof ClosedChannelException)) {
future.channel().pipeline().fireExceptionCaught(future.cause());
Expand Down Expand Up @@ -797,6 +797,8 @@
clientConf.setTlsCertificateFilePath(proxyConfig.getBrokerClientCertificateFilePath());
}
clientConf.setTlsAllowInsecureConnection(proxyConfig.isTlsAllowInsecureConnection());
clientConf.setTlsCiphers(proxyConfig.getBrokerClientTlsCiphers());
clientConf.setTlsProtocols(proxyConfig.getBrokerClientTlsProtocols());
}
return clientConf;
}
Expand Down
Loading