1
0
zjcqoo 6 жил өмнө
parent
commit
c1c198239d
3 өөрчлөгдсөн 4 нэмэгдсэн , 4 устгасан
  1. 1 1
      README.md
  2. 2 2
      lua/worker.lua
  3. 1 1
      upload.sh

+ 1 - 1
README.md

@@ -116,7 +116,7 @@ https://myhost.github.io     'my';
 
 
 ![](https://raw.githubusercontent.com/EtherDream/jsproxy-localtest/temp/hook.png)
 ![](https://raw.githubusercontent.com/EtherDream/jsproxy-localtest/temp/hook.png)
 
 
-对于有些无法重写的 API,例如 `location`,本代理会将代码中字面出现的 `location` 替换成 `__location`,从而将操作转移到自定义对象上。当然对于非字面的情况(例如 `this['lo' + 'cation']`),目前还无法处理。
+对于有些无法重写的 API,例如 `location`,本代理会将代码中字面出现的 `location` 替换成 `__location`,从而将操作转移到自定义对象上。当然对于非字面的情况(例如 `this['lo' + 'cation']`),目前还无法处理。
 
 
 
 
 ### 界面和接口分离
 ### 界面和接口分离

+ 2 - 2
lua/worker.lua

@@ -5,7 +5,7 @@ if ngx.worker.id() ~= 0 then
   return
   return
 end
 end
 
 
-local function getDevTraffic(dev)
+local function buildDevTrafficFn(dev)
   --       0     1       2    3    4    5     6          7
   --       0     1       2    3    4    5     6          7
   -- eth0: bytes packets errs drop fifo frame compressed multicast
   -- eth0: bytes packets errs drop fifo frame compressed multicast
   --       bytes packets errs drop fifo colls carrier    compressed
   --       bytes packets errs drop fifo colls carrier    compressed
@@ -45,7 +45,7 @@ if fileStat == nil then
 end
 end
 
 
 local firstRun = true
 local firstRun = true
-local getDevTraffic = getDevTraffic('eth0')
+local getDevTraffic = buildDevTrafficFn('eth0')
 
 
 
 
 local function updateTraffic()
 local function updateTraffic()

+ 1 - 1
upload.sh

@@ -11,7 +11,7 @@ for v in ${NODE[@]}; do
   echo "$v upload ..."
   echo "$v upload ..."
 
 
   rsync . jsproxy@$v.$HOST:server \
   rsync . jsproxy@$v.$HOST:server \
-    -r -p \
+    -a \
     --exclude='nginx/cache/*' \
     --exclude='nginx/cache/*' \
     --exclude='nginx/logs/*'
     --exclude='nginx/logs/*'