Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
加了个反向代理地址的配置,当用户设置了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; }
}