如何让Firefox处理ed2k协议。

我使用的是mldonkey,原本是自带一个Add-on的,不过后来不支持Firefox 3.0了。
只好手动的配置一下 。以下说一下配置方法:

首先进入about:config,来添加一个自定义的boolean类型,叫:network.protocol-handler.external.ed2k,值为true。
之后,在Firefox -> Preferences -> Applications中可以看到ed2k一项。
然后,写一个小脚本放在/usr/bin下,叫mlcmd

#!/bin/sh
CMD=”$1″
FILE=`mktemp`
echo “Creating $FILE …”
echo “auth username password” > $FILE
echo “$CMD” >> $FILE
cat $FILE | netcat -t localhost 4000
rm $FILE
echo
echo “Removing $FILE …”

之后,设定Firefox -> Preferences -> Applications中的ed2k,使用mlcmd开启。
去VeryCD中试一下。一切OK。

如果mldonkey有密码,可以按telnet的键入顺序建立一个tmp文件,然后通过netcat写到localhost 4000。

cat /tmp/tmpfile | netcat localhost 4000

这个就可以了。

Viewed 6894 times by 1918 viewers

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>