thread_concurrency
数量设置为CPU核心数量的两倍.
thread_cache_size
按照内存大小来设置, 1G=8, 2G=16, 3G=32, >3G=64
wait_timeout
超时时间,如果连接数比较大,可以减少此参数的值,我使用的是10
max_connections
最大连接数,mysql实际允许连接数的值是max_connections+1,按照系统库不同而有不同性能.一般是500~1000,MySQL AB提供的linux静态库可以达到4000.
query_cache_size
查询缓冲,默认是0,所以必须打开以提高mysql性能,其本身需要40K来保存结构数据.所以不能设置的太小,初期可以设置成32M,然后根据实际运行情况另行调整
query_cache_type
指定查询缓冲的类型,0是关闭,1是缓冲除了使用SELECT SQL_NO_CACHE语句指明了不需要缓冲的数据意外的所有查询,2是只缓冲SELECT SQL_CACHE指定的查询.一般设置为1.
query_cache_limit
允许进入查询缓冲区的最小数据大小,默认值是1MB,可以修改的小一点以满足更多查询的需求.但是如果设置的过于小,则会导致很多新的小查询的结果将原有的查询结果交换出去.增加系统的颠簸.

相关命令
查询mysql服务器相关状态数据
>SHOW STATUS;

查询mysql服务器相关配置选项
>SHOW VARIABLES;

整理查询缓冲区里的碎片
>flush query cache;

删除查询缓冲区里的所有内容
>reset query cache;

设置mysql参数
>SET GLOBAL;

查询mysql当前执行的sql语句
>show processlist;

变量 含义
Qcache_queries_in_cache
在缓存中已注册的查询数目
Qcache_inserts
被加入到缓存中的查询数目
Qcache_hits
缓存采样数数目
Qcache_lowmem_prunes
因为缺少内存而被从缓存中删除的查询数目
Qcache_not_cached
没有被缓存的查询数目 (不能被缓存的,或由于 QUERY_CACHE_TYPE)
Qcache_free_memory
查询缓存的空闲内存总数
Qcache_free_blocks
查询缓存中的空闲内存块的数目
Qcache_total_blocks
查询缓存中的块的总数目

MySQL查询优化
>SHOW STATUS LIKE ‘Qcache%’;
查询出Cache状态
如果Qcache_lowmem_prunes非常大,说明因为内存不足而被交换出cache的数据很多.如果增加内存.可以保证较小的交换次数以及较高的命中率
例如现在我们查询的结果如下

| Qcache_free_blocks      | 1234     |
| Qcache_free_memory      | 25957504 |
| Qcache_hits             | 55771119 |
| Qcache_inserts          | 7441153  |
| Qcache_lowmem_prunes    | 28332    |
| Qcache_not_cached       | 1233788  |
| Qcache_queries_in_cache | 4810     |
| Qcache_total_blocks     | 11038    |

设置为64M cache内存后
>set global query_cache_size=67108864;

| Qcache_free_blocks      | 1        |
| Qcache_free_memory      | 66623616 |
| Qcache_hits             | 55788258 |
| Qcache_inserts          | 7445445  |
| Qcache_lowmem_prunes    | 28332    |
| Qcache_not_cached       | 1234057  |
| Qcache_queries_in_cache | 183      |
| Qcache_total_blocks     | 392      |

自由内存块看起来变小了
是因为现在自由内存块.是一个整块.而以前的内存块都是分散的小块
而因为重建了cache区
Qcache_queries_in_cache变量变小了.因为此操作重新建立了cache内存区.所有数据重新缓存
在运行一两天后我们再看此数据.如果变大了.说明增大cache内存区域是有效的.如果和以前数据差不多
说明增加的内存并没有实际起到多大的作用.

有人会觉得如果我将cache内存设置的非常大
然后将cache_limit设置成0
那么所有查询都会被缓存了
理论上是这样.但是一台数据库服务器的查询非常多.
如果连查询单条数据都要缓存.
那么内存再大也会不够的.到时候老的内容就会被交换出去
当cache内存使用满的时候,就会不停的有新查询进来将老查询替换出去.
这样导致两个结果.一个是内存颠簸.效率反而下降.
第二个是cache内存的小碎块增多,内存利用率降低
如果是只有内容很少的小库,并且查询率不高.是可以使用这种方法提高响应速度
但是如果是实际生产环境,数据量会比较大.还是需要按照最佳比例来配置.
而不同的应用不同的数据量会有不同的搭配,这点大家不要看网上的优化配置随便的填写
还是要时时的查看mysql的状态进行调整.即便是这个月调整好的优化参数
到了下个月业务不同,数据量增加,也会需要调整的.

一、实际需求
在应用各种监控软件(比如:cacti、nagios、sitescope等)的时候,我一般都会用到它的email阀值报警功能。如果这时候再加上一个 msn在线监控机器人为你把关,第一时间给你发出msn报警信息,是不是能让你更快的处理问题呢。以下我为大家介绍一个msn command line 的小程序来实现这个功能。
软件下载地址:sendMsg

二、运行环境
一个支持php的系统环境就可以啦,当然要能上网,不然怎么发消息呢。
我的做法是和cacti监控服务器放一起,不需要额外的设备和资源投入。
注册一个msn的帐号用于监控机器人。比如:test@test.com 密码:123456
需要收到消息的msn帐号必须加监控帐号test@test.com为好友,不然收不到消息。

三、sendMsg用法
sendMsg.zip包中所有文件如下:

# ls -l sendMsg/
-
rw-r--r-- 1 root root 1213 Jul 29  2007 index.php //测试页面,web中打开开始测试;很容易做。
-
rw-r--r-- 1 root root 3894 Jul 29  2007 msnpauth-1.1.3.php
-
rw-r--r-- 1 root root 3372 Jul 29  2007 msnpauth.php
-
rw-r--r-- 1 root root 4586 Jul 29  2007 sendMsg.php
-
rw-r--r-- 1 root root  223 Jul 29  2007 simple.php
-
rw-r--r-- 1 root root 1424 Jul 29  2007 template.tpl

该程序也是通过登录msn服务器、建立IM会话,发送消息;
基本PHP语法如下:

$sendMsg = new sendMsg();
$sendMsg->login('test@test.com', '123456');
//刚才建立的用于举例的
msn监控机器人帐号
$sendMsg->createSession('recipient@hotmail.com');
//接受信息人的
msn帐号
$sendMsg->sendMessage('message', 'Times New Roman', 'FF0000');
//第一个是具体信息内容,后面可以设定字体和颜色;
$sendMsg->sendMessage(iconv("GBK", "UTF-8", 测试), 'Times New Roman', '008000');
//也利用
iconv转换gbkutf8来发送中文信息;

效果如下:

四、实际应用
这里是我自己写的一个应用发送msn信息的php脚本:仅供参考,如果大家有更好请和我交流。

#!/usr/bin/php
<?
if ($argc != 3) {
die("Usage: send_cndmonitor.php <msn-address> <messages>n");
}
array_shift($argv);
$msnaddr = $argv[0];
$messages = $argv[1];
include('sendMsg.php');
$sendMsg = new sendMsg();
$sendMsg->login('test@test.com', '123456');
$sendMsg->createSession($msnaddr);
$sendMsg->sendMessage($messages, 'Times New Roman', '008000');
?>

主要是为了能被其他脚本调用,用于发送一个报警信息。缺点是不能判定错误,所以实际运用中存在故障,需要网络流畅的环境下使用。

我们的生产环境已经存在大量的监控系统,所以针对错误信息已经整理到数据库中,因此我只需要从数据库导出目前存在error信息的文本文件,然后根据节点位置发送给相关维护负责人即可。

为了能判定和确保发送正确,我利用sendMsg中的index.php的页面和shell脚本相结合来循环发送,实在抱歉本人PHP程度有限;
脚本如下:(这是我实例中使用的一个工作脚本,仅供大家借鉴)

#!/bin/sh
wget --user=monitor --password=123456 http://127.0.0.1/monitor/msn.txt -O /var/www/html/sendMsg/msn.txt.1 >/dev/null 2>&1
#下载msn要发送的信息,因为页面都是认证的所以用了wget的user和password;
now=`date +%Y-%m-%d-%H:%M`
[ -f /var/www/html/sendMsg/msn.txt ] && oldmd5=`md5sum var/www/html/sendMsg/msn.txt |awk '{print $1}' |tee /var/log/cdn_status_old.md5` || exit 0
[ -f /var/www/html/sendMsg/msn.txt.1 ] && newmd5=`md5sum var/www/html/sendMsg/msn.txt.1 |awk '{print $1}' |tee /var/log/cdn_status_new.md5` || exit 0
SA=(admin1 admin2 admin3 admin4)
# 相关负责人列表和下载的msn信息的中的名字对应;
msnaddr=(admin1@msn.com admin2@msn.com admin3@msn.com admin4@msn.com)
# 相关负责人的msn帐号和SA变量中的的名字顺序一一对应;
sendMsg()
{
num=0
while [ $num -lt 1 ];
do
wget --post-data "sender=test@test.com&password=123456&recipient=${1}&message=${2}" http://127.0.0.1/sendMsg/index.php -O /var/www/html/sendMsg/index.php.1 >/dev/null 2>&1
# 使用wget post-data发送post参数给index.php页面,用以发送msn信息。
if [ -f /var/www/html/sendMsg/index.php.1 ]; then
if cat /var/www/html/sendMsg/index.php.1 |grep -i successfully >/dev/null 2>&1;then
num=1 #判断信息发送成功
elif cat /var/www/html/sendMsg/index.php.1 |grep -i "The user appears to be offline" >/dev/null 2>&1;then
num=1 #判断msn接受人为是否在线状态
echo "The user is offline."
exit 0
elif cat /var/www/html/sendMsg/index.php.1 |grep -i "Something went wrong trying to connect to the server" >/dev/null 2>&1;then
num=1 #判断msn 服务器存在连接问题
echo "MSN server is wrong."
exit 0
else
num=0 #除了以上三种情况退出循环外,其他情况重试。
fi
rm -f /var/www/html/sendMsg/index.php.1
else
num=0
fi
done
}
 
if [[ $oldmd5 == $newmd5 ]];then #校验msn的信息是否是已经发送过的,主要是为了不重复发送错误信息。
rm -f /var/www/html/sendMsg/msn.txt.1
exit 0
else
mv /var/www/html/sendMsg/msn.txt /var/www/html/sendMsg/bak/msn$now.txt -f
mv /var/www/html/sendMsg/msn.txt.1 /var/www/html/sendMsg/msn.txt -f
#备份已发送的msn错误信息
 
fi
 
for i in `seq 0 1 3` #根据维护人员的数量进行判断和循环
do
if cat /var/www/html/sendMsg/msn.txt |grep -i ${SA[$i]}; then
messages=`cat /var/www/html/sendMsg/msn.txt |grep -i ${SA[$i]}`
sendMsg "${msnaddr[$i]}" "$messages"
else
continue
fi
done

加入到crontab每5分钟执行一次;考虑维护人员的上线时间(最好是24H值班msn,那就不存在这个问题)设定执行时间为每周1到5的9点到18点;

*/5 9-18 * * 1-5 /var/www/html/sendMsg/send_report.sh

实际应用大家可以根据自己的情况进行调整,我这里只是告诉大家怎么使用sendmsg,举了一个简单的实例帮助大家理解和应用。

如果懂php语言的可以把这个作为cacti的一个插件使用,那样效果就更棒啦~

 查看全文

Since we first started talking about using the browser as an authentication tool in December 2000 OpenSource implementations have started to appear. Here is a list of all the software I know of that implements either a CaptivePortal or an ActivePortal solution.

LiveCD

Open Source

  • talweg

    • It's a http/https captive portal. It uses http redirections to enforce transmissions using a secured https channel. Using of IP/MAC address to maintain sessions are not necessary, the authentication is more secure.
  • NoCatAuth

    • Written in perl, supports Linux/iptables and OpenBSD/pfctl. GPLed. Supports authenticating modes against an auth service with a wide variety of backends, including a MySQL database, PAM, RADIUS, LDAP, and more. Also features a non-authenticating "open mode" that merely requires a user to accept an AUP before they can log in. This project is more or less seeking a new maintainer.
  • NoCatSplash

    • Written in C, currently under heavy development. Intended to be the successor to NoCatAuth, the gateway process and all its data files fit within 200-250k, making it ideal for embedded environments.

  • Captivator-gw

    • Captive portal that works inline at Layer 2 in your network. Supports vlans and trunk interfaces. Uses arp to detect if users are still connected. Written in perl, and easy to add new features. Developed at the University of Wisconsin - Madison.
  • Opengate

    • GPLed, written in C, runs on FreeBSD. Uses Ajax (or Java applet) to keep the connection open. When the authenticated user closes the browser or OS, the network for the terminal is closed immediately. Ftp, pop3, pop3s, RADIUS, LDAP or PAM for an authentication back-end. Developed in Saga University (Japan).
  • MetaNet by ErikWalthinsen.

    • Still in early beta but it will provide an entire network application framework rather then just a CaptivePortal solution.

  • WiCap by BrianCaswell

    • Written in Perl and runs under OpenBSD. I believe this is what NovaWireless will be deploying.

  • WiCap-PHP by CalebPhillips

    • Written in 'C' and PHP, runs under OpenBSD. There is a fork written in Python and PHP. A more betterer implementation of WiCap.

  • River of Stars

    • Wireless heartbeat implementation (presently most usable on an OpenBSD gateway)
  • LanRoamer (Linux 2.4.x)

    • Based on the Linux 2.4 kernel and GPL'd. (Name changed to LanRoamer by Jim Thompson)

  • SLAN

    • A GPL'd captive portal implementation using VPN technology. Has Linux and Windows clients.
  • Netlogon by Kent Engström at Linköpings University

    • Not much known, a basic captive portal solution.
  • Authentication Gateway HOWTO by Nathan Zorn

    • Uses a PAM module to insert an iptables rule. Very simple and effective. (Added by LimAko).

  • StockholmOpen by the Royal Institute of Technology in Stockholm, Sweden

    • This system is also operator neutral, allowing different users to connect through the access network to different upstream providers. Implementation in C, uses PAM, Linux/FreeBSD. BSD License. (Added by MartinHedenfalk).

  • OpenSplash by Aleksandr Melentiev from San Francisco Wireless

    • Inspired by the simplicity of wicap, intended to run on FreeBSD by utilizing Perl and ipfw. Doesn't provide much functionality, other than a simple AUP agreement. Development version includes abstract authentication system.
  • ChilliSpot by Mondru AB

    • ChilliSpot is an open source captive portal or wireless LAN access point controller written in C which supports web based login (external web server required) as well as Wireless Protected Access (WPA), sports a builtin DHCP server and a RADIUS client/proxy server to handle authentication, authorization and accounting (AAA) via an external Radius server. Currently runs on Linux (RedHat, Fedora, Debian binaries and Gentoo ebuild available) but should compile also on FreeBSD, OpenBSD, Solaris, Apple OS X. Previously known as hotspotd, which was available only as binary. Fifth GPL release (0.94): 2004-06-22. (Added by Ovidiu)

  • M0n0wall by Manuel Kasper

    • Embedded Firewall based on FreeBSD that can run from embedded devices as well as PC's. The Captive Portal software included with it allows for button/AUP pass through, as well as authentication using Radius.
  • pfSense

    • Firewall based on FreeBSD6 that can run from embedded devices as well as PC's. The Captive Portal software included with it allows for button/AUP pass through, as well as authentication using Radius.
  • Wifidog

    • The WiFiDog project was started by Île sans fil and is currently in production. Existing captive were either almost impossible to embede or only designed to display disclaimers with no access control at all (No Cat Splash and others). WiFiDog is designed to have optional centralized access control, full bandwidth accounting, node heartbeating and local content specific to each hotspot. It does not rely on a javascript window, so it works with any platform with a web browser, including PDAs and cellphones. It is developed in C to make it easy to include in embedded systems (It has been designed for the LinkSys WRT54G, but runs on any recent linux platform). A typical install only takes 30kb on i386, and a fully functionnal install could be made in under 10 kb if necessary.

  • Authpf

    • User Shell for Authenticating Gateways on OpenBSD. Authpf(8) is a user shell for authenticating gateways. User logs in using SSH.
  • sweetspot

    • IP-level captive portal with built-in packet filtering and accounting features, Linux based.

Free (Closed Source)

  • 2hotspot

    • Instant creation of hotspots for Windows XP,2k,2003. Works with any wireless router or adapter. Optional profit mode makes charging clients extremely easy. Has optional IP-based authentication (no MAC required).
  • DNS Redirector

    • Forces a splash page (welcome, advertisement, coupon, password, registration, or terms & conditions statement) the first time someone tries to surf the Internet on your network.

    • Tracks clients by IP (not MAC) so any client OS, regardless of local VPN/firewall software, is flawlessly supported.
    • For paid wifi, free-spots, or any public network.
    • Runs on Windows 2K/XP/2003/Vista, can be installed as a service.
    • Includes content filtering; bad/adult sites, advertisement blocking/replacement.
    • Includes time of day restriction; no surfing after hours, during bedtime, etc.
    • Ability to block everything and allow only a few sites, or resolve everything to one site.
    • Very customizable; redirects to your own HTML/ASP/PHP welcome, blocked, restricted, pages served by IIS or Apache.

Commercial

  • UseMyNet is a commercial captive portal for OpenWRT.

    • Self-contained - Everying runs on router flash.
    • No revenue sharing or monthly fees.
    • Landing page editor
    • Ticket generation
    • Adjustable durations and bandwidth rates.
    • Pre-printed Tickets.
  • WiFi Captive Portal WiFi Gator captive portal for HotSpots, You own the software.

    • Create unlimited hotspot landing pages
    • Unlimited PayPal accounts and can assign them to hotspot landing pages

    • Heartbeat script phones home with information from each hotspot
    • Print out prepaid tickets with each hotspots logo(pdf format).
    • Each hotspot has an image uploader and wysiwyg web based editor to comletey brand each landing page.
    • Individually set time plans and prices for each hotspot
    • Everything is fully brand-able.
    • Walled gardens, and pre approved websites such as airports weather and bus routs
    • Our custom firmware is free to install into all routers and has the option to create self healing mesh networks.
    • Best of all, there is no revenue sharing, you own the radius server and charge your own prices.
    • You are up and running in 15 minutes.
  • LinSpot

    • U can get the Linux-version via email at beta@linspot.com It is a free and easy software to sell your Wireless Internet Access.

  • TOMIZONE.com - Free commercial Hotspot Solution

    • Embedded in selected D-Link, Netgear, Belkin and Linksys Wi-Fi Routers natively
    • Dual SSID D-Link product (DIR-300) native port
    • Multi-currency real time AAA
    • Included PayPal billing and cash distribution

    • Online voucher creation and distribution
    • No contract or on-going fees
    • Limit speed of connection for all users
    • Hour, Day, Week passes
  • AmazingPorts will give you a simple to install, free Captive Portal solution for home use - just download, burn CD and install. It handleds QoS on a per service/user level - so you can ensure that your guests don't trash your bandwidth. AmazingPorts also implements Service Oriented Provisioning meaning that you can define services on a granular level not only "internet on/off". Good luck Jan E ( AmazingPorts team)

  • HotSpotSystem.com - Commercial or Free HotSpot solution

    • HotSpot PRO - for creating paid HotSpots

      • Firmware software is FREE and running on the router (LinkSys WRT54GL and compatible)

      • No setup and monthly fees to pay
      • PayPal and Credit Card module included (no merchant account required)

      • Pre-Paid module included
      • Set your own prices in your own currency
      • Customizable start page in 12 languages
    • HotSpot FREE - for creating a FREE HotSpot with authentication

      • Limit accesses with access codes
      • Limit bandwidth/data traffic
      • 3 different subscription models depending on the number of authentications per month
  • myWIFIzone Captive Portal Services

    • Windows 2k,XP supports free spot or hotspot, Mthly. fee (free while in Beta test)
    • On-line tools for customizing captive portal, adding users, etc.
  • Patronsoft FirstSpot

    • Windows 2k,XP,2003,Vista air time credit control, PayPal, WorldPay integration

    • self sign-up/anonymous mode/freely customizable login pages/...
    • with embedded database for working with MySQL, MS SQL, etc
  • MikroTik Hotspot RouterOS -- www.mikrotik.com

  • Aradial Radius server and Radius Billing software solutions

  • Aptilo's system for hotspot management

    • Billing integrated with Credit card brokers, hotel systems, mobile phone systems, etc
    • Visitor Access functionality.
    • Full plug'n'play support.
  • Cisco http://www.cisco.com

  • Interlink Networks RADIUS Server Software High Performance RADIUS Software

  • Nokia http://www.nokia.com

    • Mobilestar used P020s for the initial deployment of over 600 Starbucks. When Voice Stream bought the remnants of the bankruptcy, all 600+ Starbucks were retrofitted because Nokia's solution did not properly safeguard username and password combinations with an https page. P022 corrected this major bug among a few other things.
    • P020 Public Access Zone Controller (discontinued) is an integrated network appliance with a RADIUS client and DHCP server.
    • P022 Access Controller (discontinued) Nokia P022 Access Controller--Your IP Gateway to the Internet. The Nokia P022 Access Controller is a gateway between the Wireless LAN network and the Internet. The P022 authenticates the user, monitors network usage in real-time, collects charging information and acts as a router. The Nokia P022 Access Controller can be connected to the Nokia Authentication Server for integration into a mobile operators network or to a RADIUS server for integration into other customer, care and billing systems.
    • P030 Mobility Services Manager (discontinued) offers the RADIUS server and billing functions.
  • Nomadix http://www.nomadix.com

    • AG 2000w+ - Wireless Gateway; small single cell deployment
    • HSG - HotSpot Gateway for small to medium sized deployments

    • AG5000 - High performance gateway for hotels, airports, and convention centers
    • AG5000 Metro - High performance gateway for Metropolitan HotZone deployments

  • T-Mobile HotSpot http://www.t-mobile.com/hotspot (Starbucks Borders FedEx Kinkos Red Roof Hyatt American Delta United USAir...)

    • Starbucks has a CaptivePortal solution of some sort. Anyone know the details?

    • Yeah, its Cisco's Service Selection Gateway -- Jim Thompson
    • In UK, running in cooperation with Aptilo's Service Management Platform for added functionality.
  • MS Choice (site requires IE5) Microsoft's testbed for the Starbucks Deal.

    • "To prevent such unauthorized access and hacking, OIT developed its own authentication program requiring wireless users to log in through a web browser before access to the Internet is granted. If a user's connection is inactive for a certain amount of time, the authentication system closes the user's access, deterring potential hackers from taking advantage of the connection."
    • Not quite true. The Starbucks deal was Mobilestar, and there was precious little Microsoft content in the deal (or company). --Jim Thompson
  • Columbitech's Wireless VPN

    • "... enables mobile professionals to access mission-critical data on the corporate LAN from all major handheld devices, with optimized performance and true end-to-end security from application to application. In addition, Columbitech's solution offers a secure always-on experience. Columbitech Wireless VPN will also support wireless network roaming."
    • http://www.columbitech.com/products/

    • Mostly a mobile IP / VPN solution.
  • NASA's Wireless Firewall Gateway

    • A solution using Openbsd, PHP, IPFilter and Apache. There is no source available that I know of.
  • Wayport

    • Another solution using Linux, perl IPF, and Apache. No source available --Jim Thompson
  • Surf and Sip

    • Hack using FreeBSD, perl, ipfw and mini_httpd. No source available -- MattPeterson

  • FatPort

    • Gateway software running OpenBSD, Perl, C, and Apache.
    • Auth server running PostgreSQL, etc..
    • System can be licensed, but code not available. --KenSimpson

  • IPzone Linux,Apache No source available -- Suresh Rasaretnam

  • ControlAP Win*,*nix,MacOS, Zaurus,PocketPC - JAVA VM needed - No source available, web-based administration - free 30 days trial.

  • Air Marshal Authentication Gateway Commercial Linux-based captive portal for HotSpots, Fixed Wireless and Wired Networks.

    • RADIUS: Auth, Acct, Disconnect, PreAuth (MAC), WISPr, Ascend Filters, Failover

    • Supports thousands of concurrent sessions
    • SSL and browser based CHAP protects credentials and private customer data
    • Supports Static Routing, NAT and transparent L2 bridging
    • Guest / Anon Access /w daily usage limits
    • Local accts: UL/DL rate shaping, expiration, time and data usage limits
    • Network TCP/UDP listeners authenticate servers, Nintendo DS, etc
    • Walled gardens, commercial interruptions, customizable client HTML UI
    • Session data mirroring/intercept to remote collector
    • FREE for up to 5 concurrent logon sessions
  • LinSpot

    • U can get the Linux-version via email at beta@linspot.com It is a free and easy software to sell your Wireless Internet Access.

  • Sputnik Managed Wi-Fi Networks "Everything you need to deploy and manage a profitable Wi-Fi network."

    • Plug 'n Play provisioning
    • User authentication and tracking
    • Manage 1 or 1,000 access points remotely
    • Modules for accepting PayPal payments

    • Modules for accepting credit card payments (Note: Requires a hosted billing account with Aria Systems.)
    • Modules for "Pre-Paid Cards"
    • Give customers monthly & renewing subscription options

    • Supports RADIUS accounting
    • Buy the Sputnik Control Center and run it on your own server or subscribe to SputnikNet and have them host it for you.

    • Firmware images for the Linksys WRT54G(S) freely downloadable. (When combined with a subscription to SputnikNet you'll be up and running in no time!)

  • Free Secure WiFi Client LucidLink WiFi Security.

  • WILIBOX Embedded Linux Platform Commercial Linux-based software platform targeting WISPs. Demo download available.

    • Supports common access point and router hardware platforms
    • 802.11 stack supports multiple virtual APs (multiple BSSIDs) and multiple client mode STA (station) connections concurrently
    • Hotspot features: WEB login redirection (captive portal), UAT, SMTP redirection, RADIUS and others
    • RCMS - Remote Configuration Management System, firmware management and status reporting
  • WisperMesh Pro and WUMPS - Wisper User Management and Provisioning System

    • Hosted or standalone HotZone management system for WiFi MESH networks

    • Pre-paid cards can customized and printed to pre-cut business card sheets
    • Premium-SMS, Paypal and Credit Card payments.
    • Central management for nodes settings and firmware, user accounting and status reports
    • Support for multiple BSSID's and VLAN's with independent QoS for Internet, VoWLAN and multicast streaming media
  • WorldSpot

    • Hosted hotspot management portal. Free for free hotspots.
    • Chillispot compatible (implies compatibility with opensource firmware like DD-WRT, OpenWrt, or any linux platform)

    • No need for PC, only a linux compatible wifi router needed.
    • Advanced pre-paid cards
    • Wysiwyg cards customization and printing
    • Wysiwyg welcome page customization
    • Paypal online billing soon.

 

今天发现几根白发,不算多。

目前各项工作都进展的比较顺利。但是在产品推动方面,还需要梳理。

About this file
---------------
This file contains information for anyone wanting to work on the Geany
codebase. You should be aware of the open source licenses used - see
the README file or the documentation.

Writing plugins
---------------
You should generate and read the plugin API documentation, see below.

src/plugindata.h contains the plugin API data types and some notes.
See plugins/demoplugin.c for a very basic example plugin.
src/plugins.c loads and unloads plugins (you shouldn't need to read
this really).

Plugin API documentation
^^^^^^^^^^^^^^^^^^^^^^^^
You can generate documentation for the plugin API using the doxygen
tool. Run 'make api-doc' in the doc subdirectory. The documentation will
be output to doc/reference/index.html.

Patches
-------
We are happy to receive patches, but it's best to check with us by email
or mailing list whether a new feature is appropriate, and whether someone
is already working on similar code.

In general it's best to work from the current SVN, but we accept patches
against other releases.
$ svn diff > fix-some-bug.patch

If you're not using SVN, you can use the diff command:
$ diff -u originalpath modifiedpath > new-feature.patch

For Windows:
Subversion (SVN): http://subversion.tigris.org/ />diff, grep, etc: http://mingw.org/ or http://unxutils.sourceforge.net/. />See also the 'Building on Windows' document on the website.

File organization
-----------------
callbacks.c is just for Glade callbacks.
Avoid adding code to geany.h if it will fit better elsewhere.
See the top of each src/*.c file for a brief description of what it's for.

Keeping the plugin ABI stable
-----------------------------
Please be aware that anything with a doc-comment (a comment with an
extra asterix: '/**') is something in the plugin API. Things like enums
and structs can usually still be appended to, ensuring that all the
existing elements stay in place - this will keep the ABI stable.

Note: Some structs like KeyBindingGroup and GeanyCallback cannot be
appended to without breaking the ABI because they are used to declare
structs by plugins, not just for accessing struct members through
a pointer.

Before the 1.0 release series, the ABI can change when necessary, and
even the API can change. An ABI change just means that all plugins will
not load and they must be rebuilt. An API change means that some plugins
might not build correctly.

When reordering or changing existing elements of structs that are used as
part of the plugin API, you should increment abi_version in plugindata.h.
This is not needed if you're just appending fields to structs. The
api_version value should be incremented for any changes to the plugin API,
including appending elements.

If you're in any doubt when making changes to plugin API code, just ask us.

Glade
-----
Use the code generation features of Glade instead of editing interface.c
or support.c. Glade 2.10 is recommended as long as we support GTK+ 2.6,
because later versions of Glade are not 100% compatible with GTK+ 2.6
(e.g. they may use functions added in GTK+ 2.8).

You can build Glade 2.10 and run the binary in place, without installing
it - this should work fine even if you have another version of Glade
installed on the system.

GTK API documentation
---------------------
The official GTK 2.6 API documentation is not available online anymore,
so we put them on
http://geany.uvena.de/manual/gtk/. />There is also a tarball with all available files for download and use
with devhelp.

Using the 2.6 API documentation of the GTK libs (including GLib, GDK and
Pango) has the advantages that you don't get confused by any newer API
additions and you don't have to take care about whether you can use
them or not.
This is because Geany depends on GTK 2.6. API symbols from newer
GTK/GLib versions should be avoided to keep the source code building
against GTK 2.6.

Coding
------
Don't write long functions with a lot of variables and/or scopes - break
them down into smaller static functions where possible. This makes code
much easier to read and maintain.
Use GLib types and functions - e.g. g_free instead of free.
Your code should build against GLib 2.6 and GTK 2.6. At least for the
moment, we want to keep the minimum requirement for GTK at 2.6 (of
course, you can use the GTK_CHECK_VERSION macro to protect code using
later versions).
We currently try to support the old GCC 2.9.x compiler,
so we always declare variables before statements. You can use
-Wdeclaration-after-statement in your ./configure CFLAGS to warn about
this.
You should also try to write ISO C90 code for portability, so always
use C /* */ comments and function_name(void) instead of function_name().
This is for compatibility with various Unix-like compilers. You can use
-ansi in your CFLAGS to help check this.

Style
-----
We use a tab width of 4 and indent completely with tabs not spaces.
Use the multiline comment /* */ to comment small blocks of code,
functions descriptions or longer explanations of code, etc. C++ single
line comments will cause portability issues. The more comments are in
your code the better.
Lines should not be longer than about 100 characters and after 100
characters the lines should be wrapped and more indented than the first
line to highlight that the line is continued. We avoid putting spaces
between function names and the opening brace for argument lists. Try to
fit in with the existing code brace indenting style, comments, operator
spacing etc. It's not required but it makes our lives easier ;-)

Libraries
---------
We prefer to use an unmodified version of Scintilla - any changes should
be passed on to the maintainers at
http://scintilla.org. />
Tagmanager was originally taken from Anjuta 1.2.2, and parts of it
(notably c.c) have been merged from later versions of Anjuta and
CTags. The independent Tagmanager library itself ceased development
before Geany was started. It's source code parsing is mostly taken from
Exuberant CTags (see
http://ctags.sf.net).


NOTES
=====
Some of these notes below are brief (or maybe incomplete) - please
contact the mailing list for more information.

Using pre-defined autotools values
----------------------------------
When you are use macros supplied by the autotools like GEANY_PREFIX,
GEANY_LIBDIR, GEANY_DATADIR and GEANY_LOCALEDIR be aware that these
might not be static strings when Geany is configured with
--enable-binreloc. Then these macros will be replaced by function calls
(in src/prefix.h). So, don't use anything like
printf("Prefix: " GEANY_PREFIX); but instead use
printf("Prefix: %s", GEANY_PREFIX);

Adding a file foo.[hc] in src/ or plugins/
------------------------------------------
Add foo.c, foo.h to SRCS in path/Makefile.am.
Add foo.o to OBJS in path/makefile.win32.
Add path/foo.c to po/POTFILES.in (for string translation).

Adding a filetype
-----------------
You can add a filetype without syntax highlighting or tag parsing, but
check to see if those features have been written in other projects first.

For syntax highlighting, it may be possible to use an existing Scintilla
lexer in the scintilla/ subdirectory - if not, you will need to find
(or write) one, LexFoo.cxx. Try the Scintilla project first. Remember
to update scintilla/Makefile.am and scintilla/makefile.win32.

For tag parsing (e.g. for the symbol list), see 'Adding a TagManager
parser' below.

Add GEANY_FILETYPES_FOO to filetypes.h.
Initialize GEANY_FILETYPES_FOO in init_builtin_filetypes() of
filetypes.c.
Rebuild Geany.
From your geany/ directory, run:
src/geany --generate-data-files

(The src/ prefix may be different, depending on where the binary is
generated.)
This will update data/filetype_extensions.conf. Note that
you need GEANY_DEBUG to be defined when building Geany for the
--generate-data-files argument to work - this is always defined in the
SVN version. Alternatively, edit the file by hand.

filetypes.* configuration file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
All languages need a data/filetypes.foo configuration file. See
data/filetypes.c for an example.

Programming languages should have:
[keywords] if the lexer supports it.
[settings] mostly for comment settings.
[build_settings] for commands to run.

For languages with a Scintilla lexer, there should be a [styling] section,
to correspond to the styles used in styleset_foo() in highlighting.c -
see below.

Syntax highlighting
^^^^^^^^^^^^^^^^^^^
For syntax highlighting, you will need to edit highlighting.c and add
the following things:
1. Write styleset_foo_init() to setup default styles and load style
settings from the filetypes.foo configuration file. You should probably
start by copying and adapting another filetype's initialization, such
as styleset_asm_init().
2. Write styleset_foo() to apply styles when a new scintilla widget
is created. Again you could copy and adapt a function like styleset_asm().
3. Add this in highlighting_init_styles():
init_styleset_case(GEANY_FILETYPES_FOO, foo);
4. Add this in highlighting_set_styles():
styleset_case(GEANY_FILETYPES_FOO, foo);

Other features
^^^^^^^^^^^^^^
Error message parsing is done in msgwin_parse_compiler_error_line() of
msgwindow.c. See the ParseData typedef for more information. (In future
this may be done with a regex).

For brace indentation, update lexer_has_braces() in editor.c;
indentation after ':' is done from on_new_line_added().

If the lexer has comment styles, you should add them in is_comment()
in editor.c. For now, this prevents calltips and autocompletion when
typing in a comment (but it can still be forced by the user).

If the Scintilla lexer supports user type keyword highlighting (e.g.
SCLEX_CPP), update editor_lexer_get_type_keyword_idx() in editor.c.


Adding a TagManager parser
--------------------------
This assumes the filetype for Geany already exists.

First write or find a CTags compatible parser, foo.c. Note that there
are some language patches for CTags at:
http://sf.net/projects/ctags - see the tracker.

(You can also try the Anjuta project's tagmanager codebase.)

Add foo.c to SRCS in Makefile.am.
Add foo.o to OBJS in makefile.win32.
Add Foo to parsers.h & fill in comment with parser number for foo.

In foo.c:
Edit FooKinds 3rd column to match a s_tag_type_names string in tm_tag.c.

In filetypes.c, filetypes_init_types():
Set filetypes[GEANY_FILETYPES_FOO].lang = foo's parser number.

In symbols.c:
Update init_tag_list() for foo, listing the tm_tag_* types corresponding
to the s_tag_type_names strings used in foo.c for FooKinds.


Loading a plugin from GDB
-------------------------
This is useful so you can load plugins without installing them first.
Alternatively you can use a symlink in ~/.geany/plugins or
$prefix/lib/geany (where $prefix is /usr/local by default).

The gdb session below was run from the toplevel Geany source directory.
Start normally with e.g. "gdb src/geany".
Type 'r' to run.
Press Ctrl-C from the gdb window to interrupt program execution.

Program received signal SIGINT, Interrupt.
0x00d16402 in __kernel_vsyscall ()
(gdb) call plugin_new("./plugins/.libs/demoplugin.so")
** INFO: Loaded: ./plugins/.libs/demoplugin.so (Demo)
$1 = (Plugin *) 0x905a890
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x00d16402 in __kernel_vsyscall ()
(gdb) call plugin_free(0x905a890)
** INFO: Unloaded: ./plugins/.libs/demoplugin.so
(gdb) c
Continuing.

截至今天,5种检测方式都已经完成。分别是: ping,snmp,端口,URL,接口,5种方式。

 接下来还需要完成监控报警部分功能。

在考虑,这个版本是继续2.3版本好呢,还是定为3.0好呢。

 

版本说明:


  继2.0,2.1,2.2三个版本的推出,我们将在内部已经测试了将近半年的健康检测模块部分的功能集成在 2.3版本里。这次发布的2.3-alpha1版本,是集成健康检测后的第一个提供给用户一起测试的版本,也是在这个版本里引入地址池管理概念。另外会在 未来的2.3-alpha2版本继续将负载均衡功能集成进来。

  地址池管理,是通过管理地址池里的IP地址,达到添加一个记录,指向多 个IP的效果。以前如果有10台WEB服务器,需要通过DNS轮询的话,就需要添加10条A记录。有地址池管理后,只需要在地址池里添加10个IP地址, 然后在域名管理里添加一条A记录。并且这个地址池还可以重复使用。

  健康检测功能,是针对在实易智能DNS系统管理的域名的记录IP地址进行健康检测。当根据添加地址池的IP地址时设定的检测方式进行检测后发现该IP主机异常(宕机、服务停止)时,会根据设定采取的措施来处理,或者停用,或者替换为新的IP。

  未来的负载均衡功能,会根据接口获取目标主机的负载,跟设定的权值比较。当负载值大于或等于权值时,采取指定的停用或替换措施。


  通过这两个功能,可以克服传统DNS系统无法判断记录指向的主机是否正常运行,负载是否承载的了的问题。


新功能:

1. 增加健康检查模块
2. 增加地址池管理功能


修复BUG:

 

升级:

 

其他:

 

下载地址:

http://fedns.isyi.com/download/index.shtml#2.3

使用手册:
在线阅读或者下载阅读:
http://fedns.isyi.com/docs/index.shtml

将在明天早上发布2.3-alpha1版本。这个版本集成健康检测功能。

也是这个版本引入地址池的管理概念。通过地址池管理,可以对每个IP设置不同的检测方式。同时可以对检测失效(宕机、不能服务)的IP进行停用或者替换为新的IP地址。

HTTP(HyperTextTransferProtocol)是超文本传输协议的缩写,它用于传送WWW方式的数据,关于HTTP协议的详细内 容请参考RFC2616。HTTP协议采用了请求/响应模型。客户端向服务器发送一个请求,请求头包含请求的方法、URI、协议版本、以及包含请求修饰 符、客户信息和内容的类似于MIME的消息结构。服务器以一个状态行作为响应,相应的内容包括消息协议的版本,成功或者错误编码加上包含服务器信息、实体 元信息以及可能的实体内容。

通常HTTP消息包括客户机向服务器的请求消息和服务器向客户机的响应消息。这两种类型的消息由一个起始行,一个或者多个头域,一个只是头域结束 的空行和可选的消息体组成。HTTP的头域包括通用头,请求头,响应头和实体头四个部分。每个头域由一个域名,冒号(:)和域值三部分组成。域名是大小写 无关的,域值前可以添加任何数量的空格符,头域可以被扩展为多行,在每行开始处,使用至少一个空格或制表符。

通用头域

通用头域包含请求和响应消息都支持的头域,通用头域包含Cache-Control、 Connection、Date、Pragma、Transfer-Encoding、Upgrade、Via。对通用头域的扩展要求通讯双方都支持此扩 展,如果存在不支持的通用头域,一般将会作为实体头域处理。下面简单介绍几个在UPnP消息中使用的通用头域。


Cache-Control头域
Cache-Control指定请求和响应遵循的缓存机制。在请求消息或响应消息中设置 Cache-Control并不会修改另一个消息处理过程中的缓存处理过程。请求时的缓存指令包括no-cache、no-store、max-age、 max-stale、min-fresh、only-if-cached,响应消息中的指令包括public、private、no-cache、no- store、no-transform、must-revalidate、proxy-revalidate、max-age。各个消息中的指令含义如 下:

Public指示响应可被任何缓存区缓存。

Private指示对于单个用户的整个或部分响应消息,不能被共享缓存处理。这允许服务器仅仅描述当用户的部分响应消息,此响应消息对于其他用户的请求无效。

no-cache指示请求或响应消息不能缓存

no-store用于防止重要的信息被无意的发布。在请求消息中发送将使得请求和响应消息都不使用缓存。

max-age指示客户机可以接收生存期不大于指定时间(以秒为单位)的响应。

min-fresh指示客户机可以接收响应时间小于当前时间加上指定时间的响应。

max-stale指示客户机可以接收超出超时期间的响应消息。如果指定max-stale消息的值,那么客户机可以接收超出超时期指定值之内的响应消息。


Date头域
Date头域表示消息发送的时间,时间的描述格式由rfc822定义。例如,Date:Mon,31Dec200104:25:57GMT。Date描述的时间表示世界标准时,换算成本地时间,需要知道用户所在的时区。


Pragma头域
Pragma头域用来包含实现特定的指令,最常用的是Pragma:no-cache。在HTTP/1.1协议中,它的含义和Cache- Control:no-cache相同。

请求消息

请求消息的第一行为下面的格式:

MethodSPRequest-URISPHTTP-VersionCRLFMethod 表示对于Request-URI完成的方法,这个字段是大小写敏感的,包括OPTIONS、GET、HEAD、POST、PUT、DELETE、 TRACE。方法GET和HEAD应该被所有的通用WEB服务器支持,其他所有方法的实现是可选的。GET方法取回由Request-URI标识的信息。 HEAD方法也是取回由Request-URI标识的信息,只是可以在响应时,不返回消息体。POST方法可以请求服务器接收包含在请求中的实体信息,可 以用于提交表单,向新闻组、BBS、邮件群组和数据库发送消息。

SP表示空格。Request-URI遵循URI格式,在此字段为星号(*)时,说明请求并不用于某个特定的资源地址,而是用于服务器本身。 HTTP- Version表示支持的HTTP版本,例如为HTTP/1.1。CRLF表示换行回车符。请求头域允许客户端向服务器传递关于请求或者关于客户机的附加 信息。请求头域可能包含下列字段Accept、Accept-Charset、Accept- Encoding、Accept-Language、Authorization、From、Host、If-Modified-Since、If- Match、If-None-Match、If-Range、If-Range、If-Unmodified-Since、Max-Forwards、 Proxy-Authorization、Range、Referer、User-Agent。对请求头域的扩展要求通讯双方都支持,如果存在不支持的请 求头域,一般将会作为实体头域处理。

典型的请求消息:

GET http://download.microtool.de:80/somedata.exe
Host: download.microtool.de
Accept:*/*
Pragma: no-cache
Cache-Control: no-cache
Referer: http://download.microtool.de/
User-Agent:Mozilla/4.04[en](Win95;I;Nav)
Range:bytes=554554-

上例第一行表示HTTP客户端(可能是浏览器、下载程序)通过GET方法获得指定URL下的文件。棕色的部分表示请求头域的信息,绿色的部分表示通用头部分。


Host头域
Host头域指定请求资源的Intenet主机和端口号,必须表示请求url的原始服务器或网关的位置。HTTP/1.1请求必须包含主机头域,否则系统会以400状态码返回。


Referer头域
Referer头域允许客户端指定请求uri的源资源地址,这可以允许服务器生成回退链表,可用来登陆、优化cache等。他也 允许废除的或错误的连接由于维护的目的被追踪。如果请求的uri没有自己的uri地址,Referer不能被发送。如果指定的是部分uri地址,则此地址 应该是一个相对地址。


Range头域
Range头域可以请求实体的一个或者多个子范围。例如,

表示头500个字节:bytes=0-499

表示第二个500字节:bytes=500-999

表示最后500个字节:bytes=-500

表示500字节以后的范围:bytes=500-

第一个和最后一个字节:bytes=0-0,-1

同时指定几个范围:bytes=500-600,601-999

但是服务器可以忽略此请求头,如果无条件GET包含Range请求头,响应会以状态码206(PartialContent)返回而不是以200 (OK)。


User-Agent头域
User-Agent头域的内容包含发出请求的用户信息。

响应消息

响应消息的第一行为下面的格式:

HTTP-VersionSPStatus-CodeSPReason-PhraseCRLF

HTTP-Version表示支持的HTTP版本,例如为HTTP/1.1。Status- Code是一个三个数字的结果代码。Reason-Phrase给Status-Code提供一个简单的文本描述。Status-Code主要用于机器自 动识别,Reason-Phrase主要用于帮助用户理解。Status-Code的第一个数字定义响应的类别,后两个数字没有分类的作用。第一个数字可 能取5个不同的值:

1xx:信息响应类,表示接收到请求并且继续处理

2xx:处理成功响应类,表示动作被成功接收、理解和接受

3xx:重定向响应类,为了完成指定的动作,必须接受进一步处理

4xx:客户端错误,客户请求包含语法错误或者是不能正确执行

5xx:服务端错误,服务器不能正确执行一个正确的请求

响应头域允许服务器传递不能放在状态行的附加信息,这些域主要描述服务器的信息和 Request-URI进一步的信息。响应头域包含Age、Location、Proxy-Authenticate、Public、Retry- After、Server、Vary、Warning、WWW-Authenticate。对响应头域的扩展要求通讯双方都支持,如果存在不支持的响应头 域,一般将会作为实体头域处理。

典型的响应消息:

HTTP/1.0200OK

Date:Mon,31Dec200104:25:57GMT

Server:Apache/1.3.14(Unix)

Content-type:text/html

Last-modified:Tue,17Apr200106:46:28GMT

Etag:"a030f020ac7c01:1e9f"

Content-length:39725426

Content-range:bytes554554-40279979/40279980

上例第一行表示HTTP服务端响应一个GET方法。棕色的部分表示响应头域的信息,绿色的部分表示通用头部分,红色的部分表示实体头域的信息。

Location响应头

Location响应头用于重定向接收者到一个新URI地址。

Server响应头

Server响应头包含处理请求的原始服务器的软件信息。此域能包含多个产品标识和注释,产品标识一般按照重要性排序。

实体

请求消息和响应消息都可以包含实体信息,实体信息一般由实体头域和实体组成。实体头域包含关于实体的原信息,实体头包括Allow、 Content- Base、Content-Encoding、Content-Language、 Content-Length、Content-Location、Content-MD5、Content-Range、Content-Type、 Etag、Expires、Last-Modified、extension-header。extension-header允许客户端定义新的实体 头,但是这些域可能无法未接受方识别。实体可以是一个经过编码的字节流,它的编码方式由Content-Encoding或Content-Type定 义,它的长度由Content-Length或Content-Range定义。

Content-Type实体头

Content-Type实体头用于向接收方指示实体的介质类型,指定HEAD方法送到接收方的实体介质类型,或GET方法发送的请求介质类型 Content-Range实体头

Content-Range实体头用于指定整个实体中的一部分的插入位置,他也指示了整个实体的长度。在服务器向客户返回一个部分响应,它必须描述响应覆盖的范围和整个实体长度。一般格式:

Content-Range:bytes-unitSPfirst-byte-pos-last-byte-pos/entity-legth

例如,传送头500个字节次字段的形式:Content-Range:bytes0- 499/1234如果一个http消息包含此节(例如,对范围请求的响应或对一系列范围的重叠请求),Content-Range表示传送的范围, Content-Length表示实际传送的字节数。

Last-modified实体头

Last-modified实体头指定服务器上保存内容的最后修订时间。
最近研究了一下代理,重新拾起了HTTP协议,这里有几个重要的概念重复一下。
  1. 连接(Connection):一个传输层的实际环流,它是建立在两个相互通讯的应用程序之间。
  2. 消息(Message):HTTP通讯的基本单位,包括一个结构化的八元组序列并通过连接传输。
  3. 请求(Request):一个从客户端到服务器的请求信息包括应用于资源的方法、资源的标识符和协议的版本号
  4. 响应(Response):一个从服务器返回的信息包括HTTP协议的版本号、请求的状态(例如“成功”或“没找到”)和文档的MIME类型。
  5. 资源(Resource):由URI标识的网络数据对象或服务。
  6. 实体(Entity):数据资源或来自服务资源的回映的一种特殊表示方法,它可能被包围在一个请求或响应信息中。一个实体包括实体头信息和实体的本身内容。
  7. 客户机(Client):一个为发送请求目的而建立连接的应用程序。
  8. 用户代理(Useragent):初始化一个请求的客户机。它们是浏览器、编辑器或其它用户工具。
  9. 服务器(Server):一个接受连接并对请求返回信息的应用程序。
  10. 源服务器(Originserver):是一个给定资源可以在其上驻留或被创建的服务器。
  11. 代理(Proxy):
    • 一个中间程序,它可以充当一个服务器,也可以充当一个客户机,为其它客户机建立请求。请求是通过可能的翻译在内部或经过传递到其它的服务器中。一个代理在发送请求信息之前,必须解释并且如果可能重写它。
    • 代理经常作为通过防火墙的客户机端的门户,代理还可以作为一个帮助应用来通过协议处理没有被用户代理完成的请求。
  12. 网关(Gateway):
    • 一个作为其它服务器中间媒介的服务器。与代理不同的是,网关接受请求就好象对被请求的资源来说它就是源服务器;发出请求的客户机并没有意识到它在同网关打交道。
    • 网关经常作为通过防火墙的服务器端的门户,网关还可以作为一个协议翻译器以便存取那些存储在非HTTP系统中的资源。
  13. 通道(Tunnel):是作为两个连接中继的中介程序。一旦激活,通道便被认为不属于HTTP通讯,尽管通道可能是被一个HTTP请求初始化的。当被中继 的连接两端关闭时,通道便消失。当一个门户(Portal)必须存在或中介(Intermediary)不能解释中继的通讯时通道被经常使用。
  14. 缓存(Cache):反应信息的局域存储。

在调试snmp部分的时候,发现snmp_sess_open函数会出现内存泄露。太郁闷了。

在freebsd7下,valgrind 出现错误,不能正确运行,没办法检查内存泄露。只能通过最原始的分段检查来确定内存泄露的位置。

google了一些资料,仍然没有解决。还需要继续努力!

 

计划本周内存推出一个集成负载均衡功能的2.3-alpha1版本。

我们很容易看到别人的优点。
像是某人很漂亮啦,工作能力很强啦,人缘很好啦,但我们很少能看到自己的长处及自己的价值。
因为要严以律己,所以对自己的要求与批评就很多,期望也就过高,常常造成否定自己的心态;认为自己很多地方都不够好,久而久之,就产生了自卑感,失去了自信心,认为自己的存在没什么价值,因而活得非常消沉,甚至厌世。
有鉴于此,美国的布里居丝 Helice Bridges 发起了一个叫做蓝色绸带的运动。

希望能在公元二千年的时候,每一个美国人都能拿到一条她设计的蓝色缎带。

上面 写着 "Who I Am Makes A Difference ",也就是我可以为这个世界创造一些价值的意思。
她处处散发这样的缎带,鼓励大家把缎带送给家人和朋友,谢谢这些在我们四周的人。她也四处演讲,强调每个人的价值。
结果因为这些缎带的传送,引发了许多感人的故事,也改变了许多人的生命。

其中有一个故事十分发人深省:
有一次这位女士给了一个朋友三条缎带,希望他能送给别人。

这位朋友送了一条给他不苟言笑、事事挑剔的上司。

他觉得由于他的严厉使他多学到许多东西。
另外他还多给了一条缎带,希望他的上司能拿去送给另外一个影响他生命的人。

他的上司非常的讶异,因为所有的员工一向对他是敬而远之。
他知道自己的人缘很差,没想到还有人会感念他严苛的态度,

把它当做是正面的影响,而向他致谢,这使他的心顿时柔软起来。
这个上司一个下午都若有所思的坐在办公室里,而后他提早下班回家,把那条缎
带给了他正值青少年期的儿子。
他们父子关系一向不好,平时他忙着公务,不太顾家,对儿子也只有责备,很少
赞赏。

那天他怀着一颗歉疚的心,把缎带给了儿子,同时为自己一向的态度道歉。

他告诉儿子,其实他的存在带给他这个父亲无限的喜悦与骄傲。

尽管他从未称赞他,也少有时间与他相处,但是他是十分爱他的,也以他为荣。

当他说完了这些话,儿子竟然号啕大哭。他对父亲说:他以为他父亲一点也不在乎他,他觉得人生一点价值都没有,他不喜欢自己,恨自己不能讨父亲的欢心,正准备以自杀来结束痛苦的一生。
没想到他父亲的一番言语,打开了心结,也救了他一条性命。

这位父亲吓得出了一身冷汗,自己差点失去了独生的儿子而不自知。
从此改变了自己的态度,调整了生活的重心,也重建了亲子关系,加强了儿子对自己的信心。
就这样,整个家庭因为一条小小的缎带而彻底改观。
一条蓝色的缎带为什么有这么大的魔力?
因为它是一个提醒,提醒我们看到自己的价值。提醒我们要接受自己、关爱自己。
我们是可以创造奇迹、创造不同的人,不论我们是谁,都有这样的能力。
也只有如此,我才能看到这世界的美好、光明的一面,也才能生活得愉快,真正的去爱,去创造生命。
这条用E-mail做的蓝色缎带送给你。
我们每个人都像小丑,玩着五个球,

五个球是你的 *工作、健康、家庭、朋友、灵魂*,

这五个球只有一个是用橡胶做的,掉下去会弹起来,那就是工作。

另外四个球都是用玻璃做的,掉了,就碎了。

今天看到firefox3都出到3.0.1版本了。

想想也该换装新版本试试的时候了,于是到ports里make install一个。呵呵

整体感觉,比firefox2要舒服。尤其是中文字体方面,比之前好看的多了。

  强烈建议各位用户使用这个版本,如果有使用2.2以前的版本,也强烈建议升级到2.2-RELEASE版本。由于前不久BIND出现重大漏洞,我们这个版本及时升级到最新版本,已经修复漏洞。同时增加了许多新功能特性,使得功能更完备,更易用。

 

新功能:

  1. 增加PING、DIG常用工具
  2. 增加区域管理中批量删除、修改、启用/禁用、包含/屏蔽IP地址的功能
  3. 增加自定义域名后缀功能
  4. 增加使用cookie、http验证登录
  5. 增加域名查询统计(具体到每个域名的查询统计)
  6. 完善用户管理,可以控制用户只有管理域名或者记录的权限
  7. 增加根据单数字、字母快速查找域名连接

修复BUG:

  1. 修正升级判断时版本信息不一致问题
  2. 修改退出登录后跳转到登录界面
  3. 修正登录失败不记录登录用户名的问题

升级:

  1. BIND 升级到 BIND-9.4.2-P2
  2. SNMP 升级到 UCD-SNMP-4.2.7
  3. PHP 升级到 PHP-5.2.6

其他:

  1. 调整首页,显示更多信息
  2. 修改列表页面,使得每行显示不同的颜色
  3. 允许所有用户组用户看到全部支持的记录类型

官方网站:
http://fedns.isyi.com/index.shtml

下载地址:
http://fedns.isyi.com/download/index.shtml#2.2

使用手册:
在线阅读或者下载阅读:
http://fedns.isyi.com/docs/index.shtml

  1、强烈的欲望

  “欲”,实际就是一种生活目标,一种人生理想。创业者的欲望与普通人欲望的不同之处在于,他们的欲望往往超出他们的现实,往往需要打破他们现在的立足点,打破眼前的樊笼,才能够实现。 所以,创业者的欲望往往伴随着行动力和牺牲精神。这不是普通人能够做得到的。

  因为想得到,而凭自己现在的身份、地位、财富得不到,所以要去创业,要靠创业改变身份,提高地位,积累财富,这构成了许多创业者的人生“三部曲”。

  因为欲望,而不甘心,而创业,而行动,而成功,这是大多数白手起家的创业者走过的共同道路。

  或许我们可以套用一句伟人的话:“欲望是创业的最大推动力。”

  2、超乎想象的忍耐力

  在创业的路上,付出怎样的代价,付出怎样的努力,忍受了多少别人不能够忍受的憋闷、痛苦、甚至是屈辱、这种心情只有创业过的人最清楚!有多少人愿意付出与他们一样的代价.

  对一般人来说,忍耐是一种美德,对创业者来说,忍耐却是必须具备的品格。

  老话说“吃得菜根,百事可做”。对创业来说,肉体上的折磨算不得什么,精神上的折磨才是致命的,如果有心自己创业,一定要先在心里问一问自己, 面对从肉体到精神上的全面折磨,你有没有那样一种宠辱不惊的“定力”与“精神力”。如果没有,那么一定要小心。对有些人来说,一辈子给别人打工,做一个打 工仔,是一个更合适的选择。

 

  3、开阔的眼界

  对于创业者来说,只有真正见多识广。广博的见识,开阔的眼界,才能有效地拉近自己与成功的距离,使创业活动少走弯路。

  众多成功创业者创业思路的几个共同来源。

  第一,职业。俗话说,不熟不做,由原来所从事的职业下海,对行业的运作规律、技术、管理都非常熟悉,人头、市场也熟悉,这样的创业活动成功的几率很大。这是最常见的一种创业思路的来源。

  第二,阅读,包括书、报纸、杂志等等。比亚迪老总王传福的创业灵感来自一份国际电池行业动态,一份简报似的东西。1993年的一天,王传福在一 份国际电池行业动态上读到,日本宣布本土将不再生产镍镉电池,王传福立刻意识这将引发镍镉电池生产基地的国际大转移,意识自己创业的机会来了。果然,随后 的几年,王传福利用日本企业撤出留下的市场空隙,很多人将读书与休闲等同,对创业者来说,阅读就是工作,是工作的一部