Apr 17

直接编译会出错:

/opt/lib//libcrypto.a(c_zlib.o): In function zlib_stateful_expand_block': c_zlib.c:(.text+0x54): undefined reference toinflate'
/opt/lib//libcrypto.a(c_zlib.o): In function zlib_stateful_compress_block': c_zlib.c:(.text+0xd8): undefined reference todeflate'
/opt/lib//libcrypto.a(c_zlib.o): In function bio_zlib_free': c_zlib.c:(.text+0x128): undefined reference toinflateEnd'
c_zlib.c:(.text+0x144): undefined reference to deflateEnd' /opt/lib//libcrypto.a(c_zlib.o): In functionzlib_stateful_finish':
c_zlib.c:(.text+0x194): undefined reference to inflateEnd' c_zlib.c:(.text+0x19c): undefined reference todeflateEnd'
/opt/lib//libcrypto.a(c_zlib.o): In function zlib_stateful_init': c_zlib.c:(.text+0x224): undefined reference toinflateInit_'
c_zlib.c:(.text+0x26c): undefined reference to deflateInit_' /opt/lib//libcrypto.a(c_zlib.o): In functionbio_zlib_ctrl':
c_zlib.c:(.text+0x4a0): undefined reference to deflate' c_zlib.c:(.text+0x56c): undefined reference tozError'
/opt/lib//libcrypto.a(c_zlib.o): In function bio_zlib_write': c_zlib.c:(.text+0x708): undefined reference todeflate'
c_zlib.c:(.text+0x794): undefined reference to zError' c_zlib.c:(.text+0x824): undefined reference todeflateInit_'
/opt/lib//libcrypto.a(c_zlib.o): In function bio_zlib_read': c_zlib.c:(.text+0x900): undefined reference toinflate'
c_zlib.c:(.text+0x954): undefined reference to zError' c_zlib.c:(.text+0x9e0): undefined reference toinflateInit_'
collect2: error: ld returned 1 exit status
Makefile:94: recipe for target 'redsocks2' failed
make: *** [redsocks2] Error 1

解决方法,修改 Makefile:
override LIBS += -lssl -lcrypto -ldl

改成:
override LIBS += -lssl -lcrypto -ldl -lz

然后:
CCFLAGS=-static make

或者(tomatoware)
LDFLAGS="-Wl,-static -static -static-libgcc" make

编译成功。


Jul 30

支持 SOCKS5 代理的:DNS2SOCKS

http://sourceforge.net/projects/dns2socks/

dns2socks.jpg

支持 HTTPS (HTTP CONNECT)代理的: DESPROXY-DNS

http://desproxy.sourceforge.net/

dns2https.jpg

能用在什么场合,想用的人自然知道,不多说了。 :evil:


Jun 21

这个脚本可以批量删除 NVRAM 中以某些字符串开头的内容:

#/bin/sh
#scriptname: nvram_unset_pro
for _TEMPVAR in `nvram show 2>/dev/null|grep "^$1"|cut -d'=' -f1`;
	do nvram unset $_TEMPVAR;
done

用法:

nvram_unset_pro bt_

这样就删除了所有 bt_ 开头的设置项。

记得删除完成后用

nvram commit

提交,否则路由器重启后又会生成。


Nov 07

一、下载源程序

git clone https://github.com/semigodking/redsocks.git

二、编译

cd redsocks-master
make

会出错:

parser.c: In function 'vp_in_addr':
parser.c:306: error: 'AI_ADDRCONFIG' undeclared (first use in this function)
parser.c:306: error: (Each undeclared identifier is reported only once
parser.c:306: error: for each function it appears in.)
make: *** [parser.o] Error 1

三、解决,在parser.c文件的第32行插入如下代码:

#ifndef AI_ADDRCONFIG
#define AI_ADDRCONFIG 0x0020
#endif

Oct 21

下载源码: https://github.com/madeye/shadowsocks-libev

直接编译会出错:

/tmp/cciqCfzf.s: Assembler messages:
/tmp/cciqCfzf.s:2903: Error: opcode not supported on this processor: mips1 (mips1) `sync'

修改 \shadowsocks-libev-master\libev 下的 ev.c :

找到:

#define ECB_MEMORY_FENCE         __asm__ __volatile__ ("sync"     : : : "memory")

改为:

#define ECB_MEMORY_FENCE         __asm__ __volatile__ (".set mips2; sync; .set mips0" ::: "memory")

有两处,都改吧。(参考:http://permalink.gmane.org/gmane.comp.lib.ev/2182)

再编译就可以通过了:

Shadowsocks.1.4.0.Tomato.gif


[16/59]  «< 11 12 13 14 15 16 17 18 19 20 > ... »