From 32c46c56a7920941f9eec4d9dacba0c6df857886 Mon Sep 17 00:00:00 2001 From: zeaslity Date: Sun, 5 Mar 2023 13:15:27 +0800 Subject: [PATCH] =?UTF-8?q?[=20env=20]=20-=20=E6=96=B0=E5=A2=9Eopenai?= =?UTF-8?q?=E9=83=A8=E5=88=86=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/all-agent-hosts.txt | 2 +- .../xray/persisit/RealXrayPathConfig.json | 1123 +++++++++++++---- .../func/xray/persisit/RealXrayPathConfig.txt | 11 + .../openai/openai-web-dockercompose.yaml | 22 + .../octopus/openai/openai-wmm-nginx.conf | 19 + .../java/io/wdd/source/shell/install-nginx.sh | 11 + 6 files changed, 961 insertions(+), 227 deletions(-) create mode 100644 source/src/main/java/io/wdd/source/octopus/openai/openai-web-dockercompose.yaml create mode 100644 source/src/main/java/io/wdd/source/octopus/openai/openai-wmm-nginx.conf diff --git a/agent/all-agent-hosts.txt b/agent/all-agent-hosts.txt index 46f8bd1..f4532f2 100644 --- a/agent/all-agent-hosts.txt +++ b/agent/all-agent-hosts.txt @@ -45,5 +45,5 @@ Phoenix-amd64-02,Phoenix-arm64-01,Phoenix-arm64-02,London-amd64-01,London-amd64- AllHosts=(Phoenix-arm64-01 Phoenix-arm64-02 London-arm64-02 London-amd64-01 London-amd64-02 London-arm64-01 Phoenix-amd64-02 Shanghai-amd64-01 Seoul-amd64-04) -Tokyo-amd64-13-6e8a19, Tokyo-amd64-07-f66a41, Phoenix-arm64-01-52c2f4, Phoenix-amd64-02-2a45bb, Phoenix-arm64-02-7b95ac, London-arm64-02-9ee6ba, London-amd64-01-0b219f, London-amd64-02-c155d1, London-arm64-01-72519e +Tokyo-amd64-13-6e8a19, Tokyo-amd64-07-f66a41, Phoenix-arm64-01-52c2f4, Phoenix-amd64-02-2a45bb, Phoenix-arm64-02-7b95ac, London-arm64-02-9ee6ba, London-amd64-01-0b219f, London-amd64-02-c155d1, London-arm64-01-72519e,LosAngeles-amd64-01-5a180b diff --git a/server/src/main/java/io/wdd/func/xray/persisit/RealXrayPathConfig.json b/server/src/main/java/io/wdd/func/xray/persisit/RealXrayPathConfig.json index 0ef4dd6..d81cfda 100644 --- a/server/src/main/java/io/wdd/func/xray/persisit/RealXrayPathConfig.json +++ b/server/src/main/java/io/wdd/func/xray/persisit/RealXrayPathConfig.json @@ -3,95 +3,8 @@ "msg": "success", "data": [ { - "xrayConfigFileName": "5-Phoenix-amd64-02-2023-03-04-16-32-13.json", - "xrayConfigFile": "/octopus-server/xray/5-Phoenix-amd64-02-2023-03-04-16-32-13.json", - "xrayConfig": { - "log": { - "access": "/var/log/xray/access.log", - "error": "/var/log/xray/error.log", - "loglevel": "warning" - }, - "inbounds": [ - { - "protocol": "vmess", - "listen": "0.0.0.0", - "port": 19995, - "streamSettings": { - "tcpSettings": { - "header": { - "type": "http", - "response": { - "version": "1.1", - "status": "200", - "reason": "Accept", - "headers": { - "Content-Type": [ - "application/octet-stream", - "video/mpeg" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Connection": [ - "keep-alive" - ], - "Pragma": "no-cache" - } - } - } - } - }, - "tag": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02", - "settings": { - "clients": [ - { - "id": "d2b314c1-8cbc-47d0-91f7-f172c8aa148f", - "email": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02@octopus.io", - "level": 0, - "alterId": 0 - } - ], - "disableInsecureEncryption": false - } - } - ], - "outbounds": [ - { - "protocol": "freedom" - }, - { - "protocol": "blackhole", - "tag": "block" - } - ], - "routing": { - "domainStrategy": "IPIfNonMatch", - "rules": [ - { - "type": "field", - "inboundTag": [ - "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02" - ], - "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02" - } - ] - } - }, - "objectSummary": { - "bucketName": "tokyo-oracle-10gb", - "key": "5-Phoenix-amd64-02-2023-03-04-16-32-13.json", - "size": 1458, - "lastModified": "2023-03-04", - "contentType": "application/json", - "access": { - "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/5-Phoenix-amd64-02-2023-03-04-16-32-13.json" - }, - "etag": "2acf2546e097b217a7b2e288433d060b" - } - }, - { - "xrayConfigFileName": "2-Tokyo-amd64-03-2023-03-04-16-32-13.json", - "xrayConfigFile": "/octopus-server/xray/2-Tokyo-amd64-03-2023-03-04-16-32-13.json", + "xrayConfigFileName": "2-Tokyo-amd64-03-2023-03-04-17-13-51.json", + "xrayConfigFile": "/octopus-server/xray/2-Tokyo-amd64-03-2023-03-04-17-13-51.json", "xrayConfig": { "log": { "access": "/var/log/xray/access.log", @@ -132,7 +45,7 @@ "settings": { "clients": [ { - "id": "24e51a3a-ebfb-4c74-81d9-68feae8dc6c2", + "id": "54c40f04-cf52-4d1c-8bc3-6d8b73febdaa", "email": "Tokyo-amd64-03@octopus.io", "level": 0, "alterId": 0 @@ -174,7 +87,7 @@ "settings": { "clients": [ { - "id": "a7171db5-9836-4135-acc6-845b68927182", + "id": "1e25e321-1ccb-4dbe-88d4-24b8d6f92396", "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03@octopus.io", "level": 0, "alterId": 0 @@ -182,6 +95,48 @@ ], "disableInsecureEncryption": false } + }, + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19995, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01", + "settings": { + "clients": [ + { + "id": "1fbfec35-1c34-4d99-8805-3ee607f0dd7e", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } } ], "outbounds": [ @@ -191,6 +146,64 @@ { "protocol": "blackhole", "tag": "block" + }, + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": "198.74.113.249", + "port": 19995, + "users": [ + { + "id": "1fbfec35-1c34-4d99-8805-3ee607f0dd7e", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ] + } + ] + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01", + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "request": { + "version": "1.1", + "method": "GET", + "path": [ + "/" + ], + "headers": { + "Host": [ + "www.baidu.com", + "www.google.com", + "www.bing.com", + "www.github.com" + ], + "User-Agent": [ + "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36", + "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46" + ], + "Accept-Encoding": [ + "gzip", + "deflate" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "mux": { + "enabled": false, + "concurrency": -1 + } } ], "routing": { @@ -209,25 +222,47 @@ "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03" ], "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03" + }, + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01" } ] } }, "objectSummary": { "bucketName": "tokyo-oracle-10gb", - "key": "2-Tokyo-amd64-03-2023-03-04-16-32-13.json", - "size": 2423, + "key": "2-Tokyo-amd64-03-2023-03-04-17-13-51.json", + "size": 4990, "lastModified": "2023-03-04", "contentType": "application/json", "access": { - "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/2-Tokyo-amd64-03-2023-03-04-16-32-13.json" + "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/2-Tokyo-amd64-03-2023-03-04-17-13-51.json" }, - "etag": "c0801eb53972bd1de2647831f69e8ad5" + "etag": "8946683931f49b7afcbba8251cd83cba" } }, { - "xrayConfigFileName": "0-Shanghai-amd64-01-2023-03-04-16-32-13.json", - "xrayConfigFile": "/octopus-server/xray/0-Shanghai-amd64-01-2023-03-04-16-32-13.json", + "xrayConfigFileName": "99-subscribe-octopus-latest.txt", + "xrayConfigFile": "/octopus-server/xray/99-subscribe-octopus-latest.txt", + "objectSummary": { + "bucketName": "seoul", + "key": "99-subscribe-octopus-latest.txt", + "size": 3976, + "lastModified": "2023-03-04", + "contentType": "text/plain", + "access": { + "originUrl": "https://cnk8d6fazu16.compat.objectstorage.ap-seoul-1.oraclecloud.com/seoul/99-subscribe-octopus-latest.txt" + }, + "etag": "48445f67c2b7e0844385046bb5f31b7b" + } + }, + { + "xrayConfigFileName": "0-Shanghai-amd64-01-2023-03-04-17-13-51.json", + "xrayConfigFile": "/octopus-server/xray/0-Shanghai-amd64-01-2023-03-04-17-13-51.json", "xrayConfig": { "log": { "access": "/var/log/xray/access.log", @@ -268,7 +303,7 @@ "settings": { "clients": [ { - "id": "e26a72a5-3177-4a44-8f1b-196a74198d6e", + "id": "6850023e-ef24-4a39-af00-97e4d84dc172", "email": "Shanghai-amd64-01->Seoul-amd64-04@octopus.io", "level": 0, "alterId": 0 @@ -310,7 +345,7 @@ "settings": { "clients": [ { - "id": "a7171db5-9836-4135-acc6-845b68927182", + "id": "1e25e321-1ccb-4dbe-88d4-24b8d6f92396", "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03@octopus.io", "level": 0, "alterId": 0 @@ -348,12 +383,12 @@ } } }, - "tag": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02", + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01", "settings": { "clients": [ { - "id": "d2b314c1-8cbc-47d0-91f7-f172c8aa148f", - "email": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02@octopus.io", + "id": "1fbfec35-1c34-4d99-8805-3ee607f0dd7e", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01@octopus.io", "level": 0, "alterId": 0 } @@ -390,11 +425,95 @@ } } }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01", + "settings": { + "clients": [ + { + "id": "68e8018b-a0c0-4892-9133-7eeaafd125e9", + "email": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } + }, + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19993, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02", + "settings": { + "clients": [ + { + "id": "309e172e-2374-447e-ba5a-f715b9eabf1d", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } + }, + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19992, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, "tag": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01", "settings": { "clients": [ { - "id": "3705712f-72a8-400b-a6aa-8ad4eaab7da8", + "id": "eed89635-4138-4e7d-b788-05f527574217", "email": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01@octopus.io", "level": 0, "alterId": 0 @@ -414,7 +533,7 @@ "port": 19997, "users": [ { - "id": "e26a72a5-3177-4a44-8f1b-196a74198d6e", + "id": "6850023e-ef24-4a39-af00-97e4d84dc172", "email": "Shanghai-amd64-01->Seoul-amd64-04@octopus.io", "level": 0, "alterId": 0 @@ -472,7 +591,7 @@ "port": 19996, "users": [ { - "id": "a7171db5-9836-4135-acc6-845b68927182", + "id": "1e25e321-1ccb-4dbe-88d4-24b8d6f92396", "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03@octopus.io", "level": 0, "alterId": 0 @@ -530,7 +649,123 @@ "port": 19995, "users": [ { - "id": "d2b314c1-8cbc-47d0-91f7-f172c8aa148f", + "id": "1fbfec35-1c34-4d99-8805-3ee607f0dd7e", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ] + } + ] + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01", + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "request": { + "version": "1.1", + "method": "GET", + "path": [ + "/" + ], + "headers": { + "Host": [ + "www.baidu.com", + "www.google.com", + "www.bing.com", + "www.github.com" + ], + "User-Agent": [ + "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36", + "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46" + ], + "Accept-Encoding": [ + "gzip", + "deflate" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "mux": { + "enabled": false, + "concurrency": -1 + } + }, + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": "140.238.14.103", + "port": 19994, + "users": [ + { + "id": "68e8018b-a0c0-4892-9133-7eeaafd125e9", + "email": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ] + } + ] + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01", + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "request": { + "version": "1.1", + "method": "GET", + "path": [ + "/" + ], + "headers": { + "Host": [ + "www.baidu.com", + "www.google.com", + "www.bing.com", + "www.github.com" + ], + "User-Agent": [ + "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36", + "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46" + ], + "Accept-Encoding": [ + "gzip", + "deflate" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "mux": { + "enabled": false, + "concurrency": -1 + } + }, + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": "140.238.14.103", + "port": 19993, + "users": [ + { + "id": "309e172e-2374-447e-ba5a-f715b9eabf1d", "email": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02@octopus.io", "level": 0, "alterId": 0 @@ -585,10 +820,10 @@ "vnext": [ { "address": "140.238.14.103", - "port": 19994, + "port": 19992, "users": [ { - "id": "3705712f-72a8-400b-a6aa-8ad4eaab7da8", + "id": "eed89635-4138-4e7d-b788-05f527574217", "email": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01@octopus.io", "level": 0, "alterId": 0 @@ -655,6 +890,20 @@ ], "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03" }, + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01" + }, + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01" + }, { "type": "field", "inboundTag": [ @@ -674,34 +923,329 @@ }, "objectSummary": { "bucketName": "tokyo-oracle-10gb", - "key": "0-Shanghai-amd64-01-2023-03-04-16-32-13.json", - "size": 9932, + "key": "0-Shanghai-amd64-01-2023-03-04-17-13-51.json", + "size": 14970, "lastModified": "2023-03-04", "contentType": "application/json", "access": { - "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/0-Shanghai-amd64-01-2023-03-04-16-32-13.json" + "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/0-Shanghai-amd64-01-2023-03-04-17-13-51.json" }, - "etag": "d0116839afa4481260a3b5859efd54f8" + "etag": "efc534d09fb54cf5f1b3e0f3044a4b1f" } }, { - "xrayConfigFileName": "99-subscribe-octopus-latest.txt", - "xrayConfigFile": "/octopus-server/xray/99-subscribe-octopus-latest.txt", + "xrayConfigFileName": "5-Phoenix-amd64-02-2023-03-04-17-13-51.json", + "xrayConfigFile": "/octopus-server/xray/5-Phoenix-amd64-02-2023-03-04-17-13-51.json", + "xrayConfig": { + "log": { + "access": "/var/log/xray/access.log", + "error": "/var/log/xray/error.log", + "loglevel": "warning" + }, + "inbounds": [ + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19993, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02", + "settings": { + "clients": [ + { + "id": "309e172e-2374-447e-ba5a-f715b9eabf1d", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } + } + ], + "outbounds": [ + { + "protocol": "freedom" + }, + { + "protocol": "blackhole", + "tag": "block" + } + ], + "routing": { + "domainStrategy": "IPIfNonMatch", + "rules": [ + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02" + } + ] + } + }, "objectSummary": { - "bucketName": "seoul", - "key": "99-subscribe-octopus-latest.txt", - "size": 2930, + "bucketName": "tokyo-oracle-10gb", + "key": "5-Phoenix-amd64-02-2023-03-04-17-13-51.json", + "size": 1458, "lastModified": "2023-03-04", - "contentType": "text/plain", + "contentType": "application/json", "access": { - "originUrl": "https://cnk8d6fazu16.compat.objectstorage.ap-seoul-1.oraclecloud.com/seoul/99-subscribe-octopus-latest.txt" + "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/5-Phoenix-amd64-02-2023-03-04-17-13-51.json" }, - "etag": "af0c916c1a76bcea122909b7d1438a6b" + "etag": "3f6e49ce9169c09b8d22b0e7ebf9fbaf" } }, { - "xrayConfigFileName": "1-Seoul-amd64-04-2023-03-04-16-32-13.json", - "xrayConfigFile": "/octopus-server/xray/1-Seoul-amd64-04-2023-03-04-16-32-13.json", + "xrayConfigFileName": "7-London-amd64-01-2023-03-04-17-13-51.json", + "xrayConfigFile": "/octopus-server/xray/7-London-amd64-01-2023-03-04-17-13-51.json", + "xrayConfig": { + "log": { + "access": "/var/log/xray/access.log", + "error": "/var/log/xray/error.log", + "loglevel": "warning" + }, + "inbounds": [ + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19992, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01", + "settings": { + "clients": [ + { + "id": "eed89635-4138-4e7d-b788-05f527574217", + "email": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } + } + ], + "outbounds": [ + { + "protocol": "freedom" + }, + { + "protocol": "blackhole", + "tag": "block" + } + ], + "routing": { + "domainStrategy": "IPIfNonMatch", + "rules": [ + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01" + } + ] + } + }, + "objectSummary": { + "bucketName": "tokyo-oracle-10gb", + "key": "7-London-amd64-01-2023-03-04-17-13-51.json", + "size": 1454, + "lastModified": "2023-03-04", + "contentType": "application/json", + "access": { + "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/7-London-amd64-01-2023-03-04-17-13-51.json" + }, + "etag": "c90d31f09f6bf395be2bb25c1013e5ef" + } + }, + { + "xrayConfigFileName": "10-LosAngeles-amd64-01-2023-03-04-17-13-51.json", + "xrayConfigFile": "/octopus-server/xray/10-LosAngeles-amd64-01-2023-03-04-17-13-51.json", + "xrayConfig": { + "log": { + "access": "/var/log/xray/access.log", + "error": "/var/log/xray/error.log", + "loglevel": "warning" + }, + "inbounds": [ + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19995, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01", + "settings": { + "clients": [ + { + "id": "1fbfec35-1c34-4d99-8805-3ee607f0dd7e", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } + }, + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19994, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01", + "settings": { + "clients": [ + { + "id": "68e8018b-a0c0-4892-9133-7eeaafd125e9", + "email": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } + } + ], + "outbounds": [ + { + "protocol": "freedom" + }, + { + "protocol": "blackhole", + "tag": "block" + } + ], + "routing": { + "domainStrategy": "IPIfNonMatch", + "rules": [ + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01" + }, + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01" + } + ] + } + }, + "objectSummary": { + "bucketName": "tokyo-oracle-10gb", + "key": "10-LosAngeles-amd64-01-2023-03-04-17-13-51.json", + "size": 2667, + "lastModified": "2023-03-04", + "contentType": "application/json", + "access": { + "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/10-LosAngeles-amd64-01-2023-03-04-17-13-51.json" + }, + "etag": "c0d56e38c5007096c61a546c22c92709" + } + }, + { + "xrayConfigFileName": "1-Seoul-amd64-04-2023-03-04-17-13-51.json", + "xrayConfigFile": "/octopus-server/xray/1-Seoul-amd64-04-2023-03-04-17-13-51.json", "xrayConfig": { "log": { "access": "/var/log/xray/access.log", @@ -742,7 +1286,7 @@ "settings": { "clients": [ { - "id": "27e31d44-4395-4cc5-9ca2-d5d96be26b64", + "id": "6751d88b-4d65-4ed0-8628-502d4f1b66c1", "email": "Seoul-amd64-04@octopus.io", "level": 0, "alterId": 0 @@ -784,7 +1328,7 @@ "settings": { "clients": [ { - "id": "e26a72a5-3177-4a44-8f1b-196a74198d6e", + "id": "6850023e-ef24-4a39-af00-97e4d84dc172", "email": "Shanghai-amd64-01->Seoul-amd64-04@octopus.io", "level": 0, "alterId": 0 @@ -826,7 +1370,7 @@ "settings": { "clients": [ { - "id": "a7171db5-9836-4135-acc6-845b68927182", + "id": "1e25e321-1ccb-4dbe-88d4-24b8d6f92396", "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03@octopus.io", "level": 0, "alterId": 0 @@ -864,12 +1408,12 @@ } } }, - "tag": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02", + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01", "settings": { "clients": [ { - "id": "d2b314c1-8cbc-47d0-91f7-f172c8aa148f", - "email": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02@octopus.io", + "id": "1fbfec35-1c34-4d99-8805-3ee607f0dd7e", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01@octopus.io", "level": 0, "alterId": 0 } @@ -906,11 +1450,95 @@ } } }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01", + "settings": { + "clients": [ + { + "id": "68e8018b-a0c0-4892-9133-7eeaafd125e9", + "email": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } + }, + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19993, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02", + "settings": { + "clients": [ + { + "id": "309e172e-2374-447e-ba5a-f715b9eabf1d", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02@octopus.io", + "level": 0, + "alterId": 0 + } + ], + "disableInsecureEncryption": false + } + }, + { + "protocol": "vmess", + "listen": "0.0.0.0", + "port": 19992, + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "Accept", + "headers": { + "Content-Type": [ + "application/octet-stream", + "video/mpeg" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, "tag": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01", "settings": { "clients": [ { - "id": "3705712f-72a8-400b-a6aa-8ad4eaab7da8", + "id": "eed89635-4138-4e7d-b788-05f527574217", "email": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01@octopus.io", "level": 0, "alterId": 0 @@ -937,7 +1565,7 @@ "port": 19996, "users": [ { - "id": "a7171db5-9836-4135-acc6-845b68927182", + "id": "1e25e321-1ccb-4dbe-88d4-24b8d6f92396", "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03@octopus.io", "level": 0, "alterId": 0 @@ -991,11 +1619,127 @@ "settings": { "vnext": [ { - "address": "129.146.171.163", + "address": "18.181.77.246", "port": 19995, "users": [ { - "id": "d2b314c1-8cbc-47d0-91f7-f172c8aa148f", + "id": "1fbfec35-1c34-4d99-8805-3ee607f0dd7e", + "email": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ] + } + ] + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01", + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "request": { + "version": "1.1", + "method": "GET", + "path": [ + "/" + ], + "headers": { + "Host": [ + "www.baidu.com", + "www.google.com", + "www.bing.com", + "www.github.com" + ], + "User-Agent": [ + "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36", + "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46" + ], + "Accept-Encoding": [ + "gzip", + "deflate" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "mux": { + "enabled": false, + "concurrency": -1 + } + }, + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": "198.74.113.249", + "port": 19994, + "users": [ + { + "id": "68e8018b-a0c0-4892-9133-7eeaafd125e9", + "email": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01@octopus.io", + "level": 0, + "alterId": 0 + } + ] + } + ] + }, + "tag": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01", + "streamSettings": { + "tcpSettings": { + "header": { + "type": "http", + "request": { + "version": "1.1", + "method": "GET", + "path": [ + "/" + ], + "headers": { + "Host": [ + "www.baidu.com", + "www.google.com", + "www.bing.com", + "www.github.com" + ], + "User-Agent": [ + "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36", + "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46" + ], + "Accept-Encoding": [ + "gzip", + "deflate" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + }, + "mux": { + "enabled": false, + "concurrency": -1 + } + }, + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": "129.146.171.163", + "port": 19993, + "users": [ + { + "id": "309e172e-2374-447e-ba5a-f715b9eabf1d", "email": "Shanghai-amd64-01->Seoul-amd64-04->Phoenix-amd64-02@octopus.io", "level": 0, "alterId": 0 @@ -1050,10 +1794,10 @@ "vnext": [ { "address": "141.147.99.91", - "port": 19994, + "port": 19992, "users": [ { - "id": "3705712f-72a8-400b-a6aa-8ad4eaab7da8", + "id": "eed89635-4138-4e7d-b788-05f527574217", "email": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01@octopus.io", "level": 0, "alterId": 0 @@ -1127,6 +1871,20 @@ ], "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03" }, + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->Tokyo-amd64-03->LosAngeles-amd64-01" + }, + { + "type": "field", + "inboundTag": [ + "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01" + ], + "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->LosAngeles-amd64-01" + }, { "type": "field", "inboundTag": [ @@ -1146,102 +1904,15 @@ }, "objectSummary": { "bucketName": "tokyo-oracle-10gb", - "key": "1-Seoul-amd64-04-2023-03-04-16-32-13.json", - "size": 9699, + "key": "1-Seoul-amd64-04-2023-03-04-17-13-51.json", + "size": 14736, "lastModified": "2023-03-04", "contentType": "application/json", "access": { - "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/1-Seoul-amd64-04-2023-03-04-16-32-13.json" + "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/1-Seoul-amd64-04-2023-03-04-17-13-51.json" }, - "etag": "1757de9d237091dcb75886700129e012" - } - }, - { - "xrayConfigFileName": "7-London-amd64-01-2023-03-04-16-32-13.json", - "xrayConfigFile": "/octopus-server/xray/7-London-amd64-01-2023-03-04-16-32-13.json", - "xrayConfig": { - "log": { - "access": "/var/log/xray/access.log", - "error": "/var/log/xray/error.log", - "loglevel": "warning" - }, - "inbounds": [ - { - "protocol": "vmess", - "listen": "0.0.0.0", - "port": 19994, - "streamSettings": { - "tcpSettings": { - "header": { - "type": "http", - "response": { - "version": "1.1", - "status": "200", - "reason": "Accept", - "headers": { - "Content-Type": [ - "application/octet-stream", - "video/mpeg" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Connection": [ - "keep-alive" - ], - "Pragma": "no-cache" - } - } - } - } - }, - "tag": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01", - "settings": { - "clients": [ - { - "id": "3705712f-72a8-400b-a6aa-8ad4eaab7da8", - "email": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01@octopus.io", - "level": 0, - "alterId": 0 - } - ], - "disableInsecureEncryption": false - } - } - ], - "outbounds": [ - { - "protocol": "freedom" - }, - { - "protocol": "blackhole", - "tag": "block" - } - ], - "routing": { - "domainStrategy": "IPIfNonMatch", - "rules": [ - { - "type": "field", - "inboundTag": [ - "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01" - ], - "outboundTag": "Shanghai-amd64-01->Seoul-amd64-04->London-amd64-01" - } - ] - } - }, - "objectSummary": { - "bucketName": "tokyo-oracle-10gb", - "key": "7-London-amd64-01-2023-03-04-16-32-13.json", - "size": 1454, - "lastModified": "2023-03-04", - "contentType": "application/json", - "access": { - "originUrl": "https://nrjcs6lwr9vy.compat.objectstorage.ap-tokyo-1.oraclecloud.com/tokyo-oracle-10gb/7-London-amd64-01-2023-03-04-16-32-13.json" - }, - "etag": "79839cdc5456155f3944c5e613ca1c7f" + "etag": "d0c6d258d7b4c9aa65e124f5c5c37524" } } ] -} +} \ No newline at end of file diff --git a/server/src/main/java/io/wdd/func/xray/persisit/RealXrayPathConfig.txt b/server/src/main/java/io/wdd/func/xray/persisit/RealXrayPathConfig.txt index 201cbb5..6dec719 100644 --- a/server/src/main/java/io/wdd/func/xray/persisit/RealXrayPathConfig.txt +++ b/server/src/main/java/io/wdd/func/xray/persisit/RealXrayPathConfig.txt @@ -4,8 +4,19 @@ Seoul-amd64-04-f301ac, Tokyo-amd64-03-99907c, Shanghai-amd64-01-259df5->Seoul-amd64-04-f301ac, Shanghai-amd64-01-259df5->Seoul-amd64-04-f301ac->Tokyo-amd64-03-99907c, +Shanghai-amd64-01-259df5->Seoul-amd64-04-f301ac->Tokyo-amd64-03-99907c->LosAngeles-amd64-01-5a180b, +Shanghai-amd64-01-259df5->Seoul-amd64-04-f301ac->LosAngeles-amd64-01-5a180b, Shanghai-amd64-01-259df5->Seoul-amd64-04-f301ac->Phoenix-amd64-02-2a45bb, Shanghai-amd64-01-259df5->Seoul-amd64-04-f301ac->London-amd64-01-0b219f +# 检测IP是否可以使用OpenAI +bash <(curl -Ls https://cpp.li/openai) + +# 通过安装 Cloudflare WARP跳过验证 + +# https://p3terx.com/archives/cloudflare-warp-script-issue-and-solution.html +https://p3terx.com/archives/cloudflare-warp-configuration-script.html + + diff --git a/source/src/main/java/io/wdd/source/octopus/openai/openai-web-dockercompose.yaml b/source/src/main/java/io/wdd/source/octopus/openai/openai-web-dockercompose.yaml new file mode 100644 index 0000000..2c2ba14 --- /dev/null +++ b/source/src/main/java/io/wdd/source/octopus/openai/openai-web-dockercompose.yaml @@ -0,0 +1,22 @@ +version: '3' + +services: + app: + image: chenzhaoyu94/chatgpt-web # 总是使用 latest ,更新时重新 pull 该 tag 镜像即可 + ports: + - 3002:3002 + environment: + # 二选一 + OPENAI_API_KEY: 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 + # 二选一 + #OPENAI_ACCESS_TOKEN: xxxxxx + # API接口地址,可选,设置 OPENAI_API_KEY 时可用 + #OPENAI_API_BASE_URL: xxxx + # 反向代理,可选 + #API_REVERSE_PROXY: xxx + # 超时,单位毫秒,可选 + TIMEOUT_MS: 60000 + # Socks代理,可选,和 SOCKS_PROXY_PORT 一起时生效 + #SOCKS_PROXY_HOST: xxxx + # Socks代理端口,可选,和 SOCKS_PROXY_HOST 一起时生效 + #SOCKS_PROXY_PORT: xxxx \ No newline at end of file diff --git a/source/src/main/java/io/wdd/source/octopus/openai/openai-wmm-nginx.conf b/source/src/main/java/io/wdd/source/octopus/openai/openai-wmm-nginx.conf new file mode 100644 index 0000000..9794226 --- /dev/null +++ b/source/src/main/java/io/wdd/source/octopus/openai/openai-wmm-nginx.conf @@ -0,0 +1,19 @@ +server { + listen 443 ssl; + + server_name wmm.107421.xyz; + + ssl_certificate /etc/nginx/conf.d/ssl_key/wmm.107421.xyz.cert.pem; + ssl_certificate_key /etc/nginx/conf.d/ssl_key/wmm.107421.xyz.key.pem; + ssl_session_timeout 1d; + ssl_session_cache shared:MozSSL:10m; + ssl_session_tickets off; + + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; + ssl_prefer_server_ciphers off; + + location / { + proxy_pass http://127.0.0.1:3002; + } +} diff --git a/source/src/main/java/io/wdd/source/shell/install-nginx.sh b/source/src/main/java/io/wdd/source/shell/install-nginx.sh index 60ea027..265a7f2 100644 --- a/source/src/main/java/io/wdd/source/shell/install-nginx.sh +++ b/source/src/main/java/io/wdd/source/shell/install-nginx.sh @@ -54,3 +54,14 @@ for table in {$allTable[*]}; do echo "ALTER TABLE $table IMPORT TABLESPACE;" done + +export DOMAIN_NAME=wmm.107421.xyz +export CF_Token="oXJRP5XI8Zhipa_PtYtB_jy6qWL0I9BosrJEYE8p" +export CF_Account_ID="dfaadeb83406ef5ad35da02617af9191" +export CF_Zone_ID="511894a4f1357feb905e974e16241ebb" + +acme.sh --issue --dns dns_cf -d ${DOMAIN_NAME} --keylength ec-256 +acme.sh --install-cert -d ${DOMAIN_NAME} --ecc \ +--key-file /etc/nginx/conf.d/ssl_key/${DOMAIN_NAME}.key.pem \ +--fullchain-file /etc/nginx/conf.d/ssl_key/${DOMAIN_NAME}.cert.pem \ +--reloadcmd "systemctl restart nginx --force"