Skip to content

Conversation

@KlN-4096
Copy link
Contributor

加了个反向代理地址的配置,当用户设置了sessionserver.mojang.com的反向代理时,可以使用配置修改鉴权url,避免minecraft服务器需要使用代理导致玩家高ping.

因此mod可以通过我自己稳定的https://sessionproxy.example.com/session/minecraft/hasJoined?username=...&serverId=... 来进行鉴权,避免经常出现鉴权失败

示例(因为我是nginx-proxy-manager配置的反代,所以可能有些不准确,建议询问AI):
server {
listen 443 ssl;
server_name sessionproxy.example.com;

ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;

location = /session/minecraft/hasJoined/ { return 308 /session/minecraft/hasJoined; }

location ^~ /session/minecraft/hasJoined {
proxy_pass https://sessionserver.mojang.com$request_uri;
proxy_set_header Host sessionserver.mojang.com;
proxy_ssl_server_name on;
proxy_ssl_name sessionserver.mojang.com;
}

location / { return 404; }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant