Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
6bfa4b0b
Commit
6bfa4b0b
authored
Nov 26, 2021
by
echicken
🐔
Browse files
Address family must occupy bytes 15 & 16
parent
32238a33
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
exec/websocketservice.js
exec/websocketservice.js
+2
-2
No files found.
exec/websocketservice.js
View file @
6bfa4b0b
...
...
@@ -95,9 +95,9 @@ try {
if
(
UsingHAProxy
())
{
var
hapstr
=
'
\
x0D
\
x0A
\
x0D
\
x0A
\
x00
\
x0D
\
x0A
\
x51
\
x55
\
x49
\
x54
\
x0A
\
x21
'
;
if
(
client
.
socket
.
family
===
PF_INET
)
{
hapstr
+=
'
\
x11
\
x0C
'
;
hapstr
+=
'
\
x11
\
x00
\
x0C
'
;
}
else
if
(
client
.
socket
.
family
===
PF_INET6
)
{
hapstr
+=
'
\
x21
\
x24
'
;
hapstr
+=
'
\
x21
\
x00
\
x24
'
;
}
hapstr
+=
inet_pton
(
FWebSocketHeader
[
'
X-Forwarded-For
'
]);
hapstr
+=
inet_pton
(
FServerSocket
.
remote_ip_address
);
...
...
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