Skip to content

Commit

Permalink
camellia-http-accelerate-proxy,proxy and transport-server support set…
Browse files Browse the repository at this point in the history
…ting bind host, default 0.0.0.0
  • Loading branch information
caojiajun committed Jul 20, 2023
1 parent 1ee1053 commit 9fae5a7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public HttpAccelerateProxy(ITransportRouter router) {

@Override
public void start() {
String host = DynamicConf.getString("http.accelerate.proxy.host", "0.0.0.0");
int port = DynamicConf.getInt("http.accelerate.proxy.port", 11800);
if (port <= 0) {
logger.warn("http accelerate proxy skip start");
Expand Down Expand Up @@ -129,11 +130,11 @@ protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest httpReque
});
}
});
bootstrap.bind(port).sync();
logger.info("http accelerate proxy start success, port = {}", port);
bootstrap.bind(host, port).sync();
logger.info("http accelerate proxy start success, host = {}, port = {}", host, port);
started = true;
} catch (Exception e) {
logger.error("http accelerate proxy start error, port = {}", port, e);
logger.error("http accelerate proxy start error, host = {}, port = {}", host, port, e);
throw new IllegalStateException(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public TransportTcpServer(IUpstreamRouter router) {

@Override
public void start() {
String host = DynamicConf.getString("transport.server.host", "0.0.0.0");
int port = DynamicConf.getInt("transport.server.port", 11600);
if (port <= 0) {
logger.warn("transport tcp server skip start");
Expand Down Expand Up @@ -87,10 +88,10 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) {
}
});
bootstrap.bind(port).sync();
logger.info("transport tcp server start success, port = {}", port);
logger.info("transport tcp server start success, host = {}, port = {}", host, port);
started = true;
} catch (Exception e) {
logger.error("transport tcp server start error, port = {}", port, e);
logger.error("transport tcp server start error, host = {}, port = {}", host, port, e);
throw new IllegalStateException(e);
}
}
Expand Down
11 changes: 11 additions & 0 deletions update-en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
[中文版](update-zh.md)

# 1.2.12(2023/07/xx)
### add
* camellia-http-accelerate-proxy,proxy and transport-server support setting bind host, default 0.0.0.0

### update
* camellia-hot-key-sdk use ConcurrentHashMapCollector, update collector full log from error to info

### fix
* none


# 1.2.11(2023/07/19)
### add
* camellia-tools add CamelliaSegmentStatistics tools
Expand Down
11 changes: 11 additions & 0 deletions update-zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
[ENGLISH](update-en.md)


# 1.2.12(2023/07/xx)
### 新增
* camellia-http-accelerate-proxy,proxy和transport-server支持设置绑定的host(默认是0.0.0.0)

### 更新
* camellia-hot-key-sdk使用ConcurrentHashMapCollector时如果key满了,打印的日志从error改成info

### fix
*


# 1.2.11(2023/07/19)
### 新增
* camellia-tools新增CamelliaSegmentStatistics工具类
Expand Down

0 comments on commit 9fae5a7

Please sign in to comment.