Skip to content

Instantly share code, notes, and snippets.

@wangjiezhe
Last active September 19, 2024 09:07
Show Gist options
  • Select an option

  • Save wangjiezhe/24d5084ff02e1bf8d9b5374f9e0140c0 to your computer and use it in GitHub Desktop.

Select an option

Save wangjiezhe/24d5084ff02e1bf8d9b5374f9e0140c0 to your computer and use it in GitHub Desktop.

Revisions

  1. wangjiezhe revised this gist Sep 19, 2024. 2 changed files with 7 additions and 3 deletions.
    4 changes: 4 additions & 0 deletions AdGuardHome.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    dns:
    rewrites:
    - domain: dzsms.gwm.com.cn
    answer: **.**.**.**
    6 changes: 3 additions & 3 deletions dns.Caddyfile
    Original file line number Diff line number Diff line change
    @@ -25,8 +25,8 @@ dzsms.gwm.com.cn {
    "apk_forceUpdate": "Yes",
    "notice": {
    "vin_notice": [
    "VIN码可以在仪表板左上方(前风挡玻璃后面)和车辆铭牌上获得。",
    "本应用适用于2019年及之后生产的车型。"
    "VIN码可以在仪表板左上方(前风挡玻璃后面)和车辆铭牌上获得。",
    "本应用适用于2019年及之后生产的车型。"
    ],
    "add_notice": [
    "制造年月可通过车辆铭牌获得。",
    @@ -36,7 +36,7 @@ dzsms.gwm.com.cn {
    "notice_en": {
    "vin_notice": [],
    "add_notice": [
    "The date can be obtained from the certification label."
    "The date can be obtained from the certification label."
    ]
    }
    }
  2. wangjiezhe created this gist Sep 19, 2024.
    46 changes: 46 additions & 0 deletions dns.Caddyfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    dns.domain.ltd {
    # cert setting missing

    handle {
    # reverse_proxy :3003 {
    reverse_proxy :8800 {
    header_up X-Real-IP {http.request.remote}
    }
    }
    }

    dzsms.gwm.com.cn {
    tls internal
    handle /apiv2/car_apk_update {
    header Content-Type application/json
    respond 200 {
    body ` {
    "code": 200,
    "message": "查询成功",
    "data": {
    "apk_version": "99999",
    "apk_url": "https://download.domain.ltd/test.apk",
    "apk_msg": "恭喜成功",
    "isUpdate": "Yes",
    "apk_forceUpdate": "Yes",
    "notice": {
    "vin_notice": [
    "VIN码可以在仪表板左上方(前风挡玻璃后面)和车辆铭牌上获得。",
    "本应用适用于2019年及之后生产的车型。"
    ],
    "add_notice": [
    "制造年月可通过车辆铭牌获得。",
    "本应用适用于2019年及之后生产的车型。"
    ]
    } ,
    "notice_en": {
    "vin_notice": [],
    "add_notice": [
    "The date can be obtained from the certification label."
    ]
    }
    }
    } `
    }
    }
    }