KoLmafia relay browser on Android

eggman

New member
http://i.imgur.com/QqHDa.jpg

Chish and I have been poking around KoLmafia to see about porting it to Android. This requires a rewrite of the interface as Android doesn't have Swing and a few other libraries. As neither of us know java well enough to write a whole new UI for Android (and strip out the swing that is currently in KoLmafia) our first instinct is to write a webUI, as mafia already has support for accepting commands via a web interface (relay browser). Unfortunately I don't know how to make a diff file, jar build or push to git/svn with Eclipse. Feel free to message me on here or in game (Eggman247 #351326) with any questions or comments.
 

eggman

New member
Code:
						else
						{
							String refererHost = referer.substring( 7, endHostIndex );

							if ( validRefererHosts.contains( refererHost ) )
							{
								// Do nothing
							}
							else if ( invalidRefererHosts.contains( refererHost ) )
							{
								validHost = false;
							}
							else //if ( InetAddress.getByName( refererHost ).isLoopbackAddress() )
							{
								validRefererHosts.add( refererHost );
							}
							//else
							//{
							//	invalidRefererHosts.add( refererHost );
							//	validHost = false;
							//}

This block in RelayAgent.java and this in RelayServer.java

Code:
	private synchronized boolean openServerSocket()
	{
		try
		{
			this.serverSocket = new ServerSocket( RelayServer.port, 25 );
			return true;
		}
		catch ( Exception e )
		{
			return false;
		}
	}
 

eggman

New member
Thanks, adding it as an option is a better idea than what I had done. Glad to see this helps people.
 

Chish

Member
Our next step is to write a relay override that resembles mafia's main interface.
The final step will be to strip a lot of stuff out of mafia (relax, we won't fuck up the main branch) until there's no swing, etc. so that it can run on mobile devices.
 
Top