-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxy.sh
More file actions
executable file
·26 lines (21 loc) · 792 Bytes
/
proxy.sh
File metadata and controls
executable file
·26 lines (21 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
export TERM=xterm
if [ -f ".env" ]; then
export $(grep -v '^#' .env | xargs)
else
echo ".env not found."
production="true"
authentification="false"
fi
if test "$authentification" = "true"; then
proxyauth="--proxyauth $username:$password"
else
proxyauth=""
fi
if test "$production" = "true"; then
echo "Run in production mode."
mitmdump -s proxy.py --listen-host 0.0.0.0 --listen-port 8302 --ssl-insecure --set confdir=./.certs --set block_global=false $proxyauth
else
echo "Run in development mode."
nodemon-py-simple -c hosts -m proxy.py "mitmweb -s proxy.py --listen-host 0.0.0.0 --listen-port 8302 --web-host 0.0.0.0 --web-port 8301 --ssl-insecure --set confdir=./.certs --no-web-open-browser --set block_global=false $proxyauth"
fi