@@ -176,30 +176,47 @@ commands:
176
176
- run :
177
177
name : Install Python3 and MITM Proxy
178
178
command : |
179
- # Detect OS and install requirements accordingly
180
- if [ "$(uname)" == "Darwin" ]; then
181
- echo "Running on macOS..."
182
- if ! command -v brew &> /dev/null; then
183
- echo "Homebrew not found. Installing Homebrew..."
184
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
185
- fi
186
- brew install python3 openssl
187
- else
188
- echo "Running on Linux..."
189
- sudo apt-get update
190
- sudo apt-get install -y python3 python3-pip openssl
191
- fi
192
-
193
- # Verify installations
194
- python3 --version
195
- pip3 --version
196
-
197
- # Upgrade pip to the latest version
198
- pip3 install --upgrade pip
199
-
200
- # Install mitmproxy version 10.2.4
201
- pip3 install mitmproxy==10.2.4
202
-
179
+ # Detect OS and install requirements accordingly
180
+ if [ "$(uname)" == "Darwin" ]; then
181
+ echo "Running on macOS..."
182
+ brew install python3 openssl
183
+ else
184
+ echo "Running on Linux..."
185
+ sudo apt-get update
186
+ sudo apt-get install -y python3 python3-pip openssl
187
+ fi
188
+
189
+ # Verify installations
190
+ python3 --version
191
+ pip3 --version
192
+
193
+ # Upgrade pip and install mitmproxy
194
+ pip3 install --upgrade pip
195
+ pip3 install mitmproxy==10.2.4
196
+
197
+ # Start mitmdump
198
+ mitmdump --set block_global=false &
199
+ sleep 10
200
+
201
+ # Create mitmproxy directory
202
+ mkdir -p ~/.mitmproxy
203
+
204
+ # Wait for certificate generation
205
+ while [ ! -f ~/.mitmproxy/mitmproxy-ca-cert.pem ]; do
206
+ sleep 2
207
+ done
208
+
209
+ # Create all required certificate formats
210
+ cd ~/.mitmproxy
211
+ # Create .cer (PEM format)
212
+ cp mitmproxy-ca-cert.pem mitmproxy-ca-cert.cer
213
+ # Create .crt (PEM format)
214
+ cp mitmproxy-ca-cert.pem mitmproxy-ca-cert.crt
215
+ # Create .der format for iOS
216
+ openssl x509 -in mitmproxy-ca-cert.pem -outform DER -out mitmproxy-ca-cert.der
217
+
218
+ echo "MITM Proxy setup completed"
219
+
203
220
setup_appium :
204
221
steps :
205
222
- run :
@@ -892,10 +909,8 @@ jobs:
892
909
app-dir : << parameters.working_directory >>
893
910
- build_and_pack_sdk :
894
911
working_directory : << parameters.working_directory >>
895
- - run :
896
- name : Install CocoaPods
897
- working_directory : <<parameters.working_directory>>/ios
898
- command : pod install
912
+ - install_pods :
913
+ working_directory : examples/hybrid/ios
899
914
- run :
900
915
name : Build iOS App
901
916
working_directory : <<parameters.working_directory>>/ios
@@ -908,13 +923,6 @@ jobs:
908
923
build
909
924
# Setup testing environment
910
925
- setup_mitm_proxy
911
- - run :
912
- name : Start MITM Proxy
913
- background : true
914
- command : |
915
- mitmdump -s ~/project/examples/hybrid/e2e/proxy-server.py -p 8082 &
916
- sleep 10
917
-
918
926
- setup_ios_proxy
919
927
- setup_appium
920
928
0 commit comments