JustEnoughSkins
JustEnoughSkins 是一个 Velocity 插件,它在配置文件请求阶段检查玩家的皮肤 textures 属性。具有有效 Mojang 签名的纹理将保持不变,而未签名或无效的皮肤纹理则通过 MineSkin API 重新签名并缓存,以避免重复请求。
配置文件
首次启动时,插件会创建:
plugins/justenoughskins/config.toml
默认配置示例:
# 启用调试日志记录。
# false:推荐用于正常使用。
# true:记录皮肤 URL、缓存键、签名时间等详细信息以便故障排除。
Debug = false
# MineSkin API 端点。
# 默认情况下,插件请求 https://api.mineskin.org/v2/generate。
MineSkinApi = "https://api.mineskin.org"
# MineSkin API 密钥。
# 在 https://account.mineskin.org/ 注册以获取一个。
# 空值仍然有效,但请求可能会受到更严格的速率限制。
# 有效的密钥通常能提供更稳定的配额和权限。
# 使用披风需要拥有相应权限的密钥。
ApiKey = ""
# 配置文件请求期间等待签名的最长时间(秒)。
# 3.0:最多等待 3 秒,使新皮肤更有可能在首次登录时应用。
# 1.0:减少等待时间,优先保证登录速度;超时后,当前请求不会等待签名结果。
# <= 0:同步运行完整的签名流程,无后台超时。缓慢或不可用的 MineSkin 服务可能会导致明显的登录延迟。
WaitingTime = 3.0
# 皮肤生成过程中发送的披风参数。
# 空值:不请求披风。
# 非空值:将其作为披风字段发送给 MineSkin。
# MineSkin API 密钥必须支持所请求的披风功能,否则生成可能会失败。
Cape = ""
# 允许用于需要重新签名的原始皮肤 URL 的 URL 方案。
# 默认情况下,仅允许 https。
AllowedSchemes = ["https"]
# 允许用于需要重新签名的原始皮肤 URL 的域名。
# 仅当方案和域名均被允许时,插件才会下载皮肤并将其发送到 MineSkin。
# 域名必须完全匹配,例如 ["textures.minecraft.net"]。
# 空列表意味着不会重新签名任何未签名或无效的外部皮肤 URL。
AllowedDomains = []
URL 白名单
具有有效 Mojang 签名的纹理仍会被直接接受。白名单仅在纹理未签名或签名无效且需要重新签名时进行检查。
原始皮肤 URL 必须同时满足以下两个规则:
- 其方案列在
AllowedSchemes 中。
- 其域名列在
AllowedDomains 中。
不在白名单中的 URL 将被拒绝。它们不会被下载,也不会提交给 MineSkin。
缓存
插件根据原始皮肤 URL 计算缓存键,并将 MineSkin 的已签名纹理结果存储在:
plugins/justenoughskins/cache/
当再次出现相同的皮肤 URL 时,插件会优先使用缓存,以减少对 MineSkin 的请求次数和降低登录延迟。
重载
Velocity 代理重载后,插件会重新加载 config.toml。现有的缓存条目不会自动清除。
JustEnoughSkins
JustEnoughSkins is a Velocity plugin that checks the player's skin textures property during the profile request stage. Textures with valid Mojang signatures are kept as is, while unsigned or invalid textures are re-signed through the MineSkin API and cached to avoid repeated requests.
Configuration File
On first startup, the plugin creates:
plugins/justenoughskins/config.toml
Default configuration example:
# Enables debug logging.
# false: recommended for normal use.
# true: logs skin URLs, cache keys, signing time, and other details for troubleshooting.
Debug = false
# MineSkin API endpoint.
# By default, the plugin requests https://api.mineskin.org/v2/generate.
MineSkinApi = "https://api.mineskin.org"
# MineSkin API key.
# Register at https://account.mineskin.org/ to get one.
# Empty value still works, but requests may hit stricter rate limits.
# A valid key usually provides more stable quota and permissions.
# Using Cape requires a key with the required permission.
ApiKey = ""
# Maximum time to wait for signing during the profile request, in seconds.
# 3.0: wait up to 3 seconds, making the new skin more likely to apply on first login.
# 1.0: wait less and prioritize login speed; on timeout, the current request will not wait for the signing result.
# <= 0: run the full signing flow synchronously with no background timeout. Slow or unavailable MineSkin service can noticeably delay login.
WaitingTime = 3.0
# Cape parameter sent during skin generation.
# Empty value: do not request a cape.
# Non-empty value: send it as the cape field to MineSkin.
# The MineSkin API key must support the requested cape capability, otherwise generation may fail.
Cape = ""
# URL schemes allowed for original skin URLs that need re-signing.
# By default, only https is allowed.
AllowedSchemes = ["https"]
# URL domains allowed for original skin URLs that need re-signing.
# The plugin downloads the skin and sends it to MineSkin only when both the scheme and domain are allowed.
# Domains must match exactly, for example ["textures.minecraft.net"].
# Empty list means no unsigned or invalid external skin URL will be re-signed.
AllowedDomains = []
URL Allowlist
Textures with valid Mojang signatures are still accepted as is. The allowlist is checked only when a texture is unsigned or has an invalid signature and needs to be re-signed.
The original skin URL must satisfy both rules:
- Its scheme is listed in
AllowedSchemes.
- Its domain is listed in
AllowedDomains.
URLs outside the allowlist are rejected. They are not downloaded and are not submitted to MineSkin.
Cache
The plugin calculates a cache key from the original skin URL and stores MineSkin's signed texture result under:
plugins/justenoughskins/cache/
When the same skin URL appears again, the plugin uses the cache first to reduce MineSkin requests and login latency.
Reloading
After a Velocity proxy reload, the plugin reloads config.toml. Existing cache entries are not cleared automatically.
评论 0
登录后参与评分
还没有评论,来抢沙发吧