From c5f8733d4c6779a2053011c08701e934b190d615 Mon Sep 17 00:00:00 2001 From: vincent Date: Wed, 15 May 2024 20:53:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=94=B9=E4=B8=BAconfig.json.=E5=BE=85=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.json | 18 ++++++++++++++++++ docker-compose.yml | 4 ++-- docker-compose.yml.bak | 15 +++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 config.json create mode 100644 docker-compose.yml.bak diff --git a/config.json b/config.json new file mode 100644 index 0000000..ed6cd8d --- /dev/null +++ b/config.json @@ -0,0 +1,18 @@ +{ + "listen": ":8443", + "tls": { + "cert": "/etc/hysteria/server.crt", + "key": "/etc/hysteria/server.key" + }, + "auth": { + "type": "password", + "password": "JitvTPJZp3TeeVS" + }, + "masquerade": { + "type": "proxy", + "proxy": { + "url": "https://bing.com", + "rewriteHost": true + } + } +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 6a3b43c..bd2aebe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,9 +7,9 @@ services: network_mode: "host" volumes: - acme:/acme - - ./hysteria.yaml:/etc/hysteria.yaml + - ./config.json:/etc/hysteria/config.json - ./key/server.crt:/etc/hysteria/server.crt - ./key/server.key:/etc/hysteria/server.key - command: ["server", "-c", "/etc/hysteria.yaml"] + command: ["server", "-c", "/etc/hysteria/config.json"] volumes: acme: diff --git a/docker-compose.yml.bak b/docker-compose.yml.bak new file mode 100644 index 0000000..6a3b43c --- /dev/null +++ b/docker-compose.yml.bak @@ -0,0 +1,15 @@ +version: "3.9" +services: + hysteria: + image: tobyxdd/hysteria:latest + container_name: hysteria + restart: always + network_mode: "host" + volumes: + - acme:/acme + - ./hysteria.yaml:/etc/hysteria.yaml + - ./key/server.crt:/etc/hysteria/server.crt + - ./key/server.key:/etc/hysteria/server.key + command: ["server", "-c", "/etc/hysteria.yaml"] +volumes: + acme: