东北大学BT站傻逼地封锁了我的ip地址,不允许我登录,不知道什么企图。知道这个地方会有东北大学的人过来看,纯粹发泄。
transmission是一个在linux下比较流行的bt客户端,gtk界面,支持daemon,并有方便的web前端和第三方的客户端。
transmission在大约1.50版的时候开始声明支持ipv6了,但是实际使用过程中却发现连接到byrbt的tracker时,服务端见到的ip是v4的ip,即使在/etc/hosts文件中指定了tracker的v6地址也一样。
google到了transmission的trac上有讨论这个问题(1,2)。似乎是transmission在对byrbt这样的v4/v6双栈的tracker时只解析v4地址,不解析v6地址。
trac里原文:
Brief explanation for posterity and those out of the loop: In libTransmission (pre-1.60?, that’s the plan anyway) “torrent” and “tracker” are used interchangeably. With the addition of IPv6 support, the two concepts need to be separated. This is a fairly major refactoring job. For 1.5x and in trunk currently, IPv6 DNS resolution in libcurl (the library we use for tracker communication) is disabled to prevent breakage of trackers with AAAA and A records on the same hostname (notably, TPB). For those of you coming here from #1937, the curl option to disable IPv6 “DNS resolution” apparently also causes curl to bail if given an explicit IPv6 tracker address (such as http://[::1]/announce), so that bug is the same as this one.
解决的办法很简单,修改源码里libtransmission/web.c,找到curl_easy_setopt( easy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );一行,将CURL_IPRESOLVE_V4修改为CURL_IPRESOLVE_V6,然后正常编译安装即可。如果同时需要使用v4的tracker,可以把这部分修改成CURL_IPRESOLVE_WHATEVER。
实际使用效果甚好。原本都是做种很久后才有零星的ipv6的peer连接,现在连上tracker后不久就能得到ipv6的peer了
BTW,不知道为什么,transmissionbt.com也被墙了……万恶的GFW……
If you enjoyed this post, make sure you subscribe to my RSS feed!
正好,过几天要装这个~~
[回复]
万恶的~gfw…
[回复]
我这边没被墙。
话说Transmission的1.6版本也快出来了,增加了Qt界面。真是一个开发活躍的软件啊。
[回复]
现在用着还挺好的~
就是速度一快,CPU占用挺高的,PIII 1G占掉50%。。。
[回复]
修改源码里libtransmission/web.c,这个怎么弄呢
[回复]
这个……总不能手把手教你怎么修改吧……
[回复]
我已经装好了,我应该进入哪里修改呢,是找到那个文件吗?如果是那个文件在哪个文件夹呢呢?
[回复]
是从源码安装的么?没有的话需要自己编译一遍。拿到源码就知道改哪里了
[回复]
不是的,是ubuntu本来就装好的,这个有办法改吗
[回复]
还想问下我编译完成了,去哪里执行呢,应用程序里看不到?谢谢了
[回复]
谢谢了,我终于弄好了
[回复]