Skip to content

Commit 4de824f

Browse files
Merge branch 'minekube:master' into master
2 parents 0641b61 + 322916a commit 4de824f

116 files changed

Lines changed: 4762 additions & 1109 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
11
module simple-proxy
22

3-
go 1.23.2
3+
go 1.24.1
44

55
replace go.minekube.com/gate => ../../../
66

77
require (
88
github.com/robinbraemer/event v0.1.1
99
go.minekube.com/brigodier v0.0.1
1010
go.minekube.com/common v0.0.6
11-
go.minekube.com/gate v0.47.0
11+
go.minekube.com/gate v0.48.1
1212
)
1313

1414
require (
15-
buf.build/gen/go/minekube/connect/protocolbuffers/go v1.35.2-20240220124425-904ce30425c9.1 // indirect
15+
buf.build/gen/go/minekube/connect/protocolbuffers/go v1.36.6-20240220124425-904ce30425c9.1 // indirect
1616
connectrpc.com/connect v1.18.1 // indirect
1717
github.com/Tnze/go-mc v1.20.2 // indirect
1818
github.com/agext/levenshtein v1.2.3 // indirect
19-
github.com/coder/websocket v1.8.12 // indirect
20-
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
19+
github.com/coder/websocket v1.8.13 // indirect
20+
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
2121
github.com/dboslee/lru v0.0.1 // indirect
2222
github.com/edwingeng/deque/v2 v2.1.1 // indirect
2323
github.com/emirpasic/gods v1.18.1 // indirect
2424
github.com/francoispqt/gojay v1.2.13 // indirect
25-
github.com/fsnotify/fsnotify v1.8.0 // indirect
25+
github.com/fsnotify/fsnotify v1.9.0 // indirect
2626
github.com/gammazero/deque v1.0.0 // indirect
2727
github.com/go-logr/logr v1.4.2 // indirect
2828
github.com/go-logr/zapr v1.3.0 // indirect
29-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
30-
github.com/golang/protobuf v1.5.4 // indirect
29+
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
30+
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
3131
github.com/google/uuid v1.6.0 // indirect
3232
github.com/hashicorp/hcl v1.0.0 // indirect
3333
github.com/jellydator/ttlcache/v3 v3.3.0 // indirect
34-
github.com/knadh/koanf/providers/file v1.1.2 // indirect
34+
github.com/knadh/koanf/providers/file v1.2.0 // indirect
3535
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
3636
github.com/magiconair/properties v1.8.7 // indirect
3737
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect
3838
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
39-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
39+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
4040
github.com/pires/go-proxyproto v0.8.0 // indirect
4141
github.com/rs/xid v1.6.0 // indirect
4242
github.com/russross/blackfriday/v2 v2.1.0 // indirect
43-
github.com/sagikazarmark/locafero v0.6.0 // indirect
43+
github.com/sagikazarmark/locafero v0.9.0 // indirect
4444
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
4545
github.com/segmentio/fasthash v1.0.3 // indirect
4646
github.com/sourcegraph/conc v0.3.0 // indirect
47-
github.com/spf13/afero v1.11.0 // indirect
48-
github.com/spf13/cast v1.7.0 // indirect
49-
github.com/spf13/pflag v1.0.5 // indirect
50-
github.com/spf13/viper v1.19.0 // indirect
47+
github.com/spf13/afero v1.14.0 // indirect
48+
github.com/spf13/cast v1.7.1 // indirect
49+
github.com/spf13/pflag v1.0.6 // indirect
50+
github.com/spf13/viper v1.20.1 // indirect
5151
github.com/subosito/gotenv v1.6.0 // indirect
52-
github.com/urfave/cli/v2 v2.27.5 // indirect
52+
github.com/urfave/cli/v2 v2.27.6 // indirect
5353
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
5454
github.com/zyedidia/generic v1.2.1 // indirect
5555
go.minekube.com/connect v0.6.2 // indirect
5656
go.uber.org/atomic v1.11.0 // indirect
5757
go.uber.org/multierr v1.11.0 // indirect
5858
go.uber.org/zap v1.27.0 // indirect
5959
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
60-
golang.org/x/net v0.34.0 // indirect
61-
golang.org/x/sync v0.10.0 // indirect
62-
golang.org/x/sys v0.29.0 // indirect
63-
golang.org/x/text v0.21.0 // indirect
64-
golang.org/x/time v0.8.0 // indirect
65-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241113202542-65e8d215514f // indirect
66-
google.golang.org/grpc v1.69.4 // indirect
67-
google.golang.org/protobuf v1.36.2 // indirect
60+
golang.org/x/net v0.38.0 // indirect
61+
golang.org/x/sync v0.12.0 // indirect
62+
golang.org/x/sys v0.32.0 // indirect
63+
golang.org/x/text v0.23.0 // indirect
64+
golang.org/x/time v0.9.0 // indirect
65+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect
66+
google.golang.org/grpc v1.70.0 // indirect
67+
google.golang.org/protobuf v1.36.6 // indirect
6868
gopkg.in/ini.v1 v1.67.0 // indirect
6969
gopkg.in/yaml.v3 v3.0.1 // indirect
7070
)

.examples/extend/simple-proxy/go.sum

Lines changed: 63 additions & 224 deletions
Large diffs are not rendered by default.

.examples/kubernetes/bundle.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ spec:
8888
- containerPort: 25565
8989
name: minecraft
9090
volumeMounts:
91-
- mountPath: /gate/config.yml
91+
- mountPath: /config.yml
9292
name: config
9393
subPath: config.yml
9494
volumes:

.examples/kubernetes/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
name: minecraft
1818
volumeMounts:
1919
- name: config
20-
mountPath: /gate/config.yml
20+
mountPath: /config.yml
2121
subPath: config.yml
2222
volumes:
2323
- name: config

.vscode/launch.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug",
9+
"type": "go",
10+
"request": "launch",
11+
"mode": "debug",
12+
"program": "${workspaceFolder}/gate.go",
13+
"args": ["-d"],
14+
"console": "integratedTerminal"
15+
},
16+
{
17+
"name": "Debug with OTEL (Self-hosted)",
18+
"type": "go",
19+
"request": "launch",
20+
"mode": "debug",
21+
"program": "${workspaceFolder}/gate.go",
22+
"args": ["-d"],
23+
"console": "integratedTerminal",
24+
"env": {
25+
"OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4318",
26+
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
27+
"OTEL_TRACES_ENABLED": "true",
28+
"OTEL_METRICS_ENABLED": "true",
29+
"OTEL_SERVICE_NAME": "gate-dev"
30+
}
31+
}
32+
]
33+
}

.web/docs/.vitepress/config.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ export default defineConfig({
4848
],
4949

5050
vue: {
51-
reactivityTransform: true,
51+
// reactivityTransform: true, // This option is deprecated
5252
},
5353

54+
ignoreDeadLinks: 'localhostLinks',
55+
5456
themeConfig: {
5557
logo: '/minekube-logo.png',
5658

@@ -176,6 +178,44 @@ export default defineConfig({
176178
},
177179
],
178180
},
181+
{
182+
text: 'OpenTelemetry',
183+
items: [
184+
{
185+
text: 'Overview',
186+
link: '/guide/otel/',
187+
},
188+
{
189+
text: 'Grafana',
190+
items: [
191+
{
192+
text: 'Grafana Cloud',
193+
link: '/guide/otel/grafana-cloud/',
194+
},
195+
{
196+
text: 'Self-hosted Grafana Stack',
197+
link: '/guide/otel/self-hosted/grafana-stack.md',
198+
},
199+
{
200+
text: 'Grafana Dashboards',
201+
link: '/guide/otel/self-hosted/dashboard',
202+
},
203+
],
204+
},
205+
{
206+
text: 'Honeycomb',
207+
link: '/guide/otel/honeycomb/',
208+
},
209+
{
210+
text: 'Self-hosted Jaeger',
211+
link: '/guide/otel/self-hosted/jaeger',
212+
},
213+
{
214+
text: 'FAQ',
215+
link: '/guide/otel/faq/',
216+
},
217+
],
218+
},
179219
{
180220
text: 'Security',
181221
items: [
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<a
3+
target="_blank"
4+
class="fixed bottom-5 right-5 z-50"
5+
href="https://minekube.com/discord"
6+
>
7+
<button
8+
aria-label="Discord Support"
9+
class="flex items-center justify-center gap-[6px] w-fit h-fit rounded-full transition-all bg-white hover:bg-[var(--vp-button-brand-hover-bg)] stroke-black hover:stroke-[var(--vp-button-brand-hover-text)] px-4 py-3 sm:px-8 sm:py-4 font-[500] text-black hover:text-[var(--vp-button-brand-hover-text)] text-[16px] leading-[20.83px] sm:text-[19px] sm:leading-[25px] !px-[16px] !py-[13px] !max-sm:rounded-full !sm:rounded-br-none !text-[16px] !leading-[21px]"
10+
>
11+
<svg width="32" height="32" viewBox="0 0 32 33" fill="inherit">
12+
<path
13+
d="M26.1303 11.347C24.3138 9.93899 22.134 9.23502 19.8331 9.11768L19.4697 9.4697C21.5284 9.93899 23.345 10.8776 25.0404 12.1683C22.9817 11.1123 20.6807 10.4084 18.2587 10.1737C17.5321 10.0563 16.9266 10.0563 16.2 10.0563C15.4734 10.0563 14.8679 10.0563 14.1413 10.1737C11.7193 10.4084 9.41833 11.1123 7.35963 12.1683C9.05501 10.8776 10.8716 9.93899 12.9303 9.4697L12.5669 9.11768C10.266 9.23502 8.08621 9.93899 6.26972 11.347C4.21101 15.1017 3.1211 19.3257 3 23.6669C4.81649 25.5443 7.35963 26.7177 10.0239 26.7177C10.0239 26.7177 10.8716 25.779 11.477 24.9576C9.90277 24.6057 8.44954 23.7843 7.48074 22.4937C8.32843 22.963 9.17611 23.4323 10.0239 23.7843C11.1138 24.2537 12.2037 24.4883 13.2936 24.723C14.2624 24.8403 15.2312 24.9576 16.2 24.9576C17.1688 24.9576 18.1376 24.8403 19.1064 24.723C20.1963 24.4883 21.2862 24.2537 22.3761 23.7843C23.2239 23.4323 24.0716 22.963 24.9193 22.4937C23.9505 23.7843 22.4972 24.6057 20.923 24.9576C21.5284 25.779 22.3761 26.7177 22.3761 26.7177C25.0404 26.7177 27.5835 25.5443 29.4 23.6669C29.2789 19.3257 28.189 15.1017 26.1303 11.347ZM12.2037 21.555C10.9927 21.555 9.90278 20.499 9.90278 19.2084C9.90278 17.9177 10.9927 16.8617 12.2037 16.8617C13.4147 16.8617 14.5046 17.9177 14.5046 19.2084C14.5046 20.499 13.4147 21.555 12.2037 21.555ZM20.1963 21.555C18.9853 21.555 17.8954 20.499 17.8954 19.2084C17.8954 17.9177 18.9853 16.8617 20.1963 16.8617C21.4073 16.8617 22.4972 17.9177 22.4972 19.2084C22.4972 20.499 21.4073 21.555 20.1963 21.555Z"
14+
fill="inherit"
15+
></path>
16+
</svg>
17+
<div class="max-sm:hidden">Discord Support</div>
18+
</button>
19+
</a>
20+
</template>

.web/docs/.vitepress/theme/components/LandingAfter.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ try:
751751
<div
752752
class="text-2xl sm:text-3xl font-semibold text-[--vp-c-brand-1]"
753753
>
754-
650+
754+
800+
755755
</div>
756756
<div class="text-xs sm:text-sm text-[--vp-c-text-2]">
757757
Discord Members
@@ -762,7 +762,7 @@ try:
762762
<div
763763
class="text-2xl sm:text-3xl font-semibold text-[--vp-c-brand-1]"
764764
>
765-
650+
765+
750+
766766
</div>
767767
<div class="text-xs sm:text-sm text-[--vp-c-text-2]">
768768
GitHub Stars
Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
11
<script setup>
2-
import DefaultTheme from 'vitepress/theme'
3-
import {useRouter} from 'vitepress';
4-
import {watch} from 'vue';
5-
import HomeHeroImage from "./HomeHeroImage.vue";
2+
import DefaultTheme from 'vitepress/theme';
3+
import { useRouter } from 'vitepress';
4+
import { watch } from 'vue';
5+
import HomeHeroImage from './HomeHeroImage.vue';
66
import LandingAfter from './LandingAfter.vue';
7+
import MyGlobalButton from './DiscordButton.vue';
78
8-
const {Layout} = DefaultTheme
9+
const { Layout } = DefaultTheme;
910
1011
const router = useRouter();
1112
1213
// Only run this on the client. Not during build
1314
if (typeof window !== 'undefined' && window.posthog) {
14-
watch(() => router.route.data.relativePath, (path) => {
15-
posthog.capture("$pageview");
16-
}, {immediate: true});
15+
watch(
16+
() => router.route.data.relativePath,
17+
(path) => {
18+
posthog.capture('$pageview');
19+
},
20+
{ immediate: true }
21+
);
1722
}
18-
1923
</script>
2024

2125
<template>
2226
<Layout>
2327
<template #home-hero-image>
24-
<HomeHeroImage/>
28+
<HomeHeroImage />
2529
</template>
2630
<template #home-features-after>
27-
<LandingAfter/>
31+
<LandingAfter />
32+
</template>
33+
<template #default>
34+
<slot />
35+
</template>
36+
<template #layout-bottom>
37+
<MyGlobalButton />
2838
</template>
2939
</Layout>
30-
</template>
40+
</template>

.web/docs/developers/api/gen/definition.gen.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
- [Player](#minekube-gate-v1-Player)
1818
- [RegisterServerRequest](#minekube-gate-v1-RegisterServerRequest)
1919
- [RegisterServerResponse](#minekube-gate-v1-RegisterServerResponse)
20+
- [RequestCookieRequest](#minekube-gate-v1-RequestCookieRequest)
21+
- [RequestCookieResponse](#minekube-gate-v1-RequestCookieResponse)
2022
- [Server](#minekube-gate-v1-Server)
23+
- [StoreCookieRequest](#minekube-gate-v1-StoreCookieRequest)
24+
- [StoreCookieResponse](#minekube-gate-v1-StoreCookieResponse)
2125
- [UnregisterServerRequest](#minekube-gate-v1-UnregisterServerRequest)
2226
- [UnregisterServerResponse](#minekube-gate-v1-UnregisterServerResponse)
2327

@@ -222,6 +226,37 @@ RegisterServerResponse is the response for RegisterServer method.
222226

223227

224228

229+
<a name="minekube-gate-v1-RequestCookieRequest"></a>
230+
231+
### RequestCookieRequest
232+
RequestCookieRequest is the request for RequestCookie method.
233+
234+
235+
| Field | Type | Label | Description |
236+
| ----- | ---- | ----- | ----------- |
237+
| player | [string](#string) | | The player&#39;s username or ID |
238+
| key | [string](#string) | | The key of the cookie in format `namespace:key` |
239+
240+
241+
242+
243+
244+
245+
<a name="minekube-gate-v1-RequestCookieResponse"></a>
246+
247+
### RequestCookieResponse
248+
RequestCookieResponse is the response for RequestCookie method.
249+
250+
251+
| Field | Type | Label | Description |
252+
| ----- | ---- | ----- | ----------- |
253+
| payload | [bytes](#bytes) | | The payload of the cookie. May be empty if the cookie is not found. |
254+
255+
256+
257+
258+
259+
225260
<a name="minekube-gate-v1-Server"></a>
226261

227262
### Server
@@ -239,6 +274,33 @@ Server represents a backend server where Gate can connect players to.
239274

240275

241276

277+
<a name="minekube-gate-v1-StoreCookieRequest"></a>
278+
279+
### StoreCookieRequest
280+
StoreCookieRequest is the request for StoreCookie method.
281+
282+
283+
| Field | Type | Label | Description |
284+
| ----- | ---- | ----- | ----------- |
285+
| player | [string](#string) | | The player&#39;s username or ID |
286+
| key | [string](#string) | | The key of the cookie in format `namespace:key` |
287+
| payload | [bytes](#bytes) | | The payload to store. Passing an empty payload will remove the cookie. |
288+
289+
290+
291+
292+
293+
294+
<a name="minekube-gate-v1-StoreCookieResponse"></a>
295+
296+
### StoreCookieResponse
297+
StoreCookieResponse is the response for StoreCookie method.
298+
299+
300+
301+
302+
303+
242304
<a name="minekube-gate-v1-UnregisterServerRequest"></a>
243305

244306
### UnregisterServerRequest
@@ -287,6 +349,8 @@ All methods follow standard gRPC error codes and include detailed error messages
287349
| UnregisterServer | [UnregisterServerRequest](#minekube-gate-v1-UnregisterServerRequest) | [UnregisterServerResponse](#minekube-gate-v1-UnregisterServerResponse) | UnregisterServer removes a server from the proxy. Returns NOT_FOUND if no matching server is found. Returns INVALID_ARGUMENT if neither name nor address is provided. |
288350
| ConnectPlayer | [ConnectPlayerRequest](#minekube-gate-v1-ConnectPlayerRequest) | [ConnectPlayerResponse](#minekube-gate-v1-ConnectPlayerResponse) | ConnectPlayer connects a player to a specified server. Returns NOT_FOUND if either the player or target server doesn&#39;t exist. Returns FAILED_PRECONDITION if the connection attempt fails. |
289351
| DisconnectPlayer | [DisconnectPlayerRequest](#minekube-gate-v1-DisconnectPlayerRequest) | [DisconnectPlayerResponse](#minekube-gate-v1-DisconnectPlayerResponse) | DisconnectPlayer disconnects a player from the proxy. Returns NOT_FOUND if the player doesn&#39;t exist. Returns INVALID_ARGUMENT if the reason text is malformed. |
352+
| StoreCookie | [StoreCookieRequest](#minekube-gate-v1-StoreCookieRequest) | [StoreCookieResponse](#minekube-gate-v1-StoreCookieResponse) | StoreCookie stores a cookie on a player&#39;s client. Returns NOT_FOUND if the player doesn&#39;t exist. Passing an empty payload will remove the cookie. |
353+
| RequestCookie | [RequestCookieRequest](#minekube-gate-v1-RequestCookieRequest) | [RequestCookieResponse](#minekube-gate-v1-RequestCookieResponse) | RequestCookie requests a cookie from a player&#39;s client. The payload in RequestCookieResponse may be empty if the cookie is not found. |
290354

291355

292356

0 commit comments

Comments
 (0)