Aug 28

移动网络完全没法下载 BT,想到用电信网络做代理,试过 shadowsocks,3proxy 等大量 Socks5 服务器软件,都因为不支持 udp:// 格式的 Tracker 服务器导致速度上不去,最后用 Dante 解决问题。证据看下面用 Proxifier 代理 qBittorrent 的截图:

我们从源码安装 Dante:

# cd /usr/src
# wget http://www.inet.no/dante/files/dante-1.4.2.tar.gz
# tar -zxf dante-1.4.2.tar.gz
# cd dante-1.4.2/
# apt-get install gcc make
# ./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/var --disable-client --without-libwrap --without-bsdauth --without-gssapi --without-krb5 --without-upnp --without-pam
# make && make install

之后检查下安装情况:

# /usr/local/sbin/sockd -v
Dante v1.4.2. Copyright (c) 1997 - 2014 Inferno Nettverk A/S, Norway

编辑配置文件:

# nano /etc/sockd.conf

内容如下:

logoutput: /var/log/socks.log

internal: 0.0.0.0 port = 10086
external: br0/eth0/ppp0 #这里一定要设置对,可用 ifconfig 查看

method: username #使用 Linux 内置用户登录,请添加一个不能 SSH 的专用账户,Socks5 连接时账户密码是明文,如无认证需要这里填 none
user.privileged: root
user.notprivileged: nobody

client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}

client block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}

block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

启动服务器:

/usr/local/sbin/sockd -f /etc/sockd.conf -D

然后在路由器上做端口映射,把 10086 端口暴露出去即可。 :mrgreen: :mrgreen: :mrgreen:


Aug 27

劫持 53 就算了,还他妈长期缓存一些错误的结果,记录下。注释的是曾经错误的目前好了的。

#SHIT CMCC
#server=/ikafan.com/127.0.0.1#5053
#server=/ikafan.com/211.136.17.107#53
#server=/ikafan.com/211.136.20.203#53
#ignore-address=42.236.6.20
server=/g.csdnimg.cn/127.0.0.1#5053

:evil: :evil: :evil:

Tags: ,

Aug 27

说是转码,其实还有下载,录屏,线性编辑等功能,同时支持 Intel/Nvidia/AMD 的硬件加速解码编码。同类软件不用试了,没一个能打的,人肉测试了几十款下来的结果。小缺点就是不直接支持蓝光碟,还有你说它不能非线性编辑也可以~

:cool: :cool: :cool:


Aug 26

冲突表现为开着安装版(便携版好像没这个问题)的 Proxifier 则 Pandownload 无法下载,看错误日志与 DNS 解析有关,解决方法如下图:

:roll: :roll: :roll:


Aug 18

直接上脚本:(https://gist.github.com/rampageX/28ca79a9812fe684650be9ac18df84fe)

安装,替换默认设置:

apt-get install -y distcc distcc-pump ccache
sed -ie 's/STARTDISTCC="false"/STARTDISTCC="true"/' /etc/default/distcc
sed -ie 's/ALLOWEDNETS="127.0.0.1"/ALLOWEDNETS="192.168.0.0\/16 172.16.0.0\/12 10.0.0.0\/8"/' /etc/default/distcc
sed -ie 's/LISTENER="127.0.0.1"/LISTENER="0.0.0.0"/' /etc/default/distcc
sed -ie "s/JOBS=\"\"/JOBS=\"`grep processor /proc/cpuinfo | wc -l`\"/" /etc/default/distcc
sed -ie 's/ZEROCONF="false"/ZEROCONF="true"/' /etc/default/distcc

添加 Tomatoware 编译工具路径:
#PATH here? https://midnightyell.wordpress.com/2012/10/14/a-good-compromise-cross-compiling-with-distcc/
echo "PATH=/opt/tomatoware/arm-soft-mmc/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> /etc/default/distcc

#for tomatoware, arm-linux-gcc etc. must in service path, or error code 110 on Router.
sed -ie 's~/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin~/opt/tomatoware/arm-soft-mmc/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin~' /etc/init.d/distcc

service distcc restart

添加 ccache 支持,可选:
echo 'CCACHE_PREFIX="distcc"' > /etc/profile.d/ccache-distcc.sh
echo 'CC="ccache gcc"' >> /etc/profile.d/ccache-distcc.sh

distcc 3.3 如果编译了白名单支持,还需要添加编译工具到白名单:
#add arm-linux-gcc/g++ to whitelist of distcc (error: CRITICAL! arm-linux-gcc not in /usr/lib/distcc whitelist.)
cd /usr/lib/distcc
sudo ln -s ../../bin/distcc ./arm-linux-gcc
sudo ln -s ../../bin/distcc ./arm-linux-g++

其他参考:
#Tomatoware REF: https://github.com/lancethepants/tomatoware/wiki/Using-distcc

#apt-get install Error and Fix: https://github.com/distcc/distcc/issues/311
#`Traceback (most recent call last): File "/usr/bin/update-distcc-symlinks", line 39, in for gnu_host in os.listdir(gcccross_dir): FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/gcc-cross'`

#Fixed by disable following code:
#`for gnu_host in os.listdir(gcccross_dir): consider_gcc("%(gnu_host)s-" % vars(), "") for version in os.listdir(gcccross_dir + "/" + gnu_host): consider_gcc("", "-%(version)s" % vars()) consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())`

调试命令:
PATH=/opt/tomatoware/arm-soft-mmc/usr/bin/:/opt/tomatoware/mipsel-soft-mmc/usr/bin/:$PATH distccd --verbose --no-detach --daemon --allow 192.168.2.0/16 --log-level debug --log-file /home/punk/log/distccd.log --user punk


[2/54]  < 1 2 3 4 5 6 7 8 9 10 > ... »