Skip to content

Commit 76024ce

Browse files
committed
fix: Minor fixes
1 parent da6f5b6 commit 76024ce

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ZBProxy
22
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Flayou233%2FZBProxy.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2Flayou233%2FZBProxy?ref=badge_small)
3-
[![Go Reference](https://pkg.go.dev/badge/github.com/layou233/ZBProxy.svg)](https://pkg.go.dev/github.com/layou233/ZBProxy)
3+
[![Go Reference](https://pkg.go.dev/badge/github.com/layou233/zbproxy/v3.svg)](https://pkg.go.dev/github.com/layou233/zbproxy/v3)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/layou233/ZBProxy)](https://goreportcard.com/report/github.com/layou233/ZBProxy)
55

66
**English** | [**简体中文**](README_cn.md)

README_cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ZBProxy
22
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Flayou233%2FZBProxy.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2Flayou233%2FZBProxy?ref=badge_small)
3-
[![Go Reference](https://pkg.go.dev/badge/github.com/layou233/ZBProxy.svg)](https://pkg.go.dev/github.com/layou233/ZBProxy)
3+
[![Go Reference](https://pkg.go.dev/badge/github.com/layou233/zbproxy/v3.svg)](https://pkg.go.dev/github.com/layou233/zbproxy/v3)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/layou233/ZBProxy)](https://goreportcard.com/report/github.com/layou233/ZBProxy)
55

66
[**English**](README.md) | **简体中文**

common/domain/matcher_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ import "testing"
55
func TestMatcher(t *testing.T) {
66
matcher := NewMatcher(
77
[]string{ // domain
8-
"example.com", "example.org",
8+
"example.com", "example.com.", "example.org",
99
}, []string{ // domain suffix
1010
"example.net", ".example.invalid",
1111
})
1212
if !matcher.Match("example.com") {
1313
t.Error("example.com is not matched")
1414
}
15+
if !matcher.Match("example.com.") {
16+
t.Error("example.com. is not matched")
17+
}
1518
if !matcher.Match("example.org") {
1619
t.Error("example.org is not matched")
1720
}

protocol/minecraft/outbound.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func (o *Outbound) InjectConnection(ctx context.Context, conn *bufio.CachedConn,
324324
}
325325
}
326326
if o.config.Minecraft.OnlineCount.EnableMaxLimit &&
327-
o.config.Minecraft.OnlineCount.Max > o.onlineCount.Load() {
327+
o.config.Minecraft.OnlineCount.Max >= o.onlineCount.Load() {
328328
msg, err := generatePlayerNumberLimitExceededMessage(o.config, metadata.Minecraft.PlayerName).MarshalJSON()
329329
if err != nil {
330330
buffer.Release()

0 commit comments

Comments
 (0)