Commit 1cf17d8
committed
fix: improve network connectivity and simplify proxy handling on JVM
- Set JVM DNS cache TTL to 30 seconds for positive lookups and 5 seconds for negative lookups to ensure network changes (like VPN toggles) are detected quickly.
- Refactor `createPlatformHttpClient` to simplify proxy configuration using OkHttp's native capabilities.
- Replace manual system proxy parsing with `proxySelector(ProxySelector.getDefault())` for `ProxyConfig.System`.
- Explicitly set `Proxy.NO_PROXY` when no proxy is configured.
- Remove redundant URI parsing and manual address mapping logic for system-level proxy detection.1 parent 725ffd8 commit 1cf17d8
2 files changed
Lines changed: 22 additions & 40 deletions
File tree
- composeApp/src/jvmMain/kotlin/zed/rainxch/githubstore
- core/data/src/jvmMain/kotlin/zed/rainxch/core/data/network
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| |||
Lines changed: 16 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | | - | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
49 | 24 | | |
| 25 | + | |
50 | 26 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
54 | 30 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 31 | + | |
| 32 | + | |
58 | 33 | | |
| 34 | + | |
59 | 35 | | |
60 | 36 | | |
0 commit comments