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
9cf3af0c
Commit
9cf3af0c
authored
Jul 08, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
585a8921
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
ygopro-server.coffee
ygopro-server.coffee
+6
-3
ygopro-server.js
ygopro-server.js
+9
-4
No files found.
ygopro-server.coffee
View file @
9cf3af0c
...
...
@@ -904,7 +904,7 @@ CLIENT_get_authorize_key = global.CLIENT_get_authorize_key = (client) ->
if
!
settings
.
modules
.
mycard
.
enabled
and
client
.
vpass
return
client
.
name_vpass
else
if
settings
.
modules
.
mycard
.
enabled
or
settings
.
modules
.
tournament_mode
.
enabled
or
settings
.
modules
.
challonge
.
enabled
or
client
.
is_local
return
client
.
name
return
client
.
name
or
client
.
ip
or
'undefined'
else
return
client
.
ip
+
":"
+
client
.
name
...
...
@@ -1218,8 +1218,11 @@ toIpv6 = global.toIpv6 = (ip) ->
isTrustedProxy
=
global
.
isTrustedProxy
=
(
ip
)
->
return
settings
.
modules
.
trusted_proxies
.
some
((
trusted
)
->
cidr
=
if
trusted
.
includes
(
'/'
)
then
ip6addr
.
createCIDR
(
trusted
)
else
ip6addr
.
createAddrRange
(
trusted
,
trusted
)
return
cidr
.
contains
(
ip
)
try
cidr
=
if
trusted
.
includes
(
'/'
)
then
ip6addr
.
createCIDR
(
trusted
)
else
ip6addr
.
createAddrRange
(
trusted
,
trusted
)
return
cidr
.
contains
(
ip
)
catch
e
return
false
)
getRealIp
=
global
.
getRealIp
=
(
physical_ip
,
xff_ip
)
->
...
...
ygopro-server.js
View file @
9cf3af0c
...
...
@@ -1183,7 +1183,7 @@
if
(
!
settings
.
modules
.
mycard
.
enabled
&&
client
.
vpass
)
{
return
client
.
name_vpass
;
}
else
if
(
settings
.
modules
.
mycard
.
enabled
||
settings
.
modules
.
tournament_mode
.
enabled
||
settings
.
modules
.
challonge
.
enabled
||
client
.
is_local
)
{
return
client
.
name
;
return
client
.
name
||
client
.
ip
||
'
undefined
'
;
}
else
{
return
client
.
ip
+
"
:
"
+
client
.
name
;
}
...
...
@@ -1604,9 +1604,14 @@
isTrustedProxy
=
global
.
isTrustedProxy
=
function
(
ip
)
{
return
settings
.
modules
.
trusted_proxies
.
some
(
function
(
trusted
)
{
var
cidr
;
cidr
=
trusted
.
includes
(
'
/
'
)
?
ip6addr
.
createCIDR
(
trusted
)
:
ip6addr
.
createAddrRange
(
trusted
,
trusted
);
return
cidr
.
contains
(
ip
);
var
cidr
,
e
;
try
{
cidr
=
trusted
.
includes
(
'
/
'
)
?
ip6addr
.
createCIDR
(
trusted
)
:
ip6addr
.
createAddrRange
(
trusted
,
trusted
);
return
cidr
.
contains
(
ip
);
}
catch
(
error1
)
{
e
=
error1
;
return
false
;
}
});
};
...
...
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