9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-31 12:56:28 +00:00

添加self host速率限制

This commit is contained in:
XiaoMoMi
2025-11-21 23:45:23 +08:00
parent c48ad4bbf3
commit 8ef24a336f
9 changed files with 751 additions and 72 deletions

View File

@@ -193,15 +193,17 @@ resource-pack:
ip: "localhost"
port: 8163
protocol: "http"
# Blocks all requests from non-Minecraft clients.
deny-non-minecraft-request: true
# Generates a single-use, time-limited download link for each player.
one-time-token: true
rate-limitation-per-ip:
enable: true
max-requests: 10
reset-interval: 30
token-bucket:
enable: true
qps: 1000
rate-limiting:
# Maximum bandwidth per second to prevent server instability for other players during resource pack downloads
max-bandwidth-per-second: 5_000_000 # 5MB/s
# Minimum guaranteed download speed per player to ensure acceptable download performance during concurrent downloads
min-download-speed-per-player: 50_000 # 50KB/s
# Prevent a single IP from sending too many resource pack download requests in a short time period
qps-per-ip: 5/60 # 5 requests per 60 seconds
item:
# [Premium Exclusive]
@@ -550,6 +552,12 @@ chunk-system:
remove: []
convert: {}
#client-optimization:
# # Using server-side ray tracing algorithms to hide certain entities and reduce client-side rendering pressure.
# entity-culling:
# enable: false
# whitelist-entities: []
# Enables or disables debug mode
debug:
common: false

View File

@@ -83,15 +83,18 @@ templates:
# any leaves block
default:block_state/leaves:
template: default:block_state/__leaves__
arguments::auto_state: leaves
arguments:
auto_state: leaves
# tintable leaves block
default:block_state/tintable_leaves:
template: default:block_state/__leaves__
arguments::auto_state: tintable_leaves
arguments:
auto_state: tintable_leaves
# non-tintable leaves block
default:block_state/non_tintable_leaves:
template: default:block_state/__leaves__
arguments::auto_state: non_tintable_leaves
arguments:
auto_state: non_tintable_leaves
# trapdoor block
default:block_state/trapdoor:
properties: