Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 17.08.2007, 22:40   #1
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default [SHARE] C4 HDAuth multiserver/floodprotected/bruteprotected

...from russia with love =)

http://humordwarf.info/HDAuth104.zip

HDAuth LoginServer 1.04

===== History / История ===

2007-08-17 v1.00
- Initial Release / Первая версия
2007-08-19 v1.01
- new parameter in .ini: ClientPort - Port number for clients (players) connections (emanuel's idea)
- fixed errors in net/mask functions (IPBans related) (thanks Kenjiro)
- changed logic in TempoBano for wrong passwords (see docs changes) (thanks hel)
- added info into docs about SQL queries (see below)
2007-08-19 v1.02
- global crash fix and "red messages" cleanup (thanks Aida)
- fixed server reconnect thing (thankgs Aida)
- added date and time before each message into text log files
- new optional parameter in .ini for [ServerXX]: LocIP - address that will be used for local network connections
this feature uses LocalNet.txt (format same as IPBan.txt) for local networks
when it tuned auth works like a "router" and sends to clients IP of GS depends on client location
for more details about this feature ask Aida @ PP
- now u can use hex format too for BlowFish keys (see .ini for details)
2007-08-20 v1.03
- fixed log files codepage, now used system's current ANSI code page
- added optional SQL query each minute (see bellow) for monitoring online players in DB e.g. for web-site stats (thanks hr)
- added boolean .ini parameters (switchers) for each log types, now u can turn on/off each type of message and for console output and for files (see .ini)
- added new type of log: *.online - about 60 times per hour there will be current online of server (can be used too for creating online stats, etc)
- removed accountmap's warnings flood
- few minor bugfixes
2007-08-21 v1.04
- *-authd.log file/console now "turnable on/off" too (thanks FidoW)


===== Features / Фичи =====
[eng]
- GUI (see below)
- compatible with that AuthD 40504
- same DB-log-files format as 40504
- TempoBano model (see below)
- IP bans by net/mask(see below)
- unlimited number of game servers
- for each GS it uses different MSSQL DB (see below)
[rus]
- ГУЙ (см. ниже)
- совместим с тем самым аутхом 40504
- системный БД-лог-файл в том же формате что и 40504
- ТемпоБано модель (см. ниже)
- баны подсетей (см. ниже)
- неограниченное число игровых серверов
- для каждого гейм-сервера используются разные базы данных (см. ниже)

===== SQL queries / СКУЛ запросы =====
[eng]
- MS-SQL use is minimized, only 3 queries is performed per user login/play/logout
1. when checking password/ban state:
"select password, uid, pay_stat, block_flag, block_flag2 from dbo.user_auth as auth inner join dbo.user_account as acc on auth.account = acc.account where auth.account='{0}'"
2. when GS says "player playing"
"UPDATE dbo.user_account SET last_login={0}, last_world={1}, last_ip='{2}' WHERE uid={3}"
3. and when GS says "player logout"
"UPDATE dbo.user_account SET last_logout={0}, last_world={1}, last_ip='{2}' WHERE uid={3}"
4. (optional) "EXEC UpdateOnline {0},{1}" - calls every minute and sends to SQL server_id with players_online
[rus]
- использование MS-SQL минимизировано, всего 3 запроса использовано на игрока при логине/игре/отключении
1. при проверке пароля/бана:
"select password, uid, pay_stat, block_flag, block_flag2 from dbo.user_auth as auth inner join dbo.user_account as acc on auth.account = acc.account where auth.account='{0}'"
2. при сообщении гейм-сервера "игрок играет"
"UPDATE dbo.user_account SET last_login={0}, last_world={1}, last_ip='{2}' WHERE uid={3}"
3. при сообщении гейм-сервера "игрок отключился"
"UPDATE dbo.user_account SET last_logout={0}, last_world={1}, last_ip='{2}' WHERE uid={3}"
4. (опционально) "EXEC UpdateOnline {0},{1}" - вызывается каждую минуту и посылает SQL серверу айди с онлайном

===== GUI / ГУЙ =====
[eng]
- IPBans editor / reloader for editing IP banned networks
- shows in real - time current server values
- Sockets/Max - number of used sockets/peak
- Players - number of players on all servers
- Servers - number of connected servers
- Uptime - no comments
- Allocated/Peak - allocated memory/peak
- GC - garbage collector current value
- Threads - number of threads in LoginServer
- Handlers - number of handles/descriptors, used in LoginServer

[rus]
- редактор/загружатор забаненных подсетей
- отображает в реальном времени текущие значения сервера
- Sockets/Max - количество подключенных сокетов/пик
- Players - количество игроков на всех серверах
- Servers - количество подключенных игровых серверов
- Uptime - догадайтесь, что
- Allocated/Peak - количество потребляемой сервером памяти/пик
- GC - текущее значение уборщика мусора
- Threads - количество нитей в сервере
- Handlers - количество дескрипторов, используемых сервером

===== Log-files / Лог-файлы =====
[eng]
- for each GS it make directory with server id
- in each directory server creates *.normal *.warning *.cheat *.error *.log files
- *.log files has same format as it was in 40504 (for easy parsing, if need)
[rus]
- для каждого игрового сервера создается папка с номером сервера
- в каждой папке сервер создает файлы *.normal *.warning *.cheat *.error *.log
- *.log файлы имеют тот же формат какой был в 40504 (для последующей обработки, если необходимо)

===== TempoBano / ТемпоБано =====
[eng]
- TempoBano means "ban for few seconds"
- blocks IP if there is flood from it (number of connections from IP per time interval too high)
- blocks Account at selected Server is there is 3 wrong passwords entered (e.g. 3 minutes user will not able to even try)
1.01+: now "hacker" not able to block any account, coz _bad_password_counter_ is different also for each IP
[rus]
- ТемпоБано значит "бан на несколько секунд"
- блокирует IP если с этого адреса идет флуд (количество подключений за промежуток времени превышает допустимый)
- блокирует аккаунт на выбранном сервере если было 3 неправильных ввода парол (например 3 минуты игрок даже не сможет попробовать)
1.01+: теперь "хацкер" не сможет блокировать аккаунты, т.к. _счечик_неправильных_парол� �й_ разный так же для разных IP

===== IPBans / Баны по IP =====
[eng]
- each row in list can be in format d.d.d.d/d or just d.d.d.d
- example1: 127.0.0.1 means network 127.0.0.1/32 - only one IP address
- example2: 1xx.xx8.1.0/24 means network 1xx.xx8.1.1 - 1xx.xx8.1.255
[rus]
- каждая строка в списке может быть в формате d.d.d.d/d или просто d.d.d.d
- example1: 127.0.0.1 значит подсеть 127.0.0.1/32 - т.е. один IP адрес
- example2: 1xx.xx8.1.0/24 значит подсеть 1xx.xx8.1.1 - 1xx.xx8.1.255

===== Protocol / Протокол =====
[eng]
- on packet level server is almost same as 40504, BUT it has different order of client-server packets:
1. server sends "hello"
2. client reply "user/pass"
3. server always sends "serverlist"
4. client reply "selectedserver"
5. here server checks user/pass from DB for selected server and do as always, or "wrong password" or "continue"
so, server uses different lin2db for each server (see .ini) and we can use one loginserver for few GS
in same time, if u use same DB-connection string for all servers, it will use same DB for few servers (as ncsoft)
[rus]
- на пакетном уровне сервер почти такой-же как и 40504, НО имеет некоторые различия в пакетах клиент-сервер:
1. сервер посылает "привет"
2. клиент отвечает "логин/пароль"
3. сервер всегда посылает "списоксерверов"
4. клиент отвечает "выбралсервер"
5. и только здесь сервер проверяет логин/пароль из базы выбранного сервера, и продолжает как обычно "неправильный пароль" или "продолжаем"
как мы видим, сервер использует разные базы lin2db для каждого сервера (см .ini) и мы может использовать один логин-сервер для нескольких гейм-серверов
в то же время, если указать одинаковые строки подключений для всех серверов, будет использована одна база для всех (как у нцсофт)

/HD 2007
humordwarf is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 14:45.