Introduce to .ISZ format
All of you know .ISO formats as disk image file, today I'll introduce you a new compressed .ISZ format.
Features:
- Compressed format, you can even split into several parts.
- Open, Burn, Mount on-the-fly as .ISO formats.
- Password protection
And the specification of .ISZ file format is located here ( plain text ).
Currently, you can use UltraISO to compress ISO to ISZ, decompress ( maybe you don't need to ), mount, burn...etc, from version 8.51.
Daemon-Tools now supports .ISZ mounting, from version 4.0.9.1.
An example:
I've made a VS2005 ISO (Intergrated With SP1), it's about 4Giga large. After compressed to ISZ, the size reduced to half of previous: 2.1G.
However, the compress ratio depends on your content of image, it's same as RAR or ZIP, no magic.
Enjoy it!
Lighttpd url-redirect for Wordpress Permlink changes
I changed my wordpress blog entry permlink format. But some link to my blog exists on Internet doesn't work which results in a HTTP 404 error.
Why redirect is better then rewrite
Someone may have the same question, but take it easy, it depends on your decision.
But rewrite has it's benefits also, existed link will work without any changes. RSS feed, your live writer(maybe you prefer Word2007? :P) will still work, no need to change the configuration.
I want all visitors include search engine spiders get to know that the permlink changes, that's why I choose redirect, not rewrite.
Draft conf, simple and ugly
For example, http://feuvan.net/wordpress/?p=107 now should be http://blog.feuvan.net/index.php/2007/03/10/win-ce-platform-builder-60-evalutation-offline-download.html, then I have to configure my lighttpd configure like these.
$HTTP["url"] =~ "^/wordpress" {
url.redirect =(
"^/wordpress/(.*)$" => "http://blog.feuvan.net/index.php/$1"
)
}
But some links like http://feuvan.net/wordpress/index.php?p=56 will be redirected to http://blog.feuvan.net/index.php/index.php?p=56, it's ugly, er......
More clean conf file
So here we have a newer configure file:
$HTTP["url"] =~ "^/wordpress" {
url.redirect =(
"^/wordpress/index.php?(.*)$" => "http://blog.feuvan.net/index.php/$1",
"^/wordpress/(.*)$" => "http://blog.feuvan.net/index.php/$1"
)
}
Now the old link will be redirected to http://blog.feuvan.net/index.php/?p=56.
Furthermore
Wait, why not redirect to the new permlink directly?
Maybe I can throw out a solution.
NOTE:
You should enable mod_redirect to make the configuration works for you.
The article is specified to lighttpd 1.4.x series.
New Library Classes in "Orcas"
.NET Framework 3.5 is scheduled to be shipped with "Orcas" later 2007 or early 2008. "Orcas" is the codename of Microsoft's next generation of the heavy and effective IDE Visual Studio 2007.
According to Microsoft site, the new .NET Framework has been divided into two parts: red bits and green bits. The red bits is backward-compatible 3.0 netFX libraries, while the green bits is totally new assemblies with some extra new features including:
- A new add-in hosting model, which was discussed in the last two editions of CLR Inside Out
- Support for the Suite B set of cryptographic algorithms, as specified by the National Security Agency (NSA)
- Support for big integers
- A high-performance set collection
- Support for anonymous and named pipes
- Improved time zone support
- Lightweight reader/writer lock classes
- Better integration with Event Tracing for Windows® (ETW), including ETW provider and ETW trace listener APIs
Suite B Implementations
Suite B standard is from NSA, including these implementations:
- The Advanced Encryption Standard (AES) with key sizes of 128 and 256 bits for encryption
- The Secure Hash Algorithm (SHA-256 and SHA-384) for hashing
- The Elliptic Curve Digital Signature Algorithm (ECDSA) using curves of 256-bit and 384-bit prime moduli for signing
- Elliptic Curve Diffie-Hellman (ECDH) using curves of 256 and 384-bit prime moduli for key exchange/secret agreement
The new .NET Framework provides these implementations, and also a new class named CngKey:
To support our new CNG-based managed cryptography classes, we've added a CngKey class to abstract the storage and usage of CNG keys. CNG keys work similarly to key containers in today's Crypto API (CAPI)—they allow you to store a key pair or a public key securely and refer to it using a simple string name. You can use CngKey objects when working with the ECDsaCng and ECDiffieHellmanCng classes.
You can also use the CngKey class directly to perform many operations, including opening, creating, deleting, and exporting keys. If we don't have a managed API for the operation you want, you can get to the underlying key handle to use when calling Win32® APIs directly.
Better Integer Support: BigInteger
Now you can have the BigInteger class with these operation supports:
A New High-Performance Collection Class: HashSet
The new class HashSet was added to System.Collection.Generic namespace as a unordered generic high-performance collections that contains unique elements. It implements all the standard collection methods (such as Add, Remove, and Contains) and provides several set operations (including union, intersection, and symmetric difference). It's easy to use and with high-performance.
Pipes: System.IO.Pipes
Both anonymous and named pipes are supported. Now nearly all the pipe functionality provided by Windows are exposed. Now it's easy to achieve IPC from managed code. If you have experience with Windows native pipes, you will get no trouble to start with the new managed class.
Conclusion
We can expect more complete .NET Framework covering your industry, commercial, personal development requirements. As Microsoft has been described, .NET Framework will as last cover what Win32 SDK covers. It's not rumor or business advertisement, I believe managed code will be natively supported by OS one day, neither .NET nor Java, or some other languages.
Configure nginx as front-end web server
I've been using lighttpd for a long time, it's faster and stable. But 1.4.x series of lighttpd lacks some features I need: powerful proxy mod, dav_svn mod, real IP extract (as mod_extract_forwarded in apache).
Most of the bandwidth of feuvan.net is contributed to a web game proxy using proxy mod of lighttpd 1.4.13 : http://chaoswar.feuvan.net (official: http://alpha.chaoswar.cn:8080 ), the lighttpd causes many TIME_WAIT connections in high load condition. Therefore, I want to use a powerful proxy like squid to do the proxy work. nginx ( Engine X ) is my selection. Squid is too heavy ;-).
It's easy to install in debian, just type aptitude install nginx as root. Then I changed lighttpd listening port to localhost:81, and configure nginx to run on 0.0.0.0:80.
nginx.conf:
user www-data;
worker_processes 1;error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;events {
worker_connections 4096;
use epoll;
}http {
include /etc/nginx/mime.types;
default_type application/octet-stream;access_log /var/log/nginx/access.log;
sendfile on;
tcp_nopush on;keepalive_timeout 35;
tcp_nodelay on;gzip on;
server {
listen 80;location / {
proxy_pass http://127.0.0.1:81;
include /etc/nginx/proxy.conf;
}}
upstream chaoswar_cn {
server alpha.chaoswar.cn:8080;
}
server {
listen 80;
server_name chaoswar.feuvan.net;location / {
proxy_pass http://chaoswar_cn;
include /etc/nginx/proxy.conf;
}
}
}
proxy.conf:
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 30;
proxy_send_timeout 30;
proxy_read_timeout 30;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
The most content of configure files are copied from nginx wiki, it's easy to read. And may be I can do more optimizations like static content (picuture) cache ( expire 30d?). But the main purpose of this article is to show you a general whole picture of the proxy function of Nginx.
BTW, nginx is not just a light-weight squid like proxy server! It's also a HTTP/MAIL Server.
Anyway, I'm still waiting for 1.5.0 release of lighttpd.
See also: nginx, nginx wiki, lighttpd 1.4.x mod_proxy, lighttpd 1.5.x mod_proxy_core












