wtf? HaProxy - Confgu

wtf

NovemberFalls

Vassal
Customer
Howdy,

Thanks for taking the time to pop in here. HaProxy is whopping my butt...

I tried following this https://lucera2.com/threads/installation-haproxy-v2.2171/ and failed. I am able to get through Auth, and AA, but I hang on server select with this failure Unknown packet D1, state: CONNECTED.

I do have Active Anticheat (active and working) as well.

After reading the forms, It would appear that it is the wrong client. Though when I revert to my stable build, basically everything internal it works. Can anyone provide insights? I really believe the issue lies in here somewhere.

This is what is in my server.properties (when trying haproxy)

Code:
#-------------------------------------------------------------
# Network server configuration
#-------------------------------------------------------------
# IP which Bind gameserver * - on all possibles
GameserverHostname = *
GameserverPort =
# This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname
ExternalHostname = 40.160.250.66
# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname
InternalHostname = 127.0.0.1
Code:
# ------------------------ Configuring HaProxy v2 -----------------
# Specified Port of HaProxy
# let's say they redirect from their port 7878 to your 7777. Then you need to specify 7878 here)
# Also you must set the proxy IP to ExternalHostname and GameserverPort = leave blank.
HAProxyGameserverPort = 7788
Code:
#-------------------------------------------------------------
# Filtering invalid traffic
#-------------------------------------------------------------
# Reject invalid traffic
RejectInvalidConnections = True
# Addresses from which traffic will not be filtered.
# If you're using authserver/config/proxyservers.xml you MUST add the proxy IP here.
# Example ValidIPAddresses = 127.0.0.1,192.168.1.1,192.168.2.1
ValidIPAddresses = 127.0.0.1,40.160.250.66,135.125.174.143



 
Howdy,

Thanks for taking the time to pop in here. HaProxy is whopping my butt...

I tried following this https://lucera2.com/threads/installation-haproxy-v2.2171/ and failed. I am able to get through Auth, and AA, but I hang on server select with this failure Unknown packet D1, state: CONNECTED.

I do have Active Anticheat (active and working) as well.

After reading the forms, It would appear that it is the wrong client. Though when I revert to my stable build, basically everything internal it works. Can anyone provide insights? I really believe the issue lies in here somewhere.

This is what is in my server.properties (when trying haproxy)

Code:
#-------------------------------------------------------------
# Network server configuration
#-------------------------------------------------------------
# IP which Bind gameserver * - on all possibles
GameserverHostname = *
GameserverPort =
# This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname
ExternalHostname = 40.160.250.66
# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname
InternalHostname = 127.0.0.1
Code:
# ------------------------ Configuring HaProxy v2 -----------------
# Specified Port of HaProxy
# let's say they redirect from their port 7878 to your 7777. Then you need to specify 7878 here)
# Also you must set the proxy IP to ExternalHostname and GameserverPort = leave blank.
HAProxyGameserverPort = 7788
Code:
#-------------------------------------------------------------
# Filtering invalid traffic
#-------------------------------------------------------------
# Reject invalid traffic
RejectInvalidConnections = True
# Addresses from which traffic will not be filtered.
# If you're using authserver/config/proxyservers.xml you MUST add the proxy IP here.
# Example ValidIPAddresses = 127.0.0.1,192.168.1.1,192.168.2.1
ValidIPAddresses = 127.0.0.1,40.160.250.66,135.125.174.143
# Also you must set the proxy IP to ExternalHostname and GameserverPort = leave blank.<br>HAProxyGameserverPort = 7788
Here is, if you use direct port, for example 7777, set 7777
 
you trying make single proxy server or extra?
do no listen Deaser, just set HAProxyGameserverPort to your haproxy port and add in proxyservers.xml like this, DO NOT LEAVE BLANK in GameserverPort
1769490818659.webp
if you want add multiproxy, just add more proxy servers in proxyservers.xml

совсем не понимаю какой смысл оставлять пустым порт ГСа если ГС можно тупо скрыть через прокси, вы себе дополнительную ёбку головы устраиваете, вам нужно пиздовать менять айпишник для лицензии, еще и доп прокси в такой схеме не подключите, а что взамен? НИ ХУ Я
 
Last edited:
I have 2 separate vps, and I want to use one of them as the main proxy (on launch, players go through here), then they log in and server select hands them off to the appropriate proxy.

So, Main server (hidden), then US-E and EU-W proxies.

I haven't tested by changing the IP address (with all versions, I dont know how long that takes to propagate).


This is my proxyservers.xml which doesnt let me get to character select.

<?xml version='1.0' encoding='utf-8'?>

Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE list SYSTEM "proxyservers.dtd">
<list>

    <!-- Bartz (1x) - US-E (primary view) -->
    <proxyServer origId="1" proxyId="1" proxyHost="40.160.250.66" proxyPort="7777" hideMain="true"/>

    <!-- Test Server - Staff only, hidden from public -->
    <proxyServer origId="120" proxyId="120" proxyHost="40.160.250.66" proxyPort="7778"/>

    <!-- Bartz (1x) - EU-W view -->
    <proxyServer origId="1" proxyId="11" proxyHost="135.125.174.143" proxyPort="7777"/>

</list>
 
Does anyone have a bullet proof guide to this? I would like to fully implement it this wednesday. Though Despite having followed the guide on numerous attempts, I still get locked in the server selection. It is as if it wants to advance (the mini freeze), then it just never enters char select.
 
Does anyone have a bullet proof guide to this? I would like to fully implement it this wednesday. Though Despite having followed the guide on numerous attempts, I still get locked in the server selection. It is as if it wants to advance (the mini freeze), then it just never enters char select.
Where you install the haproxy on the main host + vps or only to the vps where will be the proxy?
 
Where you install the haproxy on the main host + vps or only to the vps where will be the proxy?
thanks for the reply good sir.

Haproxy exists on both VPS's, what I call US-E and EU-W.

I do not have HaProxy on the Main Host. I am using the Lucera Built in haproxy handler, do we need it on main?
 
thanks for the reply good sir.

Haproxy exists on both VPS's, what I call US-E and EU-W.

I do not have HaProxy on the Main Host. I am using the Lucera Built in haproxy handler, do we need it on main?
No, you do not need the Haproxy on your main. I was had the same issue like you. When I remove the haproxy from the main host, I was able to login.
 
No, you do not need the Haproxy on your main. I was had the same issue like you. When I remove the haproxy from the main host, I was able to login.
Let me provide some additional details so you can hopefully help me out here.

Currently everything is pointing to the main server, this includes Lucera, and the game client.

When I change the the files, I have to update the following:

  1. anticheat.xml
  2. authserver.properties
  3. proxyservers.xml
  4. server.properties
Additional Context

US-E Proxy: 40.160.250.66
EU-W Proxy: 135.125.174.143


Currently, theres 2 flavors for the anticheat.xml

Stable AKA Direct
Code:
<AnticheatSettings>
<loginserveraddress value="AA:2106" />
    <gameservers>
        <gameserver id="1" value="AA:7777" maximumgames="1" />
        <gameserver id="120" value="AA:7778" maximumgames="1" />

Proxy - Per the guide needs to have the ports adjusted (I have tried without this as well but its the same result)
Code:
<AnticheatSettings>
    <!-- AuthServer listens on internal port 2116 in HAProxy mode -->
    <loginserveraddress value="AA:2116" />
    <gameservers>
        <!-- Bartz listens on internal port 7787 in HAProxy mode -->
        <gameserver id="1" value="AA:7787" maximumgames="1" />
        <!-- Teon listens on internal port 7788 in HAProxy mode -->
        <gameserver id="120" value="AA:7788" maximumgames="1" />


Authserver.properties

Stable AKA Direct
Code:
# The host and port for client connections (Physical Ethernet address)
LoginserverHostname = 0.0.0.0
LoginserverPort = 2106

# ===============================================================
# Configuring HaProxy v2
# ===============================================================
# Specifies the IP address of the physical interface
HAProxyLoginserverHostname =
# Specified Port of HaProxy
# let's say they redirect from their port 2121 to your 2106. Then you need to specify 2121 here)
# You should also set LoginserverPort = -1
HAProxyLoginserverPort = -1
# ===============================================================

Proxy - Per the guide needs to have the ports adjusted (I have tried without this as well but its the same result)
Code:
# External Connection Address
# The host and port for client connections (Physical Ethernet address)
LoginserverHostname = 0.0.0.0
LoginserverPort = -1

# ===============================================================
# Configuring HaProxy v2
# ===============================================================
# Specifies the IP address of the physical interface (YOUR server IP, not proxy IP)
HAProxyLoginserverHostname = <Main Server Ip Goes Here>
# Specified Port of HaProxy - MUST be different from standard 2106
# HAProxy VPS listens on 2106, forwards to this port (2116)
HAProxyLoginserverPort = 2116
# ===============================================================


proxyservers.xml

Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE list SYSTEM "proxyservers.dtd">
<list>
    <!-- ============================================================ -->
    <!-- US-E PROXY (Primary Region) - 40.160.250.66                  -->
    <!-- Players connecting here see servers without region suffix    -->
    <!-- hideMain="true" prevents the backend server from also        -->
    <!-- appearing in the list (avoids duplicates)                    -->
    <!-- ============================================================ -->

    <!-- Bartz (1x) - US-E (primary view) -->
    <proxyServer origId="1" proxyId="1" proxyHost="40.160.250.66" proxyPort="7777" hideMain="true"/>

    <!-- Test Server - Staff only, hidden from public -->
    <proxyServer origId="120" proxyId="120" proxyHost="40.160.250.66" proxyPort="7778"/>

    <!-- ============================================================ -->
    <!-- EU-W PROXY - 135.125.174.143                                 -->
    <!-- Players connecting here see "- EU-W" suffix                  -->
    <!-- ============================================================ -->

    <!-- Bartz (1x) - EU-W view -->
    <proxyServer origId="1" proxyId="11" proxyHost="135.125.174.143" proxyPort="7777"/>

</list>


server.properties
Stable AKA Direct
Code:
#-------------------------------------------------------------
# Network server configuration
#-------------------------------------------------------------
# IP which Bind gameserver * - on all possibles
GameserverHostname = *
GameserverPort = 7777

# This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname
ExternalHostname = <Main Ip Goes Here>
# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname
InternalHostname = 127.0.0.1

# ------------------------ Configuring HaProxy v2 -----------------
# Specified Port of HaProxy
# let's say they redirect from their port 7878 to your 7777. Then you need to specify 7878 here)
# Also you must set the proxy IP to ExternalHostname and GameserverPort = leave blank.
HAProxyGameserverPort = -1

#-------------------------------------------------------------
# Filtering invalid traffic
#-------------------------------------------------------------
# Reject invalid traffic
RejectInvalidConnections = True
# Addresses from which traffic will not be filtered.
# If you're using authserver/config/proxyservers.xml you MUST add the proxy IP here.
# Example ValidIPAddresses = 127.0.0.1,192.168.1.1,192.168.2.1
ValidIPAddresses = 127.0.0.1,135.125.174.143,40.160.250.66

Proxy - Per the guide needs to have the ports adjusted (I have tried without this as well but its the same result)
Code:
#-------------------------------------------------------------
# Network server configuration
#-------------------------------------------------------------
# IP which Bind gameserver * - on all possibles
GameserverHostname = *
GameserverPort =

# This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname
ExternalHostname = 40.160.250.66
# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname
InternalHostname = 127.0.0.1

# ------------------------ Configuring HaProxy v2 -----------------
# Specified Port of HaProxy
# let's say they redirect from their port 7878 to your 7777. Then you need to specify 7878 here)
# Also you must set the proxy IP to ExternalHostname and GameserverPort = leave blank.
HAProxyGameserverPort = 7787

#-------------------------------------------------------------
# Filtering invalid traffic
#-------------------------------------------------------------
# Reject invalid traffic
RejectInvalidConnections = True
# Addresses from which traffic will not be filtered.
# If you're using authserver/config/proxyservers.xml you MUST add the proxy IP here.
# Example ValidIPAddresses = 127.0.0.1,192.168.1.1,192.168.2.1
ValidIPAddresses = 127.0.0.1,40.160.250.66,135.125.174.143

When I flip to Proxy and update my DNS record to use the proxy end point, this all crumbles. I get through Active Anticheat -> Auth (Meaning I log in and see servers) -> Select Server (that little hang for a moment when trying to display characters) -> Fails to reveal character select.

I am happy to pay to ensure that this is working, as I fully believe in proxies as well as the hidden origin, but for the life of me I can stand this up.
 
Let me provide some additional details so you can hopefully help me out here.

Currently everything is pointing to the main server, this includes Lucera, and the game client.

When I change the the files, I have to update the following:

  1. anticheat.xml
  2. authserver.properties
  3. proxyservers.xml
  4. server.properties
Additional Context

US-E Proxy: 40.160.250.66
EU-W Proxy: 135.125.174.143


Currently, theres 2 flavors for the anticheat.xml

Stable AKA Direct
Code:
<AnticheatSettings>
<loginserveraddress value="AA:2106" />
    <gameservers>
        <gameserver id="1" value="AA:7777" maximumgames="1" />
        <gameserver id="120" value="AA:7778" maximumgames="1" />

Proxy - Per the guide needs to have the ports adjusted (I have tried without this as well but its the same result)
Code:
<AnticheatSettings>
    <!-- AuthServer listens on internal port 2116 in HAProxy mode -->
    <loginserveraddress value="AA:2116" />
    <gameservers>
        <!-- Bartz listens on internal port 7787 in HAProxy mode -->
        <gameserver id="1" value="AA:7787" maximumgames="1" />
        <!-- Teon listens on internal port 7788 in HAProxy mode -->
        <gameserver id="120" value="AA:7788" maximumgames="1" />


Authserver.properties

Stable AKA Direct
Code:
# The host and port for client connections (Physical Ethernet address)
LoginserverHostname = 0.0.0.0
LoginserverPort = 2106

# ===============================================================
# Configuring HaProxy v2
# ===============================================================
# Specifies the IP address of the physical interface
HAProxyLoginserverHostname =
# Specified Port of HaProxy
# let's say they redirect from their port 2121 to your 2106. Then you need to specify 2121 here)
# You should also set LoginserverPort = -1
HAProxyLoginserverPort = -1
# ===============================================================

Proxy - Per the guide needs to have the ports adjusted (I have tried without this as well but its the same result)
Code:
# External Connection Address
# The host and port for client connections (Physical Ethernet address)
LoginserverHostname = 0.0.0.0
LoginserverPort = -1

# ===============================================================
# Configuring HaProxy v2
# ===============================================================
# Specifies the IP address of the physical interface (YOUR server IP, not proxy IP)
HAProxyLoginserverHostname = <Main Server Ip Goes Here>
# Specified Port of HaProxy - MUST be different from standard 2106
# HAProxy VPS listens on 2106, forwards to this port (2116)
HAProxyLoginserverPort = 2116
# ===============================================================


proxyservers.xml

Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE list SYSTEM "proxyservers.dtd">
<list>
    <!-- ============================================================ -->
    <!-- US-E PROXY (Primary Region) - 40.160.250.66                  -->
    <!-- Players connecting here see servers without region suffix    -->
    <!-- hideMain="true" prevents the backend server from also        -->
    <!-- appearing in the list (avoids duplicates)                    -->
    <!-- ============================================================ -->

    <!-- Bartz (1x) - US-E (primary view) -->
    <proxyServer origId="1" proxyId="1" proxyHost="40.160.250.66" proxyPort="7777" hideMain="true"/>

    <!-- Test Server - Staff only, hidden from public -->
    <proxyServer origId="120" proxyId="120" proxyHost="40.160.250.66" proxyPort="7778"/>

    <!-- ============================================================ -->
    <!-- EU-W PROXY - 135.125.174.143                                 -->
    <!-- Players connecting here see "- EU-W" suffix                  -->
    <!-- ============================================================ -->

    <!-- Bartz (1x) - EU-W view -->
    <proxyServer origId="1" proxyId="11" proxyHost="135.125.174.143" proxyPort="7777"/>

</list>


server.properties
Stable AKA Direct
Code:
#-------------------------------------------------------------
# Network server configuration
#-------------------------------------------------------------
# IP which Bind gameserver * - on all possibles
GameserverHostname = *
GameserverPort = 7777

# This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname
ExternalHostname = <Main Ip Goes Here>
# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname
InternalHostname = 127.0.0.1

# ------------------------ Configuring HaProxy v2 -----------------
# Specified Port of HaProxy
# let's say they redirect from their port 7878 to your 7777. Then you need to specify 7878 here)
# Also you must set the proxy IP to ExternalHostname and GameserverPort = leave blank.
HAProxyGameserverPort = -1

#-------------------------------------------------------------
# Filtering invalid traffic
#-------------------------------------------------------------
# Reject invalid traffic
RejectInvalidConnections = True
# Addresses from which traffic will not be filtered.
# If you're using authserver/config/proxyservers.xml you MUST add the proxy IP here.
# Example ValidIPAddresses = 127.0.0.1,192.168.1.1,192.168.2.1
ValidIPAddresses = 127.0.0.1,135.125.174.143,40.160.250.66

Proxy - Per the guide needs to have the ports adjusted (I have tried without this as well but its the same result)
Code:
#-------------------------------------------------------------
# Network server configuration
#-------------------------------------------------------------
# IP which Bind gameserver * - on all possibles
GameserverHostname = *
GameserverPort =

# This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname
ExternalHostname = 40.160.250.66
# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname
InternalHostname = 127.0.0.1

# ------------------------ Configuring HaProxy v2 -----------------
# Specified Port of HaProxy
# let's say they redirect from their port 7878 to your 7777. Then you need to specify 7878 here)
# Also you must set the proxy IP to ExternalHostname and GameserverPort = leave blank.
HAProxyGameserverPort = 7787

#-------------------------------------------------------------
# Filtering invalid traffic
#-------------------------------------------------------------
# Reject invalid traffic
RejectInvalidConnections = True
# Addresses from which traffic will not be filtered.
# If you're using authserver/config/proxyservers.xml you MUST add the proxy IP here.
# Example ValidIPAddresses = 127.0.0.1,192.168.1.1,192.168.2.1
ValidIPAddresses = 127.0.0.1,40.160.250.66,135.125.174.143

When I flip to Proxy and update my DNS record to use the proxy end point, this all crumbles. I get through Active Anticheat -> Auth (Meaning I log in and see servers) -> Select Server (that little hang for a moment when trying to display characters) -> Fails to reveal character select.

I am happy to pay to ensure that this is working, as I fully believe in proxies as well as the hidden origin, but for the life of me I can stand this up.
I know how you feel mate, check DM.
 
Back
Top