Skip to content

Commit

Permalink
feat: add BLOCK_GLOBAL
Browse files Browse the repository at this point in the history
  • Loading branch information
tscuite committed Apr 18, 2023
1 parent bb79c0b commit bee8ada
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deploy/mitmproxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ RUN yum -y install *epel* && yum -y install libpcap-devel \
&& ls -al /usr/lib64/libpcap.so.* \
&& ALIMARCH=`arch` && curl -L https://dongtai-helm-charts.oss-ap-northeast-1.aliyuncs.com/apk/mitmweb -o /opt/mitmweb \
&& ln -s /usr/lib64/libpcap.so.1.10.0 /usr/lib64/libpcap.so.0.8 && chmod +x /opt/mitmweb
ENTRYPOINT ./mitmweb --listen-host 0.0.0.0 --listen-port 10802 --web-host 0.0.0.0 --web-port 8000 -k -s headerannotion.py --mode upstream:http://${XRAY_URL}:9811
ENTRYPOINT ./mitmweb --set block_global=${BLOCK_GLOBAL} --listen-host 0.0.0.0 --listen-port 10802 --web-host 0.0.0.0 --web-port 8000 -k -s headerannotion.py --mode upstream:http://${XRAY_URL}:9811
6 changes: 3 additions & 3 deletions deploy/xray/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ plugins:
# 注意: 默认配置为禁用反连平台,这是无法扫描出依赖反连平台的漏洞,这些漏洞包括 fastjson,ssrf 以及 poc 中依赖反连的情况等
reverse:
db_file_path: "" # 反连平台数据库文件位置, 这是一个 KV 数据库
token: "" # 反连平台认证的 Token, 独立部署时不能为空
token: "834b8423418c2a2a311c69fb968318nw" # 反连平台认证的 Token, 独立部署时不能为空
http:
enabled: false
enabled: true
listen_ip: 0.0.0.0
listen_port: ""
listen_port: "8091"
ip_header: "" # 在哪个 http header 中取 ip,为空代表从 REMOTE_ADDR 中取
dns:
enabled: false
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
environment:
XRAY_SHELL: 'webscan --listen 0.0.0.0:9811 --webhook-output http://usb:5005/api/v1/xray'
restart: always
ports:
- '8091:8091'
networks:
network:
ipv4_address: 177.7.0.11
Expand All @@ -30,6 +32,7 @@ services:
restart: always
environment:
XRAY_URL: 'xray'
BLOCK_GLOBAL: 'false'
ports:
- '10802:10802'
- '8090:8000'
Expand Down

0 comments on commit bee8ada

Please sign in to comment.