diff --git a/.circleci/config.yml b/.circleci/config.yml
deleted file mode 100644
index c53c806b02..0000000000
--- a/.circleci/config.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-ANCHORS:
- node_steps: &node_steps
- steps:
- - checkout
- - run: npm ci
- - run: npm run lint
- - run: npm test
- # Check whether "run build" is successful
- - run: npm run build
-
-version: 2
-jobs:
- node_14:
- docker:
- - image: circleci/node:14
- <<: *node_steps
- node_12:
- docker:
- - image: circleci/node:12
- <<: *node_steps
- node_10:
- docker:
- - image: circleci/node:10
- <<: *node_steps
-
-workflows:
- version: 2
- node_tests:
- jobs:
- - node_14:
- filters:
- tags:
- only: /.*/
- - node_12:
- filters:
- tags:
- only: /.*/
- - node_10:
- filters:
- tags:
- only: /.*/
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2de7b3855d..c27e853332 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -10,9 +10,9 @@ jobs:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v2.5.1
+ uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
@@ -23,7 +23,7 @@ jobs:
docker_test:
runs-on: ubuntu-18.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- run: docker build -t piping-server .
- name: Working test with Docker image
run: |
diff --git a/.github/workflows/docker-develop.yml b/.github/workflows/docker-develop.yml
index 5d47021953..4b6707cb5f 100644
--- a/.github/workflows/docker-develop.yml
+++ b/.github/workflows/docker-develop.yml
@@ -11,7 +11,7 @@ jobs:
build_and_push:
runs-on: ubuntu-18.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
ref: develop
- name: Set up QEMU
diff --git a/.github/workflows/docker-latest.yml b/.github/workflows/docker-latest.yml
index e530f49f6b..8a715eea64 100644
--- a/.github/workflows/docker-latest.yml
+++ b/.github/workflows/docker-latest.yml
@@ -13,7 +13,7 @@ jobs:
build_and_push:
runs-on: ubuntu-18.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- run: git fetch --unshallow
- name: Get latest tag
id: latest_tag
diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml
index 0c38ce119d..d1a3c3a4a1 100644
--- a/.github/workflows/npm-publish.yml
+++ b/.github/workflows/npm-publish.yml
@@ -7,8 +7,8 @@ jobs:
npm_publish:
runs-on: ubuntu-18.04
steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-node@v1
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ff66b8f0b..d7103aabae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
## [Unreleased]
+## [1.12.0] - 2022-03-05
+### Changed
+* Update dependencies
+* (command) Improve HTTPS-related option error messages
+* Change fonts in top page and /noscript page
+
## [1.11.1] - 2022-02-05
### Changed
* Update dependencies
@@ -411,7 +417,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
* Docker automated build on Docker Hub
* Support HTTPS
-[Unreleased]: https://github.com/nwtgck/piping-server/compare/v1.11.1...HEAD
+[Unreleased]: https://github.com/nwtgck/piping-server/compare/v1.12.0...HEAD
+[1.12.0]: https://github.com/nwtgck/piping-server/compare/v1.11.1...v1.12.0
[1.11.1]: https://github.com/nwtgck/piping-server/compare/v1.11.0...v1.11.1
[1.11.0]: https://github.com/nwtgck/piping-server/compare/v1.10.2...v1.11.0
[1.10.2]: https://github.com/nwtgck/piping-server/compare/v1.10.1...v1.10.2
diff --git a/README.md b/README.md
index 99408144a8..482e2a4820 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
# Piping Server
-[![npm](https://img.shields.io/npm/v/piping-server.svg)](https://www.npmjs.com/package/piping-server) [![CodeFactor](https://www.codefactor.io/repository/github/nwtgck/piping-server/badge)](https://www.codefactor.io/repository/github/nwtgck/piping-server) [![CircleCI](https://circleci.com/gh/nwtgck/piping-server.svg?style=shield)](https://circleci.com/gh/nwtgck/piping-server) [![Build status](https://ci.appveyor.com/api/projects/status/g075o30d5pp4m0pa?svg=true)](https://ci.appveyor.com/project/nwtgck/piping-server) [![GitHub Actions](https://github.com/nwtgck/piping-server/workflows/Node%20CI/badge.svg)](https://github.com/nwtgck/piping-server/actions) [![Docker Automated build](https://img.shields.io/docker/automated/nwtgck/piping-server.svg)](https://hub.docker.com/r/nwtgck/piping-server/)
- [![](https://images.microbadger.com/badges/image/nwtgck/piping-server.svg)](https://microbadger.com/images/nwtgck/piping-server "Get your own image badge on microbadger.com") [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=nwtgck/piping-server)](https://dependabot.com)
+[![npm](https://img.shields.io/npm/v/piping-server.svg)](https://www.npmjs.com/package/piping-server) [![CodeFactor](https://www.codefactor.io/repository/github/nwtgck/piping-server/badge)](https://www.codefactor.io/repository/github/nwtgck/piping-server) [![Build status](https://ci.appveyor.com/api/projects/status/g075o30d5pp4m0pa?svg=true)](https://ci.appveyor.com/project/nwtgck/piping-server) [![GitHub Actions](https://github.com/nwtgck/piping-server/workflows/Node%20CI/badge.svg)](https://github.com/nwtgck/piping-server/actions) [![Docker Automated build](https://img.shields.io/docker/automated/nwtgck/piping-server.svg)](https://hub.docker.com/r/nwtgck/piping-server/) [![](https://images.microbadger.com/badges/image/nwtgck/piping-server.svg)](https://microbadger.com/images/nwtgck/piping-server "Get your own image badge on microbadger.com")
Infinitely transfer between every device over HTTP/HTTPS
@@ -130,7 +129,7 @@ docker run -p 8080:8080 -d --restart=always nwtgck/piping-server
Run a Piping Server on as follows on Linux.
```bash
-curl -L https://github.com/nwtgck/piping-server-pkg/releases/download/v1.10.2/piping-server-pkg-linuxstatic-x64.tar.gz | tar xzvf -
+curl -L https://github.com/nwtgck/piping-server-pkg/releases/download/v1.11.1/piping-server-pkg-linuxstatic-x64.tar.gz | tar xzvf -
./piping-server-pkg-linuxstatic-x64/piping-server --http-port=8080
```
The binaries are for multi-platform including Linux on x64, Linux on ARM64, Linux on ARMv7, Intel macOS, Apple Silicon macOS and Windows on x64. See to run on the other platform.
diff --git a/package-lock.json b/package-lock.json
index db3e2f787f..75a58c96fb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "piping-server",
- "version": "1.11.1",
+ "version": "1.12.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
@@ -9,7 +9,7 @@
"version": "1.11.1",
"license": "MIT",
"dependencies": {
- "log4js": "^6.4.0",
+ "log4js": "^6.4.2",
"multiparty": "^4.2.1",
"yargs": "^17.3.1"
},
@@ -21,16 +21,16 @@
"@types/node": "^16.11.22",
"@types/power-assert": "^1.5.3",
"@types/request": "^2.48.5",
- "@types/yargs": "^17.0.8",
+ "@types/yargs": "^17.0.9",
"espower-typescript": "^10.0.0",
"get-port": "^5.1.1",
"mocha": "^9.2.0",
"power-assert": "^1.6.1",
"request": "^2.88.2",
"then-request": "^6.0.2",
- "ts-node": "^10.0.0",
+ "ts-node": "^10.6.0",
"tslint": "^6.1.2",
- "typescript": "^4.0.2"
+ "typescript": "^4.6.2"
}
},
"node_modules/@babel/code-frame": {
@@ -197,9 +197,9 @@
"dev": true
},
"node_modules/@types/yargs": {
- "version": "17.0.8",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.8.tgz",
- "integrity": "sha512-wDeUwiUmem9FzsyysEwRukaEdDNcwbROvQ9QGRKaLI6t+IltNzbn4/i4asmB10auvZGQCzSQ6t0GSczEThlUXw==",
+ "version": "17.0.9",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.9.tgz",
+ "integrity": "sha512-Ci8+4/DOtkHRylcisKmVMtmVO5g7weUVCKcsu1sJvF1bn0wExTmbHmhFKj7AnEm0de800iovGhdSKzYnzbaHpg==",
"dev": true,
"dependencies": {
"@types/yargs-parser": "*"
@@ -245,15 +245,19 @@
}
},
"node_modules/ajv": {
- "version": "6.12.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
- "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/amdefine": {
@@ -667,9 +671,9 @@
}
},
"node_modules/date-format": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.3.tgz",
- "integrity": "sha512-7P3FyqDcfeznLZp2b+OMitV9Sz2lUnsT87WaTat9nVwqsBkTzPG3lPLNwW3en6F4pHUiWzr6vb8CLhjdK9bcxQ==",
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.4.tgz",
+ "integrity": "sha512-/jyf4rhB17ge328HJuJjAcmRtCsGd+NDeAtahRBTaK6vSPR6MO5HlrAit3Nn7dVjaa6sowW0WXt8yQtLyZQFRg==",
"engines": {
"node": ">=4.0"
}
@@ -1248,9 +1252,9 @@
}
},
"node_modules/flatted": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz",
- "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw=="
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz",
+ "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg=="
},
"node_modules/forever-agent": {
"version": "0.6.1",
@@ -1276,9 +1280,9 @@
}
},
"node_modules/fs-extra": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
- "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
+ "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
@@ -1873,15 +1877,15 @@
}
},
"node_modules/log4js": {
- "version": "6.4.1",
- "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.1.tgz",
- "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==",
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.2.tgz",
+ "integrity": "sha512-k80cggS2sZQLBwllpT1p06GtfvzMmSdUCkW96f0Hj83rKGJDAu2vZjt9B9ag2vx8Zz1IXzxoLgqvRJCdMKybGg==",
"dependencies": {
- "date-format": "^4.0.3",
+ "date-format": "^4.0.4",
"debug": "^4.3.3",
- "flatted": "^3.2.4",
+ "flatted": "^3.2.5",
"rfdc": "^1.3.0",
- "streamroller": "^3.0.2"
+ "streamroller": "^3.0.4"
},
"engines": {
"node": ">=8.0"
@@ -1954,9 +1958,9 @@
}
},
"node_modules/mocha": {
- "version": "9.2.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz",
- "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==",
+ "version": "9.2.1",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.1.tgz",
+ "integrity": "sha512-T7uscqjJVS46Pq1XDXyo9Uvey9gd3huT/DD9cYBb4K2Xc/vbKRPUWK067bxDQRK0yIz6Jxk73IrnimvASzBNAQ==",
"dev": true,
"dependencies": {
"@ungap/promise-all-settled": "1.1.2",
@@ -2695,13 +2699,13 @@
}
},
"node_modules/streamroller": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.0.2.tgz",
- "integrity": "sha512-ur6y5S5dopOaRXBuRIZ1u6GC5bcEXHRZKgfBjfCglMhmIf+roVCECjvkEYzNQOXIN2/JPnkMPW/8B3CZoKaEPA==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.0.4.tgz",
+ "integrity": "sha512-GI9NzeD+D88UFuIlJkKNDH/IsuR+qIN7Qh8EsmhoRZr9bQoehTraRgwtLUkZbpcAw+hLPfHOypmppz8YyGK68w==",
"dependencies": {
- "date-format": "^4.0.3",
- "debug": "^4.1.1",
- "fs-extra": "^10.0.0"
+ "date-format": "^4.0.4",
+ "debug": "^4.3.3",
+ "fs-extra": "^10.0.1"
},
"engines": {
"node": ">=8.0"
@@ -2855,9 +2859,9 @@
"dev": true
},
"node_modules/ts-node": {
- "version": "10.4.0",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz",
- "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==",
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.6.0.tgz",
+ "integrity": "sha512-CJen6+dfOXolxudBQXnVjRVvYTmTWbyz7cn+xq2XTsvnaXbHqr4gXSCNbS2Jj8yTZMuGwUoBESLaOkLascVVvg==",
"dev": true,
"dependencies": {
"@cspotcode/source-map-support": "0.7.0",
@@ -2871,6 +2875,7 @@
"create-require": "^1.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.0",
"yn": "3.1.1"
},
"bin": {
@@ -3005,9 +3010,9 @@
"dev": true
},
"node_modules/typescript": {
- "version": "4.5.5",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
- "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz",
+ "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -3072,6 +3077,12 @@
"uuid": "bin/uuid"
}
},
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz",
+ "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==",
+ "dev": true
+ },
"node_modules/verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
@@ -3415,9 +3426,9 @@
"dev": true
},
"@types/yargs": {
- "version": "17.0.8",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.8.tgz",
- "integrity": "sha512-wDeUwiUmem9FzsyysEwRukaEdDNcwbROvQ9QGRKaLI6t+IltNzbn4/i4asmB10auvZGQCzSQ6t0GSczEThlUXw==",
+ "version": "17.0.9",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.9.tgz",
+ "integrity": "sha512-Ci8+4/DOtkHRylcisKmVMtmVO5g7weUVCKcsu1sJvF1bn0wExTmbHmhFKj7AnEm0de800iovGhdSKzYnzbaHpg==",
"dev": true,
"requires": {
"@types/yargs-parser": "*"
@@ -3454,9 +3465,9 @@
"dev": true
},
"ajv": {
- "version": "6.12.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
- "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -3808,9 +3819,9 @@
}
},
"date-format": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.3.tgz",
- "integrity": "sha512-7P3FyqDcfeznLZp2b+OMitV9Sz2lUnsT87WaTat9nVwqsBkTzPG3lPLNwW3en6F4pHUiWzr6vb8CLhjdK9bcxQ=="
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.4.tgz",
+ "integrity": "sha512-/jyf4rhB17ge328HJuJjAcmRtCsGd+NDeAtahRBTaK6vSPR6MO5HlrAit3Nn7dVjaa6sowW0WXt8yQtLyZQFRg=="
},
"debug": {
"version": "4.3.3",
@@ -4284,9 +4295,9 @@
"dev": true
},
"flatted": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz",
- "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw=="
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz",
+ "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg=="
},
"forever-agent": {
"version": "0.6.1",
@@ -4306,9 +4317,9 @@
}
},
"fs-extra": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
- "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
+ "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
@@ -4758,15 +4769,15 @@
}
},
"log4js": {
- "version": "6.4.1",
- "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.1.tgz",
- "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==",
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.2.tgz",
+ "integrity": "sha512-k80cggS2sZQLBwllpT1p06GtfvzMmSdUCkW96f0Hj83rKGJDAu2vZjt9B9ag2vx8Zz1IXzxoLgqvRJCdMKybGg==",
"requires": {
- "date-format": "^4.0.3",
+ "date-format": "^4.0.4",
"debug": "^4.3.3",
- "flatted": "^3.2.4",
+ "flatted": "^3.2.5",
"rfdc": "^1.3.0",
- "streamroller": "^3.0.2"
+ "streamroller": "^3.0.4"
}
},
"make-error": {
@@ -4824,9 +4835,9 @@
}
},
"mocha": {
- "version": "9.2.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz",
- "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==",
+ "version": "9.2.1",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.1.tgz",
+ "integrity": "sha512-T7uscqjJVS46Pq1XDXyo9Uvey9gd3huT/DD9cYBb4K2Xc/vbKRPUWK067bxDQRK0yIz6Jxk73IrnimvASzBNAQ==",
"dev": true,
"requires": {
"@ungap/promise-all-settled": "1.1.2",
@@ -5422,13 +5433,13 @@
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
},
"streamroller": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.0.2.tgz",
- "integrity": "sha512-ur6y5S5dopOaRXBuRIZ1u6GC5bcEXHRZKgfBjfCglMhmIf+roVCECjvkEYzNQOXIN2/JPnkMPW/8B3CZoKaEPA==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.0.4.tgz",
+ "integrity": "sha512-GI9NzeD+D88UFuIlJkKNDH/IsuR+qIN7Qh8EsmhoRZr9bQoehTraRgwtLUkZbpcAw+hLPfHOypmppz8YyGK68w==",
"requires": {
- "date-format": "^4.0.3",
- "debug": "^4.1.1",
- "fs-extra": "^10.0.0"
+ "date-format": "^4.0.4",
+ "debug": "^4.3.3",
+ "fs-extra": "^10.0.1"
}
},
"string_decoder": {
@@ -5550,9 +5561,9 @@
"dev": true
},
"ts-node": {
- "version": "10.4.0",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz",
- "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==",
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.6.0.tgz",
+ "integrity": "sha512-CJen6+dfOXolxudBQXnVjRVvYTmTWbyz7cn+xq2XTsvnaXbHqr4gXSCNbS2Jj8yTZMuGwUoBESLaOkLascVVvg==",
"dev": true,
"requires": {
"@cspotcode/source-map-support": "0.7.0",
@@ -5566,6 +5577,7 @@
"create-require": "^1.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.0",
"yn": "3.1.1"
},
"dependencies": {
@@ -5656,9 +5668,9 @@
"dev": true
},
"typescript": {
- "version": "4.5.5",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
- "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz",
+ "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
"dev": true
},
"uid-safe": {
@@ -5706,6 +5718,12 @@
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true
},
+ "v8-compile-cache-lib": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz",
+ "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==",
+ "dev": true
+ },
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
diff --git a/package.json b/package.json
index 427427eaea..eb8dca8e21 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "piping-server",
- "version": "1.11.1",
+ "version": "1.12.0",
"description": "Streaming Data Transfer Server over HTTP/HTTPS",
"bin": {
"piping-server": "dist/src/index.js"
@@ -36,19 +36,19 @@
"@types/node": "^16.11.22",
"@types/power-assert": "^1.5.3",
"@types/request": "^2.48.5",
- "@types/yargs": "^17.0.8",
+ "@types/yargs": "^17.0.9",
"espower-typescript": "^10.0.0",
"get-port": "^5.1.1",
"mocha": "^9.2.0",
"power-assert": "^1.6.1",
"request": "^2.88.2",
"then-request": "^6.0.2",
- "ts-node": "^10.0.0",
+ "ts-node": "^10.6.0",
"tslint": "^6.1.2",
- "typescript": "^4.0.2"
+ "typescript": "^4.6.2"
},
"dependencies": {
- "log4js": "^6.4.0",
+ "log4js": "^6.4.2",
"multiparty": "^4.2.1",
"yargs": "^17.3.1"
}
diff --git a/src/index.ts b/src/index.ts
index 829fc0d0b3..675068faff 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -62,38 +62,47 @@ http.createServer(pipingServer.generateHandler(false))
logger.info(`Listen HTTP on ${httpPort}...`);
});
-if (enableHttps && httpsPort !== undefined) {
- if (serverKeyPath === undefined || serverCrtPath === undefined) {
- logger.error("Error: --key-path and --crt-path should be specified");
- } else {
- let secureContext: tls.SecureContext | undefined;
- const updateSecureContext = () => {
- try {
- secureContext = tls.createSecureContext({
- key: fs.readFileSync(serverKeyPath),
- cert: fs.readFileSync(serverCrtPath),
- });
- logger.info("Certificate loaded");
- } catch (e) {
- logger.error("Failed to load certificate", e);
- }
- }
- updateSecureContext();
- if (secureContext === undefined) {
- throw new Error("No certificate");
+if (enableHttps) {
+ if (httpsPort === undefined) {
+ logger.error("--https-port is required");
+ process.exit(1);
+ }
+ if (serverKeyPath === undefined) {
+ logger.error("--key-path is required");
+ process.exit(1);
+ }
+ if (serverCrtPath === undefined) {
+ logger.error("--crt-path is required");
+ process.exit(1);
+ }
+
+ let secureContext: tls.SecureContext | undefined;
+ const updateSecureContext = () => {
+ try {
+ secureContext = tls.createSecureContext({
+ key: fs.readFileSync(serverKeyPath),
+ cert: fs.readFileSync(serverCrtPath),
+ });
+ logger.info("Certificate loaded");
+ } catch (e) {
+ logger.error("Failed to load certificate", e);
}
- fs.watchFile(serverCrtPath, updateSecureContext);
- fs.watchFile(serverKeyPath, updateSecureContext);
- http2.createSecureServer(
- {
- SNICallback: (servername, cb) => cb(null, secureContext!),
- allowHTTP1: true
- },
- pipingServer.generateHandler(true)
- ).listen({ host, port: httpsPort }, () => {
- logger.info(`Listen HTTPS on ${httpsPort}...`);
- });
}
+ updateSecureContext();
+ if (secureContext === undefined) {
+ throw new Error("No certificate");
+ }
+ fs.watchFile(serverCrtPath, updateSecureContext);
+ fs.watchFile(serverKeyPath, updateSecureContext);
+ http2.createSecureServer(
+ {
+ SNICallback: (servername, cb) => cb(null, secureContext!),
+ allowHTTP1: true
+ },
+ pipingServer.generateHandler(true)
+ ).listen({ host, port: httpsPort }, () => {
+ logger.info(`Listen HTTPS on ${httpsPort}...`);
+ });
}
// Catch and ignore error
diff --git a/src/resources.ts b/src/resources.ts
index d70fbc7aaf..ed4fb27aba 100644
--- a/src/resources.ts
+++ b/src/resources.ts
@@ -10,6 +10,11 @@ export const indexPage: string = `\