diff --git a/404.html b/404.html index d4acd6fdfc3..40c9d47ebc5 100644 --- a/404.html +++ b/404.html @@ -13,7 +13,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.

Released under the MIT License.

- diff --git a/guide/deployment.html b/guide/deployment.html index 78de1560cb7..6a6268cd28b 100644 --- a/guide/deployment.html +++ b/guide/deployment.html @@ -30,7 +30,7 @@ # Modify the configuration environment variables according to the requirements and configuration description vi local_config.py
  • Run

    sh
    python ./run.py
  • Access

    sh
    # Access the web page
     http://localhost:8923/

    If you are using the source code deployment method, please change the api request of http://localhost/ form in the template to api:// or http://localhost:8923/ manually in order to complete the related API request properly.

    Templates need to be published to be displayed in "Public Templates", and you need admin rights to approve them in "My Publish Requests".

  • Configure administrators

    sh
    python ./chrole.py your@email.address admin

    The first registered user is the administrator by default, you need to log out and then login to get full administrator rights

    Configuration Environment Variables

    variable namerequireddefault valuedescription
    BINDNo0.0.0.0Listening address
    PORTNo8923Listening port
    QD_DEBUGNoFalseWhether to enable Debug mode
    WORKER_METHODNoQueueTask timing execution method,
    The default is Queue, optional Queue or Batch,
    Batch mode is the old version of timing task execution method, the performance is weak,
    Recommended only when Queue timed execution mode fails
    MULTI_PROCESSNoFalse(Experimental) Whether to enable multi-process mode,
    invalid on Windows platform
    AUTO_RELOADNoFalseWhether to enable automatic hot reload,
    invalid when MULTI_PROCESS=True
    STATIC_URL_PREFIXNo/static/Static file URL prefix
    DOMAINNo''Specify the access domain name,
    (recommended modification), otherwise the function of resetting password by email is not valid
    AES_KEYNobinuxAES encryption key, (Modification strongly recommended)
    COOKIE_SECRETNobinuxcookie encryption key, (Modification strongly recommended)
    COOKIE_DAYNo5The number of days the cookie is kept in the client
    DB_TYPENosqlite3Set to 'mysql' when MySQL is required
    JAWSDB_MARIA_URLNo''When you need to use MySQL,
    set to mysql://username:password@hostname:port/database_name?auth_plugin=
    QD_SQL_ECHONoFalseWhether to enable the log output of SQLAlchmey, the default is False,
    When set to True, the SQL statement will be output on the console,
    allow to set to debug to enable debug mode
    QD_SQL_LOGGING_NAMENoQD.sql_engineSQLAlchmey log name, default is 'QD.sql_engine'
    QD_SQL_LOGGING_LEVELNoWarningSQLAlchmey log level, default is 'Warning'
    QD_SQL_ECHO_POOLNoTrueWhether to enable SQLAlchmey's connection pool log output, the default is True,
    allow setting to debug to enable debug mode
    QD_SQL_LOGGING_POOL_NAMENoQD.sql_poolSQLAlchmey connection pool log name, the default is 'QD.sql_pool'
    QD_SQL_LOGGING_POOL_LEVELNoWarningSQLAlchmey connection pool log level, default is 'Warning'
    QD_SQL_POOL_SIZENo10SQLAlchmey connection pool size, default is 10
    QD_SQL_MAX_OVERFLOWNo50SQLAlchmey connection pool maximum overflow, the default is 50
    QD_SQL_POOL_PRE_PINGNoTrueWhether to ping before the connection pool gets a connection, the default is True
    QD_SQL_POOL_RECYCLENo3600SQLAlchmey connection pool recovery time, the default is 3600
    QD_SQL_POOL_TIMEOUTNo60SQLAlchmey connection pool timeout, the default is 60
    QD_SQL_POOL_USE_LIFONoTrueSQLAlchmey whether to use LIFO algorithm, the default is True
    REDISCLOUD_URLNo''When you need to use Redis or RedisCloud,
    set to http://rediscloud:password@hostname:port
    REDIS_DB_INDEXNo1The default is 1
    QD_EVILNo500(Only when the Redis connection is enabled)
    Score = number of operation failures (such as login, verification, test, etc.) * corresponding penalty points
    When the score reaches the upper limit of evil, it will be automatically banned until the next hour cycle
    EVIL_PASS_LAN_IPNoTrueWhether to turn off the evil restriction of local private IP address users and Localhost_API requests
    TRACEBACK_PRINTNoFalseWhether to enable to print Exception's TraceBack information in the console log
    PUSH_PIC_URLNopush_pic.pngThe default is [push_pic.png](https 😕/fastly.jsdelivr.net/gh/qd-today/qd@master/web/static/img/push_pic.png)
    PUSH_BATCH_SWNoTrueWhether to allow periodic push of QD task logs, the default is True
    MAIL_SMTPNo""Email SMTP server
    MAIL_PORTNo465Email SMTP server port
    MAIL_USERNo""Email username
    MAIL_PASSWORDNo""Email password
    MAIL_FROMNoMAIL_USERThe Email used when sending, the default is the same as MAIL_USER
    MAIL_DOMAIN_HTTPSNoFalseWhether to use HTTPS for email domain name.
    Not the framework itself HTTPS configuration.
    If you need HTTPS, please use an external reverse proxy
    PROXIESNo""Global proxy domain name list, separated by "|"
    PROXY_DIRECT_MODENo""Global proxy blacklist mode, not enabled by default
    "url" is URL matching mode; "regexp" is regular expression matching mode
    PROXY_DIRECTNo""Global proxy blacklist matching rules
    NEW_TASK_DELAYNo1Preparation time after new task, default is 1 second
    TASK_WHILE_LOOP_TIMEOUTNo900Maximum runtime of a single While loop during a task run,
    the default is 15 minutes
    TASK_REQUEST_LIMITNo1500Maximum number of requests per task run,
    the default is 1500
    USE_PYCURLNoTrueWhether to enable Pycurl module
    ALLOW_RETRYNoTrueWhen some requests in the Pycurl environment may cause Request errors,
    automatically modify the conflict settings and resend the request
    DNS_SERVERNo""Use specified DNS for resolution via Curl (only supports Pycurl environment),
    such as 8.8.8.8
    CURL_ENCODINGNoTrueWhether to allow to use Curl for Encoding operation
    CURL_CONTENT_LENGTHNoTrueWhether to allow Curl to use custom Content-Length request in Headers
    NOT_RETRY_CODENoSee configuration for details...See configuration for details...
    EMPTY_RETRYNoTrueSee configuration for details...
    USER0ISADMINNoTrueThe first registered user is an administrator, False to close
    EXTRA_ONNX_NAMENo""Customize the ONNX file name in the config directory
    (do not fill in the ".onnx" suffix)
    Separate multiple onnx file names with "|"
    EXTRA_CHARSETS_NAMENo""Custom ONNX in the config directory corresponds to the custom charsets.json file name
    (do not fill in the ".json" suffix)
    Multiple json file names are separated by "|"
    WS_PING_INTERVALNo5WebSocket ping interval, the default is 5 seconds
    WS_PING_TIMEOUTNo30WebSocket ping timeout, the default is 30 seconds
    WS_MAX_MESSAGE_SIZENo10485760WebSocket maximum message size, the default is 10485760 bytes
    WS_MAX_QUEUE_SIZENo100WebSocket maximum queue size, the default is 100
    WS_MAX_CONNECTIONS_SUBSCRIBENo30WebSocket subscribe page maximum number of connections, the default is 30
    SUBSCRIBE_ACCELERATE_URLNojsdelivr_cdnSubscribe page acceleration URL, the default is jsdelivr_cdn,
    See configuration for details...

    For details, please refer to config.py

    - diff --git a/guide/faq.html b/guide/faq.html index 25304bce816..49aaeeb4351 100644 --- a/guide/faq.html +++ b/guide/faq.html @@ -44,7 +44,7 @@ proxy_set_header X-Forwarded-Proto $scheme; } } - diff --git a/guide/how-to-use.html b/guide/how-to-use.html index 43e3da8fa64..df3e7ff6ca3 100644 --- a/guide/how-to-use.html +++ b/guide/how-to-use.html @@ -17,7 +17,7 @@
    Skip to content
    On this page

    How to Use?

    Har Obtain

    1. What is HAR?

    HAR: https://toolbox.googleapps.com/apps/har_analyzer/?lang=

    2. Packet capture

    2.1. Chrome or Edge

    1. Press F12, Ctrl + Shift + I, or from the Chrome menu select More tools > Developer tools.
    2. From the panel that opens at the bottom of your screen, select the Network tab.
    3. Make sure the Record button in the upper left corner of the Network tab is shown in red.
    4. If it's grey, click it once to start recording.
    5. Check the box next to Preserve log. Preserve log
    6. Click the Clear button to clear out any existing logs from the Network tab.
    7. Now try to reproduce the task you were trying to do.
    8. Once you have reproduced the task, right-click anywhere on the grid of network requests.
    9. Select Save as HAR with Content. Save as HAR with Content
    10. Save the file to your computer.

    2.2. Firefox

    1. Press F12 ​(or Go to Tools > Web Developer > Network).
    2. Now try to reproduce the task you were trying to do.
    3. Right-click on the loaded results.
    4. Select Save all as har.

    2.3. Windows - Fiddler

    1. Open Fiddler, open the Tools menu, select Options.
    2. Select the HTTPS tab, check Capture HTTPS Connects.
    3. Select the Connections tab, check Decrypt HTTPS traffic.
    4. Now try to reproduce the task you were trying to do.
    5. export to HAR format - please select HTTPArchive as the export method.

    2.4. IOS - Stream

    1. Open Stream.
    2. Before capture the HTTPS request, you need to install the CA certificate, setting > General > About > Certificate Trust Settings to trust the CA certificate.
    3. Click the start packet capture button, the phone will automatically pop up the VPN configuration window, and then select Allow.
    4. Now try to reproduce the task you were trying to do.
    5. On the app page, click Stop Capture to end this capture.
    6. export the HAR file.

    3. Community HAR

    1. Click the Community Template button to the right of my template.
    2. Update the repository to get the latest HAR file list.
    3. Select the HAR file you want to use and click the Subscribe button to subscribe to the template.
    4. Modify the template according to your needs.
    5. Then jump to step 5 of 3. Edit the template to continue editing.

    Upload the HAR file

    1. Access and login to QD framework.
    2. Click the + button to the right of my template.
    3. Upload the HAR file you just saved.
    4. Click upload to continue.

    Edit the template

    1. Replace the username, password, cookie, header and other parts that change according to the user with a template similar to {{ username }}. (templates support jinja2 syntax)
    2. Use the test panel in request editing to test whether the template is returned correctly, use the correct and wrong user names to test。
    3. Fill in success/failure assertion, which helps to detect sign-in failures and template failures.
    4. When some data from the previous request is needed in the request, variable extraction is used to extract the data through regularization and save it in the environment variable. Use ab(\w+)cd, the group selector, to select part of it.
    5. Use __log__ to extract task logs.
    6. When all request edits are complete, use Test next to the Download button to test the overall.
    7. The template being edited will be automatically saved in the browser cache, so don't worry about losing it.
    8. Click the Save button to save the template.
    9. Click the Download button to download the template.

    Create scheduled task

    1. Click the + button to the right of my task.
    2. Select the template you just created.
    3. Fill in the task variables, task interval, task group and task execution time.
    4. Click the Test button to test the task.
    5. Click the Save button to save the task.

    Released under the MIT License.

    - diff --git a/guide/update.html b/guide/update.html index 9eb761be900..75cbfdfd4f0 100644 --- a/guide/update.html +++ b/guide/update.html @@ -25,7 +25,7 @@ # docker exec -it "container name" /bin/sh wget https://gitee.com/qd-today/qd/raw/master/update.sh -O ./update.sh && \ sh ./update.sh -f - diff --git a/guide/what-is-qd.html b/guide/what-is-qd.html index ea7526861a9..1cde0a4e26a 100644 --- a/guide/what-is-qd.html +++ b/guide/what-is-qd.html @@ -16,7 +16,7 @@
    Skip to content
    On this page

    What is QD?

    QD is a web framework for HTTP timed task automation base on HAR Editor and Tornado Server.

    Features

    • Har-based: By simply uploading Har obtained through packet capture, you can create HTTP task template required by the framework.
    • Tornado Server: Use Tornado as a server to asynchronously respond to front-end and initiate HTTP requests.
    • API & Plugin Support: Various APIs and filters are built in for template creation, and custom plugins will be provided later.
    • Open source: QD is an open source project based on the MIT license.

    How to deploy

    Please refer: Deployment

    How to use

    Please refer: How to use

    How to Update

    Please refer: Update

    Discussion

    Released under the MIT License.

    - diff --git a/hashmap.json b/hashmap.json index f8237129664..ff017b3c4ac 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"guide_deployment.md":"df1605f6","guide_how-to-use.md":"4ee6e35b","index.md":"4f08d380","guide_faq.md":"b338d96d","guide_update.md":"b3da2bcd","guide_what-is-qd.md":"914769b2","toolbox_pusher.md":"ffb35ca2","zh_cn_guide_what-is-qd.md":"0c57a771","zh_cn_toolbox_pusher.md":"3577463c","zh_cn_guide_how-to-use.md":"7d8d7f5f","zh_cn_guide_deployment.md":"0122de01","zh_cn_index.md":"58b391dd","zh_cn_guide_update.md":"859c4a2e","zh_cn_guide_faq.md":"21f79509"} +{"guide_faq.md":"b338d96d","guide_update.md":"b3da2bcd","guide_what-is-qd.md":"914769b2","toolbox_pusher.md":"ffb35ca2","zh_cn_guide_deployment.md":"0122de01","zh_cn_guide_faq.md":"21f79509","index.md":"4f08d380","zh_cn_guide_update.md":"859c4a2e","zh_cn_guide_what-is-qd.md":"0c57a771","zh_cn_index.md":"58b391dd","zh_cn_toolbox_pusher.md":"3577463c","guide_how-to-use.md":"4ee6e35b","guide_deployment.md":"df1605f6","zh_cn_guide_how-to-use.md":"7d8d7f5f"} diff --git a/index.html b/index.html index f358906b0a4..c2e46298f93 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@
    Skip to content

    QD

    A web framework for HTTP timed task automation.

    QD

    Har-based

    By simply uploading Har obtained through packet capture, you can create HTTP task template required by the framework.

    Tornado Server

    Use Tornado as a server to asynchronously respond to front-end and initiate HTTP requests.

    API & Plugin Support

    Various APIs and filters are built in for template creation, and custom plugins will be provided later.

    Open source

    QD is an open source project based on the MIT license.

    Released under the MIT License.

    - diff --git a/toolbox/pusher.html b/toolbox/pusher.html index 3d51a86bd39..d21300b8150 100644 --- a/toolbox/pusher.html +++ b/toolbox/pusher.html @@ -28,7 +28,7 @@ proxy_pass https://qyapi.weixin.qq.com/; } }

    WeCom Webhook Push

    WeCom Webhook push needs to set parameters in Toolbox->Push Registration:

    Parameter nameRequiredDefaultDescription
    QYWX_WebHook_KeyTrue""WeCom Webhook Key,
    Can be obtained in WeCom

    Custom Push

    Custom push supports GET and POST push methods, using {log} and {t} to represent the log and title to be replaced.

    Custom push needs to set parameters in Toolbox->Push Registration:

    Custom Get Push

    Parameter nameRequiredDefaultDescription
    URLTrue""Custom Get push address,
    For example, https://example.com/push?log={log}&t={t}
    GET_HeaderFalse""Custom Get push Header,
    Use json format (double quotes), the format is { "key1": "value1", "key2": "value2" },
    If left blank, the Header is not set

    Custom Post Push

    Parameter nameRequiredDefaultDescription
    URLTrue""Custom Post push address,
    For example, https://example.com/push
    POST_HeaderFalse""Custom Post push Header,
    Use json format (double quotes), the format is { "key1": "value1", "key2": "value2" },
    For example, { "key1": "{log}", "key2": "{t}" },
    If left blank, the Header is not set
    POST_DataFalse""Custom Post push Body,
    Use json format (double quotes),
    For example, { "key1": "{log}", "key2": "{t}" },
    If left blank, the Body is not set

    Push Settings

    After registering the push method in Toolbox->Push Registration, you can set the trigger conditions of the push method in Toolbox->Push Settings.

    In Push Settings, you can set the push switch of each task, the task result push channel, the task result notification selection, and the task result batch push.

    Task Result Push Channel

    The task result push channel is used to set the task result push channel. The task result push channel includes the following:

    Task Result Notification Selection

    The task result notification selection is used to set when to push the task result. The task result notification selection includes the following:

    Notify after automatic error can be set to push notifications after automatic execution fails several times. For example, if set to 3, the notification will be pushed after automatic execution fails 3 times.

    Task Result Batch Push

    The task result batch push is used to set the batch push of the task result. When Enable batch push is turned on, the task result within the specified time interval before the current push time will be batch pushed according to the Batch push time setting and Batch push time interval when the task result is pushed.

    - diff --git a/zh_CN/guide/deployment.html b/zh_CN/guide/deployment.html index c7665ec98c8..5313b008b4a 100644 --- a/zh_CN/guide/deployment.html +++ b/zh_CN/guide/deployment.html @@ -30,7 +30,7 @@ # 根据需求和配置说明修改配置文件或环境变量值 vi local_config.py
  • 启动

    sh
    python ./run.py
  • 访问

    sh
    # 访问网页
     http://localhost:8923/

    如果您使用的是源码部署方式,请手动将模板中 http://localhost/ 形式的 api 请求改为 api://http://localhost:8923/ ,以便正确完成相关API 请求。

    模板需要发布才会在「公开模板」中展示, 你需要管理员权限在「我的发布请求」中审批通过。

  • 设置管理员

    sh
    python ./chrole.py your@email.address admin

    首位注册用户默认为管理员, 需要先登出再登陆后才能获得完整管理员权限

    配置环境变量

    变量名是否必须默认值说明
    BIND0.0.0.0监听地址
    PORT8923监听端口
    QD_DEBUGFalse是否启用Debug模式
    WORKER_METHODQueue任务定时执行方式,
    默认为 Queue, 可选 Queue 或 Batch,
    Batch 模式为旧版定时任务执行方式, 性能较弱,
    建议仅当 Queue 定时执行模式失效时使用
    MULTI_PROCESSFalse(实验性)是否启用多进程模式,
    Windows平台无效
    AUTO_RELOADFalse是否启用自动热加载,
    MULTI_PROCESS=True时无效
    STATIC_URL_PREFIX/static/静态文件URL前缀
    DOMAIN''指定访问域名,
    (建议修改), 否则通过邮件重置密码及邮箱推送等功能无效
    AES_KEYbinuxAES加密密钥, (强烈建议修改)
    COOKIE_SECRETbinuxcookie加密密钥, (强烈建议修改)
    COOKIE_DAY5Cookie在客户端中保留的天数
    DB_TYPEsqlite3需要使用MySQL时设置为'mysql'
    JAWSDB_MARIA_URL''需要使用MySQL时,
    设置为 (mysql://用户名:密码@hostname:port/数据库名?auth_plugin=)
    QD_SQL_ECHOFalse是否启用 SQLAlchmey 的日志输出, 默认为 False,
    设置为 True 时, 会在控制台输出 SQL 语句,
    允许设置为 debug 以启用 debug 模式
    QD_SQL_LOGGING_NAMEQD.sql_engineSQLAlchmey 日志名称, 默认为 'QD.sql_engine'
    QD_SQL_LOGGING_LEVELWarningSQLAlchmey 日志级别, 默认为 'Warning'
    QD_SQL_ECHO_POOLTrue是否启用 SQLAlchmey 的连接池日志输出, 默认为 True,
    允许设置为 debug 以启用 debug 模式
    QD_SQL_LOGGING_POOL_NAMEQD.sql_poolSQLAlchmey 连接池日志名称, 默认为 'QD.sql_pool'
    QD_SQL_LOGGING_POOL_LEVELWarningSQLAlchmey 连接池日志级别, 默认为 'Warning'
    QD_SQL_POOL_SIZE10SQLAlchmey 连接池大小, 默认为 10
    QD_SQL_MAX_OVERFLOW50SQLAlchmey 连接池最大溢出, 默认为 50
    QD_SQL_POOL_PRE_PINGTrue是否在连接池获取连接前,
    先ping一下, 默认为 True
    QD_SQL_POOL_RECYCLE3600SQLAlchmey 连接池回收时间, 默认为 3600
    QD_SQL_POOL_TIMEOUT60SQLAlchmey 连接池超时时间, 默认为 60
    QD_SQL_POOL_USE_LIFOTrueSQLAlchmey 是否使用 LIFO 算法, 默认为 True
    REDISCLOUD_URL''需要使用Redis或RedisCloud时,
    设置为 http://rediscloud:密码@hostname:port
    REDIS_DB_INDEX1默认为1
    QD_EVIL500(限Redis连接已开启)登录用户或IP在1小时内
    分数 = 操作失败(如登录, 验证, 测试等操作)次数 * 相应惩罚分值
    分数达到evil上限后自动封禁直至下一小时周期
    EVIL_PASS_LAN_IPTrue是否关闭本机私有IP地址用户及Localhost_API请求的evil限制
    TRACEBACK_PRINTFalse是否启用在控制台日志中打印Exception的TraceBack信息
    PUSH_PIC_URLpush_pic.png默认为push_pic.png
    PUSH_BATCH_SWTrue是否允许开启定期推送 QD 任务日志, 默认为True
    MAIL_SMTP""邮箱SMTP服务器
    MAIL_PORT465邮箱SMTP服务器端口
    MAIL_USER""邮箱用户名
    MAIL_PASSWORD""邮箱密码
    MAIL_FROMMAIL_USER发送时使用的邮箱,默认与MAIL_USER相同
    MAIL_DOMAIN_HTTPSFalse发送的邮件链接启用HTTPS,
    非框架前端使用HTTPS,
    如果前端需要HTTPS, 请使用反向代理.
    PROXIES""全局代理域名列表,用"
    PROXY_DIRECT_MODE""全局代理黑名单模式,默认不启用
    "url"为网址匹配模式;"regexp"为正则表达式匹配模式
    PROXY_DIRECT""全局代理黑名单匹配规则
    NEW_TASK_DELAY1新建任务后准备时间, 单位为秒, 默认为1秒
    TASK_WHILE_LOOP_TIMEOUT900任务运行中单个 While 循环最大运行时间,
    单位为秒, 默认为 15 分钟
    TASK_REQUEST_LIMIT1500任务运行中单个任务最大请求次数,
    默认为 1500 次
    USE_PYCURLTrue是否启用Pycurl模组
    ALLOW_RETRYTrue在Pycurl环境下部分请求可能导致Request错误时,
    自动修改冲突设置并重发请求
    DNS_SERVER""通过Curl使用指定DNS进行解析(仅支持Pycurl环境),
    如 8.8.8.8
    CURL_ENCODINGTrue是否允许使用Curl进行Encoding操作
    CURL_CONTENT_LENGTHTrue是否允许Curl使用Headers中自定义Content-Length请求
    NOT_RETRY_CODE详见配置...详见配置...
    EMPTY_RETRYTrue详见配置...
    USER0ISADMINTrue第一个注册用户为管理员,False关闭
    EXTRA_ONNX_NAME""config目录下自定义ONNX文件名
    (不填 ".onnx" 后缀)
    多个onnx文件名用"|"分隔
    EXTRA_CHARSETS_NAME""config目录下自定义ONNX对应自定义charsets.json文件名
    (不填 ".json" 后缀)
    多个json文件名用"|"分隔
    WS_PING_INTERVALNo5WebSocket ping间隔, 单位为秒, 默认为 5s
    WS_PING_TIMEOUTNo30WebSocket ping超时时间, 单位为秒, 默认为 30s
    WS_MAX_MESSAGE_SIZENo10485760WebSocket 单次接收最大消息大小, 默认为 10MB
    WS_MAX_QUEUE_SIZENo100WebSocket 最大消息队列大小, 默认为 100
    WS_MAX_CONNECTIONS_SUBSCRIBENo30WebSocket 公共模板更新页面最大连接数, 默认为 30
    SUBSCRIBE_ACCELERATE_URLNojsdelivr_cdn订阅加速方式或地址, 用于加速公共模板更新, 仅适用于 GitHub.
    详见配置...

    详细信息请查阅config.py

    - diff --git a/zh_CN/guide/faq.html b/zh_CN/guide/faq.html index 8a6aee86ffd..9fdd0e21628 100644 --- a/zh_CN/guide/faq.html +++ b/zh_CN/guide/faq.html @@ -46,7 +46,7 @@ # 其他可选配置 结束 } } - diff --git a/zh_CN/guide/how-to-use.html b/zh_CN/guide/how-to-use.html index 4fee7ab5fe5..194471b6903 100644 --- a/zh_CN/guide/how-to-use.html +++ b/zh_CN/guide/how-to-use.html @@ -17,7 +17,7 @@
    Skip to content
    页面导航

    如何使用?

    获取 HAR

    1. 什么是 HAR?

    HAR:https://toolbox.googleapps.com/apps/har_analyzer/?lang=zh_CN

    2. 抓包

    2.1. Chrome 或 Edge

    1. F12Ctrl + Shift + I ,或从 Chrome 菜单中选择 更多工具 > 开发者工具
    2. 从屏幕底部或右侧打开的面板中,选择 网络 选项卡。
    3. 确保 网络 选项卡左上角的 录制 按钮显示为 红色
    4. 如果它是灰色的,单击一下开始录制。
    5. 选中 保留日志 旁边的框。 Preserve log
    6. 单击 清除 按钮以清除 网络 选项卡中的所有现有日志。
    7. 现在尝试重现您计划发起的 HTTP 请求。
    8. 重现任务后,右键单击网络请求网格上的任意位置。
    9. 选择 另存为带内容的 HARSave as HAR with Content
    10. 将文件保存到您的计算机。

    2.2. 火狐

    1. F12 (或转到 Tools > Web Developer > Network )。
    2. 现在尝试重现您计划发起的 HTTP 请求。
    3. 右键单击​​加载的结果。
    4. 选择全部另存为 har。

    2.3. Windows - Fiddler

    1. 打开 Fiddler,打开 Tools 菜单,选择 Options
    2. 选择 HTTPS 选项卡 ,勾选 Capture HTTPS Connects
    3. 选择 连接 选项卡,选中 解密 HTTPS 流量
    4. 现在尝试重现您计划发起的 HTTP 请求。
    5. 导出为 HAR 格式 - 请选择 HTTPArchive 作为导出方式。

    2.4. IOS - Stream

    1. 打开 Stream。
    2. 抓取HTTPS请求前,需要安装CA证书, setting > General > About > Certificate Trust Settings 信任CA证书。
    3. 点击开始抓包按钮,手机会自动弹出VPN配置窗口,然后选择允许。
    4. 现在尝试重现您计划发起的 HTTP 请求。
    5. 在应用页面,点击停止抓拍结束本次抓拍。
    6. 导出HAR文件。

    3. 公共模板

    1. 点击 我的模板 右侧的 社区模板 按钮。
    2. 更新存储库以获取最新的 HAR 文件列表。
    3. 选择你要使用的HAR文件,点击 Subscribe 按钮订阅模板。
    4. 根据需要修改模板。
    5. 然后跳到 3.编辑模板 继续编辑。

    上传 HAR 文件

    1. 访问并登录 QD 首页。
    2. 点击 我的模板 右侧的 + 按钮。
    3. 上传刚刚保存的 HAR 文件。
    4. 点击 上传 继续。

    编辑模板

    1. 将用户名、密码、cookie、header 等根据用户变化的部分替换成类似 {{ username }} 的模板。(模板支持 jinja2 语法
    2. 在请求编辑中使用测试面板测试模板是否正确返回,使用正确和错误的用户名进行测试。
    3. 填写 成功/失败断言,这有助于检测模板任务是否运行失败。
    4. 当请求中需要上一次请求的一些数据时,使用变量抽取,通过正则化抽取数据,保存在环境变量中。使用组选择器 ab(\w+)cd 选择其中的一部分。
    5. 使用 __log__ 提取任务日志。
    6. 当所有请求编辑完成后,使用下载按钮旁边的 测试 来测试整体。
    7. 正在编辑的模板会自动保存在浏览器缓存中,不用担心丢失。
    8. 单击 保存 按钮保存模板。
    9. 单击 下载 按钮下载模板。

    创建定时任务

    1. 点击 我的任务 右侧的 + 按钮。
    2. 选择刚刚创建的模板。
    3. 填写任务变量,任务间隔、任务组和任务执行时间。
    4. 单击 测试 按钮测试任务。
    5. 单击保存按钮保存任务。

    基于 MIT 许可证发布.

    - diff --git a/zh_CN/guide/update.html b/zh_CN/guide/update.html index 089987b72b6..4932ec1e320 100644 --- a/zh_CN/guide/update.html +++ b/zh_CN/guide/update.html @@ -25,7 +25,7 @@ sh /usr/src/app/update.sh

    强制同步最新源码

    sh
    # 先 cd 到仓库代码根目录, 执行命令后重启进程
     wget https://gitee.com/qd-today/qd/raw/master/update.sh -O ./update.sh && \
     sh ./update.sh -f
    - diff --git a/zh_CN/guide/what-is-qd.html b/zh_CN/guide/what-is-qd.html index 88fa93afd0f..761962d163e 100644 --- a/zh_CN/guide/what-is-qd.html +++ b/zh_CN/guide/what-is-qd.html @@ -16,7 +16,7 @@
    Skip to content
    页面导航

    什么是 QD?

    QD 是 一个 基于 HAR 编辑器和 Tornado 服务端的 HTTP 定时任务自动执行 Web 框架。

    特性

    • 基于Har: 仅需上传通过抓包得到的 Har, 即可制作框架所需的 HTTP 任务模板。
    • Tornado 服务端: 使用 Tornado 作为服务端, 以实现异步响应前端和发起 HTTP 请求。
    • API & 插件支持: 内置多种 API 和过滤器用于模板制作, 后续将提供自定义插件支持。
    • 开源: QD 是一个基于 MIT 许可证的开源项目。

    如何部署

    请参考: 部署

    如何使用

    请参考: 如何使用

    如何更新

    请参考: 更新

    讨论

    基于 MIT 许可证发布.

    - diff --git a/zh_CN/index.html b/zh_CN/index.html index 4a6c09e6228..bb2b2f17e2b 100644 --- a/zh_CN/index.html +++ b/zh_CN/index.html @@ -16,7 +16,7 @@
    Skip to content

    QD

    一个 HTTP 定时任务自动执行 Web 框架

    QD

    基于Har

    仅需上传通过抓包得到的 Har, 即可制作框架所需的 HTTP 任务模板。

    Tornado 服务端

    使用 Tornado 作为服务端, 以实现异步响应前端请求和发起 HTTP 请求。

    API & 插件支持

    内置多种 API 和过滤器用于模板制作, 后续将提供自定义插件支持。

    开源项目

    QD 是一个基于 MIT 许可证的开源项目。

    基于 MIT 许可证发布.

    - diff --git a/zh_CN/toolbox/pusher.html b/zh_CN/toolbox/pusher.html index b5216cba17f..d891593a872 100644 --- a/zh_CN/toolbox/pusher.html +++ b/zh_CN/toolbox/pusher.html @@ -28,7 +28,7 @@ proxy_pass https://qyapi.weixin.qq.com/; } }

    企业微信 Webhook 推送

    企业微信 Webhook 推送需要在 工具箱->推送注册 中设置参数:

    参数名是否必须默认值说明
    QYWX_WebHook_Key""企业微信 Webhook Key,
    可在 企业微信 中获取

    自定义推送

    自定义推送支持 GETPOST 推送方式, 使用 {log}{t} 表示要替换的日志和标题.

    自定义推送需要在 工具箱->推送注册 中设置参数:

    自定义 Get 推送

    参数名是否必须默认值说明
    URL""自定义 Get 推送地址,
    例如 https://example.com/push?log={log}&t={t}
    GET_Header""自定义 Get 推送 Header,
    使用 json 格式(半角双引号), 格式为 { "key1": "value1", "key2": "value2" },
    如果留空, 则不设置 Header

    自定义 Post 推送

    参数名是否必须默认值说明
    URL""自定义 Post 推送地址,
    例如 https://example.com/push
    POST_Header""自定义 Post 推送 Header,
    使用 json 格式(半角双引号), 格式为 { "key1": "value1", "key2": "value2" },
    如果留空, 则不设置 Header
    POST_Data""自定义 Post 推送 Body,
    使用 json 格式(半角双引号),
    例如 { "key1": "{log}", "key2": "{t}" },
    如果留空, 则不设置 Body

    推送设置

    工具箱->推送注册 中注册推送方式后, 可以在 工具箱->推送设置 中设置推送方式的触发条件.

    推送设置 中, 可以设置每个任务的推送开关, 任务结果推送渠道, 任务结果通知选择, 任务结果批量推送等.

    任务结果推送渠道

    用于设置任务结果推送渠道, 任务结果推送渠道包括以下几种:

    任务结果通知选择

    用于设置在何时推送任务结果, 任务结果通知选择包括以下几种:

    自动错误几次后提醒 可以设置在自动执行失败几次后推送通知, 例如设置为 3 , 则当自动执行失败 3 次后, 会推送通知.

    任务结果批量推送

    开启定期批量推送 时, 会根据 批量推送时间设置批量推送时间间隔 来批量推送距离本次推送时间前指定时间间隔内的任务结果.

    -