Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
srvpro
Commits
79f741d3
Commit
79f741d3
authored
Jun 30, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of ../srvpro
parents
69402caa
3b205665
Pipeline
#38323
failed with stages
in 70 minutes and 33 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
18 deletions
+42
-18
Dockerfile.lite
Dockerfile.lite
+2
-3
msg-polyfill/index.js
msg-polyfill/index.js
+15
-5
msg-polyfill/index.ts
msg-polyfill/index.ts
+13
-5
ygopro-server.coffee
ygopro-server.coffee
+5
-2
ygopro-server.js
ygopro-server.js
+7
-3
No files found.
Dockerfile.lite
View file @
79f741d3
...
@@ -6,9 +6,8 @@ RUN apt update && \
...
@@ -6,9 +6,8 @@ RUN apt update && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/*
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/*
WORKDIR /usr/src
WORKDIR /usr/src
RUN wget -O premake.zip https://github.com/premake/premake-core/releases/download/v5.0.0-beta5/premake-5.0.0-beta5-src.zip && \
RUN wget -O premake.zip https://github.com/premake/premake-core/releases/download/v5.0.0-beta7/premake-5.0.0-beta7-src.zip && \
7z x -y premake.zip && \
7z x -y -opremake premake.zip && \
mv premake-5.0.0-beta5-src premake && \
cd premake/build/gmake.unix && \
cd premake/build/gmake.unix && \
make -j$(nproc)
make -j$(nproc)
...
...
msg-polyfill/index.js
View file @
79f741d3
...
@@ -15,15 +15,25 @@ const getPolyfillers = (version) => {
...
@@ -15,15 +15,25 @@ const getPolyfillers = (version) => {
};
};
async
function
polyfillGameMsg
(
version
,
msgTitle
,
buffer
)
{
async
function
polyfillGameMsg
(
version
,
msgTitle
,
buffer
)
{
const
polyfillers
=
getPolyfillers
(
version
);
const
polyfillers
=
getPolyfillers
(
version
);
let
mutated
=
false
;
let
pbuf
=
buffer
;
for
(
const
polyfiller
of
polyfillers
)
{
for
(
const
polyfiller
of
polyfillers
)
{
const
newBuf
=
await
polyfiller
.
polyfillGameMsg
(
msgTitle
,
buffer
);
const
newBuf
=
await
polyfiller
.
polyfillGameMsg
(
msgTitle
,
pbuf
);
if
(
newBuf
)
{
if
(
newBuf
)
{
mutated
=
true
;
pbuf
=
newBuf
;
buffer
=
newBuf
;
}
}
}
}
return
mutated
?
buffer
:
undefined
;
if
(
pbuf
===
buffer
)
{
return
undefined
;
}
else
if
(
pbuf
.
length
<=
buffer
.
length
)
{
pbuf
.
copy
(
buffer
,
0
,
0
,
pbuf
.
length
);
return
pbuf
.
length
===
buffer
.
length
?
undefined
:
buffer
.
slice
(
0
,
pbuf
.
length
);
}
else
{
return
pbuf
;
}
}
}
async
function
polyfillResponse
(
version
,
msgTitle
,
buffer
)
{
async
function
polyfillResponse
(
version
,
msgTitle
,
buffer
)
{
const
polyfillers
=
getPolyfillers
(
version
);
const
polyfillers
=
getPolyfillers
(
version
);
...
...
msg-polyfill/index.ts
View file @
79f741d3
...
@@ -15,15 +15,23 @@ const getPolyfillers = (version: number) => {
...
@@ -15,15 +15,23 @@ const getPolyfillers = (version: number) => {
export
async
function
polyfillGameMsg
(
version
:
number
,
msgTitle
:
string
,
buffer
:
Buffer
)
{
export
async
function
polyfillGameMsg
(
version
:
number
,
msgTitle
:
string
,
buffer
:
Buffer
)
{
const
polyfillers
=
getPolyfillers
(
version
);
const
polyfillers
=
getPolyfillers
(
version
);
let
mutated
=
false
;
let
pbuf
=
buffer
;
for
(
const
polyfiller
of
polyfillers
)
{
for
(
const
polyfiller
of
polyfillers
)
{
const
newBuf
=
await
polyfiller
.
polyfillGameMsg
(
msgTitle
,
buffer
);
const
newBuf
=
await
polyfiller
.
polyfillGameMsg
(
msgTitle
,
pbuf
);
if
(
newBuf
)
{
if
(
newBuf
)
{
mutated
=
true
;
pbuf
=
newBuf
;
buffer
=
newBuf
;
}
}
}
}
return
mutated
?
buffer
:
undefined
;
if
(
pbuf
===
buffer
)
{
return
undefined
;
}
else
if
(
pbuf
.
length
<=
buffer
.
length
)
{
pbuf
.
copy
(
buffer
,
0
,
0
,
pbuf
.
length
);
return
pbuf
.
length
===
buffer
.
length
?
undefined
:
buffer
.
slice
(
0
,
pbuf
.
length
);
}
else
{
return
pbuf
;
}
}
}
export
async
function
polyfillResponse
(
version
:
number
,
msgTitle
:
string
,
buffer
:
Buffer
)
{
export
async
function
polyfillResponse
(
version
:
number
,
msgTitle
:
string
,
buffer
:
Buffer
)
{
...
...
ygopro-server.coffee
View file @
79f741d3
...
@@ -2370,17 +2370,20 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
...
@@ -2370,17 +2370,20 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
}
}
CLIENT_kick
(
client
)
CLIENT_kick
(
client
)
return
false
return
false
client_key
=
CLIENT_get_authorize_key
(
client
)
clean_blocker
=
()
->
aragami
.
del
(
aragami_classes
.
ClientVersionBlocker
,
client_key
)
if
info
.
version
==
settings
.
version
if
info
.
version
==
settings
.
version
await
clean_blocker
()
return
true
return
true
if
settings
.
alternative_versions
.
includes
(
info
.
version
)
if
settings
.
alternative_versions
.
includes
(
info
.
version
)
client_key
=
CLIENT_get_authorize_key
(
client
)
if
!
await
aragami
.
has
(
aragami_classes
.
ClientVersionBlocker
,
client_key
)
if
!
await
aragami
.
has
(
aragami_classes
.
ClientVersionBlocker
,
client_key
)
blocker_obj
=
new
aragami_classes
.
ClientVersionBlocker
()
blocker_obj
=
new
aragami_classes
.
ClientVersionBlocker
()
blocker_obj
.
clientKey
=
client_key
blocker_obj
.
clientKey
=
client_key
await
aragami
.
set
(
blocker_obj
)
await
aragami
.
set
(
blocker_obj
)
return
bad_version
(
"${version_to_polyfill}"
)
return
bad_version
(
"${version_to_polyfill}"
)
else
else
await
aragami
.
del
(
aragami_classes
.
ClientVersionBlocker
,
client_key
)
await
clean_blocker
(
)
return
true
return
true
return
bad_version
(
if
info
.
version
<
settings
.
version
then
settings
.
modules
.
update
else
settings
.
modules
.
wait_update
)
return
bad_version
(
if
info
.
version
<
settings
.
version
then
settings
.
modules
.
update
else
settings
.
modules
.
wait_update
)
polyfill_version
=
()
->
polyfill_version
=
()
->
...
...
ygopro-server.js
View file @
79f741d3
...
@@ -3120,7 +3120,7 @@
...
@@ -3120,7 +3120,7 @@
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
ygopro
.
ctos_follow
(
'
JOIN_GAME
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
available_logs
,
check_buffer_indentity
,
check_version
,
create_room_name
,
create_room_with_action
,
decrypted_buffer
,
duelLog
,
e
,
exactBan
,
i
,
id
,
index
,
j
,
l
,
len
,
len1
,
len2
,
len3
,
m
,
matching_match
,
matching_participant
,
n
,
polyfill_version
,
pre_room
,
recover_match
,
ref
,
ref1
,
replay
,
replay_id
,
replays
,
room
,
secret
,
struct
,
tournament_data
,
userData
,
userDataRes
,
userUrl
;
var
available_logs
,
check_buffer_indentity
,
check_version
,
create_room_name
,
create_room_with_action
,
decrypted_buffer
,
duelLog
,
e
,
exactBan
,
i
,
id
,
index
,
j
,
l
,
len
,
len1
,
len2
,
len3
,
m
,
matching_match
,
matching_participant
,
n
,
polyfill_version
,
pre_room
,
recover_match
,
ref
,
ref1
,
replay
,
replay_id
,
replays
,
room
,
secret
,
struct
,
tournament_data
,
userData
,
userDataRes
,
userUrl
;
check_version
=
async
function
()
{
check_version
=
async
function
()
{
var
bad_version
,
blocker_obj
,
client_key
;
var
bad_version
,
blocker_obj
,
cl
ean_blocker
,
cl
ient_key
;
bad_version
=
function
(
msg
)
{
bad_version
=
function
(
msg
)
{
ygopro
.
stoc_send_chat
(
client
,
msg
,
ygopro
.
constants
.
COLORS
.
RED
);
ygopro
.
stoc_send_chat
(
client
,
msg
,
ygopro
.
constants
.
COLORS
.
RED
);
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
...
@@ -3130,18 +3130,22 @@
...
@@ -3130,18 +3130,22 @@
CLIENT_kick
(
client
);
CLIENT_kick
(
client
);
return
false
;
return
false
;
};
};
client_key
=
CLIENT_get_authorize_key
(
client
);
clean_blocker
=
function
()
{
return
aragami
.
del
(
aragami_classes
.
ClientVersionBlocker
,
client_key
);
};
if
(
info
.
version
===
settings
.
version
)
{
if
(
info
.
version
===
settings
.
version
)
{
await
clean_blocker
();
return
true
;
return
true
;
}
}
if
(
settings
.
alternative_versions
.
includes
(
info
.
version
))
{
if
(
settings
.
alternative_versions
.
includes
(
info
.
version
))
{
client_key
=
CLIENT_get_authorize_key
(
client
);
if
(
!
(
await
aragami
.
has
(
aragami_classes
.
ClientVersionBlocker
,
client_key
)))
{
if
(
!
(
await
aragami
.
has
(
aragami_classes
.
ClientVersionBlocker
,
client_key
)))
{
blocker_obj
=
new
aragami_classes
.
ClientVersionBlocker
();
blocker_obj
=
new
aragami_classes
.
ClientVersionBlocker
();
blocker_obj
.
clientKey
=
client_key
;
blocker_obj
.
clientKey
=
client_key
;
await
aragami
.
set
(
blocker_obj
);
await
aragami
.
set
(
blocker_obj
);
return
bad_version
(
"
${version_to_polyfill}
"
);
return
bad_version
(
"
${version_to_polyfill}
"
);
}
else
{
}
else
{
await
aragami
.
del
(
aragami_classes
.
ClientVersionBlocker
,
client_key
);
await
clean_blocker
(
);
return
true
;
return
true
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment