Jump to content
Sign in to follow this  
Veltor88

C++ - Installer un Proxy IP sur votre Game

Recommended Posts

Niveau requis   Intermédiaire

Temps estimé :  10 minutes

 

Bonjour à tous,
 
 
Grace à ce tutoriel vous aurez la possibilité de vous connecter à votre serveur VPS/Nat comme Google Cloud par exemple
 
Char.cpp
 

Cherchez

p.lAddr	= lAddr;

Ajoutez en dessous

if (!g_stProxyIP.empty())
	p.lAddr = inet_addr(g_stProxyIP.c_str());

Config.cpp

 

Cherchez

uint32_t	g_dwSkillBookNextReadMax = 43200;

Ajoutez en dessous

 std::string	g_stProxyIP = "";

Cherchez

fprintf(stdout, "SKILLBOOK_NEXTREAD_MAX: %u\n", g_dwSkillBookNextReadMax);

Ajoutez en dessous

		TOKEN("proxy_ip")
		{
			g_stProxyIP = value_string;
		}

Config.h

 

Cherchez

extern uint32_t	g_dwSkillBookNextReadMax;

 Ajoutez en dessous

extern std::string	g_stProxyIP;

desc.cpp

 

Cherchez

for (int32_t i = 0; i < PLAYER_PER_ACCOUNT; ++i)

 Ajoutez en dessous

	if (!g_stProxyIP.empty())
		rTable.players[i].lAddr=inet_addr(g_stProxyIP.c_str());

Input_db.cpp

 

Cherchez

rTab.players[i].szName);

 Ajoutez en dessous

			if (!g_stProxyIP.empty())
				rTab.players[i].lAddr=inet_addr(g_stProxyIP.c_str());

Cherchez

struct in_addr in;

 Ajoutez en dessous

	if (!g_stProxyIP.empty())
		rTab.players[i].lAddr=inet_addr(g_stProxyIP.c_str());

Cherchez

pack.player = pPacketDB->player;

 Ajoutez en dessous

if (!g_stProxyIP.empty())
	pack.player.lAddr=inet_addr(g_stProxyIP.c_str());

 Finalisation  : compiler et remplacer le game et ouvrir les fichiers CONFIG (Auth, Channel(X)/Core(X) et Game99) et ajoutez :

PROXY_IP: TON_IP

 

2507502.png

 

Source : MartySama
 
Merci à @Kurokos pour avoir testé le PROXY_IP
 
Cordialement,
Veltor

 

  • Like 6

Share this post


Link to post

After this I did lose the ability to join locally.

login through local ip 192.168... disconnect after char select

login through local ip 127.0.0.1 disconnect after char select

login through ethernet ip can't reach the server by client

Maybe I could put an if statement on source to detect if I'm connecting locally and allow it?

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.