Skip to content

Commit 2dd67bc

Browse files
committed
chore: Update default config to adapt to Hypixel changes
Hypixel now rejects connections claiming non-25565 port in the handshake packet.
1 parent 6271dc1 commit 2dd67bc

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

config/root.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,16 @@ func LoadConfigFromFile(ctx context.Context, filePath string, watch bool, logger
150150
Type: "always",
151151
Sniff: jsonx.Listable[string]{"minecraft"},
152152
},
153+
{
154+
Type: "ServiceName",
155+
Parameter: json.RawMessage("\"Hypixel-in\""),
156+
Rewrite: RuleRewrite{
157+
Minecraft: &ruleRewriteMinecraft{
158+
Hostname: "mc.hypixel.net",
159+
Port: 25565,
160+
},
161+
},
162+
},
153163
},
154164
DefaultOutbound: "Hypixel-out",
155165
},
@@ -159,7 +169,6 @@ func LoadConfigFromFile(ctx context.Context, filePath string, watch bool, logger
159169
TargetAddress: "mc.hypixel.net",
160170
TargetPort: 25565,
161171
Minecraft: &MinecraftService{
162-
EnableHostnameRewrite: true,
163172
OnlineCount: onlineCount{
164173
Max: 20,
165174
Online: -1,

config/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type access struct {
2323
}
2424

2525
type MinecraftService struct {
26-
EnableHostnameRewrite bool
26+
EnableHostnameRewrite bool `json:",omitempty"`
2727
RewrittenHostname string `json:",omitempty"`
2828

2929
OnlineCount onlineCount

0 commit comments

Comments
 (0)