Skip to content

Commit f817776

Browse files
committed
Merge branch 'release/1.12.9'
2 parents 0417ef3 + 93447bc commit f817776

File tree

12 files changed

+233
-248
lines changed

12 files changed

+233
-248
lines changed

.circleci/config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2.1
2+
3+
orbs:
4+
node: circleci/node@4.7
5+
6+
executors:
7+
linux:
8+
machine:
9+
image: ubuntu-2004:202107-02
10+
11+
jobs:
12+
empty_test:
13+
executor: linux
14+
steps:
15+
- checkout
16+
17+
workflows:
18+
all-tests:
19+
jobs:
20+
- empty_test

.github/workflows/ci.yml

Lines changed: 27 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Node CI
33

44
on: [push, pull_request]
55

6+
env:
7+
PIPING_SERVER_CHECK_VERSION: 0.11.0
8+
69
jobs:
710
build:
811
runs-on: ubuntu-20.04
@@ -19,85 +22,33 @@ jobs:
1922
- run: npm run lint
2023
- run: npm run build
2124
- run: npm test
22-
- name: Operational test
23-
run: |
24-
set -eux
25-
# Create certificates
26-
(mkdir /tmp/ssl_certs && cd /tmp/ssl_certs && openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -sha256 -nodes --subj '/CN=localhost/')
27-
# Run a server
28-
node ./dist/src/index.js --http-port=8080 --enable-https=true --https-port=8443 --key-path=/tmp/ssl_certs/server.key --crt-path=/tmp/ssl_certs/server.crt &> /tmp/piping_log.txt &
29-
# Wait for server running
30-
sleep 1
31-
32-
# Create a file to send
33-
echo 'hello, world' > /tmp/hello.txt
34-
35-
# Send and wait for a receiver
36-
curl -T /tmp/hello.txt localhost:8080/mypath &
37-
# Get data as a file
38-
curl localhost:8080/mypath > /tmp/download.txt
39-
# Print downloaded file
40-
cat /tmp/download.txt
41-
# Test the equality
42-
diff /tmp/hello.txt /tmp/download.txt
43-
44-
# Send and wait for a receiver
45-
curl -kT /tmp/hello.txt https://localhost:8443/mypath &
46-
# Get data as a file
47-
curl -k https://localhost:8443/mypath > /tmp/download.txt
48-
# Print downloaded file
49-
cat /tmp/download.txt
50-
# Test the equality
51-
diff /tmp/hello.txt /tmp/download.txt
52-
# Print server log
53-
cat /tmp/piping_log.txt
25+
- name: Create certificates
26+
run: cd /tmp && mkdir ssl_certs && cd ssl_certs && openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -sha256 -nodes --subj '/CN=localhost/'
27+
- name: Install piping-server-check
28+
run: cd /tmp && wget -O piping-server-check.deb https://github.com/nwtgck/piping-server-check/releases/download/v${PIPING_SERVER_CHECK_VERSION}/piping-server-check-${PIPING_SERVER_CHECK_VERSION}-linux-amd64.deb && sudo dpkg -i piping-server-check.deb
29+
- name: piping-server-check
30+
run: piping-server-check --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise post_cancel_post --compromise get_cancel_get --concurrency 100 --server-command="${SERVER_COMMAND}" --n-simultaneous-requests=60 --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m
31+
env:
32+
SERVER_COMMAND: 'mkdir -p /tmp/logs && exec node ./dist/src/index.js --http-port=$HTTP_PORT --enable-https=true --https-port=$HTTPS_PORT --key-path=/tmp/ssl_certs/server.key --crt-path=/tmp/ssl_certs/server.crt 2>&1 | tee /tmp/logs/$SERVER_RUN_ID.log > /dev/stderr'
33+
timeout-minutes: 2
34+
- name: Show server logs from piping-server-check
35+
if: ${{ always() }}
36+
run: tail -n +1 /tmp/logs/*
5437

5538
docker_test:
5639
runs-on: ubuntu-20.04
5740
steps:
5841
- uses: actions/checkout@v3
5942
- run: docker build -t piping-server .
60-
- name: Operational test with Docker image
61-
run: |
62-
set -eux
63-
# Run a server
64-
docker run -d -p 8080:80 --name=piping piping-server --http-port=80
65-
# Wait for server running
66-
sleep 1
67-
# Create a file to send
68-
echo 'hello, world' > /tmp/hello.txt
69-
# Send and wait for a receiver
70-
curl -T /tmp/hello.txt localhost:8080/mypath &
71-
# Get data as a file
72-
curl localhost:8080/mypath > /tmp/download.txt
73-
# Print downloaded file
74-
cat /tmp/download.txt
75-
# Test the equality
76-
diff /tmp/hello.txt /tmp/download.txt
77-
# Print server log
78-
docker logs piping
79-
# Delete container
80-
docker rm -f piping
81-
- name: Operational test with Docker image for HTTPS
82-
run: |
83-
set -eux
84-
# Create certificates
85-
(mkdir ssl_certs && cd ssl_certs && openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -sha256 -nodes --subj '/CN=localhost/')
86-
# Run a server
87-
docker run -d -p 8080:80 -p 8443:443 -v $PWD/ssl_certs:/ssl_certs --name=piping piping-server --http-port=80 --enable-https=true --https-port=443 --key-path=/ssl_certs/server.key --crt-path=/ssl_certs/server.crt
88-
# Wait for server running
89-
sleep 1
90-
# Create a file to send
91-
echo 'hello, world' > /tmp/hello.txt
92-
# Send and wait for a receiver
93-
curl -kT /tmp/hello.txt https://localhost:8443/mypath &
94-
# Get data as a file
95-
curl -k https://localhost:8443/mypath > /tmp/download.txt
96-
# Print downloaded file
97-
cat /tmp/download.txt
98-
# Test the equality
99-
diff /tmp/hello.txt /tmp/download.txt
100-
# Print server log
101-
docker logs piping
102-
# Delete container
103-
docker rm -f piping
43+
- name: Create certificates
44+
run: cd /tmp && mkdir ssl_certs && cd ssl_certs && openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -sha256 -nodes --subj '/CN=localhost/'
45+
- name: Install piping-server-check
46+
run: cd /tmp && wget -O piping-server-check.deb https://github.com/nwtgck/piping-server-check/releases/download/v${PIPING_SERVER_CHECK_VERSION}/piping-server-check-${PIPING_SERVER_CHECK_VERSION}-linux-amd64.deb && sudo dpkg -i piping-server-check.deb
47+
- name: piping-server-check
48+
run: piping-server-check --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise post_cancel_post --compromise get_cancel_get --concurrency 100 --server-command="${SERVER_COMMAND}" --n-simultaneous-requests=60 --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m
49+
env:
50+
SERVER_COMMAND: 'mkdir -p /tmp/logs && exec docker run --rm -p $HTTP_PORT:80 -p $HTTPS_PORT:443 -v /tmp/ssl_certs:/ssl_certs piping-server --http-port=80 --enable-https=true --https-port=443 --key-path=/ssl_certs/server.key --crt-path=/ssl_certs/server.crt 2>&1 | tee /tmp/logs/$SERVER_RUN_ID.log > /dev/stderr'
51+
timeout-minutes: 3
52+
- name: Show server logs from piping-server-check
53+
if: ${{ always() }}
54+
run: tail -n +1 /tmp/logs/*

.github/workflows/docker-develop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
username: nwtgck
2525
password: ${{ secrets.DOCKER_HUB_TOKEN }}
2626
- name: Build and push
27-
uses: docker/build-push-action@v3
27+
uses: docker/build-push-action@v4
2828
with:
2929
context: .
3030
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64

.github/workflows/docker-latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
username: nwtgck
3535
password: ${{ secrets.DOCKER_HUB_TOKEN }}
3636
- name: Build and push
37-
uses: docker/build-push-action@v3
37+
uses: docker/build-push-action@v4
3838
with:
3939
context: .
4040
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55

66
## [Unreleased]
77

8+
## [1.12.9] - 2023-04-08
9+
### Changed
10+
* Update dependencies
11+
* (Docker) Use node 16.20.0 as base docker image
12+
13+
### Fixed
14+
* Update timing of overwriting with original socket.write() in HTTP/1.0
15+
* Set `requestTimeout: 0` to HTTP/1.1 server option for supporting Node.js 18
16+
817
## [1.12.8] - 2022-11-26
918
### Changed
1019
* Update dependencies
@@ -461,7 +470,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
461470
* Docker automated build on Docker Hub
462471
* Support HTTPS
463472

464-
[Unreleased]: https://github.com/nwtgck/piping-server/compare/v1.12.8...HEAD
473+
[Unreleased]: https://github.com/nwtgck/piping-server/compare/v1.12.9...HEAD
474+
[1.12.9]: https://github.com/nwtgck/piping-server/compare/v1.12.8...v1.12.9
465475
[1.12.8]: https://github.com/nwtgck/piping-server/compare/v1.12.7...v1.12.8
466476
[1.12.7]: https://github.com/nwtgck/piping-server/compare/v1.12.6...v1.12.7
467477
[1.12.6]: https://github.com/nwtgck/piping-server/compare/v1.12.5...v1.12.6

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16.18.1-alpine
1+
FROM node:16.20.0-alpine
22

33
LABEL maintainer="Ryo Ota <nwtgck@nwtgck.org>"
44

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ Here are public Piping Servers.
106106

107107
* <https://ppng.io>
108108
* <https://piping.nwtgck.repl.co>
109-
* <https://ppng.herokuapp.com>
110109
* <https://piping.glitch.me>
111110
* <https://piping-47q675ro2guv.runkit.sh>
112111

@@ -141,7 +140,6 @@ Here are easier ways to own your Piping Server.
141140
- Remix on Glitch <https://glitch.com/~piping>
142141
- Clone on RunKit: <https://runkit.com/nwtgck/piping>
143142
- Fork on Repl.it: <https://repl.it/@nwtgck/piping>
144-
- Deploy to Heroku: <https://elements.heroku.com/buttons/nwtgck/piping-server>
145143

146144
See "[Ecosystem around Piping Server · nwtgck/piping-server Wiki](https://github.com/nwtgck/piping-server/wiki/Ecosystem-around-Piping-Server)" to find more about self-hosting.
147145

@@ -170,8 +168,6 @@ Options:
170168
--crt-path Certification path [string]
171169
```
172170

173-
Click the button above to deploy a Piping Server to Heroku.
174-
175171
## Piping Server written in Rust
176172
Piping Server is also developed in Rust.
177173
<https://github.com/nwtgck/piping-server-rust>

0 commit comments

Comments
 (0)