mirror of
https://github.com/MatthewL246/pretendo-docker.git
synced 2026-08-26 12:56:07 -05:00
feat: Progress to add Splatoon servers
This commit is contained in:
48
compose.yml
48
compose.yml
@@ -459,6 +459,54 @@ services:
|
||||
- ./environment/super-mario-maker.env
|
||||
- ./environment/super-mario-maker.local.env
|
||||
|
||||
splatoon-authentication:
|
||||
build: ./repos/splatoon-authentication
|
||||
depends_on:
|
||||
- account
|
||||
- mongodb
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
# Go delve debugger
|
||||
- 127.0.0.1:2349:2349
|
||||
# Authentication server
|
||||
- 61002:61002/udp
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./logs/splatoon-authentication/
|
||||
target: /app/log/
|
||||
networks:
|
||||
internal:
|
||||
dns: 172.20.0.200
|
||||
env_file:
|
||||
- ./environment/splatoon.env
|
||||
- ./environment/splatoon.local.env
|
||||
|
||||
splatoon-secure:
|
||||
build: ./repos/splatoon-secure
|
||||
depends_on:
|
||||
- account
|
||||
- mongodb
|
||||
- splatoon-authentication
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
# Go delve debugger
|
||||
- 127.0.0.1:2350:2350
|
||||
# Secure server
|
||||
- 60003:60003/udp
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./logs/splatoon-secure/
|
||||
target: /app/log/
|
||||
- type: bind
|
||||
source: ./environment/splatoon-secure.conf
|
||||
target: /app/secure.conf
|
||||
networks:
|
||||
internal:
|
||||
dns: 172.20.0.200
|
||||
env_file:
|
||||
- ./environment/splatoon.env
|
||||
- ./environment/splatoon.local.env
|
||||
|
||||
volumes:
|
||||
mitmproxy-pretendo-data:
|
||||
mongodb-database:
|
||||
|
||||
21
environment/splatoon-secure.conf
Normal file
21
environment/splatoon-secure.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
PrudpVersion=1
|
||||
SignatureVersion=1
|
||||
ServerPort=60003
|
||||
KerberosKeySize=32
|
||||
AccessKey=6f599f81
|
||||
ServerName=Pretendo Splatoon Secure
|
||||
NexVersion=30500
|
||||
AccountDatabaseIP=account
|
||||
AccountDatabasePort=5000
|
||||
NEXDatabaseIP=mongodb
|
||||
NEXDatabasePort=27017
|
||||
DatabaseUseAuth=false
|
||||
AccountDatabase=pretendo
|
||||
PNIDCollection=pnids
|
||||
NexAccountsCollection=nexaccounts
|
||||
SplatoonDatabase=splatoon
|
||||
RoomsCollection=rooms
|
||||
SessionsCollection=sessions
|
||||
UsersCollection=users
|
||||
RegionsCollection=regions
|
||||
TournamentsCollection=tourneys
|
||||
2
environment/splatoon.env
Normal file
2
environment/splatoon.env
Normal file
@@ -0,0 +1,2 @@
|
||||
PN_SPLATOON_AUTHENTICATION_SERVER_PORT=61002
|
||||
MONGO_URI=mongodb://mongodb:27017/pretendo_account?replicaSet=rs
|
||||
0
logs/splatoon-authentication/.gitkeep
Normal file
0
logs/splatoon-authentication/.gitkeep
Normal file
0
logs/splatoon-secure/.gitkeep
Normal file
0
logs/splatoon-secure/.gitkeep
Normal file
23
patches/splatoon-authentication/dockerize.patch
Normal file
23
patches/splatoon-authentication/dockerize.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
diff --git c/Dockerfile i/Dockerfile
|
||||
new file mode 100644
|
||||
index 0000000..d2d087b
|
||||
--- /dev/null
|
||||
+++ i/Dockerfile
|
||||
@@ -0,0 +1,17 @@
|
||||
+FROM golang:alpine AS builder
|
||||
+WORKDIR /build
|
||||
+
|
||||
+RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
+
|
||||
+COPY go.* ./
|
||||
+RUN go mod download
|
||||
+
|
||||
+COPY . ./
|
||||
+RUN go build -gcflags "all=-N -l" -v -o server
|
||||
+
|
||||
+FROM alpine:latest AS runner
|
||||
+WORKDIR /app
|
||||
+
|
||||
+COPY --from=builder /build/server /app/server
|
||||
+COPY --from=builder /go/bin/dlv /app/
|
||||
+CMD ["/app/dlv", "exec", "/app/server", "--listen=:2349", "--headless", "--api-version=2", "--log", "--accept-multiclient", "--continue"]
|
||||
23
patches/splatoon-secure/dockerize.patch
Normal file
23
patches/splatoon-secure/dockerize.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
diff --git c/Dockerfile i/Dockerfile
|
||||
new file mode 100644
|
||||
index 0000000..d2d087b
|
||||
--- /dev/null
|
||||
+++ i/Dockerfile
|
||||
@@ -0,0 +1,17 @@
|
||||
+FROM golang:alpine AS builder
|
||||
+WORKDIR /build
|
||||
+
|
||||
+RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
+
|
||||
+COPY go.* ./
|
||||
+RUN go mod download
|
||||
+
|
||||
+COPY . ./
|
||||
+RUN go build -gcflags "all=-N -l" -v -o server
|
||||
+
|
||||
+FROM alpine:latest AS runner
|
||||
+WORKDIR /app
|
||||
+
|
||||
+COPY --from=builder /build/server /app/server
|
||||
+COPY --from=builder /go/bin/dlv /app/
|
||||
+CMD ["/app/dlv", "exec", "/app/server", "--listen=:2350", "--headless", "--api-version=2", "--log", "--accept-multiclient", "--continue"]
|
||||
48
patches/splatoon-secure/fix-no-param3.patch
Normal file
48
patches/splatoon-secure/fix-no-param3.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
diff --git a/nex/matchmake-extension/auto_matchmake_with_param_postpone.go b/nex/matchmake-extension/auto_matchmake_with_param_postpone.go
|
||||
index 7e1fff0..22b06d5 100644
|
||||
--- a/nex/matchmake-extension/auto_matchmake_with_param_postpone.go
|
||||
+++ b/nex/matchmake-extension/auto_matchmake_with_param_postpone.go
|
||||
@@ -69,7 +69,7 @@ func AutoMatchmakeWithParam_Postpone(err error, client *nex.Client, callID uint3
|
||||
oEvent.PIDSource = client.PID()
|
||||
oEvent.Type = 122000 // Switch gathering
|
||||
oEvent.Param1 = gid
|
||||
- oEvent.Param3 = 1
|
||||
+ // oEvent.Param3 = 1
|
||||
|
||||
for _, pid := range database.GetRoomPlayers(sourceGid) {
|
||||
if pid == 0 {
|
||||
@@ -160,7 +160,7 @@ func AutoMatchmakeWithParam_Postpone(err error, client *nex.Client, callID uint3
|
||||
oEvent.Type = 3001 // New participant
|
||||
oEvent.Param1 = gid
|
||||
oEvent.Param2 = client.PID()
|
||||
- oEvent.Param3 = uint32(participationCount)
|
||||
+ // oEvent.Param3 = uint32(participationCount)
|
||||
/* if matchmakeSession.GameMode == 12 {
|
||||
oEvent.Param3 = 4
|
||||
} else {
|
||||
diff --git a/nex/matchmake-extension/create_matchmake_session_with_param.go b/nex/matchmake-extension/create_matchmake_session_with_param.go
|
||||
index c8b79cf..b113f56 100644
|
||||
--- a/nex/matchmake-extension/create_matchmake_session_with_param.go
|
||||
+++ b/nex/matchmake-extension/create_matchmake_session_with_param.go
|
||||
@@ -95,7 +95,7 @@ func CreateMatchmakeSessionWithParam(err error, client *nex.Client, callID uint3
|
||||
oEvent.Type = 3001 // New participant
|
||||
oEvent.Param1 = gid
|
||||
oEvent.Param2 = hostpid
|
||||
- oEvent.Param3 = 1
|
||||
+ // oEvent.Param3 = 1
|
||||
|
||||
stream := nex.NewStreamOut(globals.NEXServer)
|
||||
oEventBytes := oEvent.Bytes(stream)
|
||||
diff --git a/nex/matchmake-extension/join_matchmake_session_with_param.go b/nex/matchmake-extension/join_matchmake_session_with_param.go
|
||||
index 40b4d85..309385c 100644
|
||||
--- a/nex/matchmake-extension/join_matchmake_session_with_param.go
|
||||
+++ b/nex/matchmake-extension/join_matchmake_session_with_param.go
|
||||
@@ -138,7 +138,7 @@ func JoinMatchmakeSessionWithParam(err error, client *nex.Client, callID uint32,
|
||||
oEvent.Type = 3001 // New participant
|
||||
oEvent.Param1 = gid
|
||||
oEvent.Param2 = client.PID()
|
||||
- oEvent.Param3 = 1
|
||||
+ // oEvent.Param3 = 1
|
||||
|
||||
stream := nex.NewStreamOut(globals.NEXServer)
|
||||
oEventBytes := oEvent.Bytes(stream)
|
||||
Submodule repos/BOSS updated: 61f8611cf3...16a762b972
Submodule repos/Inkay updated: 349b1f38aa...d62765bab9
Submodule repos/account updated: 0074645960...0242fa7450
Submodule repos/friends updated: ee46ec47e5...cc9b839d45
Submodule repos/juxtaposition-ui updated: 95fab2bae9...e3736862ca
Submodule repos/mitmproxy-pretendo updated: b7b6e19879...43cbe68587
1
repos/splatoon-authentication
Submodule
1
repos/splatoon-authentication
Submodule
Submodule repos/splatoon-authentication added at 189bc9e6c7
1
repos/splatoon-secure
Submodule
1
repos/splatoon-secure
Submodule
Submodule repos/splatoon-secure added at 2f3ca91e77
Submodule repos/website updated: 139a18ddd1...9bb9f6a4f0
@@ -83,6 +83,15 @@ async function runAsync() {
|
||||
1,
|
||||
"0".repeat(64)
|
||||
);
|
||||
await createNexServer(
|
||||
"Splatoon",
|
||||
"10176900",
|
||||
["00050000-10176A00", "00050000-10176900", "00050000-10162B00"],
|
||||
process.env.SERVER_IP,
|
||||
process.env.SPLATOON_PORT,
|
||||
1,
|
||||
"0".repeat(64)
|
||||
);
|
||||
|
||||
await mongoose.connection.close();
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ echo "SERVER_IP=$server_ip" >>"$git_base_dir/.env"
|
||||
echo "PN_FRIENDS_SECURE_SERVER_HOST=$server_ip" >>./friends.local.env
|
||||
echo "PN_WIIU_CHAT_SECURE_SERVER_LOCATION=$server_ip" >>./wiiu-chat.local.env
|
||||
echo "PN_SMM_SECURE_SERVER_HOST=$server_ip" >>./super-mario-maker.local.env
|
||||
echo "PN_SPLATOON_AUTHENTICATION_SERVER_HOST=$server_ip" >>./splatoon.local.env
|
||||
|
||||
# Get the Wii U IP address
|
||||
if [[ -n "$wiiu_ip" ]]; then
|
||||
|
||||
2
setup.sh
2
setup.sh
@@ -120,4 +120,4 @@ print_stage "Setting up containers with first-run scripts."
|
||||
setup_containers
|
||||
|
||||
print_title "Pretendo Network server setup script finished"
|
||||
print_success "Setup completed! You can now start your Pretendo Network server with \"docker compose up -d --build\"."
|
||||
print_success "Setup completed! You can now start your Pretendo Network server with \"docker compose up -d --build\"."
|
||||
Reference in New Issue
Block a user