Aller au contenu
Top-Metin2.org - Vous êtes à la recherche d'un serveur Metin 2 ? ×
×
×
  • Créer...

Installer un Proxy IP sur votre Game


Messages recommandés

  • Funkiest

Centre de Téléchargement

Hidden Content

    Give reaction to this post to see the hidden content.
( Interne )

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

 

  • Metin2 Dev 11
  • Good 2
  • Love 11
Lien vers le commentaire
Partager sur d’autres sites

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?

 

Lien vers le commentaire
Partager sur d’autres sites

  • 1 an après...

Salut, Funkymu.

J'ai un problème avec ce tutoriel, j'ai donc suivi toutes les étapes que vous avez écrites ci-dessus, mais je rencontre cette erreur lors de la compilation:

desc.cpp: In member function 'void DESC::SendLoginSuccessPacket()':
desc.cpp:940:71: error: 'i' was not declared in this scope
   CGuild* g = CGuildManager::instance().GetLinkedGuild(rTable.players[i].dwID);

C'est Char.cpp: 

Hidden Content

    Give reaction to this post to see the hidden content.

C'est Config.cpp: 

Hidden Content

    Give reaction to this post to see the hidden content.

C'est Config.h: 

Hidden Content

    Give reaction to this post to see the hidden content.

C'est Desc.cpp: 

Hidden Content

    Give reaction to this post to see the hidden content.

C'est Input_db.cpp: 

Hidden Content

    Give reaction to this post to see the hidden content.

Cela fait 3 semaines que je lutte pour exécuter un serveur Metin2 sur un VPS de Google Cloud. Si vous pouviez m'aider, je vous serais à jamais redevable.

Modifié par SkryDll
  • Metin2 Dev 2
Lien vers le commentaire
Partager sur d’autres sites

  • Administrateur
il y a une heure, SkryDll a dit :

Salut, Funkymu.

J'ai un problème avec ce tutoriel, j'ai donc suivi toutes les étapes que vous avez écrites ci-dessus, mais je rencontre cette erreur lors de la compilation:


desc.cpp: In member function 'void DESC::SendLoginSuccessPacket()':
desc.cpp:940:71: error: 'i' was not declared in this scope
   CGuild* g = CGuildManager::instance().GetLinkedGuild(rTable.players[i].dwID);

C'est Char.cpp: 

Hidden Content

    Give reaction to this post to see the hidden content.

C'est Config.cpp: 

Hidden Content

    Give reaction to this post to see the hidden content.

C'est Config.h: 

Hidden Content

    Give reaction to this post to see the hidden content.

C'est Desc.cpp: 

Hidden Content

    Give reaction to this post to see the hidden content.

C'est Input_db.cpp: 

Hidden Content

    Give reaction to this post to see the hidden content.

Cela fait 3 semaines que je lutte pour exécuter un serveur Metin2 sur un VPS de Google Cloud. Si vous pouviez m'aider, je vous serais à jamais redevable.

Tu devrais utiliser ce lien pour fournir tes fichiers https://fr.metin2.dev/bin/, ca sera plus simple pour t'aider que d'aller sur mega, télécharger, ouvrir...

  • Love 1
Lien vers le commentaire
Partager sur d’autres sites

char.cpp: In member function 'void CHARACTER::ChannelSwitch(int)':
char.cpp:7349:6: error: 'g_stProxyIP' was not declared in this scope
 if (!g_stProxyIP.empty())
      ^
compiling dev_log.cpp
char.cpp: In member function 'void CHARACTER::ChannelSwitch(int)':
char.cpp:7349:6: error: 'g_stProxyIP' was not declared in this scope
 if (!g_stProxyIP.empty())

 

Lien vers le commentaire
Partager sur d’autres sites

  • 6 mois après...
  • Développeur
Il y a 16 heures, Shurinhass a dit :

it's not working here, I'm using these files from the server   

[40250] Reference Serverfile + Client + Src [15 Available Languages]

Hidden Content

    Give reaction to this post to see the hidden content.

You did something wrong trying to add the system. Like an additional } or whatever

  • Good 1
Lien vers le commentaire
Partager sur d’autres sites



  • brilliantdiscord_widget
  • Flux d'Activité

    1. 21

      Metin2 en 2020 peut-on en parler?

    2. 0

      METIN2Project

    3. 3

      Ressources - UnPack - Metin2 Client - Officiel

    4. 0

      Barre des tâches d'argent étendue

    5. 16

      Redémarrage automatique des channels

    6. 16

      Multi Logo GM / SGM / GA

  • En ligne récemment

    • Aucun utilisateur enregistré regarde cette page.

Information importante

Conditions d’utilisation / Politique de confidentialité / Règles / Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.