Launcher'ınızda bu kısma basıldığında çalışacak bir kayıt formu geliştirdim. Proje C# ve PHP ile yazıldı. Insert işleminde PDO kullandım, PHP geliştiricilerinin bile en güvenli sistem budur dedikleri bir sistemdir. Projelerde değişmesi gereken yerleri yorum şeklinde belirttim. Yapamayan arkdaşlar olursa bunun içinde bir video hazırlayabilirim. Projenin solution dosyasını vereceğim için tamamen geliştirmeye açıktır. C#'dan anlayan arkadaşlar geliştirebilirler. Launcher'ınızda Hesap butonuna basıldığında bu exe'nin açılması için launcher dosyanıızdaki skin.xml ' de bu butonun exec 'ine bu exe'nin yolunu göstermeniz yeterli olur. Aynı config.exe mantığı gibi yaparsınız diye umuyorum. Ayrıca talep görürse gerekli anlatımı video şeklinde hazırlarım.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Edit: Projeyi kendime göre nasıl düzenlerim ve Launcher'ıma nasıl eklerim diyenler varsa bununla alakalı video çekebilrim...
Metin2 Sunucuları İçin Sunucu Tarafında Çalışan Kayıt Sistemi Geliştirme Rehberi
C# ve PHP dillerini kullanarak Metin2 özel sunucularınız için güçlü bir kayıt sistemi oluşturmak, hem güvenlik hem de kullanıcı deneyimi açısından büyük önem taşır. Bu rehberde, Metin2Lobby olarak sunucu geliştiricileri için detaylı bir şekilde nasıl bir C# tabanlı kayıt programı ve PHP destekli web servisi entegre edebileceğinizi anlatacağız.
Sunucu Tarafında (Server Side) Kayıt Sistemi Nedir?
Metin2 özel sunucularında, oyuncuların oyun içi veya harici yollarla hesap oluşturabilmesi için bir kayıt sistemi gereklidir. Bu sistem genellikle AuthDB ile entegre çalışarak yeni kullanıcıları veritabanına güvenli şekilde ekler. C# tarafında geliştirilen istemci, kullanıcıdan gerekli bilgileri alır, şifrelemeye tabi tutar ve PHP ile yazılmış olan arka uç servisine gönderir. PHP tarafı da bu verileri doğrular ve veritabanına işler.
Neden C# ve PHP Kullanmalısınız?[/BR]
C#, masaüstü uygulamaları geliştirmek için güçlü ve güvenilir bir dildir. Windows tabanlı sistemlerde yüksek performans sağlar ve kolay GUI entegrasyonuna sahiptir. PHP ise web tabanlı işlemler için idealdir, veritabanı işlemleri hızlıdır ve sunucu tarafında kolay yönetilebilir. Bu ikili, Metin2 geliştiricileri arasında yaygın olarak tercih edilmektedir çünkü hem güvenli hem de esnek yapı sunar.
C# Tarafında Geliştirilecek Fonksiyonlar
Form tabanlı bir arayüz oluşturulur. Kullanıcıdan kullanıcı adı, şifre ve e-posta gibi bilgiler alınır. Şifreler SHA256 veya benzeri güçlü bir algoritma ile şifrelenmelidir. Ardından, veriler POST metodu ile PHP dosyasına gönderilir. Hata durumları kontrol edilir ve kullanıcıya geri bildirim sağlanır. Örneğin:
- Kullanıcı adı daha önce alınmışsa
- Şifre belirtilen uzunlukta değilse
- E-posta formatı doğru değilse
PHP Tarafında Gerçekleştirilecek İşlemler[/BR]
Gelen veriler kontrol edilir. Gerekli alanlar eksiksiz mi? Kullanıcı adı daha önce alınmış mı? E-posta formatı geçerli mi? Bu kontroller yapıldıktan sonra, veriler MySQL veya MariaDB veritabanına güvenli şekilde eklenir. Prepared statements kullanarak SQL injection saldırılarına karşı korunma sağlanmalıdır. Ayrıca, IP bazlı engelleme ve spam önleyici sistemler entegre edilebilir.
Olası Güvenlik Açıkları ve Çözümler
Bazı geliştiriciler basitçe şifreleri MD5 ile hash'leyip veritabanına kaydeder. Bu tarz yöntemler kolayca kırılabilir. Güçlü şifreleme algoritmaları kullanılmalı. Ayrıca, her kullanıcıdan gelen istekler filtrelenmeli ve IP loglama yapılmalıdır. Eğer bir IP adresinden çok sayıda kayıt denemesi gelirse, bu IP adresi geçici olarak engellenmelidir. Rate limiting gibi tekniklerle de sistem korunabilir.
Martysama ve Diğer Geliştirici Kaynakları[/BR]
Martysama gibi deneyimli geliştiricilerin katkılarıyla paylaşılan kaynaklar sayesinde, C++, Python ve Py Root gibi diğer sistemlerle entegre çalışan kayıt sistemleri de geliştirilebilir. Ancak bu makalede odak noktamız C# ve PHP tabanlı bir çözüm. Yine de, uiscript ve pack gibi yapılarla istemci tarafında da görsel açıdan etkileyici giriş ekranları oluşturulabilir.
Sonuç[/BR]
Metin2 özel sunucularınızda kullanıcıların güvenli ve kolay bir şekilde kayıt olması için C# ve PHP tabanlı bir sistem oluşturmak oldukça mantıklı ve etkili bir çözümdür. Bu tür sistemler, Metin2Lobby topluluğu tarafından da sıklıkla önerilir çünkü hem geliştiricilere hem de oyunculara kolaylık sağlar. Doğru yapılandırılmış bir kayıt sistemi, sunucunuzun popülerliğini artırmada önemli rol oynar.
Guide to Developing Server-Side Registration System for Metin2 Servers
Developing a powerful registration system for your Metin2 private servers using C# and PHP languages is crucial for both security and user experience. In this guide, we will explain in detail how you can integrate a C#-based registration application with a PHP-supported web service, brought to you by Metin2Lobby.
What is a Server-Side Registration System?
In Metin2 private servers, a registration system is required so that players can create accounts either within the game or via external methods. This system usually works integrated with AuthDB and securely adds new users to the database. The client developed on the C# side collects necessary information from the user, encrypts them, and sends them to the backend service written in PHP. The PHP side validates these data and inserts them into the database.
Why Should You Use C# and PHP?
C# is a strong and reliable language for developing desktop applications, offering high performance on Windows-based systems and easy GUI integration. PHP, on the other hand, is ideal for web-based operations, offering fast database interactions and easy server-side management. This pair is widely preferred among Metin2 developers because it offers both secure and flexible structures.
Functions to Be Developed in C#
A form-based interface is created. Information such as username, password, and email are collected from the user. Passwords must be encrypted using a strong algorithm like SHA256. Then, the data is sent to the PHP file using the POST method. Error cases are checked and feedback is provided to the user. For example:
- If the username has already been taken
- If the password does not meet the required length
- If the email format is incorrect
Operations to Be Performed in PHP
The incoming data is checked. Are all required fields filled? Has the username been taken before? Is the email format valid? After these checks, the data is securely inserted into the MySQL or MariaDB database. Protection against SQL injection attacks must be ensured by using Prepared statements. Additionally, IP-based blocking and anti-spam systems can be implemented.
Possible Security Vulnerabilities and Solutions
Some developers simply hash passwords using MD5 and store them in the database. Such methods can easily be broken. Strong encryption algorithms should be used. Moreover, requests from each user should be filtered, and IP logging should be performed. If multiple registration attempts come from a single IP address, that IP address should be temporarily blocked. Systems like rate limiting can also protect the system.
Resources by Martysama and Other Developers
Thanks to resources shared by experienced developers like Martysama, registration systems working integrated with other systems like C++, Python, and Py Root can also be developed. However, our focus in this article is on a solution based on C# and PHP. Nevertheless, visually impressive login screens can be created on the client-side using structures like uiscript and pack.
Conclusion
Creating a C# and PHP-based system for users to register safely and easily on your Metin2 private servers is a logical and effective solution. Such systems are frequently recommended by the Metin2Lobby community as they provide convenience for both developers and players. A well-configured registration system plays an important role in increasing the popularity of your server.
