aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: amuleweb doesn't listen anywhere if ECAddress specified  (Read 3665 times)

bk

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
amuleweb doesn't listen anywhere if ECAddress specified
« on: March 15, 2008, 12:39:43 AM »

hi there,
i run amuled with amuleweb on a server with two NICs. if i leave  ECAddress blank, amuleweb listens on both of the two interfaces. that is, also on the outbound one. this is bad ;-). if i specifiy ECAddress, the remote gui is restricted to this address, but not amuleweb: it simply seems to listen nowhere. not even localhost. so i consider this a bug...

ah well, and i'm using this on a linux box. happens with 2.1.3 and 'SVN Sun Mar  9'...
« Last Edit: March 15, 2008, 12:50:45 AM by bk »
Logged

bk

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: amuleweb doesn't listen anywhere if ECAddress specified
« Reply #1 on: March 15, 2008, 05:30:52 PM »


just had a quick look at the sources:
it seems the webserver doesn't read in the ECAddress cfg value anywhere, it just listens everywhere.
the webserver seems to be initialised in CWSThread::Entry() with wxIPV4address.AnyAddress(),  so it listens on 0.0.0.0.
fine so far.

the problem now is that amuled only listens on ECAddress, but it seems amuleweb wants to connect to localhost. furthermore, there is an option --host in the manpage, but it's not in the code for the webserver (as of mar 9 svn)
for connecting to the core, it uses CaMuleExternalConnector class, calling SendRecvMsg_v2(), which in turn calls SendRecvPacket().
phh, this is getting complicated... it sends a CECPacket, okay...
but now i'm stuck. where is the ip address of the external connection specified?
       
Logged

bk

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: amuleweb doesn't listen anywhere if ECAddress specified
« Reply #2 on: March 15, 2008, 05:34:45 PM »

yeah, well nowhere. thats the problem.
i now figured out that amuleweb uses CaMuleExternalConnector and its member m_host is not set to ECAddress but localhost:

src/ExternalConnector.cpp:552
            m_host = wxT("localhost");

shouldn't it be like in CaMuleExternalConnector::LoadConfigFile() :                                                         
            m_host = m_configFile->Read(wxT("/EC/Host"), wxEmptyString);     
or something?                             
« Last Edit: March 15, 2008, 06:43:41 PM by bk »
Logged