Access relay browser from remote device?

Soluzar

Member
I'm aware that at the moment KoLMafia blocks access to the relay browser from any other address than loopback. You can't even access it by typing in your own IP address in the browser window of the computer you're using it from. I gather from an old thread I found that this is the intended behaviour. If possible, I'd like to know how to change that so it may be accessed from other PCs on the local network. I think it poses a minimal security risk to access it from the 192.168.xxx.yyy block, if access could be limited in that way.

I'm hoping to access the relay browser on a tablet. I love the convenient little addons that Mafia makes to the relay browser and would prefer not to give them up. Can anyone help me out? If it requires me to modify the code and then to build KoLMafia myself, that's perfectly reasonable. I have no idea as yet how to build a JAR from the source, but I guess I can learn. :)

ETA: I've had a bit of a go at it, but...

Going on the basis of this thread... http://kolmafia.us/showthread.php?1337-Remote-Control-Mafia

I thought I'd be able to modify RelayServer.java to accept any IP instead of just the loopback address. I managed to build the JAR from the checked out SVN repository and include that small modification, but it didn't do what I expected it to do. Further tips are much appreciated.

ETA (2): I managed to get what looks suspiciously like the KoL frameset but without anything in the frames. How... interesting.

ETA (3): I don't have much programming knowledge, but I wonder if I need to change other hardcoded references to the loopback address in this code? I'm going to try that for a bit, but I'd reeealllly appreciate some help. For what it's worth I'm pretty sure the problem is that my referrer headers aren't properly formed... no idea why but the behaviour I'm seeing somewhat indicates that.
 
Last edited:

xKiv

Active member
You could also try setting up an ssh tunnel that would look like 127.0.0.1:whatever to the tablet and would connect to 127.0.0.1:kolmafiaport on the machine running kolmafia.
 

Soluzar

Member
That sounds potentially easier... I have to admit, though... I hoped this would work. It's just an HTTP server. No reason why I shouldn't be able to modify it to be accessible to the whole network, if I knew what I was doing.

Unfortunately when it comes to SSH Tunnelling I also have no idea. =\

I've installed an SSH server on my PC but I don't know if I need to run the client on my tablet or on the PC also.

Well... I think maybe there's some genuine reason why this just can't work. I've got the SSH client up and running, connecting to the box that runs KoLMafia. Unfortunately if I try to connect to the relay browser it just doesn't load anything. No error message, it just doesn't work. Or maybe it does and it is so slow as to be useless.

I'm slightly cross with myself for wasting an afternoon on something that clearly isn't going to work. :(
 
Last edited:
Top