Giter Site home page Giter Site logo

blessing's Introduction

GitHub Matrics

blessing's People

Contributors

fallencrystal avatar renovate[bot] avatar shizoukia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

blessing's Issues

IPTables & IPSet功能测试

我在 7b8c2c2 提交中引入了iptables & ipset支持 但我目前没有合适的压力测试和众多的ip源(我有但我不清楚它们甚至能不能达到服务器). 故此打开issue 在此处查看关于此功能的进展

如果您想测试 请联系我以获得构建包. 此功能可能有一定的不稳定性 使用前请确保您有备用手段回滚MoeFilter对您的ipset&iptables策略所做的更改.

非紧急情况下不要强制关闭服务器 这会导致iptables无法被正确卸载

todo:

  • 模块(是否)工作测试
  • 多线程异步命令线程池分配情况 (需要在5ms内涌入至少到达服务器核心数量的ip以及更高的cps!)
  • 策略问题

IPTables & IPSet 是硬编码的 我还不是很熟悉它们 如果您发现了语法错误或者可以改善的地方 请打开一个拉取请求. 初始化命令和卸载命令位于 OSFirewallLoader.kt.

为了避免因为iptables以及ipset消耗殆尽的问题 我们需要更高级的scheduler和自动分配其重复延迟. 这可能会在以后会进一步实施 但实际上目前mcstorm已不可用 并且我不知道能从其它地方找到更好的压力源进行测试.

MessageUtil v2

所有消息使用数据包和缓存并添加跨版本支持. 以达到真正高性能的目的.

Decoration cannot be serialized

How to reproduce:

MixedComponent("<aqua> <b>Test</b> <i>Test</i> <u>Test</u> <obf>Test</obf>".toComponent())

Send it to the client. The client will be disconnect:

written from json:
io.netty.handler.codec.DecoderException: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 5

written from nbt:
Failed to decode: No matching codec found; No matching codec found; No matching codec found; List must have contents\n{color:"aqua",extra:[{},text:"Test"},{"":" "},{},{text:"Test"},{"":" "},{}],text:"Test"

Limbo captcha

在limbo内发送地图验证码以执行检查 同时增强Chcker逻辑 使其兼容多检查并发.

  • 制作新的检查管理器
  • 验证码绘制
  • 发送
  • 包装成数据包的验证码 而不是单纯的地图数据

缓存的潜在慢速内存泄漏风险

此条目需要更多信息
已知可能会导致内存泄漏的类和 方法/Field (嫌疑顺序从上到下):

  • catmoe.fallencrystal.moefilter.common.check.misc.ProxyCheck : increase()
    • catmoe.fallencrystal.moefilter.api.proxy : cache
    • catmoe.fallencrystal.moefilter.common.firewall.Firewall : cache
    • catmoe.fallencrystal.moefilter.common.firewall.Throttler : ipCache
  • catmoe.fallencrystal.moefilter.common.firewall.system.ExecutorHelper : init()
    • catmoe.fallencrystal.moefilter.common.firewall.system.ExecutorHelper : queue
    • catmoe.fallencrystal.moefilter.common.firewall.system.ExecutorHelper : activeThread
    • catmoe.fallencrystal.moefilter.common.firewall.system.ExecutorHelper : intThread
  • catmoe.fallencrystal.moefilter.common.state.StateManager : attackEndedDetector()

与JPremium的兼容性

jpremium总是使用反射来获取InitialHandler中的uniqueid (uuid) 但MoeFilter自己的InitialHandler没有这个值
我不确定能不能修补它 我期望JPremium自己能修补这点.

如果您正在被此问题困扰 请查看最后一条comment

DosHacker Free压测方案可绕过

使用MoeFiler DosHacker Free压测方案 虽然防住了 但是服务器直接崩溃 玩家无法进入
家宽 5900x 但是在压测的时候宽带是够的 压测了一段时间会卡 然后崩溃

(Experimental) Implement Motd caching on a standalone PacketHandler.

Try to implement motd caching directly without implementing limbo. (Send motd packets directly on PacketHandler. No need to call listener is required. Even do not need to go through the InitialHandler)

TODO:

  • implement it
  • configurable avatar clipping. just like the original motd cache manager
  • test it in a strict environment (with a large number of requests or with very little memory allocated)

[MoeTranslation] How to translation `isProxyCommand` and `isCommand`

thats how it goes.
im currently having some difficulties. velocity's ChatEvent does not provide which category the message belongs to (chat, command, agent, etc..). But BungeeCord is different. BungeeCord will offer 'isProxyCommand' and 'isCommand'. so just need to play some logic games. we can then know who the audience for this message is.
although BungeeCord doesnt actually implement them either(very simple judgment. just like they build proxies do). this is extremely dependent on the current platform. implementing them requires complex processing. so im not quite sure if im worth doing those.

*: the reason this event is really hard to implement is to get the command and its permissions. because if the player doesnt have permissions. their commands will be directly send to the backend.

[Limbo] Unexpected packet sended for 1.18.2+ (PacketJoinGame)

Client-side:

Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException:
Packet 0/40 (ClientboundLoginPacket) was larger than I expected, found 3968 bytes extra whilst reading packet 40 (0x28)

Server-side:

[MoeLimbo] Decoding packet 0x00 (PacketHandshake) for version UNDEFINED with 15 bytes length
[MoeLimbo] Decoding packet 0x00 (PacketHandshake) for version UNDEFINED with 15 bytes length
[MoeLimbo] Processing Handshake: Version: V1_20, State: LOGIN, Connection from 127.0.0.1:25577
[MoeLimbo] Encoder mappings refreshed. Now switch to state LOGIN for version V1_20
[MoeLimbo] Decoder mappings refreshed. Now switch to state LOGIN for version V1_20
[MoeLimbo] Decoding packet 0x00 (PacketInitLogin) for version V1_20 with 27 bytes length
[MoeLimbo] Processing Handshake: Version: V1_20, State: STATUS, Connection from 127.0.0.1:25577
[MoeLimbo] Encoder mappings refreshed. Now switch to state STATUS for version V1_20
[MoeLimbo] Decoder mappings refreshed. Now switch to state STATUS for version V1_20
[MoeLimbo] Decoding packet 0x00 (PacketStatusRequest) for version V1_20 with 0 bytes length
[MoeLimbo] Encoding packet 0x02 (PacketLoginSuccess) for version V1_20 with 27 bytes length
[MoeLimbo] Encoder mappings refreshed. Now switch to state PLAY for version V1_20
[MoeLimbo] Decoder mappings refreshed. Now switch to state PLAY for version V1_20
[MoeLimbo] Encoding packet 0x28 (PacketJoinGame) for version V1_20 with 41055 bytes length
[MoeLimbo] Encoding packet 0x00 (PacketPingResponse) for version V1_20 with 149 bytes length
[MoeLimbo] Decoding packet 0x01 (PacketStatusPing) for version V1_20 with 8 bytes length
[MoeLimbo] Encoding packet 0x34 (PacketPlayerAbilities) for version V1_20 with 10 bytes length
[MoeLimbo] Encoding packet 0x3C (PacketServerPositionLook) for version V1_20 with 39 bytes length
[MoeLimbo] Encoding packet 0x50 (PacketSpawnPosition) for version V1_20 with 13 bytes length
[MoeLimbo] Encoding packet 0x17 (PacketPluginMessage) for version V1_20 with 39 bytes length
[MoeLimbo] Encoding packet 0x24 (PacketEmptyChunk) for version V1_20 with 484 bytes length
[MoeLimbo] Encoding packet 0x23 (PacketKeepAlive) for version V1_20 with 9 bytes length
[MoeLimbo] Client disconnected.

清理代码

我有计划清理代码 让代码变得简洁可观 就像 1ac547e 提交所做那样 试图用更少的代码实现更多的功能.

一些代码例如就像反面模式中的一些例子. 但我的主要目标仍然是上面所说.

API接口不建议进行大更改. 除非更改能够保持与之前接口的兼容性.

虽然这基本上就是 长火车 但还是仍然欢迎任何对代码简洁化或增强的拉取请求(pr)

Block hit platform

Packet:

  • Block supported Stone, Barrier
  • Supported to 1.8 (better with 1.7) - 1.20.2

Antibot module:

  • Replace the old dirty move check.
  • Multiple checks.
  • Flagless

A bunch of questions come together

The following content is written using Chinese. If you happen to need to read the content. Please use a translator.

这里是一堆问题集合在一起的问题. 它们可能有关目前MoeFilter会引起的插件错误 以及替代或解决方案.

如果您认为您要修正一些内容 或添加某些内容 请在 此处 打开一个新问题

java.lang.IllegalArugmentException: Cannot convert mixed JsonArray to Tag

 java.lang.IllegalArgumentException: Cannot convert mixed JsonArray to Tag
       at catmoe.fallencrystal.moefilter.network.limbo.compat.message.NbtMessage$Companion.fromJson(NbtMessage.kt:108)
       at catmoe.fallencrystal.moefilter.network.limbo.compat.message.NbtMessage$Companion.fromJson(NbtMessage.kt:75)
       at catmoe.fallencrystal.moefilter.network.limbo.compat.message.NbtMessage$Companion.create(NbtMessage.kt:46)
       at catmoe.fallencrystal.moefilter.network.limbo.packet.s2c.PacketDisconnect.setMessage(PacketDisconnect.kt:32)
       at catmoe.fallencrystal.moefilter.network.common.kick.FastDisconnect.getCacheReason(FastDisconnect.kt:111)
       at catmoe.fallencrystal.moefilter.network.common.kick.FastDisconnect.initMessages(FastDisconnect.kt:99)
       at catmoe.fallencrystal.moefilter.network.common.kick.FastDisconnect.reload(FastDisconnect.kt:87)
       at catmoe.fallencrystal.moefilter.common.config.ReloadConfig.reloadConfig(ReloadConfig.kt:82)
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.base/java.lang.reflect.Method.invoke(Method.java:568)
       at catmoe.fallencrystal.translation.event.EventManager.callEvent(EventManager.kt:90)
       at catmoe.fallencrystal.moefilter.util.plugin.AsyncLoader.registerListener(AsyncLoader.kt:196)
       at catmoe.fallencrystal.moefilter.util.plugin.AsyncLoader.load$lambda$2(AsyncLoader.kt:117)
       at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:66)
       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
       at java.base/java.lang.Thread.run(Thread.java:833)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Warning

Renovate failed to look up the following dependencies: Failed to look up maven package net.miaomoe.blessing:protocol, Failed to look up maven package net.miaomoe.blessing:nbt.

Files affected: fallback/pom.xml, protocol/pom.xml


Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/test-build.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-java v4
  • actions/upload-artifact v4
maven
bungee/pom.xml
  • org.apache.maven.plugins:maven-shade-plugin 3.5.2
  • net.kyori:adventure-text-minimessage 4.16.0
  • net.kyori:adventure-nbt 4.16.0
  • net.kyori:adventure-platform-bungeecord 4.3.2
  • com.github.ben-manes.caffeine:caffeine 2.9.3
  • io.github.waterfallmc:waterfall-api 1.20-R0.3-SNAPSHOT
config/pom.xml
  • org.apache.maven.plugins:maven-compiler-plugin 3.12.1
  • org.apache.maven.plugins:maven-shade-plugin 3.5.2
  • com.typesafe:config 1.4.3
  • org.projectlombok:lombok 1.18.30
  • org.jetbrains:annotations 24.1.0
event/pom.xml
  • org.apache.maven.plugins:maven-shade-plugin 3.5.2
  • com.github.ben-manes.caffeine:caffeine 2.9.3
fallback/pom.xml
  • org.apache.maven.plugins:maven-shade-plugin 3.5.2
  • net.miaomoe.blessing:protocol 0.0.1
  • net.miaomoe.blessing:nbt 0.0.1
  • net.kyori:adventure-nbt 4.16.0
  • net.kyori:adventure-text-minimessage 4.16.0
  • net.kyori:adventure-text-serializer-legacy 4.16.0
  • net.kyori:adventure-text-serializer-gson 4.16.0
  • io.netty:netty-all 4.1.107.Final
  • com.google.code.gson:gson 2.10.1
nbt/pom.xml
  • org.apache.maven.plugins:maven-shade-plugin 3.5.2
  • net.kyori:adventure-text-minimessage 4.16.0
  • net.kyori:adventure-text-serializer-gson 4.16.0
  • net.kyori:adventure-nbt 4.16.0
  • com.google.code.gson:gson 2.10.1
placeholder/pom.xml
  • org.apache.maven.plugins:maven-shade-plugin 3.5.2
  • com.github.ben-manes.caffeine:caffeine 2.9.3
plugin/pom.xml
  • org.apache.maven.plugins:maven-shade-plugin 3.5.2
  • net.kyori:adventure-text-minimessage 4.16.0
  • net.kyori:adventure-nbt 4.16.0
  • net.kyori:adventure-platform-bungeecord 4.3.2
  • com.github.ben-manes.caffeine:caffeine 2.9.3
  • com.typesafe:config 1.4.3
pom.xml
  • org.jetbrains.kotlin:kotlin-maven-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.23
  • org.jetbrains.kotlin:kotlin-test 1.9.23
  • org.jetbrains.kotlin:kotlin-jps-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-maven-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.23
  • org.jetbrains.kotlin:kotlin-test 1.9.23
  • org.jetbrains.kotlin:kotlin-jps-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-maven-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.23
  • org.jetbrains.kotlin:kotlin-test 1.9.23
  • org.jetbrains.kotlin:kotlin-jps-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-maven-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.23
  • org.jetbrains.kotlin:kotlin-test 1.9.23
  • org.jetbrains.kotlin:kotlin-jps-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-maven-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.23
  • org.jetbrains.kotlin:kotlin-test 1.9.23
  • org.jetbrains.kotlin:kotlin-jps-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.23
  • org.jetbrains.kotlin:kotlin-test 1.9.23
  • org.jetbrains.kotlin:kotlin-jps-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-maven-plugin 1.9.23
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.23
  • org.jetbrains.kotlin:kotlin-test 1.9.23
  • org.jetbrains.kotlin:kotlin-jps-plugin 1.9.23
protocol/pom.xml
  • org.apache.maven.plugins:maven-shade-plugin 3.5.2
  • net.miaomoe.blessing:nbt 0.0.1
  • net.kyori:adventure-nbt 4.16.0
  • net.kyori:adventure-text-minimessage 4.16.0
  • net.kyori:adventure-text-serializer-legacy 4.16.0
  • net.kyori:adventure-text-serializer-gson 4.16.0
  • io.netty:netty-all 4.1.107.Final
  • com.github.ben-manes.caffeine:caffeine 2.9.3

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.