From a044943db7713e47d084a88cf5ca0e14e06635dd Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 20 Mar 2026 09:46:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BAhttps=20=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- change2/service2.py | 4 ++-- change3/service3.py | 4 ++-- change_app.py | 18 ++++++++++++++++++ notice.txt | 2 ++ 4 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 notice.txt diff --git a/change2/service2.py b/change2/service2.py index b30e33f..ea5b0ea 100644 --- a/change2/service2.py +++ b/change2/service2.py @@ -28,9 +28,9 @@ import oss2 COMFYUI_URL = "http://127.0.0.1:8188" # COMFYUI_URL = "http://117.50.80.187:47697" -# WORKFLOW_PATH = Path(__file__).parent / "change2_1_ex.json" +WORKFLOW_PATH = Path(__file__).parent / "change2_1_ex.json" -WORKFLOW_PATH = Path(__file__).parent / "change_fast2.json" +# WORKFLOW_PATH = Path(__file__).parent / "change_fast2.json" # 节点 ID 映射 NODE_MODEL = "11" # 模特 diff --git a/change3/service3.py b/change3/service3.py index 1a4c60a..5be3193 100644 --- a/change3/service3.py +++ b/change3/service3.py @@ -27,9 +27,9 @@ from pydantic import BaseModel COMFYUI_URL = "http://127.0.0.1:8188" # COMFYUI_URL = "http://117.50.80.187:47697" -#WORKFLOW_PATH = Path(__file__).parent / "change2_2_0308.json" +WORKFLOW_PATH = Path(__file__).parent / "change2_2_0308.json" -WORKFLOW_PATH = Path(__file__).parent / "change_fast3.json" +# WORKFLOW_PATH = Path(__file__).parent / "change_fast3.json" # 节点 ID 映射 NODE_MODEL = "11" # 模特 diff --git a/change_app.py b/change_app.py index 966a90a..7714d90 100644 --- a/change_app.py +++ b/change_app.py @@ -1,4 +1,5 @@ import requests +import os from flask import Flask, jsonify, request, send_from_directory app = Flask(__name__, static_folder='static') @@ -69,3 +70,20 @@ def change_cloth_base64(): if __name__ == '__main__': app.run(host="0.0.0.0", port=28889, debug=True) + +# if __name__ == '__main__': +# # 证书路径(替换为你的域名) +# ssl_cert = '/etc/letsencrypt/live/change.xiangsilian.com/fullchain.pem' +# ssl_key = '/etc/letsencrypt/live/change.xiangsilian.com/privkey.pem' + +# # 检查证书文件是否存在 +# if not os.path.exists(ssl_cert) or not os.path.exists(ssl_key): +# print("❌ 证书文件不存在,请检查路径是否正确!") +# else: +# # 启动HTTPS服务(443端口需要root权限,所以运行时要加sudo) +# app.run( +# host='0.0.0.0', # 允许外网访问 +# port=443, # HTTPS默认端口(非443需加端口访问,如8443) +# ssl_context=(ssl_cert, ssl_key), # 加载Let's Encrypt证书 +# debug=True # 生产环境务必关闭debug +# ) diff --git a/notice.txt b/notice.txt new file mode 100644 index 0000000..dddc97c --- /dev/null +++ b/notice.txt @@ -0,0 +1,2 @@ +sudo apt install certbot -y +sudo certbot certonly --standalone -d change.xiangsilian.com --email youmiss@163.com --agree-tos --non-interactive