   <p>只填写IP则返回该IP的端口信息,可填写格式为单个IP或IP段,如"192.168.1.1-192.168.1.255"</p>
   <p>若既填写IP也填写端口,则返回该IP段除了填写的端口之外开放的端口信息,可填写IP格式,单个IP或IP段,可填写端口格式为单个端口或用竖线"|"隔开的多个端口,如"22|80"</p>
   API:
-  <p>Filter ip: http://localhost/fip/ipfrom-ipto</p>
-  <p>Filter port: http://localhost/fport/portfrom-portto</p>
-  <p>Alarm data: http://localhost/alarm/22|53|80|500 (替换为要排除的端口)</p>
-  <p>White list: http://localhost/wlst/ipfrom-ipto:22|53|80|500 (替换为要排除的端口)</p>
+  <p>Filter ip: http://localhost/fip?from=192.168.1.1&to=192.168.1.254</p>
+  <p>Filter port: http://localhost/fport?from=22&to=80</p>
+  <p>Alarm data: http://localhost/alarm?ports=22|53|80|500 (替换为要排除的端口)</p>
+  <p>White list: http://localhost/wlst?from=192.168.1.1&to=192.168.1.254&ports=22|53|80|500 (替换为要排除的端口)</p>
   </center>'''
   res.end body
 

          body['data'][i] = (j['ip'] for j in docs)
        ep.emit 'one_port'

app.get '/alarm/:port_tmp', (req, res) ->
  ports = (Number(i) for i in req.params.port_tmp.split '|')
  res.setHeader('Content-Type', 'application/json; charset=utf-8')
  body = {}
  body['data'] = {}

          body['data'][i.ip]['port'] = i.port
          ep.emit 'one_ip'

app.get '/fport', (req, res) ->
  ep = new EventProxy()
  ep.after 'one_port', [Number(req.query.from)..Number(req.query.to)].length, ->
    res.end(JSON.stringify body, null, 2)
  res.setHeader('Content-Type', 'application/json; charset=utf-8')
  body = {}
  body['data'] = {}
  for i in [Number(req.query.from)..Number(req.query.to)]
    do (i) ->
      db.ips.find {'port': {$all: [i]}}, {'_id': false, 'port': false, 'update': false}, (err, docs) ->
        if err then throw err
