NAME

japana - HTTP proxy converting Japanese characters into ASCII


SYNOPSIS

japana--configfile configfile ] [ --addr addr ] [ --port port ] [ --proxy proxy ] [ --kakasioptions options ] [ --version ]

japana-c configfile ] [ -a addr ] [ -p port ] [ -P proxy ] [ -o options ] [ -V ]


OVERVIEW

japana is a small and simple proxy written in Perl. The proxy converts Japanese characters (Hiragana, Katakana, Kanji etc.) into ASCII (Romaji) on the fly. The conversion is done using the KAKASI library.


DESCRIPTION

Just start japana. This will by default create a proxy running on http://localhost:8080 (it will fail if something else is already running on this port). Then point your browser to the proxy. Next, surf to some Japanese website (e.g. http://amazon.co.jp) and see all those Japanese characters converted to plain ascii text.

That's all. If you want to change the proxy port, make japana use another proxy or the like, see the switches section below.

Switches

--configfile configfile | -c configfile
The options from the given configuration file will be read. These options can be overridden by other command line arguments.

Default is not to read a configuration file.

--addr addr | -a addr
This is the IP address that japana will bind to. Be careful: Everybody who can reach the japana port on this address can use your proxy. There is no access control yet. You might use a packet filter to 'guard' japana from others. This address (together with the correct port) must be configured in your browser to make use of the japana proxy.

Default is to bind to address '127.0.0.1' as this address can only be accessed from your local computer and is not accessible from the network. Please take care when binding to another address.

--port port | -p port
This is the port on which japana listens to your incoming requests. This port (together with the correct address) must be configured in your browser to make use of the japana proxy.

Default setting is port 8080.

--proxy proxy | -P proxy
If this variable contains a value, the given proxy is used by japana. This allows to chain multiple proxies together. (e.g. If you need a proxy to access the Internet then point your browser to the japana proxy and in turn point japana to your original proxy.) Set this to `none' to use no proxy at all.

Default is to use the environment variable ${http_proxy}.

--kakasioptions options | -o options
These options are passed directly to kakasi and affect the conversion process. See the kakasi documentation for details.

Default options are '-ja -ga -ka -Ea -Ka -Ha -Ja -U -s' and should be reasonable.

--version | -V
This prints the current version of japana and exits.

Configuration file format

Configuration is also possible via configuration files. Every command line switch is possible in a configuration file. Empty lines and lines starting with # are ignored.

Instead of --port 3128 you would put this line in the configuration file:

 port = 3128

-o '-ja -ga -ka -U -s' will become

 kakasioptions = -ja -ga -ka -U -s

and so on and so forth.


MODULES NEEDED

 use AppConfig qw(:expand);
 use HTTP::Daemon;
 use LWP::UserAgent;
 use Text::Kakasi;

These modules can be obtained at <http://www.cpan.org> and Text::Kakasi can be found here: <http://www.daionet.gr.jp/~knok/kakasi/>.

If setting up kakasi is too complicated, you might try the old 1.0.x version of japana. It does not use kakasi, and so can't convert Kanji.


BUGS

In this version japana supports NO ACCESS CONTROL! Everyone with access to the japana port on your system will be able to use the proxy.

Please report bugs to <japana-bugs@cgarbs.de>


AUTHOR

japana was written by Christian Garbs <mitch@cgarbs.de>. Look for updates at <http://www.cgarbs.de/japana.en.html>.


COPYRIGHT

japana is licensed under the GNU GPL.


THANKS

Thanks go to Tobias Diedrich <ranma@gmx.at> and Benjamin Heuer <benjaminheuer@t-online.de> for ideas, bug-reports and beta testing.

Sorry to those guys from <news:de.soc.kultur.japan> who helped with the translation routine in version 1.0.x: It is not used any more.