Compare commits

...

2 Commits

Author SHA1 Message Date
44e81e4eed Fabric模组模板那边新的文件 2025-03-26 10:10:52 +08:00
TheWhiteDog9487
8c32ac9cad Update README.md 2025-03-26 10:10:31 +08:00
3 changed files with 67 additions and 17 deletions

9
.gitattributes vendored Normal file
View File

@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf
# These are Windows script files and should use crlf
*.bat text eol=crlf

37
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,37 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.
name: build
on: [pull_request, push]
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS
]
runs-on: ubuntu-22.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/

View File

@ -6,23 +6,27 @@
如果你在“添加服务器”或者“直接连接”界面输入的服务器地址首尾或者中间包含空格,这个模组会自动帮你把它去掉。
以防止上面提到的“未知的主机”Bug的出现。
# 为什么会有这个模组
前几个月吧,我想玩一个服务器。从那个服务器的官网把地址复制下来,粘贴到“服务器地址”中保存之后,居然出现了“未知的主机”。
莫慌这显然是DNS没查找到对应的地址先Ping一下。
Ping能找到域名对应的地址然后我又怀疑是长城又在搞什么用站长之家的工具测了一下所有的结果和我的都是一样的啊。
这就比较奇怪了。
然后在折腾了一段时间之后,我发现了问题。
**我复制到的服务器地址的末尾,有一个空格。**
这就很难绷了啊再继续折腾了一段时间确认问题能够稳定复现之后我去漏洞追踪器提交了一个Bug。
结果您猜怎么着?
![漏洞追踪器上提的问题](https://github.com/TheWhiteDog9487/ServerAddressSpaceFix/blob/%E4%B8%BB%E8%A6%81/%E5%9B%BE%E7%89%87/Snipaste_2023-10-18_15-22-39.png?raw=true)
![下面的评论](https://github.com/TheWhiteDog9487/ServerAddressSpaceFix/blob/%E4%B8%BB%E8%A6%81/%E5%9B%BE%E7%89%87/Snipaste_2023-10-18_15-22-47.png?raw=true)
![更早的一个问题报告](https://github.com/TheWhiteDog9487/ServerAddressSpaceFix/blob/%E4%B8%BB%E8%A6%81/%E5%9B%BE%E7%89%87/Snipaste_2023-10-18_15-22-57.png?raw=true)
我英语完全不行,就没继续说下去了,问题描述都是用翻译写的。
但是吧,我打心里觉得这事多少有点离谱。
既然你的地址是String类那在后面调用一下trim方法很难吗
而且我作为一个玩家你跟我说“这都是你自己不小心这根本就不能算是个Bug“我是不能接受的。
**所以,有了这个模组。**
<details>
<summary>为什么会有这个模组</summary>
<pre>
前几个月吧,我想玩一个服务器。从那个服务器的官网把地址复制下来,粘贴到“服务器地址”中保存之后,居然出现了“未知的主机”。
莫慌这显然是DNS没查找到对应的地址先Ping一下。
Ping能找到域名对应的地址然后我又怀疑是长城又在搞什么用站长之家的工具测了一下所有的结果和我的都是一样的啊。
这就比较奇怪了。
然后在折腾了一段时间之后,我发现了问题。
<strong>我复制到的服务器地址的末尾,有一个空格。</strong>
这就很难绷了啊再继续折腾了一段时间确认问题能够稳定复现之后我去漏洞追踪器提交了一个Bug。
结果您猜怎么着?
<img src="https://github.com/TheWhiteDog9487/ServerAddressSpaceFix/blob/%E4%B8%BB%E8%A6%81/%E5%9B%BE%E7%89%87/Snipaste_2023-10-18_15-22-39.png?raw=true" alt="漏洞追踪器上提的问题" srcset="">
<img src="https://github.com/TheWhiteDog9487/ServerAddressSpaceFix/blob/%E4%B8%BB%E8%A6%81/%E5%9B%BE%E7%89%87/Snipaste_2023-10-18_15-22-47.png?raw=true" alt="下面的评论" srcset="">
<img src="https://github.com/TheWhiteDog9487/ServerAddressSpaceFix/blob/%E4%B8%BB%E8%A6%81/%E5%9B%BE%E7%89%87/Snipaste_2023-10-18_15-22-57.png?raw=true" alt="更早的一个问题报" srcset="">
我英语完全不行,就没继续说下去了,问题描述都是用翻译写的。
但是吧,我打心里觉得这事多少有点离谱。
既然你的地址是String类那在后面调用一下trim方法很难吗
而且我作为一个玩家你跟我说“这都是你自己不小心这根本就不能算是个Bug“我是不能接受的。
<strong>所以,有了这个模组。</strong>
</pre>
</details>
# 已知问题
所有已知问题均被修复,如果有新的欢迎通知我。