GlobalMgr Packet Proxy [PHP]

Results 1 to 15 of 15
  1. #1
    Hardcore Member Stricted is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    234Posts

    GlobalMgr Packet Proxy [PHP]

    based on this thread http://forum.ragezone.com/f459/globa...-proxy-932596/
    i have written a new GlobalMgr Packet Proxy in php

    the reason for that is simple => i i don't want run windows binaries (.exe) files on a linux machine

    here is the source for that https://gist.github.com/Stricted/f35135507d344c9638e8

    i have test it

    Original:
    Code:
    [Fri Mar  7 2014 12:18:52.902028 4148930256]: GetPathString(): Section /etc/cabal/Data/Mobs.scp
    [Fri Mar  7 2014 12:18:53.084008 4148930256]: GetPathString(): Section /etc/cabal/Data/Item.scp
    [Fri Mar  7 2014 12:18:53.173402 4148930256]: GetPathString(): Section /etc/cabal/Data/Warp.scp
    changed:
    Code:
    [Fri Mar  7 2014 19:53:56.292383 4149024464]: GetPathString(): Section /etc/cabal/Data/M.scp
    [Fri Mar  7 2014 19:53:56.608045 4149024464]: GetPathString(): Section /etc/cabal/Data/Item_hardcore.scp
    [Fri Mar  7 2014 19:53:56.806229 4149024464]: GetPathString(): Section /etc/cabal/Data/Warp_hardcore.scp
    NOTE: this is only for guys they want change the scp files, science wp8 they come from database and not from common.ini

    if you want know how to use it see here: http://forum.ragezone.com/f459/globa...8/#post8007052

    EDIT:// add init.d script like worldsrv

    UPDATE:// the proxy forwards the packages now instantly with no delay
    UPDATE:// loglevel added
    UPDATE:// the proxy read now the old values and replace them, its not longer hardcoded, and i add a check to verify the data replacement

    have fun with it
    Last edited by Stricted; 12-03-14 at 03:44 PM.


  2. #2
    .:[5kR1p7 k1dd13]:. x30unlimited is offline
    MemberRank
    Jan 2009 Join Date
    367Posts

    Re: GlobalMgr Packet Proxy [PHP]

    looks ok, gz :P

  3. #3
    Hardcore Member Stricted is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    234Posts

    Re: GlobalMgr Packet Proxy [PHP]

    thank you
    i have update the script and add comments

    EDIT:// add an daemon: now you not need screen to start them ;)
    Last edited by Stricted; 07-03-14 at 11:28 PM.

  4. #4
    wWw.F403.OrG S37uP!Update is offline
    MemberRank
    Oct 2008 Join Date
    F403.ORGLocation
    1,304Posts

    Re: GlobalMgr Packet Proxy [PHP]

    How do i use that? I mean where do i add this script?
    To make it start and work correctly?

  5. #5
    Hardcore Member Stricted is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    234Posts

    Re: GlobalMgr Packet Proxy [PHP]

    as example we named our proxy proxy_01.php (the ini and log file has the same name as the php file)

    you must create for every worldsrv a own proxy

    to use this script
    add a new file in /etc/cabal and name it proxy_01.ini with this content
    Code:
    [NetLib]
    Port=35000
    IPAddress=127.0.0.1
    
    [WorldSvr]
    Warp=Data/Warp.scp
    Mobs=Data/Mobs.scp
    Item=Data/Item.scp
    
    [GlobalMgrSvr]
    Port=38170
    Addr=127.0.0.1
    change
    Code:
    Warp=Data/Warp.scp
    Mobs=Data/Mobs.scp
    Item=Data/Item.scp
    to whatever you want leave it blank for default or set default scp here

    after this start your proxy with
    PHP Code:
    php proxy_01.php 
    change in your worldsrv ini
    Code:
    [GlobalMgrSvr]
    Addr=127.0.0.1
    Port=38170
    to
    Code:
    [GlobalMgrSvr]
    Addr=127.0.0.1
    Port=35000
    and then start the worldsrv and have fun with you new scp files
    Last edited by Stricted; 08-03-14 at 11:14 AM.

  6. #6
    wWw.F403.OrG S37uP!Update is offline
    MemberRank
    Oct 2008 Join Date
    F403.ORGLocation
    1,304Posts

    Re: GlobalMgr Packet Proxy [PHP]

    Got it :)
    Thank your for this release!

  7. #7
    Hardcore Member Stricted is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    234Posts

    Re: GlobalMgr Packet Proxy [PHP]

    UPDATE

    i have improved the proxy now its a php5 class

    to run this proy you need the php modules pcntl and posix (this proxy is a daemon)

    now i post my configuration setup
    first put the
    Code:
    cabal_proxy.php
    to
    Code:
    /home/cabal/
    and
    Code:
    cabal_proxy
    to
    Code:
     /etc/rc.d/init.d/
    then set chmod
    Code:
    chmod 0777 /home/cabal/cabal_proxy.php
    chmod 0777 /etc/rc.d/init.d/cabal_proxy
    now we have our basics then we add symlinks (actualyl i dont know the right dirs from centos, my server runs on debian :D)
    Code:
    ln -sf /home/cabal/cabal_proxy.php /home/cabal/proxy_01_01.php
    ln -sf /etc/rc.d/init.d/cabal_proxy /etc/rc.d/init.d/proxy_01_01
    then we create a new .ini file in
    Code:
    /etc/cabal/
    with the name
    Code:
    proxy_01_01.ini
    with the following content
    Code:
    [NetLib]
    #port for WorldSvr
    Port=35000
    IPAddress=127.0.0.1
    Debug=0
     
    [WorldSvr]
    #here you can replace the scp files
    Warp=Data/Warp.scp
    Mobs=Data/Mobs_hardcore.scp
    Item=Data/Item.scp
     
    [GlobalMgrSvr]
    #port from GlobalMgrSvr
    Port=38170
    Addr=127.0.0.1
    Debug = debugmode (0= disbaled, 1=enabled)
    the debugmode put all incomming tcp packages from GlobalMgrSvr and WorldSvr into a debug file in
    Code:
    /var/log/cabal/
    now you can edit your worldsrv and change the globalmgrsrv port to 35000, start the proxy with service proxy_01_01 start and then start your worldsrv and have fun with your new scp files :)

  8. #8
    Account Upgraded | Title Enabled! joel de paula is offline
    MemberRank
    May 2011 Join Date
    413Posts

    Re: GlobalMgr Packet Proxy [PHP]

    can someone explain me this will serve in my cabal server

  9. #9
    Hardcore Member Stricted is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    234Posts

    Re: GlobalMgr Packet Proxy [PHP]

    Quote Originally Posted by joel de paula View Post
    can someone explain me this will serve in my cabal server
    have you read my posts?
    read them again....

  10. #10
    Account Upgraded | Title Enabled! joel de paula is offline
    MemberRank
    May 2011 Join Date
    413Posts

    Re: GlobalMgr Packet Proxy [PHP]

    I read bro already put up but do not know how it works

  11. #11
    ┌П┐(•_•)┌П┐ allocen is offline
    MemberRank
    Dec 2009 Join Date
    Deep AbyssLocation
    1,003Posts

    Re: GlobalMgr Packet Proxy [PHP]

    then you just read again and again and again and again and again and again and again and so on till your brain get it. Stricted explained already exactly how does it work.

  12. #12
    Hardcore Member Stricted is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    234Posts

    Re: GlobalMgr Packet Proxy [PHP]

    Quote Originally Posted by allocen View Post
    then you just read again and again and again and again and again and again and again and so on till your brain get it. Stricted explained already exactly how does it work.
    thanks
    i dont know want you hear @joel de paula
    but read my posts again there allready all what you want to know

  13. #13
    Account Upgraded | Title Enabled! joel de paula is offline
    MemberRank
    May 2011 Join Date
    413Posts

    Re: GlobalMgr Packet Proxy [PHP]

    does anyone have these files already ready
    I put on centos and run the commands because of this error here



    http://prntscr.com/5vlzfo

  14. #14
    Enthusiast th1nk is offline
    MemberRank
    Feb 2012 Join Date
    46Posts

    Re: GlobalMgr Packet Proxy [PHP]

    Is the Proxy can fix channel crash bug??

  15. #15
    Hardcore Member Stricted is offline
    MemberRank
    Feb 2012 Join Date
    GermanyLocation
    234Posts

    Re: GlobalMgr Packet Proxy [PHP]

    Quote Originally Posted by joel de paula View Post
    does anyone have these files already ready
    I put on centos and run the commands because of this error here



    http://prntscr.com/5vlzfo
    check your file permissions

    Quote Originally Posted by th1nk View Post
    Is the Proxy can fix channel crash bug??
    nope



Advertisement