即使 Mojang 的身份验证服务器宕机,也能让你正常游戏。 此外,它还改善了网络行为。
它是如何工作的?
- Mojang 的 Web 服务/API 的响应会被本地缓存一段时间。
如果发生宕机,则使用之前缓存的响应。
例如,这使得你的皮肤能够正确显示。 - 每个客户端都会本地存储(或生成如果不存在)一个密钥对,当 Mojang 的身份验证服务器宕机时,该密钥对将用作与服务器进行身份验证的回退方案(参见 公钥加密)。
请注意:- 服务器也必须安装此模组
- 你必须在过去 36 天内至少加入过一次该服务器
该模组对客户端和服务器都是可选的。
但是,如果一方缺少该模组,当 Mojang 的身份验证服务器/API 宕机时,将无法加入服务器。
用法
命令
你可以在安装了该模组的服务器上,使用 /authback 命令来管理你自己的或其他玩家(如果你是管理员)的公钥。
配置
客户端
你可以通过以下方式配置该模组:
选项 > 在线... > AuthBack...- 或者如果安装了 ModMenu:
模组 > AuthBack > 点击图标/设置
通用
配置动态加载自以下位置(按优先级从高到低排序)
- 环境变量
- 以
AUTHBACK_<variant>为前缀- 其中
variant是SERVER或CLIENT
- 其中
- 以
AUTHBACK_为前缀 - 所有属性均为大写,并使用
_代替.或-
- 以
- 系统属性
- 以
authback.<variant>为前缀- 其中
variant是server或client
- 其中
- 以
authback.为前缀
- 以
- 位于
.config/authback-<variant>.json中的配置文件- 其中
variant是server或client
- 其中
完整的配置选项列表
请注意,预配置的值通常开箱即用。
在进行修改时,你应该确切地知道自己在做什么。
通用(客户端和服务器)
| 属性 | 类型 | 默认值 | 备注 |
|---|---|---|---|
discovery-cache.default-reuse-minutes |
int |
120 (2h) |
Mojang API 的 discovery 端点的响应几乎从不更改。此选项指示模组重用最后保存的响应,持续指定的分钟数,而不是再次联系 API。使用缓存的响应要快得多,并且在频繁重启游戏时节省网络流量。 |
global-public-keys-cache.default-reuse-minutes |
int |
120 (2h) |
与上面的 discovery-cache 相同,但针对 global-public-keys。截至编写本文档时,这些密钥在过去 3 年多时间内未发生过更改。 |
game-profiles.delete-after-days |
int |
36 |
选择 36 天作为默认值,是因为当玩家更改其用户名时,该名称将在 37 天内不可用 |
game-profiles.max-cache-size |
int |
250 |
在缓存中保留的最大游戏档案数量。如果超出最大值,最旧的条目将被移除,直到列表降至配置最大值的 90%。 |
username-to-id-resolver.use-vanilla |
bool |
false |
使用原始的/“原版”用户名到 ID 解析器 |
username-to-id-resolver.expire-after-days |
int |
36 |
缓存条目被删除前的天数。 选择 36 天作为默认值,是因为当玩家更改其用户名时,该名称将在 37 天内不可用。 原版实现使用的是 1 个月。 |
username-to-id-resolver.refresh-before-expire-days |
int |
14 |
在过期前的天数,当缓存条目被访问时将会刷新。 |
username-to-id-resolver.max-cache-size |
int |
1000 |
在缓存中保留的用户名和 ID 的最大数量。如果超出最大值,最旧的条目将被移除,直到列表降至配置最大值的 90%。 |
username-to-id-resolver.resolve-offline-users-by-default |
bool |
true |
是否应缓存离线用户(例如未验证的账户)? 请注意
|
username-to-id-resolver.update-on-game-profile-fetch |
bool |
true |
获取游戏档案时:是否应将信息中继给用户名到 ID 解析器/缓存? 仅当需要时(例如未知的用户名/ID 或条目不存在)才会更新缓存 |
username-to-id-resolver.use-game-profile-cache |
bool |
true |
当所有主缓存失败时,使用 GameProfileCacheManager 作为二级缓存。 这种情况应该极少发生,但如果缓存损坏等情况下可能会发生 |
skip-extract-profile-action-types |
bool |
false |
调试选项 |
服务器
| 属性 | 类型 | 默认值 | 备注 |
|---|---|---|---|
keys.max-keys-per-player |
int |
3 |
每个玩家存储的公钥最大数量 |
keys.delete-after-unused-days |
int |
36 |
如果用户在此时间段内未使用公钥登录,该密钥将被删除。选择 36 天作为默认值是因为当玩家更改用户名时,旧名称将在 37 天内不可用 |
fallback-auth.allow-always |
bool |
true |
始终允许使用备用身份验证。如果只想在服务器无法在玩家登录期间与 Mojang API 通信时才允许备用身份验证,请设置为 false |
fallback-auth.rate-limit.requests-per-ip-per-minute |
int |
20 |
默认设置允许每 3 秒发起一次请求。如果值设置为 0 或更小,速率限制器将禁用 |
fallback-auth.rate-limit.bucket-size |
int |
1000 |
存储的 IP 地址数量(在内存中) |
fallback-auth.rate-limit.ignore-private-addresses |
bool |
true |
是否不对 私有 IP 地址 进行速率限制? |
fallback-auth.rate-limit.ipv6-network-prefix-bytes |
int |
8 |
IPv6 的网络前缀字节数(不是比特!)。默认值 8 对应 /64。 |
force-disable-enforce-secure-profile |
bool |
true |
强制禁用 enforce-secure-profile |
skip-old-user-conversion |
bool |
true |
跳过迁移 1.7.6(2014-04 发布)之前服务器使用的用户文件。这种情况极不可能需要,且涉及联系 Mojang API。因此默认跳过迁移 |
disable-legacy-query-handler |
bool |
true |
禁用传统/1.7 之前(2013-10 发布)的查询/心跳处理程序 |
log-connection-init-ips |
bool |
false |
记录所有初始化/开始连接到 INFO 级别的所有远程 IP |
客户端
所有特定于客户端的选项都可以在游戏选项 UI 中更改/描述(见上文)。
常见问题解答
我在哪里可以找到我的公钥?
公钥可以在以下位置找到/复制:
Options > Online... > AuthBack... > Key management- 或者如果安装了 ModMenu:
Mods > AuthBack > Click Icon/Settings > Key management
身份验证服务器宕机,我在服务器上安装了模组但无法加入
这是因为服务器不知道你的公钥。
你可以通过以下方式修复此问题:
- 确保你在不到一个月前登录过该服务器
- 这是因为在这种情况下将使用的
usercache.json中的条目将在一个月后过期
- 这是因为在这种情况下将使用的
- 确保你可以透过服务器控制台/RCON 运行命令
- 将模组添加到本地客户端/游戏中并启动它
- 然后从中复制公钥(详见上文)
- 然后在服务器上将该公钥与你的账户关联:
/authback public_key add name <yourName> <yourPublicKey>- 或
/authback public_key add id <yourUUID> <yourPublicKey>
你现在应该可以像往常一样登录了。
但是请注意,与配置文件相关的内容(如皮肤)将不会显示。
建议在故障结束后重启服务器,以正确加载现有的配置文件。
身份验证服务器宕机,我的朋友安装了模组但无法加入我的服务器
这是因为他们以前从未带着模组加入过。
如果你是管理员,你可以通过以下方式修复此问题:
- 告诉你的朋友使用模组启动游戏
- 并将他们的公钥(见上文“我在哪里可以找到我的公钥?”)发送给你
- 通过在服务器上运行
/authback public_key add name <yourFriendsPlayerName> <yourFriendsPublicKey>将公钥与他们在服务器上关联
我如何测试备用身份验证?
- 确保服务器知道你的公钥(你可以在服务器上通过
/authback public_key list检查) - 确保服务器上启用了
fallback-auth.allow-always(默认情况下应已启用) - 以离线模式启动客户端
- 在客户端选项中启用
Suppress any joinServer error - 你现在应该能够使用备用身份验证加入服务器。请查看日志以获取详细信息。
模组将其数据存储在哪里?
在游戏目录(例如 %APPDATA%\.minecraft)内的 .mods\authback 目录中。
Allows you to play as normal even when Mojang's authentication servers are down. Additionally also improves the networking behavior.
How does it work?
- The responses from Mojang's webservices/API are cached locally for some time.
If an outage occurs the previously cached responses are used.
For example this allows for your skin to be displayed properly. - Every client locally stores (or generates if not present) a keypair, which will be used as a fallback to authenticate with servers when Mojang's authentication servers are down (see Public-key cryptography).
Please note:- The server also needs to have the mod installed
- You must have already joined the server once (during the past 36 days)
The mod is optional for the client and server.
However if one side lacks the mod joining a server will be impossible when Mojang's authentication servers/APIs are down.
Usage
Command
You can use the /authback command on servers with the mod to manage your public keys or those of other players if you are an admin.
Configuration
Client
You can configure the mod via
Options > Online... > AuthBack...- or if ModMenu is installed:
Mods > AuthBack > Click Icon/Settings
General
The configuration is dynamically loaded from (sorted by highest priority)
- Environment variables
- prefixed with
AUTHBACK_<variant>- where
variantis eitherSERVERORCLIENT
- where
- prefixed with
AUTHBACK_ - all properties are in UPPERCASE and use
_instead of.or-
- prefixed with
- System properties
- prefixed with
authback.<variant>- where
variantis eitherserverORclient
- where
- prefixed with
authback.
- prefixed with
- A configuration file located in
.config/authback-<variant>.json- where
variantis eitherserverORclient
- where
Full list of configuration options
Please note that the preconfigured values usually work out of the box.
You should know exactly what you're doing when doing modifications.
Common (Client and Server)
| Property | Type | Default | Notes |
|---|---|---|---|
discovery-cache.default-reuse-minutes |
int |
120 (2h) |
The response for the discovery endpoint of Mojang's API barely ever changes. This option instructs the mod to re-use the last saved response for the specified amount of minutes instead of contacting the API again. Using the cached response is a lot faster and saves network traffic during frequent game restarts. |
global-public-keys-cache.default-reuse-minutes |
int |
120 (2h) |
Same as discovery-cache above but for global-public-keys. As of writing this documentation the keys were not changed in the past 3+ years. |
game-profiles.delete-after-days |
int |
36 |
36 days was choosen as the default because when a player changes their username the name will be unavailable for 37 days |
game-profiles.max-cache-size |
int |
250 |
Maximum amount of game profiles to keep in the cache. If the size exceeds the maximum the oldest entries will be removed until the list is at 90% of the configured maximum. |
username-to-id-resolver.use-vanilla |
bool |
false |
Use the original/"vanilla" username-to-id resolver |
username-to-id-resolver.expire-after-days |
int |
36 |
Days after which the cache entry will be deleted. 36 days was choosen as the default because when a player changes their username the name will be unavailable for 37 days. The vanilla implementation uses 1 month. |
username-to-id-resolver.refresh-before-expire-days |
int |
14 |
Days before the expiration when a cached entry will be refreshed when it's accessed. |
username-to-id-resolver.max-cache-size |
int |
1000 |
Maximum amount of usernames and ids to keep in the cache. If the size exceeds the maximum the oldest entries will be removed until the list is at 90% of the configured maximum. |
username-to-id-resolver.resolve-offline-users-by-default |
bool |
true |
Should offline users (e.g. unvalidated accounts) be cached? Please note
|
username-to-id-resolver.update-on-game-profile-fetch |
bool |
true |
When a gameprofile is fetched: Should the information be relayed to the username-to-id-resolver/cache? The cache will only be updated if required (e.g. unknown username/id or non-existing entry) |
username-to-id-resolver.use-game-profile-cache |
bool |
true |
Uses GameProfileCacheManager as secondary cache when all primary caches fail. Usage should be extremely rare but can happen if the cache was e.g. corrupted |
skip-extract-profile-action-types |
bool |
false |
Debug-Option |
Server
| Property | Type | Default | Notes |
|---|---|---|---|
keys.max-keys-per-player |
int |
3 |
Maximum amount of public keys to store per player |
keys.delete-after-unused-days |
int |
36 |
If a user does not login with a public key for this amount of time the key will be deleted. 36 days was choosen as the default because when a player changes their username the name will be unavailable for 37 days |
fallback-auth.allow-always |
bool |
true |
Always allows the use of fallback authentication. Set to false if you only want to allow fallback authentication when the server can't communicate with the Mojang's API during a player login |
fallback-auth.rate-limit.requests-per-ip-per-minute |
int |
20 |
The default allows for requests every 3s. If the value is set to 0 or less the rate limiter will be disabled |
fallback-auth.rate-limit.bucket-size |
int |
1000 |
Amount of IP addresses to store (in memory) |
fallback-auth.rate-limit.ignore-private-addresses |
bool |
true |
Should private IP addresses NOT be rate limited? |
fallback-auth.rate-limit.ipv6-network-prefix-bytes |
int |
8 |
Network prefix bytes (not bits!) for IPv6. The default 8 resolves to /64. |
force-disable-enforce-secure-profile |
bool |
true |
Forces enforce-secure-profile to be disabled |
skip-old-user-conversion |
bool |
true |
Skips the migration of user files used by servers before 1.7.6 (released 2014-04). It's extremely unlikely that this is needed by a server and requires contacting Mojang's API. Therefore the migration is skipped by default |
disable-legacy-query-handler |
bool |
true |
Disables the legacy/pre 1.7 (released 2013-10) query/ping handler |
log-connection-init-ips |
bool |
false |
Logs all remote IPs that initialize/start a connection to level INFO |
Client
All client specific options can be changed / are described in the game options UI (see above).
FAQ
Where can I find my public key?
The public key can be found/copied under
Options > Online... > AuthBack... > Key management- or if ModMenu is installed:
Mods > AuthBack > Click Icon/Settings > Key management
The authentification servers are down, I installed the mod on my server but I can't join
This is because the server doesn't know your public key.
You can fix this in the following way:
- Make sure that you logged onto the server less than a month ago
- that is because the entries in
usercache.json- which will be used in such a case - will expire after a month
- that is because the entries in
- Make sure that you can run commands via the server console/RCON
- Add the mod to your local client/game and launch it
- and copy the public key from there (see above for details)
- Then associate the public key on the server with your account:
/authback public_key add name <yourName> <yourPublicKey>- or
/authback public_key add id <yourUUID> <yourPublicKey>
You should now be able to log in as usual.
Note however that profile related content like skins will not not be displayed.
It's also recommended to restart the server once the outage is over to correctly load existing profiles.
The authentification servers are down, my friend got the mod but they can't join my server
This is because they never joined with the mod before.
You can fix this in the following way if you are an Admin:
- Tell your friend to launch the game with the mod
- and to send their public key (see "Where can I find my public key?" above) to you
- Associate the public key on the server with them by running
/authback public_key add name <yourFriendsPlayerName> <yourFriendsPublicKey>
How can I test fallback authentication?
- Ensure that the server knows your public key (you can check that on the server using
/authback public_key list) - Ensure that
fallback-auth.allow-alwaysis enabled on the server (it should be enabled by default) - Start the client in offline mode
- Enable
Suppress any joinServer errorin the client options - You should now be able to join the server using fallback authentication. Check the log for details.
Where does the mod store it's data?
In the game directory (e.g. %APPDATA%\.minecraft) inside the .mods\authback directory.
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AuthBack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
评论 0
登录后参与评分
还没有评论,来抢沙发吧