mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 16:02:26 +08:00
网关登录sdk地址配置
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
[hk4e]
|
[hk4e]
|
||||||
kcp_addr = "127.0.0.1" # 该地址只用来注册到节点服务器 并非网关本地监听地址 本地监听为0.0.0.0
|
kcp_addr = "127.0.0.1" # 该地址只用来注册到节点服务器 填网关的外网地址 网关本地监听为0.0.0.0
|
||||||
kcp_port = 22222
|
kcp_port = 22222
|
||||||
client_proto_proxy_enable = false
|
client_proto_proxy_enable = false
|
||||||
version = "320"
|
version = "320"
|
||||||
gate_tcp_mq_addr = "127.0.0.1"
|
gate_tcp_mq_addr = "127.0.0.1" # 访问网关tcp直连消息队列的地址 填网关的内网地址
|
||||||
gate_tcp_mq_port = 33333
|
gate_tcp_mq_port = 33333
|
||||||
|
login_sdk_url = "http://127.0.0.1:8080/gate/token/verify" # 网关登录验证token的sdk服务器地址 目前填dispatch的内网地址
|
||||||
|
|
||||||
[logger]
|
[logger]
|
||||||
level = "DEBUG"
|
level = "DEBUG"
|
||||||
|
|||||||
@@ -38,14 +38,15 @@ type Redis struct {
|
|||||||
|
|
||||||
// Hk4e 原神相关
|
// Hk4e 原神相关
|
||||||
type Hk4e struct {
|
type Hk4e struct {
|
||||||
KcpPort int32 `toml:"kcp_port"` // 该地址只用来注册到节点服务器 并非网关本地监听地址 本地监听为0.0.0.0
|
KcpAddr string `toml:"kcp_addr"` // 该地址只用来注册到节点服务器 填网关的外网地址 网关本地监听为0.0.0.0
|
||||||
KcpAddr string `toml:"kcp_addr"`
|
KcpPort int32 `toml:"kcp_port"`
|
||||||
GameDataConfigPath string `toml:"game_data_config_path"`
|
GameDataConfigPath string `toml:"game_data_config_path"`
|
||||||
GachaHistoryServer string `toml:"gacha_history_server"`
|
GachaHistoryServer string `toml:"gacha_history_server"`
|
||||||
ClientProtoProxyEnable bool `toml:"client_proto_proxy_enable"`
|
ClientProtoProxyEnable bool `toml:"client_proto_proxy_enable"`
|
||||||
Version string `toml:"version"`
|
Version string `toml:"version"`
|
||||||
GateTcpMqAddr string `toml:"gate_tcp_mq_addr"`
|
GateTcpMqAddr string `toml:"gate_tcp_mq_addr"` // 访问网关tcp直连消息队列的地址 填网关的内网地址
|
||||||
GateTcpMqPort int32 `toml:"gate_tcp_mq_port"`
|
GateTcpMqPort int32 `toml:"gate_tcp_mq_port"`
|
||||||
|
LoginSdkUrl string `toml:"login_sdk_url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// MQ 消息队列
|
// MQ 消息队列
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"hk4e/common/config"
|
||||||
"hk4e/common/mq"
|
"hk4e/common/mq"
|
||||||
"hk4e/dispatch/controller"
|
"hk4e/dispatch/controller"
|
||||||
"hk4e/gate/kcp"
|
"hk4e/gate/kcp"
|
||||||
@@ -278,7 +279,7 @@ func (k *KcpConnectManager) getHeadMsg(clientSeq uint32) (headMsg *proto.PacketH
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (k *KcpConnectManager) getPlayerToken(req *proto.GetPlayerTokenReq, session *Session) (rsp *proto.GetPlayerTokenRsp) {
|
func (k *KcpConnectManager) getPlayerToken(req *proto.GetPlayerTokenReq, session *Session) (rsp *proto.GetPlayerTokenRsp) {
|
||||||
tokenVerifyRsp, err := httpclient.Post[controller.TokenVerifyRsp]("http://127.0.0.1:8080/gate/token/verify", &controller.TokenVerifyReq{
|
tokenVerifyRsp, err := httpclient.Post[controller.TokenVerifyRsp](config.CONF.Hk4e.LoginSdkUrl, &controller.TokenVerifyReq{
|
||||||
AccountId: req.AccountUid,
|
AccountId: req.AccountUid,
|
||||||
AccountToken: req.AccountToken,
|
AccountToken: req.AccountToken,
|
||||||
}, "")
|
}, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user