RobinzZH

Results issues of RobinzZH

Installation of code-server via install.sh fails on docker images. https://github.com/coder/code-server/blob/ad81a30db5421fcfe66b53e61a50b38f1a7f3cc1/install.sh#L422-L423 # Steps to Reproduce ```sh $ docker run -it alpine / # apk add nodejs npm curl ... / #...

crypto.createCipher自node10.0开始已被废弃,需更改为createCipheriv ![image](https://user-images.githubusercontent.com/8800473/53141291-8276cb00-35ca-11e9-9e3c-d0ca7209e244.png) 发现调用接口文件:`/bin/tsw/util/auto-report/post.js` ```js module.exports.encode = function(appid, appkey, data) { const input = Buffer.from(JSON.stringify(data), 'UTF-8'); const buff = zlib.deflateSync(input); const des = crypto.createCipher('des', (appid + appkey)); ``` ps: 对接接口`crypto.createDecipher`也需要替换

测试环境以及抓包数据加解密耗时过大,导致请求超时 加解密使用PBKDF2的迭代次数过多(32767) 每次生成key耗时45ms左右 这里需要调整迭代次数,兼顾加密安全与性能

如果没有配置wsRouter,一旦收到websocket请求,就会因为找不到路由配置而报错 ![image](https://user-images.githubusercontent.com/8800473/65828280-c140d200-e2cb-11e9-86d3-2513b13b165e.png) 默认只是配置了router的默认值,而没有配置wsRouter https://github.com/Tencent/TSW/blob/master/bin/tsw/default/config.default.js#L102 ![image](https://user-images.githubusercontent.com/8800473/65828286-d584cf00-e2cb-11e9-9b06-68dbf50d5f9d.png)

bug

代码位置: e.g. https://github.com/Tencent/TSW/blob/master/lib/core/runtime/create-server.hack.ts#L118 报错堆栈: ```js /Users/xxx/xxx/xxx/node_modules/@tswjs/tsw/dist/core/runtime/create-server.hack.js:98 responseBody: res._body.toString("base64"), ^ TypeError: Cannot read property 'toString' of undefined at ServerResponse. (/Users/xxx/xxx/xxx/node_modules/@tswjs/tsw/dist/core/runtime/create-server.hack.js:98:49) at Object.onceWrapper (events.js:312:28) at ServerResponse.emit (events.js:228:7) at ServerResponse.EventEmitter.emit (domain.js:498:23) at onFinish...

bug