Compare commits

...

4 Commits

Author SHA1 Message Date
zhq
e6a37de094
Merge e76ceea3462024f47764922c5afc7f1235ae708a into 32a56708cc4abd7ca693607302264de67f9587d1 2023-09-19 22:13:29 +08:00
Teddysun
32a56708cc
Update Dockerfile.architecture 2023-09-16 14:57:18 +09:00
zhq
e76ceea346
Update bench.sh 2022-03-28 09:29:05 +08:00
zhq
6d95140d11
add cn 2022-03-28 09:28:24 +08:00
7 changed files with 58 additions and 35 deletions

View File

@ -71,15 +71,24 @@ speed_test() {
speed() { speed() {
speed_test '' 'Speedtest.net' speed_test '' 'Speedtest.net'
speed_test '29071' 'Chengdu, CN'
speed_test '17584' 'Chongqing, CN'
speed_test '29105' 'Xi an, CN'
speed_test '28225' 'Changsha, CN'
speed_test '29353' 'Wuhan, CN'
speed_test '16145' 'Lanzhou, CN'
speed_test '3973' 'Lanzhou, CN'
speed_test '41910' 'Zhengzhou, CN'
speed_test '36996' 'Guiyang, CN'
speed_test '24447' 'Shanghai, CN'
speed_test '26352' 'Nanjing, CN'
speed_test '27594' 'Guangzhou, CN'
speed_test '32155' 'Hongkong, CN'
speed_test '21541' 'Los Angeles, US' speed_test '21541' 'Los Angeles, US'
speed_test '43860' 'Dallas, US' speed_test '43860' 'Dallas, US'
speed_test '40879' 'Montreal, CA' speed_test '40879' 'Montreal, CA'
speed_test '24215' 'Paris, FR' speed_test '24215' 'Paris, FR'
speed_test '28922' 'Amsterdam, NL' speed_test '28922' 'Amsterdam, NL'
speed_test '24447' 'Shanghai, CN'
speed_test '26352' 'Nanjing, CN'
speed_test '27594' 'Guangzhou, CN'
speed_test '32155' 'Hongkong, CN'
speed_test '6527' 'Seoul, KR' speed_test '6527' 'Seoul, KR'
speed_test '7311' 'Singapore, SG' speed_test '7311' 'Singapore, SG'
speed_test '21569' 'Tokyo, JP' speed_test '21569' 'Tokyo, JP'

View File

@ -1,5 +1,5 @@
# Dockerfile for hysteria based alpine # Dockerfile for hysteria based alpine
# Copyright (C) 2022 Teddysun <i@teddysun.com> # Copyright (C) 2023 Teddysun <i@teddysun.com>
# Reference URL: # Reference URL:
# https://github.com/HyNetwork/hysteria # https://github.com/HyNetwork/hysteria
@ -9,7 +9,7 @@ LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM ARG TARGETPLATFORM
WORKDIR /root WORKDIR /root
COPY hysteria.sh /root/hysteria.sh COPY hysteria.sh /root/hysteria.sh
COPY server.json /etc/hysteria/server.json COPY server.yaml /etc/hysteria/server.yaml
RUN set -ex \ RUN set -ex \
&& apk add --no-cache bash tzdata ca-certificates \ && apk add --no-cache bash tzdata ca-certificates \
&& chmod +x /root/hysteria.sh \ && chmod +x /root/hysteria.sh \
@ -18,4 +18,4 @@ RUN set -ex \
VOLUME /etc/hysteria VOLUME /etc/hysteria
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai
CMD [ "/usr/bin/hysteria", "server", "--config", "/etc/hysteria/server.json" ] CMD [ "/usr/bin/hysteria", "server", "-c", "/etc/hysteria/server.yaml" ]

View File

@ -22,21 +22,30 @@ It can be found at [Docker Hub][4].
## Start a container ## Start a container
You **must create a configuration file** `/etc/hysteria/server.json` in host at first: You **must create a configuration file** `/etc/hysteria/server.yaml` in host at first:
``` ```
$ mkdir -p /etc/hysteria $ mkdir -p /etc/hysteria
``` ```
A sample in JSON like below: A sample in yaml like below:
``` ```
{ listen: :8998
"listen": ":8998",
"cert": "/etc/hysteria/cert.crt", tls:
"key": "/etc/hysteria/private.key", cert: /etc/hysteria/cert.crt
"obfs": "dGVkZHlzdW4uY29tCg==" key: /etc/hysteria/private.key
}
auth:
type: password
password: your_password
resolver:
type: https
https:
addr: 8.8.8.8:443
timeout: 10s
``` ```
And put the `cert.crt`, `private.key` to the `/etc/hysteria/`. And put the `cert.crt`, `private.key` to the `/etc/hysteria/`.
@ -49,7 +58,7 @@ $ docker run -d -p 8998:8998 --name hysteria --restart=always -v /etc/hysteria:/
**Warning**: The port number must be same as configuration and opened in firewall. **Warning**: The port number must be same as configuration and opened in firewall.
[1]: https://github.com/HyNetwork/hysteria [1]: https://github.com/apernet/hysteria
[2]: https://docs.docker.com/ [2]: https://docs.docker.com/
[3]: https://docs.docker.com/install/ [3]: https://docs.docker.com/install/
[4]: https://hub.docker.com/r/teddysun/hysteria/ [4]: https://hub.docker.com/r/teddysun/hysteria/

View File

@ -1,13 +0,0 @@
{
"server": "IP:8998",
"obfs": "dGVkZHlzdW4uY29tCg==",
"up_mbps": 200,
"down_mbps": 1000,
"insecure": true,
"socks5": {
"listen": "127.0.0.1:1080"
},
"http": {
"listen": "127.0.0.1:1081"
}
}

View File

@ -0,0 +1,9 @@
server: "IP:8998"
auth: your_password
tls:
sni: www.example.com
socks5:
listen: 127.0.0.1:1080

View File

@ -1,6 +0,0 @@
{
"listen": ":8998",
"cert": "/etc/hysteria/cert.crt",
"key": "/etc/hysteria/private.key",
"obfs": "dGVkZHlzdW4uY29tCg=="
}

View File

@ -0,0 +1,15 @@
listen: :8998
tls:
cert: /etc/hysteria/cert.crt
key: /etc/hysteria/private.key
auth:
type: password
password: your_password
resolver:
type: https
https:
addr: 8.8.8.8:443
timeout: 10s