Commit 69a5061
committed
fix: apply protocol-matched User-Agent for subscription fetches (#5)
Subscription panels (v2board/xboard/sspanel) route responses by UA.
The previous client sent no UA (default reqwest/0.12.x) so these panels
rejected the request, surfacing as "address unreachable" even though
the host was reachable (sing-box SFM with a proper UA worked fine).
- loader: apply user_agent to reqwest client; derive per-protocol
default (sing-box / mihomo / v2rayN) from source_type or flag
- config: default user_agent to empty so the per-protocol default kicks
in; non-empty config value still wins as an explicit override1 parent bf9d174 commit 69a5061
2 files changed
Lines changed: 38 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
57 | 86 | | |
58 | 87 | | |
59 | 88 | | |
| |||
151 | 180 | | |
152 | 181 | | |
153 | 182 | | |
154 | | - | |
155 | | - | |
| 183 | + | |
| 184 | + | |
156 | 185 | | |
157 | 186 | | |
158 | 187 | | |
| 188 | + | |
159 | 189 | | |
160 | 190 | | |
161 | 191 | | |
| |||
0 commit comments