mitm: enable: true hostnames: - '*.jd.com' - 'www.google.cn' - '*.google.com' ca: passphase: "" certificate: "" rewrite: - regex: ^https?://www.google.cn/(.*) match: url action: "302" target: https://www.google.com/$1 # redirect with params - regex: ^http://www.google.cn match: url action: "header" # rewrite request header Host target: http://www.google.com - regex: ^https?:\/\/(www.)?jd\.com\/ match: url action: "302" target: https://www.jd.com/ - regex: ^https?://(www.)?google.cn/search match: url action: "404" # response with http status code 404 target: https://www.google.com/search - regex: ^https?:\/\/.+\.googlevideo\.com\/.+&oad match: url action: reject-image # response with 1x1 pixel emtpy image target: "" - regex: ^http://www.google.cn match: url action: "reject" # close connection immediately target: ""