Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cc2f27ea7d | |||
| 66ebc2a9f0 | |||
| 476f8c7be3 | |||
| 43191de687 | |||
| f04e85d496 | |||
| bfc1482328 | |||
| 2a069d16e9 | |||
| 87c9eedac0 | |||
| abda534e17 | |||
| 0f6546f717 | |||
| 6a4764082d | |||
| 25d58b3083 | |||
| 9a621ed6bd | |||
| 7c5ed826f4 | |||
| 7e507c7f68 | |||
| 535051be75 | |||
| e433de67f3 | |||
| 0b970c3be2 | |||
| 2a0d3c40e7 | |||
| ea928ab6dd | |||
| fc54e6f77a | |||
| ba57a33483 | |||
| 95ac6d922b | |||
| 36621bc19d | |||
| 8393ad3656 |
10 changed files with 170 additions and 449 deletions
|
|
@ -1,15 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
export EDITION=$1
|
||||
source /etc/environment
|
||||
: "${RNEX_CONTAINER_PLATFORM:=podman}"
|
||||
set -e
|
||||
|
||||
for TARGET in node-holder proxy-secure proxy-insecure backend-auth backend-secure; do
|
||||
export EDITION=$1
|
||||
source /etc/environment 2>/dev/null || true
|
||||
: "${RNEX_CONTAINER_PLATFORM:=docker}"
|
||||
|
||||
export SHORT_SHA=${GITHUB_SHA::6}
|
||||
export CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA:-$SHORT_SHA}
|
||||
|
||||
echo "building $EDITION"
|
||||
export TARGET_DIR="target/release"
|
||||
|
||||
./test-edition.sh
|
||||
./build-edition.sh
|
||||
|
||||
mkdir -p dist/
|
||||
cp $TARGET_DIR/rnex-server-backend-node-holder dist/
|
||||
cp $TARGET_DIR/proxy_insecure dist/
|
||||
cp $TARGET_DIR/proxy_secure dist/
|
||||
cp $TARGET_DIR/rnex-server-backend-auth dist/
|
||||
cp $TARGET_DIR/rnex-server-backend-secure dist/
|
||||
|
||||
TARGETS=("node-holder" "proxy-secure" "proxy-insecure" "backend-auth" "backend-secure")
|
||||
|
||||
for TARGET in "${TARGETS[@]}"; do
|
||||
$RNEX_CONTAINER_PLATFORM build \
|
||||
--network=host \
|
||||
--build-arg EDITION="$EDITION" \
|
||||
--build-arg DATABASE_URL="$DATABASE_URL" \
|
||||
-t "$CI_REGISTRY_IMAGE/$EDITION/$TARGET:$CI_COMMIT_SHORT_SHA" \
|
||||
--target="$TARGET" .
|
||||
--target="$TARGET" \
|
||||
-t "$CI_REGISTRY_IMAGE/$EDITION/$TARGET:$CI_COMMIT_SHORT_SHA" .
|
||||
|
||||
$RNEX_CONTAINER_PLATFORM push "$CI_REGISTRY_IMAGE/$EDITION/$TARGET:$CI_COMMIT_SHORT_SHA"
|
||||
done
|
||||
|
|
@ -7,11 +7,30 @@ on:
|
|||
env:
|
||||
DOCKER_TLS_CERTDIR: /certs
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
SHORT_SHA: ${{ github.sha }}
|
||||
|
||||
jobs:
|
||||
sonic-transformed:
|
||||
build-editions:
|
||||
runs-on: debian-trixie
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- edition: sonic-transformed
|
||||
- edition: mario-tennis
|
||||
- edition: wii-sports-club
|
||||
db_secret: DATABASE_SMM
|
||||
- edition: puyopuyo
|
||||
db_secret: DATABASE_SMM
|
||||
- edition: minecraft-wiiu
|
||||
- edition: splatoon-testfire
|
||||
- edition: fast-racing-neo
|
||||
- edition: wii-u-chat
|
||||
- edition: splatoon
|
||||
- edition: friends
|
||||
db_secret: DATABASE_FRIENDS
|
||||
- edition: super-mario-maker
|
||||
db_secret: DATABASE_SMM
|
||||
- edition: terraria
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
|
@ -19,327 +38,26 @@ jobs:
|
|||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
- name: Cache Cargo registry and target
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target/
|
||||
key: cargo-${{ matrix.edition }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
cargo-${{ matrix.edition }}-
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Sonic Transformed edition
|
||||
- name: Set environment variables & build
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
run: ./.ci-scripts/make-edition.sh sonic-transformed
|
||||
|
||||
mario-tennis:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build MTUS edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
run: ./.ci-scripts/make-edition.sh mario-tennis
|
||||
|
||||
wii-sports-club:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Wii Sports Club edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_SMM }}
|
||||
run: ./.ci-scripts/make-edition.sh wii-sports-club
|
||||
|
||||
puyopuyo:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build puyo puyo tetris edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_SMM }}
|
||||
run: ./.ci-scripts/make-edition.sh puyopuyo
|
||||
|
||||
minecraft-wiiu:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Minecraft Wii U edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
run: ./.ci-scripts/make-edition.sh minecraft-wiiu
|
||||
|
||||
splatoon-testfire:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Splatoon Testfire edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
run: ./.ci-scripts/make-edition.sh splatoon-testfire
|
||||
|
||||
fast-racing-neo:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Fast Racing NEO edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
run: ./.ci-scripts/make-edition.sh fast-racing-neo
|
||||
|
||||
wii-u-chat:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Wii U Chat edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
run: ./.ci-scripts/make-edition.sh wii-u-chat
|
||||
|
||||
splatoon:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Splatoon edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
run: ./.ci-scripts/make-edition.sh splatoon
|
||||
|
||||
friends:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to registry
|
||||
run: podman login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Build Friends edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_FRIENDS }}
|
||||
run: ./.ci-scripts/make-edition.sh friends
|
||||
|
||||
super-mario-maker:
|
||||
runs-on: debian-trixie
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache container storage
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
/var/lib/containers/storage
|
||||
/run/containers/storage
|
||||
~/.local/share/containers/storage
|
||||
key: image-cache
|
||||
|
||||
- name: Set short SHA
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to registry
|
||||
run: podman login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
|
||||
|
||||
- name: Build Super Mario Maker edition
|
||||
env:
|
||||
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
|
||||
CI_COMMIT_SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_SMM }}
|
||||
run: ./.ci-scripts/make-edition.sh super-mario-maker
|
||||
SHORT_SHA: ${{ github.sha }}
|
||||
DATABASE_URL: ${{ matrix.db_secret != '' && secrets[matrix.db_secret] || '' }}
|
||||
run: |
|
||||
echo "SHORT_SHA=${SHORT_SHA::6}" >> $GITHUB_ENV
|
||||
export CI_COMMIT_SHORT_SHA="${SHORT_SHA::6}"
|
||||
./.ci-scripts/make-edition.sh ${{ matrix.edition }}
|
||||
109
Cargo.lock
generated
109
Cargo.lock
generated
|
|
@ -202,19 +202,19 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.103"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3"
|
||||
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
||||
|
||||
[[package]]
|
||||
name = "async-trait"
|
||||
version = "0.1.89"
|
||||
version = "0.1.91"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
|
||||
checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.117",
|
||||
"syn 3.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -302,6 +302,12 @@ version = "0.22.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.23.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
|
||||
|
||||
[[package]]
|
||||
name = "base64ct"
|
||||
version = "1.8.3"
|
||||
|
|
@ -771,7 +777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -890,9 +896,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "futures"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d"
|
||||
checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
|
|
@ -905,9 +911,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
|
||||
checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
|
|
@ -915,15 +921,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
|
||||
checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"
|
||||
|
||||
[[package]]
|
||||
name = "futures-executor"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d"
|
||||
checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
|
|
@ -943,15 +949,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
|
||||
checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a"
|
||||
|
||||
[[package]]
|
||||
name = "futures-macro"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"
|
||||
checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -960,21 +966,21 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
|
||||
checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
|
||||
checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.32"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
|
||||
checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
|
|
@ -1273,7 +1279,7 @@ version = "0.1.20"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"bytes",
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
|
|
@ -1284,7 +1290,7 @@ dependencies = [
|
|||
"libc",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"socket2 0.6.3",
|
||||
"socket2 0.5.10",
|
||||
"tokio",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
|
|
@ -1662,11 +1668,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "nex-account"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5"
|
||||
source = "sparse+https://crates.spbr.net/api/v1/crates/"
|
||||
checksum = "6f1cfe935e71c764dfd6bad9b23372396f785408536c0a23fba379ef405117d3"
|
||||
checksum = "7cb5867c4f4771dd7125dce1f911753cc9291b65cd7908c0e7ca182e7b2a57a3"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.23.1",
|
||||
"bytemuck",
|
||||
"hmac",
|
||||
"log",
|
||||
|
|
@ -2375,7 +2381,7 @@ version = "0.13.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"bytes",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
|
|
@ -2479,7 +2485,7 @@ dependencies = [
|
|||
name = "rnex-ds"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
"futures",
|
||||
"hex",
|
||||
|
|
@ -2764,7 +2770,7 @@ dependencies = [
|
|||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3152,7 +3158,7 @@ source = "sparse+https://crates.spbr.net/api/v1/crates/"
|
|||
checksum = "04f4e4710d23bb730a95d00b853e304a4c1c9e86276792cd32a92057e9833452"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"bytemuck",
|
||||
"hmac",
|
||||
"hybrid-array",
|
||||
|
|
@ -3189,7 +3195,7 @@ version = "0.9.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05b44e85bf579a8eeb4ceaa77a3a523baf2bf0e9bac7e40f405d537b5d2d5ccb"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"bytes",
|
||||
"cfg-if",
|
||||
"chrono",
|
||||
|
|
@ -3291,7 +3297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "87a2bdd6e83f6b3ea525ca9fee568030508b58355a43d0b2c1674d5f79dcd65e"
|
||||
dependencies = [
|
||||
"atoi",
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"bitflags",
|
||||
"byteorder",
|
||||
"chrono",
|
||||
|
|
@ -3390,6 +3396,17 @@ dependencies = [
|
|||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "3.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sync_wrapper"
|
||||
version = "1.0.2"
|
||||
|
|
@ -3417,10 +3434,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"getrandom 0.4.2",
|
||||
"getrandom 0.3.4",
|
||||
"once_cell",
|
||||
"rustix",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3434,22 +3451,22 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.18"
|
||||
version = "2.0.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
|
||||
checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.18"
|
||||
version = "2.0.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
|
||||
checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.117",
|
||||
"syn 3.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3599,7 +3616,7 @@ checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef"
|
|||
dependencies = [
|
||||
"async-trait",
|
||||
"axum",
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"bytes",
|
||||
"h2",
|
||||
"http 1.4.0",
|
||||
|
|
@ -3848,7 +3865,7 @@ version = "3.3.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"cookie_store",
|
||||
"der",
|
||||
"flate2",
|
||||
|
|
@ -3871,7 +3888,7 @@ version = "0.6.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.22.1",
|
||||
"http 1.4.0",
|
||||
"httparse",
|
||||
"log",
|
||||
|
|
@ -4124,7 +4141,7 @@ version = "0.1.11"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ members = [
|
|||
|
||||
[workspace.dependencies]
|
||||
tracing = "0.1.44"
|
||||
openssl = { version = "0.10.81", features = ["vendored"] }
|
||||
|
||||
[workspace.lints.clippy]
|
||||
print_stdout = { level = "deny", priority = 1}
|
||||
|
|
|
|||
64
Dockerfile
64
Dockerfile
|
|
@ -1,58 +1,26 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
FROM rust:alpine AS chef
|
||||
RUN apk add --no-cache musl-dev lld g++ make
|
||||
RUN cargo install cargo-chef
|
||||
WORKDIR /app
|
||||
FROM debian:bookworm-slim AS base
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
libssl3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
FROM chef AS planner
|
||||
COPY . .
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM chef AS builder
|
||||
RUN apk add --no-cache protobuf-dev git openssl-dev openssl-libs-static bash yq ca-certificates
|
||||
|
||||
COPY --from=planner /app/recipe.json recipe.json
|
||||
ARG EDITION
|
||||
ARG DATABASE_URL
|
||||
|
||||
RUN --mount=type=cache,id=${EDITION}-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=${EDITION}-target,target=/app/target \
|
||||
cargo chef cook --release --recipe-path recipe.json --target x86_64-unknown-linux-musl && \
|
||||
cargo chef cook --tests --target x86_64-unknown-linux-musl --recipe-path recipe.json
|
||||
|
||||
COPY . .
|
||||
RUN --mount=type=cache,id=${EDITION}-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=${EDITION}-target,target=/app/target \
|
||||
RNEX_STATIC=1 ./test-edition.sh && RNEX_STATIC=1 ./build-edition.sh && \
|
||||
mkdir -p /app/dist && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/rnex-server-backend-node-holder /app/dist/ && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/proxy_insecure /app/dist/ && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/proxy_secure /app/dist/ && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/rnex-server-backend-auth /app/dist/ && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/rnex-server-backend-secure /app/dist/
|
||||
|
||||
|
||||
FROM scratch AS node-holder
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/rnex-server-backend-node-holder /rnex-server-backend-node-holder
|
||||
FROM base AS node-holder
|
||||
COPY dist/rnex-server-backend-node-holder /rnex-server-backend-node-holder
|
||||
ENTRYPOINT ["/rnex-server-backend-node-holder"]
|
||||
|
||||
FROM scratch AS proxy-insecure
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/proxy_insecure /proxy_insecure
|
||||
FROM base AS proxy-insecure
|
||||
COPY dist/proxy_insecure /proxy_insecure
|
||||
ENTRYPOINT ["/proxy_insecure"]
|
||||
|
||||
FROM scratch AS proxy-secure
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/proxy_secure /proxy_secure
|
||||
FROM base AS proxy-secure
|
||||
COPY dist/proxy_secure /proxy_secure
|
||||
ENTRYPOINT ["/proxy_secure"]
|
||||
|
||||
FROM scratch AS backend-auth
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/rnex-server-backend-auth /rnex-server-backend-auth
|
||||
FROM base AS backend-auth
|
||||
COPY dist/rnex-server-backend-auth /rnex-server-backend-auth
|
||||
ENTRYPOINT ["/rnex-server-backend-auth"]
|
||||
|
||||
FROM scratch AS backend-secure
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/rnex-server-backend-secure /rnex-server-backend-secure
|
||||
ENTRYPOINT ["/rnex-server-backend-secure"]
|
||||
FROM base AS backend-secure
|
||||
COPY dist/rnex-server-backend-secure /rnex-server-backend-secure
|
||||
ENTRYPOINT ["/rnex-server-backend-secure"]
|
||||
|
|
@ -6,14 +6,8 @@ if [ -z ${EDITION+x} ]; then
|
|||
EDITION=$1
|
||||
fi
|
||||
|
||||
# comma seperated list of features for the specified version
|
||||
source ./buildscripts/common.sh
|
||||
echo building $EDITION
|
||||
echo FEATURES:
|
||||
echo $EDITION_FEATURES
|
||||
echo "Building $EDITION"
|
||||
echo "FEATURES: $EDITION_FEATURES"
|
||||
|
||||
if [[ ! -v RNEX_STATIC ]]; then
|
||||
cargo build --release --features "$EDITION_FEATURES"
|
||||
else
|
||||
OPENSSL_LIB_DIR=/usr/lib OPENSSL_INCLUDE_DIR=/usr/include/openssl OPENSSL_STATIC=1 RUSTFLAGS="-C relocation-model=static -C linker=ld.lld" cargo build --release --features "$EDITION_FEATURES" --target x86_64-unknown-linux-musl
|
||||
fi
|
||||
cargo build --release --features "$EDITION_FEATURES"
|
||||
|
|
@ -158,3 +158,15 @@ super-mario-maker:
|
|||
RNEX_VIRTUAL_PORT_SECURE: "1:10"
|
||||
RNEX_DEFAULT_PORT: 6000
|
||||
RNEX_ACCESS_KEY: "9f2b4678"
|
||||
terraria:
|
||||
include-in-checkall: true
|
||||
features:
|
||||
- prudpv1
|
||||
- third-notif-param
|
||||
- v3-8-15
|
||||
settings:
|
||||
AUTH_REPORT_VERSION: "branch:origin/release/ngs/3.8.x.200x build:3_8_13_2004_0"
|
||||
RNEX_VIRTUAL_PORT_INSECURE: "1:10"
|
||||
RNEX_VIRTUAL_PORT_SECURE: "1:10"
|
||||
RNEX_DEFAULT_PORT: 10000
|
||||
RNEX_ACCESS_KEY: "3d37fbdb"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
use bytemuck::from_bytes;
|
||||
|
||||
pub mod encryption;
|
||||
pub mod kerberos;
|
||||
pub mod socket_addr;
|
||||
|
|
@ -8,9 +6,11 @@ pub mod types_flags;
|
|||
pub mod virtual_port;
|
||||
|
||||
fn read_buffer(data: &[u8]) -> Option<(Vec<u8>, &[u8])> {
|
||||
let len: u32 = *from_bytes(data.get(..4)?);
|
||||
let len_bytes: [u8; 4] = data.get(..4)?.try_into().ok()?;
|
||||
|
||||
let buf = data.get(4..4 + len as usize)?;
|
||||
let len = u32::from_ne_bytes(len_bytes) as usize;
|
||||
|
||||
Some((buf.into(), data.get(4 + len as usize..).unwrap_or_default()))
|
||||
let buf = data.get(4..4 + len)?;
|
||||
|
||||
Some((buf.to_vec(), data.get(4 + len..).unwrap_or_default()))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,21 +28,21 @@ pub fn read_secure_connection_data(
|
|||
|
||||
rc4.apply_keystream(ticket_data);
|
||||
|
||||
let ticket_data: &TicketInternalData = match bytemuck::try_from_bytes(ticket_data) {
|
||||
Ok(v) => v,
|
||||
Err(e) => {
|
||||
error!("unable to read internal ticket data: {}", e);
|
||||
return None;
|
||||
}
|
||||
};
|
||||
if ticket_data.len() < std::mem::size_of::<TicketInternalData>() {
|
||||
error!("ticket_data buffer too small for TicketInternalData");
|
||||
return None;
|
||||
}
|
||||
|
||||
// todo: add ticket expiration
|
||||
let ticket_data_struct: TicketInternalData = bytemuck::pod_read_unaligned(
|
||||
&ticket_data[..std::mem::size_of::<TicketInternalData>()],
|
||||
);
|
||||
|
||||
let TicketInternalData {
|
||||
session_key,
|
||||
pid: ticket_source_pid,
|
||||
issued_time,
|
||||
} = *ticket_data;
|
||||
} = ticket_data_struct;
|
||||
|
||||
// todo: add checking if tickets are signed with a valid md5-hmac
|
||||
let request_data_length = request_data.len();
|
||||
|
|
|
|||
|
|
@ -10,11 +10,5 @@ fi
|
|||
source ./buildscripts/common.sh
|
||||
echo FEATURES:
|
||||
echo $EDITION_FEATURES
|
||||
echo ENV SETTINGS:
|
||||
env
|
||||
|
||||
if [[ ! -v RNEX_STATIC ]]; then
|
||||
cargo test --features "$EDITION_FEATURES"
|
||||
else
|
||||
OPENSSL_LIB_DIR=/usr/lib OPENSSL_INCLUDE_DIR=/usr/include/openssl OPENSSL_STATIC=1 RUSTFLAGS="-C relocation-model=static -C linker=ld.lld" cargo test --features "$EDITION_FEATURES" --target x86_64-unknown-linux-musl
|
||||
fi
|
||||
cargo build --release --features "$EDITION_FEATURES"
|
||||
|
|
|
|||
Loading…
Reference in a new issue