![](https://habrastorage.org/webt/w8/qs/tf/w8qstfoidq56-ujjy-7ledmu9_w.jpeg)
Olá Habr! Meu nome é Nastya, trabalho na equipe de teste de aplicativos móveis da FunCorp.
- . , , , . .
, , , , Rewrite Breakpoints.
, Funorp Charles Proxy.
, , .
1: , . , .
2: push-. , . , . : , .
? , . 500, , . API, . , , , .
? , .
FunCorp?
Charles Proxy Funorp -. , . , .
. -, , SSL-, . -, , , , .
1. , ,
, Charles , .
- Charles Proxy.
- SSL- . chls.pro/ssl .
- iOS : General -> About -> Trust Certificates. Android 7.0 network_security_config. .
- Charles:
- c Charles Wi-Fi , Wi-Fi , -: IP- , Charles, Server (Hostname), 8888;
- Charles , Wi-Fi, ;
- Charles , , (), Port Forwarding . « < >».
- , Charles .
- SSL Proxying Settings .
: Charles, , .
![](https://habrastorage.org/webt/qv/87/uv/qv87uvchks2uxkasnqmr3mf4we0.png)
1: Charles. , .
![](https://habrastorage.org/webt/48/h_/_m/48h__mshwvexqumz35o00na5wom.png)
2: , .. (Twitter, Facebook, .), — Charles .
.
Structure view + Focus Mode
Structure view , , . . . Overview , , , Contents , .
Focused Mode. , , Focus.
![](https://habrastorage.org/webt/cg/jc/vr/cgjcvraievuskai7-tx5k6znyk4.png)
, Focus, . Other Hosts.
![](https://habrastorage.org/webt/dg/e-/ma/dge-mavvtewp7redlvtb7z-2xq0.png)
: Charles , , , .
, . . , , . Sequence view.
Sequence view
Sequence , , . , .
. : , , , , ( ), , IP- , , Charles .
/. , SDK .
New Custom Header Column. .
Focused , Structure view.
![](https://habrastorage.org/webt/fj/y4/ux/fjy4uxf9-dbwfibbykec0jxcwe8.png)
— Focused . Settings :
![](https://habrastorage.org/webt/m7/rv/qx/m7rvqxodqi37hnkywp4zvcokqvo.png)
, , , , , Focused.
![](https://habrastorage.org/webt/3f/_a/wl/3f_awlxkejgbk8hz3um7-2tdwuy.png)
, :
- URL.
- .
- .
- , .
- .
- , .
- ( ).
- ( ) .
:
2. API
, API, . developer mode, API, .
, URL , — https://api-1111.ifunny.mobi, URL API — https://api.ifunny.mobi.
Charles .
Map Remote
Map Remote URL (Map From) (Map To). , ( ).
Map Remote . Map Remote, Tools: Map Remote macOS (⌘⌥M). Charles.
![](https://habrastorage.org/webt/ol/gb/js/olgbjsa6905wzwfgtwf90irep2m.png)
![](https://habrastorage.org/webt/sz/kn/7i/szkn7iwdn8jvmfvvipsaghw1v4e.png)
: Charles URL . URL Host, Tab. Protocol, Port, Path, Query .
Rewrite
Rewrite — Charles. 30 (Rewrite sets) (Rewrite rules).
Rewrite Tools -> Rewrite ( macOS — ⌘⌥R). Rewrite set (1), (2). Rewrite sets , . (Location) , . Location (3).
![](https://habrastorage.org/webt/ot/_7/yf/ot_7yfg0ijgvfz_g8m0oj8psdjw.png)
, (4). , .
![](https://habrastorage.org/webt/w-/ea/8_/w-ea8_mmbdpdtykasq-exew8dy4.png)
Rewrite — : (header rules), (URL), (query parameter rules) (body rules).
, , . (Type).
: (Request), (Response) , . -.
Rewrite. Match, , Replace. , — -. Match , . Host Body.
« » (Replace First), Rewrite . .
API Type: Host. :
![](https://habrastorage.org/webt/9c/-p/cz/9c-pczpfew8kbb0eetxwb9zixdg.png)
Match, Location, , Value .
3.
, , . , , , .
, :
- ;
- : 500, 503;
- : 403, 404;
- ;
- , .
:
- URL, , URL.
- — Rewrite Response Status.
. Replace :
![](https://habrastorage.org/webt/jt/gs/dy/jtgsdy9betm6gh7dczgkfjtooym.png)
- 403 Block list ( macOS — ⌘⌥B), Allow list ( macOS — ⌘⌥W).
Block Lists, Allow Lists
Block List URL, 403 . :
![](https://habrastorage.org/webt/em/fh/rw/emfhrwmfm4goumtufhxgpnfueic.png)
Allow list : URL, . 403 .
4.
, : . , .
, , . ? .
Map Local
Map Local (⌘⌥L). , , . , , , / (json, xml .., ). , Map Local.
![](https://habrastorage.org/webt/ad/7y/ei/ad7yei-v2-rzohb4r_lmlx79gja.png)
Rewrite. Type: Body, Match , . Value Replace, .
/ Rewrite .
, - , -. Match , «-» API , Replace — .
5. .
, WiFi, . , usability , , ?
(⇧⌘T) Charles :
![](https://habrastorage.org/webt/wj/w6/oh/wjw6ohebjwdl4jhgi7fs3rvzhme.png)
, , Breakpoints (⇧⌘K).
: .
Charles — . « Charles». Rewrite, .
Breakpoints , . — , . — . , . .
Rewrite
? , , . , .
- , , :
- , .
- .
- .
, ID . ID, . ID your_var, your_var -.
![](https://habrastorage.org/webt/gy/xc/a4/gyxca4rlg7rt39bkqrqxw9pfagy.png)
- , .
1: , , , , .
2: « , Rewrite ».
, Rewrite , Overview Notes:
![](https://habrastorage.org/webt/vc/8i/di/vc8idi8_a0zn0tkhmkccxfectcg.png)
Charles Rewrite:
![](https://habrastorage.org/webt/za/7i/k-/za7ik-rhsmvupiutwiwy3hmjh2w.png)
Window -> Error Log . , : , , Rewrite.
![](https://habrastorage.org/webt/xh/b3/jk/xhb3jkxrn8ps1fvvzfgicve8qwg.png)
, Rewrite . - , , .
Location.
, - .
, -. Charles macOS: , , .
Auto save
Charles — , . , . - , . , .
Tools -> Auto Save (⌘⌥A), chls-. , Charles .
![](https://habrastorage.org/webt/uo/zz/qg/uozzqgdfcnwyj7am8xvv5087gtu.png)
Mirror
— Mirror (⌘⌥I). , Charles. , . , , Map Local.
![](https://habrastorage.org/webt/zj/nm/m8/zjnmm85muphowtijiwsatwxydqc.png)
. Charles Proxy ( ) , Funorp. - , , , , .
: - .