mirror of
https://github.com/TheWhiteDog9487/ServerAddressSpaceFix.git
synced 2025-04-20 02:42:10 +08:00
Compare commits
No commits in common. "44e81e4eed0a264451ed144b83ca22376aa8cc26" and "cb7a0f57e3482125474a9cad7d7aad27cbcb1ef0" have entirely different histories.
44e81e4eed
...
cb7a0f57e3
9
.gitattributes
vendored
9
.gitattributes
vendored
@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
37
.github/workflows/build.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
# 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/
|
|
38
README.md
38
README.md
@ -6,27 +6,23 @@
|
|||||||
如果你在“添加服务器”或者“直接连接”界面输入的服务器地址首尾或者中间包含空格,这个模组会自动帮你把它去掉。
|
如果你在“添加服务器”或者“直接连接”界面输入的服务器地址首尾或者中间包含空格,这个模组会自动帮你把它去掉。
|
||||||
以防止上面提到的“未知的主机”Bug的出现。
|
以防止上面提到的“未知的主机”Bug的出现。
|
||||||
|
|
||||||
<details>
|
# 为什么会有这个模组
|
||||||
<summary>为什么会有这个模组</summary>
|
前几个月吧,我想玩一个服务器。从那个服务器的官网把地址复制下来,粘贴到“服务器地址”中保存之后,居然出现了“未知的主机”。
|
||||||
<pre>
|
莫慌,这显然是DNS没查找到对应的地址,先Ping一下。
|
||||||
前几个月吧,我想玩一个服务器。从那个服务器的官网把地址复制下来,粘贴到“服务器地址”中保存之后,居然出现了“未知的主机”。
|
Ping能找到域名对应的地址,然后我又怀疑是长城又在搞什么,用站长之家的工具测了一下,所有的结果和我的都是一样的啊。
|
||||||
莫慌,这显然是DNS没查找到对应的地址,先Ping一下。
|
这就比较奇怪了。
|
||||||
Ping能找到域名对应的地址,然后我又怀疑是长城又在搞什么,用站长之家的工具测了一下,所有的结果和我的都是一样的啊。
|
然后在折腾了一段时间之后,我发现了问题。
|
||||||
这就比较奇怪了。
|
**我复制到的服务器地址的末尾,有一个空格。**
|
||||||
然后在折腾了一段时间之后,我发现了问题。
|
这就很难绷了啊,再继续折腾了一段时间,确认问题能够稳定复现之后,我去漏洞追踪器提交了一个Bug。
|
||||||
<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“,我是不能接受的。
|
||||||
既然你的地址是String类,那在后面调用一下trim方法很难吗?
|
**所以,有了这个模组。**
|
||||||
而且,我作为一个玩家,你跟我说,“这都是你自己不小心,这根本就不能算是个Bug“,我是不能接受的。
|
|
||||||
<strong>所以,有了这个模组。</strong>
|
|
||||||
</pre>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
# 已知问题
|
# 已知问题
|
||||||
所有已知问题均被修复,如果有新的欢迎通知我。
|
所有已知问题均被修复,如果有新的欢迎通知我。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user