想玩google native client. 但它的模块需要通过https连到服务器在安装时下载。搞不定。最后试了试tsocks,还挺好的,可以用。简单的说,就是通过preload的方式截取了系统的连接,从而为整个系统设置socks代理。
把步骤列在下面,用英文写的,凑合看吧:(系统:Ubuntu)
You can sudo apt-install tsocks
Or you can build it from source code (on sourceforge).
1. I build it from source code
note: the default libtsocks.so is installed in /lib, not /usr/lib. But the tsocks script find it in /usr/lib. You can manually create a soft link in /usr/lib.
2. create a tsocks.conf in /etc
It does not have a default one there. So you can refer some examples in source code folder.
Note: the syntax is strict and the spaces are necessary.
For example:
This line is wrong:
server=192.168.1.100
This line is correct:
server = 192.168.1.100
My /etc/tsocks.conf is as follows:
local = 172.16.0.0/255.255.255.0
local = 10.0.0.0/255.0.0.0
server = proxy-socks.xx.xxx.com
server_type = 5
server_port = 1080
3. There are three ways to use tsocks. The simplest way is running it in a shell, then execute other applications freely.
source tsocks on
OK. You can do everything now.
用的时候会提示一点点错误,不用管它就可以了。