Forum

ASSIST, AMERICA'S ARMY COMMUNITY - RELIVE THE GLORY DAYS OF AMERICA'S ARMY 2.5

Author Topic: server not visible in browser  (Read 9131 times)

0 Members and 1 Guest are viewing this topic.

Jonnym

  • Guest
Re: server not visible in browser
« Reply #30 on: Saturday, February 18, 2012, 09:07:39 AM »
Will do this later, i need to remove the sensitive stuff that could be abused first.

Jonnym

  • Guest
Re: server not visible in browser
« Reply #31 on: Saturday, February 18, 2012, 11:59:35 AM »
Code has now been published on sourceforge.

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: server not visible in browser
« Reply #32 on: Saturday, February 18, 2012, 12:22:21 PM »
Thanks.

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: server not visible in browser
« Reply #33 on: Saturday, February 18, 2012, 12:47:52 PM »
And regarding the parts that are removed: which parts of the projects are complete (can be rebuild from sources) and which not? I assume that dedisrv.rbp and aaudp.rbp (the two which comprise dedicated server part) are complete, right?

Jonnym

  • Guest
Re: server not visible in browser
« Reply #34 on: Saturday, February 18, 2012, 13:18:25 PM »
All server side stuff is complete.

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: server not visible in browser
« Reply #35 on: Saturday, February 18, 2012, 19:52:48 PM »
OK, I finally found some time to go through the server-side code, and add the multihome option. I just made the aaudp.exe to bind at given IP, and passed the "multihome" option to AA server, so that it binds there too. That way all ports 1716-1718 are bound at given address, not "0.0.0.0". And as I suspected, this seems to solve the problem (so I don't understand why you said that it will require "extensive modifications" to your system).

Now, I'd like you to merge my changes into your source. I can't live with my own compiled version, since I use trial version of real studio IDE, and my binaries die after 5 minutes :-D.

How do you want me to give you those changes? Previously I talked about diff-s, but it seems impossible in this shitty binary blob world of realbasic. Oh, there is some option to export to xml, so i could diff this, but it doesn't seem to be easy to merge either. For the moment, I will just describe the needed changes in this thread below.

I would appreciate if you merge this and release new binary quickly - I can't run server until then. Or maybe you could tell me IDE which will build those .rpb without any time limits - then I don't need your new release.
« Last Edit: Saturday, February 18, 2012, 19:57:12 PM by pit-23 »

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: server not visible in browser
« Reply #36 on: Saturday, February 18, 2012, 20:43:37 PM »
Here are the changes. As I said, for the moment I just will try to make a manual diff below, in order to make your merging job easier. As for collors, yellow means context and comment information, red means removed lines, green means added lines. There may be some typos in there, but that's because I had to craft it manually.

[In aaudp.rbp :: App :: Event Handlers :: Run
We bind UDP socket to the IP given in third command line arg (if any)]

  UDPs.RouterHops = 255
  UDPs.Port = val(args(1))
  if UBound(args) >= 3 then
    Dim multihomeIp As String
    multihomeIp = args(3)
    Dim i as Integer
    For i = 0 to System.NetworkInterfaceCount - 1
      Dim n As NetworkInterface
      n = System.GetNetworkInterface(i)
      if n.IPAddress = multihomeIp then
        UDPs.NetworkInterface = n
      end if
    Next
  end if

  UDPs.Connect

[In dedisrv.rbp :: App :: Methods :: setno
We assign number to additional aa25.ini param "multihomeip"]

  CASE "colour"
    RETURN 28
  CASE "multihomeip"
    RETURN 29

  CASE "processid"
    RETURN 98

[In dedisrv.rbp :: App :: Methods :: RunSrv
We propagate multihome IP (if present) to serverx.exe and aaudp.exe]

    Dim srvOptions As String
    srvOptions = "LAN "+ Filename(map) + " ini=aa25srv.ini log=aa25srv.log"
    if settings(29) <> "" then srvOptions = srvOptions + " multihome=" + settings(29)
   
    Dim udpOptions As String
    udpOptions = str(srvport+1) + " " + str(srvport+2)
    if settings(29) <> "" then udpOptions = udpOptions + " " + settings(29)
   

    if success = true then
      Mshell.Execute "aasrv"+settings(98)+".exe LAN "+Filename(map)+" ini=aa25srv.ini log=aa25srv.log"
      Mshell.Execute "aasrv"+settings(98)+".exe " + srvOptions
      udpx.Execute "aaudp"+settings(98)+".exe " + str(srvport+1) + " " + str(srvport+2)
      udpx.Execute "aaudp"+settings(98)+".exe "+ udpOptions
    else
      Mshell.Execute chr(34)+aahome.child("System").ShellPath+"\aasrv"+settings(98)+".exe"+chr(34)+" LAN "+Filename(map)+" ini=aa25srv.ini log=aa25srv.log"
      Mshell.Execute chr(34)+aahome.child("System").ShellPath+"\aasrv"+settings(98)+".exe"+chr(34)+" " + srvOptions
      udpx.Execute chr(34)+aahome.child("System").ShellPath+"\aaudp"+settings(98)+".exe"+chr(34)+" " + str(srvport+1) + " " + str(srvport+2)
      udpx.Execute chr(34)+aahome.child("System").ShellPath+"\aaudp"+settings(98)+".exe"+chr(34)+" " + udpOptions
    end if
    SrvRun = true

[In dedisrv.rbp :: aqrtime :: action
We propagate multihome IP (if present) to udp test code]

      Dim udpTestIp As String
      if app.settings(29) = "" Then udpTestIp = "127.0.0.1" else udpTestIp = app.settings(29)

...
        if app.prcnt > 3 then
          if not app.UDPtest.IsConnected  then app.UDPtest.Connect
          app.udptest.Write ("127.0.0.1:"+str(app.SrvPort+1),"aa25ping")
          app.udptest.Write (udpTestIp + ":"+str(app.SrvPort+1),"aa25ping")
          app.out "Ongoing port test trying"
        end if
...
     if app.prcnt > 20 then
...
      else
        app.prcnt = app.prcnt + 1
        if not app.UDPtest.IsConnected  then app.UDPtest.Connect
        app.udptest.Write ("127.0.0.1:"+str(app.SrvPort+1),"aa25ping")
        app.udptest.Write (udpTestIp + ":"+str(app.SrvPort+1),"aa25ping")
      end if
             
« Last Edit: Saturday, February 18, 2012, 20:51:03 PM by pit-23 »

Jonnym

  • Guest
Re: server not visible in browser
« Reply #37 on: Sunday, February 19, 2012, 04:00:18 AM »
Have you tested this? I seems to me this would break auth comms between armyops and assist becuase they are locked to 127.0.0.1 in the uscripts for security reasons. We cannot have the Uscipt auth module respond to any address other than 127 or external source could send in auth message and do all sorts of things. and if you bind udpqr to external network address it will be ignored by the U script.

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: server not visible in browser
« Reply #38 on: Sunday, February 19, 2012, 08:40:00 AM »
I started the server, it was visible in browser correctly, and I joined it. Seemed to work ok, but I didn't do any extensive testing due to trial version time limit.

Anyway, the change should be safe, as it only affects those who will set the 'multihomeip' option - the rest works as previously.
« Last Edit: Sunday, February 19, 2012, 08:43:34 AM by pit-23 »

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: server not visible in browser
« Reply #39 on: Sunday, February 19, 2012, 08:52:25 AM »
I checked again: some time after joining there is a message like 'server running in not authorized mode'.

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: server not visible in browser
« Reply #40 on: Sunday, February 19, 2012, 09:02:58 AM »
One thing that can be done is to add ip checking in .u script if given IP is a local interface. Or maybe just .ini parameter that will be used instead of 127.0.0.1 if given.

What do you propose?
« Last Edit: Sunday, February 19, 2012, 10:11:46 AM by pit-23 »

Offline ^^UnDiSpUtEd^^

Re: server not visible in browser
« Reply #41 on: Sunday, February 19, 2012, 10:29:10 AM »
As it has been said by major we have enough servers:)

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: server not visible in browser
« Reply #42 on: Sunday, February 19, 2012, 12:16:11 PM »
Johny, maybe in auth.u, instead of using "127.0.0.1", you could use the IP that 1718 socket is bound to (using GetLocalIP function)? This would work in both normal and multihome case.


Jonnym

  • Guest
Re: server not visible in browser
« Reply #43 on: Sunday, February 19, 2012, 14:18:14 PM »
Yes good idea, I will take a look at this in the next couple of days and build you a new binary... Thanks for the info.

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: server not visible in browser
« Reply #44 on: Sunday, February 19, 2012, 14:45:35 PM »
I have nothing to contribute other than to say this is really cool to see collaboration between you two :) This will only make the community better.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

 

Download Assist

×

Download Game Client

Important: Battletracker no longer exists. However, old Battletracker accounts may still work. You can create a new 25Assist account here

Download Server Manager