Skip to content

Commit

Permalink
fix and add log for proxy protocol support(#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
caojiajun committed Aug 23, 2023
1 parent e0555e5 commit fee9260
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ camellia-redis-proxy:
monitor-interval-seconds: 60 #monitor data refresh interval seconds
# tls-port: 6381
# proxy-frontend-tls-provider-class-name: com.netease.nim.camellia.redis.proxy.tls.frontend.DefaultProxyFrontendTlsProvider
# proxy-protocol-enable: false
# cluster-mode-enable: true #cluster-mode, if setting true, proxy-cluster disguised as a redis-cluster, should configure proxy.cluster.mode.nodes=xx in camellia-redis-proxy.properties
# cport: -1 #cluster-mode is setting true, proxy will use this cport to heartbeat, if setting -1, cport = port + 10000
# netty-transport-mode: epoll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public void initChannel(SocketChannel ch) {
serverProperties.getSoBacklog(), serverProperties.getSoSndbuf(), serverProperties.getSoRcvbuf(), serverProperties.isSoKeepalive());
logger.info("CamelliaRedisProxyServer, tcp_no_delay = {}, tcp_quick_ack = {}, write_buffer_water_mark_low = {}, write_buffer_water_mark_high = {}",
serverProperties.isTcpNoDelay(), GlobalRedisProxyEnv.isServerTcpQuickAckEnable(), serverProperties.getWriteBufferWaterMarkLow(), serverProperties.getWriteBufferWaterMarkHigh());
logger.info("CamelliaRedisProxyServer, proxy_protocol_enable = {}", serverProperties.isProxyProtocolEnable());
if (port > 0 && port != tlsPort) {
logger.info("CamelliaRedisProxyServer start at port: {}", port);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static CamelliaServerProperties parse(CamelliaRedisProxyProperties proper
serverProperties.setPassword(properties.getPassword());
serverProperties.setProxyFrontendTlsProviderClassName(properties.getProxyFrontendTlsProviderClassName());
serverProperties.setMonitorEnable(properties.isMonitorEnable());
serverProperties.setProxyProtocolEnable(properties.isProxyProtocolEnable());
serverProperties.setMonitorIntervalSeconds(properties.getMonitorIntervalSeconds());
serverProperties.setMonitorCallbackClassName(properties.getMonitorCallbackClassName());
serverProperties.setClientAuthProviderClassName(properties.getClientAuthProviderClassName());
Expand Down

0 comments on commit fee9260

Please sign in to comment.