Secure TCP Forwarder 是一款C/S模型的TCP端口转发器,其客户端与服务端通信采用SSL加密方式,支持多用户和用户认证。其架构图如下
开发状态
开发中…
代码仓库
git clone http://git.heiher.info/STCPForwarder.git
Over!
Secure TCP Forwarder 是一款C/S模型的TCP端口转发器,其客户端与服务端通信采用SSL加密方式,支持多用户和用户认证。其架构图如下
开发状态
开发中…
代码仓库
git clone http://git.heiher.info/STCPForwarder.git
Over!
这是逸珑 8089 系列笔记本的 EC 固件程序,版本为 PQ1D28
下载地址:pq1d28.bin
SHA1SUM:1c28753d136e7f0fb8d2bf7f11e72f0decc1cbe5
警告:EC 烧写失败,会导致无法正常开机,请谨慎!
烧写方法:
1. 下载 EC 固件到本地硬盘 /boot 分区中。
2. 接上笔记本的 AC 电源,重启或开机。
3. 开机时,按键盘上的 [DEL] 键进入 PMON 命令接口。
4. 输入命令 load -r -d /dev/fs/ext2@wd0/pq1d28.bin 开始烧写。
5. 完成后 EC 固件程序会自动关闭计算机,按电源键开机。
Over!
逸珑 8089 系列笔记本的 PMON 固件程序,版本为 1.4.9
下载地址:pmon-LM8089-1.4.9.bin
SHA1SUM:dfb2f9854aa986e123f23e5ac04f4036f9ad0c43
警告:PMON 烧写失败,会导致无法正常开机,请谨慎!
烧写方法:
1. 下载 PMON 固件到本地硬盘 /boot 分区中。
2. 接上笔记本的 AC 电源,重启或开机。
3. 开机时,按键盘上的 [DEL] 键进入 PMON 命令接口。
4. 输入命令 load -r -f bfc00000 /dev/fs/ext2@wd0/pmon-LM8089-1.4.9.bin 开始烧写。
5. 完成后输入 reboot 命令重启,按电源键开机。
Over!
源代码
/* ssl-test.c * Heiher <admin@heiher.info> */ #include <stdio.h> #include <string.h> #include <openssl/ssl.h> #include <openssl/bio.h> #include <openssl/err.h> int main(int argc, char * argv[]) { BIO * bio = NULL; SSL * ssl = NULL; SSL_CTX * ctx = NULL; char buf[512]; char * request = "GET /sftp/ HTTP/1.1\r\n" "Host: www.heiher.info:443\r\n" "User-Agent: Mozilla/5.0 (X11; U; Linux mips64; en-US; rv:1.9.1.10)" " Gecko/20100623 Iceweasel/3.5.10 (like Firefox/3.5.10)\r\n" "Accept: text/html,application/xhtml+xml,application/xml;" "q=0.9,*/*;q=0.8\r\n" "Accept-Language: en-us,en;q=0.5\r\n" "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n" "Connection: close\r\n" "\r\n"; /* ssl init */ SSL_load_error_strings(); ERR_load_BIO_strings(); OpenSSL_add_all_algorithms(); SSL_library_init(); /* create ssl context */ ctx = SSL_CTX_new(SSLv23_client_method()); /* load the trust certificate store */ if(!SSL_CTX_load_verify_locations(ctx, NULL, "/etc/ssl/certs")) { printf("load certs failed!\r\n"); } /* create the connection */ bio = BIO_new_ssl_connect(ctx); /* set up the BIO object */ BIO_get_ssl(bio, &ssl); SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); /* open a secure connection */ BIO_set_conn_hostname(bio, "www.heiher.info:443"); if(0 >= BIO_do_connect(bio)) { printf("connect failed!\r\n"); return -1; } if(X509_V_OK != SSL_get_verify_result(ssl)) { /* print warning message */ } /* send request message */ if(0 >= BIO_write(bio, request, strlen(request))) { if(!BIO_should_retry(bio)) { /* handle failed write here */ } /* do something to handle the retry */ } /* recv response message & print */ while(1) { int len = BIO_read(bio, buf, 512); if(0 == len) { /* handle closed connection */ break; } else if(0 >= len) { if(!BIO_should_retry(bio)) { /* handle failed read here */ } /* do something to handle the retry */ } else { /* write to stdout */ write(1, buf, len); } } /* free */ BIO_free_all(bio); SSL_CTX_free(ctx); return 0; }
编译命令
gcc `pkg-config --cflags --libs libssl` -o ssl-test ssl-test.c
Over!
VPS 已经增加了 MemCache 服务了,通过这项服务可以提高 WordPress 的响应速度,降低数据库查询次数。
使用方法
var $key_prefix = '10位随机串'; // Set private key prefix here!!!
Over!
It’s very easy!
sudo rm /var/log/apache2/suexec.log sudo ln -s /dev/null /var/log/apache2/suexec.log
Over!
首先非常感谢浪点主机技术支持给我的方向,使我有机会能够了解虚拟主机的另一方案。
A. 特点
1. 权限分离,用户间互不干扰。
2. 相对使用ITK MPM方案内存需求更小,响应速度更快,并发高。
3. 可定制性强。
B. 应用程序说明
Apache: 不多说,HTTP服务器。
SuEXEC: Apache的模块,用于实现CGI或SSI应用程序的用户权限分离。
(F)CGI: Apache的模块,用于使Apache能够执行CGI和PHP-CGI。
PHP-CGI: PHP的CGI接口版本。
C. CGI模块和FastCGI模块的区别和适用环境
CGI模块为每个CGI请求fork一个新的进程,处理完成后该进程释放。适用于并发要求不高,内存资源少的系统。
FastCGI模块采用常驻的进程处理请求,由模块统一调度。适用于并发要求高,内存充足的系统。
Continue reading
WordPress 3.0 版本且主题使用了最新的函数 comment_form(),无需修改任何代码即可生效。DEMO 见我的博客。
代码仓库
git clone http://git.heiher.info/smathsum.git
Over!
在 Ubuntu 10.04 操作系统上架设了 Git 远程代码仓库并通过HTTP协议共享。clone 远程版本库时出现如下错误
fatal: http://git.heiher.info/xxxx.git/info/refs not found: did you run git update-server-info on the server?
解决方法
编辑服务器端文件 xxxx.git/hooks/post-update
exec git-update-server-info修正为
exec git update-server-info新版本 git-core 已经修复了此拼写错误。
Over!