Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
夜色 committed Aug 23, 2017
1 parent 22ebf52 commit 295c402
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions conf/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ mp {

#网络配置
net {
local-ip="" //本地ip, 默认取第一个网卡
public-ip="" //外网ip, 默认取第一个网卡
local-ip="" //本地ip, 默认取第一个网卡的本地IP
public-ip="" //外网ip, 默认取第一个网卡的外网IP

connect-server-bind-ip="" //connSrv 绑定的本地ip (默认anyLocalAddress 0.0.0.0 or ::0)
connect-server-register-ip=${mp.net.public-ip} //公网ip, 注册到zk中的ip, 默认是public-ip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ public boolean isSecurity() {

@Override
public String toString() {
if (userId == null && deviceId == null) {
return "";
}

return "{" +
"osName='" + osName + '\'' +
", osVersion='" + osVersion + '\'' +
Expand Down
6 changes: 2 additions & 4 deletions mpush-boot/src/main/resources/mpush.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ mp.redis { //redis 集群配置
nodes:["127.0.0.1:6379"] //格式是ip:port
cluster-model:single //single, cluster
}
mp.net.local-ip="" //本地ip, 默认取第一个网卡的本地IP
mp.net.public-ip="" //外网ip, 默认取第一个网卡的外网IP
mp.net.ws-server-port=0 //websocket对外端口, 0表示禁用websocket
mp.net.gateway-server-net=tcp // 网关服务使用的网络 udp/tcp
mp.net.connect-server-port=3000 //接入服务的端口号
mp.net.public-host-mapping { //本机局域网IP和公网IP的映射关系,请添加实际的IP
//"10.0.10.156":"111.1.32.137" //请修改成实际的IP
//"10.0.10.166":"111.1.33.138" //请修改成实际的IP
}
mp.http.proxy-enabled=true //启用Http代理功能

0 comments on commit 295c402

Please sign in to comment.