This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stunnel 是个好东西,很小巧,它的原理是把服务器端的 http 代理加密成 https 代理,然后在本地也用 stunnel 把 https 代理转成 http 代理,这样在本地就有了一个 http 代理可用。goagent限制太多,自己搭建的服务器就是得花钱和浪费点时间。不过值得,相信我。 | |
服务器端搭建: | |
1,http代理,用squid、polipo或者tinyporxy随便搞个http代理出来,此时这个代理是http的,直接用会被rst。 | |
2,安装 stunnel ,配置大概如下,先用 openssl 产生一个证书: | |
openssl req -new -x509 -days 365 -nodes -out /etc/stunnel.pem -keyout /etc/stunnel.pem | |
cert = /etc/stunnel.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
生成公钥文件。Terminal下面输入 | |
ssh-keygen -t rsa | |
之后在Terminal的提示里按回车。直到生成id_rsa.pub文件,生成的id_rsa.pub文件在 ~/.ssh下面。Terminal下面输入 | |
cd ~/.ssh | |
cp id_rsa.pub authorized_keys | |
上面第一句的意思是进入~/.ssh文件夹,第二句是复制id_rsa.pub为authorized_keys文件。 |