1 / 14

LuSer - 自製 Server 引擎

LuSer - 自製 Server 引擎. 徐朝 逸. 前 傳. LuSer 名稱由來 … 有點心酸 目標 一個具有基本功能的伺服器引擎,能作為開發其他網路程式的雛形. 編譯、測試環境及通訊協定. 語言: C99 編譯器: MinGW gcc (32bit) 測試環境: Windows 7 32bit 引用 API : Windows.h WinSock2.h PORT : 5000~5002( 預設 ) 通訊協定: UDP. 優缺 點. 優點 不侷限特定種類 輕巧簡單 可依需求增刪組件,或改變部署方式 缺點

vui
Download Presentation

LuSer - 自製 Server 引擎

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LuSer-自製Server引擎 徐朝逸

  2. 前傳 • LuSer名稱由來…有點心酸 • 目標 一個具有基本功能的伺服器引擎,能作為開發其他網路程式的雛形

  3. 編譯、測試環境及通訊協定 • 語言:C99 • 編譯器:MinGWgcc (32bit) • 測試環境:Windows 7 32bit • 引用API: • Windows.h • WinSock2.h • PORT:5000~5002(預設) • 通訊協定:UDP

  4. 優缺點 • 優點 • 不侷限特定種類 • 輕巧簡單 • 可依需求增刪組件,或改變部署方式 • 缺點 • 目前只能應用在Windows系統 • 可能遺漏訊息 • 功能不多

  5. 架構 Client Client Database LuMain LuAuth Config Config

  6. Demo

  7. Client • 至少2個執行緒 • 和伺服器相同的加解密方式&金鑰 • 當資料過大時,分配封包 • 在發送的地方會有”交棒”的動作

  8. LuAuth • 帳號驗證 • 自帶資料庫 • 可和LuMain分別部署到不同IP • 不一定要使用

  9. LuMain • 轉送訊息 • 密語和廣播模式 • 管理上線列表

  10. 指令 LuAuth • 註冊=> <ip> reg <id> <password> • 查找ID=> <ip> sear <id> • 登入=> <ip> auth <id> <password> • [Admin]刪除=> <ip> rem <id> <pwd> • [Admin]保存資料=> <ip> save <pwd> LuMain • 登入(從Auth)=><ip> <id> login <AuthenticPwd> • 登出=> <ip> <id> logout • 發送訊息=><ip> <id> send <dstID(All-全體廣播)> <message> • 取得上線列表=><ip> <id> list

  11. 安全性 • 3組密碼 • ServerPasspord:LuAuth、LuMain、Client加解密 • AuthenticPasspord:LuAuth發送登入訊息給LuMain • AdminPasspord:使用管理員指令 • 加解密方法 • 目前是用Xor加密

  12. 未來擴充方向 • 開發跨平台版本 • 開發不同語言的版本 • 開發TCP通訊協定 • 製成API • 使用更安全的加密法 • 改善資料庫

  13. 討論時間

  14. 結束 謝謝大家

More Related